How to avoid GPIO transmission on restart?

Hey gang,

I have a NR flow set to monitor (and email) a couple GPIO pins (power outage, etc) which are displayed on a Dashboard as red/green 'LEDs'. The problem is that when I restart the Pi, the value of those pins is re-read (to populate the dashboard LEDs, which are otherwise black for NULL input) which results in a notification being sent. i.e. "Outage: Mains power has been restored".

I just switched to the PiGPIOd library+node hoping that might have some options to deal with this, but it doesn't.

Anyone have any ideas on how to solve this?

All the best,
Dax.

The RBE node has an option to not pass on the first message seen, which might do what you want.

Ahh, so that would be put after the "LED" parry of the flow, but before the notification part.

Hmm, let me try that out.

Thanks, Colin!

Put it on the output of the gpio node

If I do that, the dashboard LEDs will be black, indicating null value. The show needs to check the state of those inputs.

I meant the wire from the GPIO node to your notification nodes, assuming that is how you have wired it.

Hey @Colin, yep we're on the same page. The problem is that if I block the first signal from the GPIO node, then the dashboard 'LED' is never given a state, so it shows a black circle for null.

What I guess I need is a way to block the first message only if it is a 1. That way I could detect a situation where, say, the mains power supply went out during a reboot of the pi. That's the only edge case I can think of.

Feed the LED through one wire direct from the gpio node and separately connect a wire from the gpio to the rbe and on to the notification flow.

Looks like Max Supergiovane's 'Boolean Logic Ultimate' package might hold the key to this, as they are "restart persistant".

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.