# How to avoid GPIO transmission on restart?

**URL:** <https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177>\
**Category:** General\
**Created:** [15 June 2021 12:40 UTC](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177 "2021-06-15T12:40:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [15 June 2021 12:40 UTC](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177/1 "2021-06-15T12:40:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 June 2021 12:53 UTC](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177/2 "2021-06-15T12:53:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [15 June 2021 15:14 UTC](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177/3 "2021-06-15T15:14:32Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 June 2021 15:41 UTC](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177/4 "2021-06-15T15:41:18Z")

</div>

Put it on the output of the gpio node

---

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [15 June 2021 15:54 UTC](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177/5 "2021-06-15T15:54:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 June 2021 16:04 UTC](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177/6 "2021-06-15T16:04:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [15 June 2021 17:14 UTC](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177/7 "2021-06-15T17:14:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 June 2021 20:25 UTC](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177/8 "2021-06-15T20:25:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [16 July 2021 20:31 UTC](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177/9 "2021-07-16T20:31:27Z")

</div>

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

> <https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/issues/14>
>
> Hi Supergiovane,
> Sorry for raising an issue ticket for this, but I couldn't fin…d any way to contact you (I tried hard!)
> 
> I wanted to ask about how your restart-persistant features work. I \[posted on the NR forum\](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177) about a particular flow triggering in an unwanted way when the Pi was restarted.
> I'm wondering if one of your nodes would be able to solve this.
> 
> All the best,
> Dax.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 September 2021 20:31 UTC](https://discourse.nodered.org/t/how-to-avoid-gpio-transmission-on-restart/47177/10 "2021-09-14T20:31:55Z")

</div>

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