-
-
Notifications
You must be signed in to change notification settings - Fork 32k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remote_rpi_gpio broken pipe after remote machine rebooted or temporarily disconnected #64441
Comments
remote_rpi_gpio documentation |
Hello, i got the same problem and see your post...thanks... just reboot of the core is ok but your comment is great, its bad to have to reboot the Core to have the pipe alive again... |
hey guys @scarre @Electronlibre2012 how did (actually where) you setup this:
I still couldn't find any usefull information about where to setup environment variables in home assistant |
i just ssh ed to HA and just run the export command and now it's stored in env variables, reboot the host but still can't access the remote raspberry's gpio ports even it's configured and allowed to HA IP, is there any magic that I should do? |
hello @ne0c0de , that was never clear for me but it works great for a while, this is what i do : 1-intall SSH & Web Terminal Addon
|
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Same problem here. It also does that, when the GPIO is taken over by a local script. |
I can confirm. Problem persist, even after update to 2022.5.5. Remote gpio works with my rpi until restart this remote host. Then I have 'broken pipe' and connection doesn't resume. I have to restart home assistant to resume connection. |
I was thinking of just modifying the code for https://github.com/home-assistant/core/blob/dev/homeassistant/components/remote_rpi_gpio/switch.py to restart the connection if it is broken when you do turn_on or turn_off |
same problem using rpiw as a binary sensor. It should at least let you know if the remote raspberry pi becomes unavailable. |
same problem with remote GPIO as switch. If a raspberry pi reboots whole pipeline breaks. So far unusable. I was also not able to add multiple remote GPIO from different pi's. |
I tried to solve the issue by adding a |
I had the same problem for a long time, but it seems to work now |
Hi, same here with switch and digital inputs on raspberry pi3 & PiZero BTW, not related, but that would be nice to have unique_ID option... |
Same problem here wiith digital outputs on Raspi B+ (yes, very old, but still sufficient to switch relais). I will switch over to mqtt-io.app (https://mqtt-io.app), which, as an mqtt client, has all options to handle all kinds of network connection problems and program crashes in an excelet manner. It looks very much like remote_gpio integration is using the hassio network stack directly and some parameters did prevent to reconnect after an network error. Why re-inventing the wheel, if there is already a solution available which offers a lot of error detection and -handling by default. |
At the end I did the same and this solution is much better: mqtt decouples the device so you can attach multiple software to it: home-assistant, nodered, your custom software etc. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
is there a good tutorial on mqtt for gpio? |
hello, i have any problem with remote_rpi_gpio, what i do is the same config in the first post AND i install advanced ssh and web terminal and add this in the init_commands part of the addon config :
and it work great, even after a reboot of the remote pi. its a rpi4. hope it will help |
The problem
remote_rpi_gpio is working fine until the remote machine is temporarily unavailable/disconnected from the network or rebooted.
Trying to interact with the remote gpio (e.g. switch on/off) results in error: Failed to call service switch/turn_on (/turn_off) [Errno 32] Broken pipe.
Functional connection to remote machine can only be recovered by restarting Home Assistant core.
Already reported as #45770 and closed, but apparently not solved.
#45770
What version of Home Assistant Core has the issue?
core-2021.12.9
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
remote_rpi_gpio
Link to integration documentation on our website
https://www.home-assistant.io/integrations/remote_rpi_gpio/
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
It would probably be good to try recovering the connection ( at least a few times - 2 or 3) after a broken pipe error ,before abandoning. I think that trying to recover upon error is better than continuously monitoring the connection: it is less "invasive" and not so costly.
There are many situations where a remote machine can be temporarily disconnected from the network or rebooted, and it shouldn't require a reboot of the core to recover.
With other integrations (e.g. deconz with a remote hub), temporarily disconnecting the remote hub or rebooting it will not affect home assistant core. I understand that accessing a deconz remote hub via a web service is not exactly comparable to maintaining a TCP connection with a remote rapsberry pi; however not trying to re-establish a TCP connection when we know it is broken seems a bit "incomplete".
The text was updated successfully, but these errors were encountered: