Hi,
I am making a full automated irrigation control and therefore I have installed a raspberry pi and connected a platine with 4 relays on it.
I have configured remote_rpi_gpio on both components(home assistant and pi), restarted the service and it worked.
I followed the tutorial on this page: remote_rpi_gpio - Home Assistant
This is the config.yml in home assistant.
switch:
- platform: remote_rpi_gpio
host: 10.0.200.22
invert_logic: true
ports:
17: Relay_RB_A
18: Relay_RB_B
27: Relay_tbd1
22: Relay_tbd2
Pretty straight forward and I was super excited. But after some time, it is not possible to switch the GPIOs from home assistant and it is necessary to restart home assistant core to get it working again. Same after a reboot from the pi.
UPDATE:
I have found the following entry in the logs. Does anyone know how to fix this? All components are up2date.
2022-04-02 13:18:21 WARNING (MainThread) [homeassistant.util.executor] Thread[SyncWorker_3] is still running at shutdown: File "/usr/local/lib/python3.9/threading.py", line 930, in _bootstrap
self._bootstrap_inner()
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 83, in _worker
work_item.run()
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/remote_rpi_gpio/switch.py", line 83, in turn_on
remote_rpi_gpio.write_output(self._switch, 1)
File "/usr/src/homeassistant/homeassistant/components/remote_rpi_gpio/__init__.py", line 57, in write_output
switch.on()
File "/usr/local/lib/python3.9/site-packages/gpiozero/output_devices.py", line 229, in on
self._write(True)
File "/usr/local/lib/python3.9/site-packages/gpiozero/output_devices.py", line 106, in _write
self.pin.state = self._value_to_state(value)
File "/usr/local/lib/python3.9/site-packages/gpiozero/pins/__init__.py", line 305, in <lambda>
lambda self, value: self._set_state(value),
File "/usr/local/lib/python3.9/site-packages/gpiozero/pins/pigpio.py", line 267, in _set_state
elif self.function == 'input':
File "/usr/local/lib/python3.9/site-packages/gpiozero/pins/__init__.py", line 283, in <lambda>
lambda self: self._get_function(),
File "/usr/local/lib/python3.9/site-packages/gpiozero/pins/pigpio.py", line 240, in _get_function
return self.GPIO_FUNCTION_NAMES[self.factory.connection.get_mode(self.number)]
File "/usr/local/lib/python3.9/site-packages/pigpio.py", line 1402, in get_mode
return _u2i(_pigpio_command(self.sl, _PI_CMD_MODEG, gpio, 0))
File "/usr/local/lib/python3.9/site-packages/pigpio.py", line 1026, in _pigpio_command
dummy, res = struct.unpack('12sI', sl.s.recv(_SOCK_CMD_LEN))
Found 2 non-daemonic threads.
[finish] process exit code 0
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
I also receive now another error [Error 32: Broken Pipe]
What am I doing wrong or missing out?
Thank you in advance
Best regards Thomas