Detecting loss of connection to Gateway


I have a Gateway Photon talking to three Bluz.

After a connection is established to the Gateway, for an unknown reason, sometimes one of the units loses connection to the Gateway. When this happens, it does not reconnect again. I know the Bluz lost connection to the Gateway because it starts flashing Green instead of White.

Is there a way to detect a loss of connection to the Gateway (after the connection is established)? If there is a way, upon finding out, I can simply reset the Bluz unit and then it should reconnect …

Your help is appreciated.


You can use the get state function to poll the status of the BLE connection:


I have a similar issue except it’s a fast green light which according to the operating states means Bluetooth is connected but there’s no cloud connection. Is there a way to get status of cloud connection and reset it? Resetting the device allows it to connect within seconds. @eric


Fast green means it is attempting to connect to the cloud automatically. You can detect this by checking the connected function, it will return true only if the device is connected to the cloud.