Query in project 6

I am using vmware to run ubuntu. While doing the 6th project, when I run the program device_status.py, time is not being displayed when my bolt device is offline. This issue doesn’t occur when my device is online. Here’s a screenshot of the code and the output


(I have scratched the api key and device id for security purposes.)

This happened with me as well. It didn’t show the time but then i tried to doing it again when the device was online, it came. And then after when i did it again with the device being offline, the time showed. Don’t worry much about it. After some trials it does show the current time.

1 Like

Heyo @kshitishjgadre @roymanmeet28

when the bolt device is INITIALLY OFF it has no access to internet to access the current time and so It shows NULL.

But when you power it ON now it is connected to the internet and so it displays the time. But this time when YOU Turn it OFF (as it was already ON) so this time it does shows the time but that time is the time after it turned OFF (that is that very last second at which it was ON)…if that makes sense :sweat_smile:

I think that value is stored in response for very few seconds and so after few seconds if YOU DON’T TURN THE DEVICE ON AND CHECK THE STATUS AGAIN it will again show the null.

But I am not sure for how how many seconds it stores that value.

bro its not a problem your device is offline therefore it can’t reach the network to set up time that’s why it shows null.

first you have to online it so that it can get the time and when offline it shows the time
eventually in my case it do so:sweat_smile:

I know bro its not a problem I didn’t say that :smile:
I only attempted to explain how the device works. That’s all

Hey guys, actually I kinda figured it out myself some time after posting my question :sweat_smile:
But anyway, thanks for trying to help me out

1 Like

That is great bro! :wine_glass: