csuermann / node-red-contrib-presence-faker

Node-RED node that fakes presence in a smart home by switching devices (e.g. lights) on and off at random times.
MIT License
23 stars 2 forks source link

Inactive Upon Load, Method to detect #20

Closed soloam closed 4 years ago

soloam commented 4 years ago

Hello, I have a switch that I use to turn on or off the faker, when the switch is on the faker is on, when the switch is off, the faker is off. The problem is the state "Inactive Upon Load" I don't have a method to detect if the node is in this state to resend the switch value! If the switch is on and for some reason (flow deploy for example) the node goes to "Inactive Upon Load" my faker stops and I don't have a visual indication of that! (important because if it's a faker I'm not home to check if it's working). I tried to use the status node to capture the state of the faker node, and if in that status send the switch state, but for some reason the status node does not capture that state!

So my recommendation:

For me the best would be number 1! I think its the one with less side effects!

Thank You Best Regards

csuermann commented 4 years ago

Hi @soloam,

Thanks for reaching out! Looks like this could be some kind of race-condition. I think I fixed it in v.1.7.1, which I just released.

Best regards C.