Remote Raspberry Pi GPIO

Same exact behaviour,

If invert_logic is false and it turn the pin on upon restart. Alternatively if invert_logic is false the pin is LOW upon restart of homeassistant, remains LOW upon click on the lighnig icon, the PIN remains LOW, if i click a second time it then turns HIGH. At that point when HA thinks the pin is Up, the pin is actually Low and vice versa.

Any idea out there? I do not have this isue if i play localy with the GPIO with wiringpi, LOW is LOW and HIGH is HIGH, so it is not a mistake with the relays i am using on ports 4,6,22 and 26.

Vince

This has never been fixed in the component, I got mine working by downloading the remote_rpi component files and editing the switch.py file, then put the whole component folder into the custom_components folder.

Basically the 2 remote_rpi_gpio.write_output lines are reversed as per the below;

    def turn_on(self, **kwargs):
        """Turn the device on."""
        remote_rpi_gpio.write_output(self._switch, 1 if self._invert_logic else 0)
        self._state = True
        self.schedule_update_ha_state()

    def turn_off(self, **kwargs):
        """Turn the device off."""
        remote_rpi_gpio.write_output(self._switch, 0 if self._invert_logic else 1)
        self._state = False
        self.schedule_update_ha_state()

Thanks @BradAU for the confirmation, it makes sense. The component is simple enough that overriding it is unlikely to lead to an issue in the future.

Ill apply the same change tonight and check if a bug had been raised before.

Kind regards,

Vincent

1 Like

Any news on this issue? Just encountered it while i was trying to migrate my home assistant instance to another server

hi im having the gipo errors after updates of HA i messaged on the github for remote gpi
and they said you need to add it to your manifest file gipozero-ha but that doesnt help me
i still new at this HA and i searched i found a amanifest file in hacs folder and a intergration-manifiest

but i really dont know where … and i googled and got a development page but doesnt help… do you know what exact file i need to edit and the exact copy and paste i just throw in there…

as i also read people say forget remote GPIO just use MMQT instead
tried learning that but i dont understand it 100% yet either

HI,

my experience with remote rasperry PI GPIO is bad, every time i restart the remote PI i have to restart the HA and the PI many time to get it working.
sometimes the binary sensors work, something the switch sensors doesn’t. without change anything on the rapsi or on the HA, after serveral reboot of both everything is working, for this reason i have the feeling i can’t trust it

i didn’t understand what the condition is (i guess is a timeout) that fix it
i don’t know if there is any trick, but i really don’t understand how i can make it more reliable

i’m now exploring the MQTT GitHub - flyte/mqtt-io: Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring., i hope this should be more stable

hi @bremby

you’ve had a year to test the mqtt-io :stuck_out_tongue:

what are your findings?

Mario

I works, but I definitely switched to an esp32 with eth and poe. More thin than the raspi

1 Like