Time getting displayed as Null in device_status.py

When I run device_status.py it shows the following:
{“value”: “offline”, “time”: null, “success”: 1}
Why is it displaying time a null value?

Following is the code:

from boltiot import Bolt
api_key = “-----------”
device_id = “------------”
mybolt = Bolt(api_key, device_id)
response = mybolt.isOnline()

API and Device name is correct.

@vikrant123rathore this is because your bolt iot module is not on at the time of running the python script.

Plug in the Bolt wifi module and connect it with a wifi network and then run this script

Exist the same code again freshly and enter the api_key and device_id clearly with help of bolt cloud account.
Please sure about wifi-module connection properly .


Hello @vikrant123rathore ,
“time” contains the current time on the Bolt cloud since your device is currently offline it is showing null. It will only return correct time when your device is on.
To get your device online you need to power it on and make sure the Wifi you are connecting to it, is connected to the internet. If constant blue and green lights are on then everything is right.
Now execute your code. If now also you are getting offline value then please make sure that you have entered the api_key and device_id correctly.
This will solve your problem.
Thank You