Node-red automations not working after reboot

We’ve been experiencing power shortages lately due to bad weather, and I’ve noticed that I need to enter the Noder-RED docker container and manually re-deploy my flows, otherwise automations don’t work.
Is this normal behavior?

Thanks

If they are routines using the inject node be sure to tick the initial checkbox so that it starts again automatically. In other cases using “context” variables if set up to use the “localfilesystem module” in your “settings.js” also helps.

I’m almost clueless about node-RED :sweat_smile:.
I don’t think I’m using any kind of variables, just some basic button-turns-on-light automations

This example you give should not need redeploying after an outage, as the trigger is your switch.
What do you see to make you need to redeploy?

It just doesn’t work, I push any button but lights don’t respond…

What makes you think that this is the Node-red flow? When you go to deploy do you see anything there? Maybe it’s simply the devices offline? The Node-red addon on the iHost shows as running when you start up after an outage?
Just for interest, because I don’t know if we can discover anything here, but what is not logical is that you need to redeploy a node-red flow.

At first I suspected of connection issues, but I have a couple of simple automations made with the iHost scene editor and those do work after the outages.
Then I tried to check if the buttons were reporting pushes correctly like this:

After deploying every automation was working correctly. Since then same thing happens on each outage and it’s fixed by just re-deploying.

Maybe @ward who knows all about Node-red can shed some light on this.

I have pinged a staff for a closer look, thx

I setup a flow like this and it’s working fine after reboot.

There are some info we are curious about:

  1. Is the problem happens only on some of your devices or all your devices are the same?
  2. What’s the type of your device? Are they from smart-home add-on or just zigbee device?

I conducted a test, and the problem only occurs during power outages. If I restart the iHost manually everything works as expected.

  1. Yes, it happens with all devices
  2. Mostly sonoff zbmini and aqara buttons

We fail to reproduce the problem, reboot the iHost or just unplug it.
All the automation works fine.
Can you add a debug node after your event-state node and see if the state report correct?