Validation for Homey bridge is offline?

I’ve the following interested use case for my Homey Bridge:

A flow switched plug A on at 00:30
Another flow switched plug A off at 01:00
Between 00:53 and 01:18 my Homey Bridge get off-line, due my internet connection was down for 15 minutes.

Due the internet was down and the Homey Bridge was off-line at 01:00 the plug was, looking at my mobile Homey App, (logical) switched off at 01:00 but physically still on.

To avoid this situation seems impossible based on the cloud approach of the Homey Bridge.

Is there any way to validate whether the Homey Bridge is off-line while running a flow? After all, I see notifications “Homey Bridge offline / online” in the timeline.

Something like this

1 Like

You could also use the word ‘offline’ in the notification to set a new boolean ‘bridge_status’ to ‘off’, and the word ‘online’ to set it to ‘on’. This would allow you decide in each flow if you want it to start or not.
You could also set a boolean to indicate that the flow did not run (via if/then/else), which would allow you to start it on boolean ‘bridge_status change to On’.
But you don’t want the ‘plug on’ flow to run after the ‘plug off’ flow: in case of flows with dependencies things become complicated. So in your case I wouldn’t use two flows, but one that switches the plug off after 1 hour delay.

1 Like

Thanks @Peter_Kawa and @Pierre_Van_de_Briel for your input :slight_smile:
It’s was really helping me to create a good solution to switch the plug always off, also when the Bridge is not online.

Solution:

  • Flow 1-2: “a notification was created” to set a boolean BridgeOnline.
  • Flow 3: at 02:00 and boolean BridgeOnline is true, then swith PlugOff and set PlugStillOn to false, else set boolean PlugStillOn to true
  • Flow 4: when boolean BrigeOnline changed to true and PlugStill is true, switch PlugOff and set PlugStillOn to false
1 Like