Google Cloud - IoT Core - Config sent every 1 hour reboot the device

I have a ESP8266 with a relay to turn on/off a ligth. All is working great, but IoT core is sending a configuration every 1 hour and that makes the device to reboot, when the device starts again there is no guarantee that the initial state is the desired.

Config sent every 1 hour

This is the message inside the config

Its there any way to avoid this automatically config?

Thanks.

Upvotes: 0

Views: 178

Answers (2)

rbarbero
rbarbero

Reputation: 101

IoT Core sends the latest configuration to the device each time the device (re)connects, to make sure it is up to date, even if new configuration was sent to it while it was disconnected. This is expected IoT Core behaviour.

As mentioned in other answer, what is probably happening is that your device is not sending data during that period of time, which makes the connection timeout after one hour. The device tries to reconnect, receives the latest configuration and that causes it to reboot.

You have many options to avoid this:

Upvotes: 2

I could solved it by change the logic inside the device. Every hour the JWD needed to be refreshed, so that made iot core send a message to the device with the new status.

Upvotes: 0

Related Questions