Error in Final project code


#1

Currently I have set the minimum and maximum temperature values as 30 and 45 respectively.
I am getting an error in the code!!
Also I would like to clear my doubt that how will the temperature sensor detect and print that fridge door opened!!?


#2

A temperature sensor can not detect if the door is open. But it can detect the changes in temperature.

Also, send us your code for debugging the issue. I will suggest you add the print statement before doing json.loads().


#3

Temperature sensor is used only for detecting the temperature. When you open the fridge, the temperature slightly rises inside, this is detected by the sensor. You have to take this sudden rise in temperature as an anomaly and an email has to be sent.

Regarding the error, please send a screenshot of the code.