I’m having serious problems with this extension.
I’m running latest hass.io and v0.95.4.
I’ve had local GPIO configured, and changed these to remote_gpio now hooked up to another Pi.
It didn’t work at all, at first.
After much messing around following the instructions, I’ve now got 2 out of 4 to work.
As it is now, 2 of my remote GPIOs work, the other 2 generate this error:
2019-06-29 xx:xx:xx ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1841103216] 'NoneType' object has no attribute 'on'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
connection.context(msg))
File "/usr/src/homeassistant/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 194, in handle_service
required_features
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 316, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 337, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/remote_rpi_gpio/switch.py", line 82, in turn_on
0 if self._invert_logic else 1)
File "/usr/src/homeassistant/homeassistant/components/remote_rpi_gpio/__init__.py", line 56, in write_output
switch.on()
AttributeError: 'NoneType' object has no attribute 'on'
Also, for the record, this is the error if you do not restart you Pi after restarting remote GPIO Pi:
2019-06-29 xx:xx:xx ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1841103216] [Errno 104] Connection reset by peer
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
connection.context(msg))
File "/usr/src/homeassistant/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 194, in handle_service
required_features
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 316, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 337, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/remote_rpi_gpio/switch.py", line 82, in turn_on
0 if self._invert_logic else 1)
File "/usr/src/homeassistant/homeassistant/components/remote_rpi_gpio/__init__.py", line 56, in write_output
switch.on()
File "/usr/local/lib/python3.7/site-packages/gpiozero/output_devices.py", line 159, in on
self._write(True)
File "/usr/local/lib/python3.7/site-packages/gpiozero/output_devices.py", line 60, in _write
self.pin.state = self._value_to_state(value)
File "/usr/local/lib/python3.7/site-packages/gpiozero/pins/__init__.py", line 247, in <lambda>
lambda self, value: self._set_state(value),
File "/usr/local/lib/python3.7/site-packages/gpiozero/pins/pigpio.py", line 219, in _set_state
elif self.function == 'input':
File "/usr/local/lib/python3.7/site-packages/gpiozero/pins/__init__.py", line 225, in <lambda>
lambda self: self._get_function(),
File "/usr/local/lib/python3.7/site-packages/gpiozero/pins/pigpio.py", line 192, in _get_function
return self.GPIO_FUNCTION_NAMES[self.factory.connection.get_mode(self.number)]
File "/usr/local/lib/python3.7/site-packages/pigpio.py", line 1317, in get_mode
return _u2i(_pigpio_command(self.sl, _PI_CMD_MODEG, gpio, 0))
File "/usr/local/lib/python3.7/site-packages/pigpio.py", line 978, in _pigpio_command
dummy, res = struct.unpack('12sI', sl.s.recv(16))
ConnectionResetError: [Errno 104] Connection reset by peer