mqtt-io
mqtt-io copied to clipboard
Debian on Odyssey x86j4125 SBC
Please consider joining the Discord server in order to get support. This is likely to be the quickest way for somebody to help you.
If you'd still like to add your support request as a GitHub Issue, please fill in the following template as best you can:
- [ X] I have read the README.md file and visited the Documentation to see if the information there helps.
Action description A clear and concise description of what you're trying to achieve.
To get mqtt-io working on an Odyssey x86 sbc with Raspberry Pi compatible 40 pin gpio interface
Previous attempts Describe what you've tried so far.
Copied working configuration from working Raspberry Pi to Odyssey sbc. Changed module type to 'gpiod' for linux
Error messages and traceback
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/srv/mqttio/lib/python3.9/site-packages/mqtt_io/__main__.py", line 85, in <module>
main()
File "/srv/mqttio/lib/python3.9/site-packages/mqtt_io/__main__.py", line 80, in main
mqtt_gpio.run()
File "/srv/mqttio/lib/python3.9/site-packages/mqtt_io/server.py", line 1226, in run
self._init_gpio_modules()
File "/srv/mqttio/lib/python3.9/site-packages/mqtt_io/server.py", line 244, in _init_gpio_modules
self.gpio_modules[gpio_config["name"]] = _init_module(
File "/srv/mqttio/lib/python3.9/site-packages/mqtt_io/server.py", line 128, in _init_module
return module_class(module_config)
File "/srv/mqttio/lib/python3.9/site-packages/mqtt_io/modules/gpio/__init__.py", line 105, in __init__
self.setup_module()
File "/srv/mqttio/lib/python3.9/site-packages/mqtt_io/modules/gpio/gpiod.py", line 35, in setup_module
self.chip = gpiod.chip(self.config["chip"])
File "/srv/mqttio/lib/python3.9/site-packages/gpiod/libgpiodcxx/__init__.py", line 107, in __init__
self.open(device, how)
File "/srv/mqttio/lib/python3.9/site-packages/gpiod/libgpiodcxx/__init__.py", line 136, in open
chip_struct = func(device)
File "/srv/mqttio/lib/python3.9/site-packages/gpiod/libgpiod/__init__.py", line 1133, in gpiod_chip_open_lookup
chip = gpiod_chip_open_by_label(descr)
File "/srv/mqttio/lib/python3.9/site-packages/gpiod/libgpiod/__init__.py", line 1100, in gpiod_chip_open_by_label
chip_iter = iter(gpiod_chip_iter())
File "/srv/mqttio/lib/python3.9/site-packages/gpiod/libgpiod/__init__.py", line 1195, in __iter__
chip = gpiod_chip_open(it)
File "/srv/mqttio/lib/python3.9/site-packages/gpiod/libgpiod/__init__.py", line 112, in gpiod_chip_open
fd = os_open(path, O_RDWR | O_CLOEXEC)
PermissionError: [Errno 13] Permission denied: '/dev/gpiochip3'
**Config**
```yaml
mqtt:
host: 127.0.0.1
port: 1883
user: ""
password: ""
topic_prefix: mqttio
gpio_modules:
- name: gpiod
module: gpiod
digital_outputs:
- name: db
module: gpiod
pin: 22
inverted: yes
on_payload: "ON"
off_payload: "OFF"
initial: high
retain: no
Hardware
- Platform: Seeed Studio Odyssey x86j4125 single board computer
- Connected hardware: Normally open button connected to pin 22
System:
- OS: Debian Bullseye
- Python version: 3.9
- User you're running as: mqttio
- Using a virtualenv?: yes
Additional context Add any other context about the problem here.