I realy enjoy to do projects with Cayenne. Its super simple.
But i have a real world problem and i hope anyone out there can help me:
I´ve made a outdoor-Whirlpool-Controller out of my RaspberryPi with Cayenne. I can controll the filterpump and the heater.
Both are controlled via a dual-relaisboard. Problem of this board is: it has inverted inputs. So, when the relais should be off, the GPIO has to be high. So far not problem. But we had a power-outage last night. Afterwards my PoolPi came up again and activated the pump and the heater. So my pool was useless heated.
How can i set the GPIO default as high after bootup?
Can anyone help?
Hi Ben
I have one or two relays set up on my pi that when it is rebooted all go high and some stay high and some that go low after a couple of seconds.
So depending on your set up would it be possible to exchange Gpio or change the no/nc round and use the inverted logic on the widget set up.
This is an issue we’ve seen come up before. We will be looking into a way to enable Cayenne users to set the default pin state upon boot. Right now we’re working on getting Arduino out the door so this may not be worked on for a little while.
Ho there , It is not a solution but only a trick .
I noticed that at the boot inputs do not go high .
I set gpio as input .
when I have to change the relay status , change with output …
caution
Pin gpio will go up immediately.
but it’s what I wanted …
certainly not good for continued use . …
I’ll continue to design using the external pull-up resistors.
5 pin SIP, 2.2k, -or whatever. 2.2k allows enough current @ 3.3v
to light a LED-to-ground, -but still pull the GPIO input LOW.
Used for, like, a lit toggle switch.
I have the same problem with raspberry pi 3 with INVERT LOGIC on relay. When the raspberry is reboted, the relays goes on because the GPIO pins goes HIGH.
This is going to happen with any system that is reset. The only thing you can do is try to minimize the disruption.
Because Linux needs to boot and then get an ethernet address and then connect to Cayenne before the I/O is restored, another solution is required.
I think the Cayenne guys were going to look at somehow storing off a current state structure that could be loaded at startup, but personally, I wouldn’t rely on this and instead, make sure my hardware goes to a safe state after reboot based on the Pi initial I/O state.
I’ve got the same problem with irrigation, a reboot could be very wet and expensive. If you are able to decipher the above work around or find a simpler answer, please share.
I think if I was doing this, I would use an I/O expander for my critical signals. That way when the chip resets, the state is very well known (defined in the data sheet), and isn’t fiddled with until we write to it.
Another idea is to just use an Arduino, or create a Pi controlled Arduino module and save the current I/O state to NVRAM and restore on reset.