You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I've configured a digital output pin 18 with gpiozero module and mqtt-io threw a KeyError: 18 error during start.
Expected behavior
It should run without errors.
Error messages and traceback
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/pi/mqttiove/lib/python3.11/site-packages/mqtt_io/__main__.py", line 126, in <module>
main()
File "/home/pi/mqttiove/lib/python3.11/site-packages/mqtt_io/__main__.py", line 118, in main
mqtt_gpio.run()
File "/home/pi/mqttiove/lib/python3.11/site-packages/mqtt_io/server.py", line 1449, in run
self._init_digital_outputs()
File "/home/pi/mqttiove/lib/python3.11/site-packages/mqtt_io/server.py", line 550, in _init_digital_outputs
raw_value = gpio_module.get_pin(out_conf["pin"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/mqttiove/lib/python3.11/site-packages/mqtt_io/modules/gpio/gpiozero.py", line 85, in get_pin
return cast(bool, self._in_pins[pin].is_active)
~~~~~~~~~~~~~^^^^^
KeyError: 18
Additional context
If I change digital_outputs to digital_inputs everything works fine.
Due to logs and source code I'm guessing that get_pin(...) method is called and it fails because it only checks _in_pins map.
The text was updated successfully, but these errors were encountered:
Describe the bug
I've configured a digital output pin 18 with gpiozero module and mqtt-io threw a KeyError: 18 error during start.
Expected behavior
It should run without errors.
Error messages and traceback
Config
Hardware
System:
Additional context
If I change
digital_outputs
todigital_inputs
everything works fine.Due to logs and source code I'm guessing that
get_pin(...)
method is called and it fails because it only checks_in_pins
map.The text was updated successfully, but these errors were encountered: