Project 9: Sending SMS when Temperature crosses Threshold


I have type the program in a correct manner but I am unable to find out the error.
Could you help me? regarding the error in screenshot photo.

@yogamalinirajendran

Can you remove that line, and write print(data). Once you run the code, show the output.

@akshayan.sinha If I write print(data) but I got output like this…

@yogamalinirajendran

Okay. Check your Device ID, you must have put incorrect credentials.
Once you make corrections, remove print(data) and stick to the previous print statement. It’ll print the data.

Let me know if you have any more queries

@yogamalinirajendran

Is your issue resolved? Do confirm if it has.


I got error

@yogamalinirajendran

As I have already mentioned,

What is the Device ID you have put in your conf.py? Please check that.

If you feel like it is correct, send a snap of your DEVICE ID (Hide the API key).
Also send a snap of your device section in cloud.boltiot.com

@akshayan.sinha I have written a correct DEVICE ID.

Right, your device ID is correct. Matches your account.

Can you take the snap of the part mybolt = Bolt(…) ?

@akshayan.sinha yeap sure.

Can you do one more thing? Head to cloud.boltiot.com/api , There build an API request for analogRead and click on Test API.

Tell me if you get the value of the pin, or does it return something else.

@akshayan.sinha

When you write print (data), do you still get ‘Device does not exist’?

@akshayan.sinha If I wrote the print(data) statement.
I got invalid for pin , success is ZERO as output and also the Device does’nt exit.

I’ll help you understand what’s going wrong. Look for parts in the program that helps you troubleshoot.

When you built the API request, copy the URL and paste it on the browser. Change the Device ID to something incorrect. Now when you run it, you’ll see “Device does not exist”.

I’ll see what other factors in the program are effecting the device ID, till then, you can troubleshoot as well.

@akshayan.sinha Okey and Thanks a lot man :innocent: for helping me…

May I know what is the final output of the program project 9: sending SMS when Temperature crosses Threshold?

@yogamalinirajendran

You should get a “Status of SMS at Twilio is : queued” statement on the terminal

Thank you, I too had same problem with this. If anyone finding trouble python works on indentation just keep in mind.