Output on Connect do not work after restart of HA

Problem/Motivation, Expected behavior, Actual behavior, Steps to reproduce

Hello
I used Event Node with any input boolean to detect that HA or Node-Red or both were restarted


image
on connect i get message, send me a telegram and make a lot of actions after restart.
I know for sure that it works till 114 HA and this NR (currently i have working raspberry with this version and it works there)
image

Now i made new install HA 118 and NR 7.2.10 on new Rapsberry and it do not work.
It works only if i make FULL Deloy. On restart i get yellow CONNECTING and then RUNNING with no further message
image

Code
[{"id":"6580c804.984c68","type":"server-state-changed","z":"93133afd.ad6e88","name":"Fake Node","server":"f39df34a.e72b7","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.fake","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":1180,"y":1000,"wires":[[]]},{"id":"f39df34a.e72b7","type":"server","name":"Home Assistant Websocket","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Thanks a lot!

Try this. See if it works for you.

1 Like

Thanks, will try!

Hi,
I have exactly the same issue…
Flows are not working after HA starts. I need to re-deploy them manually…

obraz

Shows “Running” without further message.

Output on connect is checked.

How to force Node-Red (btw, last version: 7.2.11) to refresh all state nodes?

I cannot put anything before them as they have to be first in flow (triggers).

@ thisIO - did you fixed your issue?

Anybody can help?
Thanks in advance…

I fount that it the bug of thos version. i reported it on github

See post from mbonaniMauricio Bonani
It works for me.

Noob question (I know), but what exactly I should do?
I added this flow to my flows (Update - Sep 26, 2020), I even copied it (those nodes) to my flow.

I restarted HA, and still:
obraz

Node from Mauricio is refreshed, rest are “Running”…
Help…

Did u used switch


After it it works like a charm for me. I get message after it and can use it as start of HA

There is something very confusing for me… BTW, I’m on the very beginning regarding HA, etc. so thanks for your patience…
To be clear, my intention is not to trigger some action(s) after HA start itself (btw it is working as you mentioned - when rebooted, after switch node I’ve got a message so I can i.e. say via TTS: “Home Assistent is up and running”). That’s ok.

What I really would like to do after HA reboot is to check status of particular sensors (event: state node) and react on the state.
I.e.: I have got sensor “Storm” (it can be on/off). After HA reboot I would like to check it’s state and do some actions depends on the state.
Problems: 1) after reboot node have status “Running” (no on nor off, but running) - do not put any message, 2) this is a first node (it do not have an input, so I cannot use above method with switch…)
I tried to replace event: state node with trigger: state node, but I have the same result - it’s “running” after reboot, without further action.

Edit: I will add that by HA reboot I mean restart of HA server (configuration -> server control -> reboot)
After this operation State Nodes are “freezed” (status Running without further message).

But, when I reboot whole system (Debian) by Supervisor -> System -> Reboot then it seems that everything is working as it should - Status Nodes are being refreshed - they get proper status and put messages on outputs…

I also noticed that when I am Deploying only changed flow Status Nodes are freezed. But when I made Full Deploy (all flows refreshment) then Status Nodes are ok…

How to force to refresh Status Nodes after HA restart? Is that possible or maybe everything is working as it should?

As i already mentioned - at this moment there is now way, because it is a bug. I have reported it on github and it was confirmed.
Just wait till it will be fix.
As temporaty solution you can still use this nodes Output on Connect do not work after restart of HA and then check state of sensor with current state node
image

Thank you!
Current state node seems to be good duct tape for now.
Could you please provide me a link to this bug on github? I would like to monitor it.
Thanks in advance!!!