hassio-addons/addon-mqtt-io

MQTT IO addon fails to start on RPI 4 with Home Assistant OS 12.1

Closed this issue · 2 comments

Problem/Motivation

MQTT IO addon fails to start

Expected behavior

(What you expected to happen)

Actual behavior


Add-on: MQTT IO
Expose GPIO modules and digital sensors via MQTT for remote control and monitoring.

Add-on version: 0.4.0
You are running the latest version of this add-on.
System: Home Assistant OS 12.1 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2024.3.3
Home Assistant Supervisor: 2024.03.1

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service mqtt-io: starting
s6-rc: info: service mqtt-io successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[09:24:14] INFO: Starting MQTT IO...
2024-04-05 09:24:17 mqtt_io.main [ERROR] MqttIo crashed!
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/mqtt_io/main.py", line 107, in main
mqtt_gpio.run()
File "/usr/lib/python3.11/site-packages/mqtt_io/server.py", line 1269, in run
self._init_gpio_modules()
File "/usr/lib/python3.11/site-packages/mqtt_io/server.py", line 244, in _init_gpio_modules
self.gpio_modules[gpio_config["name"]] = _init_module(
^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mqtt_io/server.py", line 128, in _init_module
return module_class(module_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mqtt_io/modules/gpio/init.py", line 106, in init
self.setup_module()
File "/usr/lib/python3.11/site-packages/mqtt_io/modules/gpio/raspberrypi.py", line 25, in setup_module
import RPi.GPIO as gpio # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/RPi/GPIO/init.py", line 23, in
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/lib/python3.11/site-packages/mqtt_io/main.py", line 115, in
main()
File "/usr/lib/python3.11/site-packages/mqtt_io/main.py", line 107, in main
mqtt_gpio.run()
File "/usr/lib/python3.11/site-packages/mqtt_io/server.py", line 1269, in run
self._init_gpio_modules()
File "/usr/lib/python3.11/site-packages/mqtt_io/server.py", line 244, in _init_gpio_modules
self.gpio_modules[gpio_config["name"]] = _init_module(
^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mqtt_io/server.py", line 128, in _init_module
return module_class(module_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mqtt_io/modules/gpio/init.py", line 106, in init
self.setup_module()
File "/usr/lib/python3.11/site-packages/mqtt_io/modules/gpio/raspberrypi.py", line 25, in setup_module
import RPi.GPIO as gpio # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/RPi/GPIO/init.py", line 23, in
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
[09:24:18] INFO: Service MQTT IO exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service mqtt-io: stopping
s6-rc: info: service mqtt-io successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Config file

mqtt:
  host: localhost
  status_payload_running: available
  status_payload_stopped: unavailable
  status_payload_dead: unavailable
  topic_prefix: torngardsbio
  user: "******"
  password: "********"
  ha_discovery:
    enabled: yes

gpio_modules:
  - name: rpi
    module: raspberrypi

digital_inputs:
  - name: East_50
    module: rpi
    pin: 18
    pullup: yes
    on_payload: "ON"
    off_payload: "OFF"
    ha_discovery:
       name: East_50

Steps to reproduce

I have a more or less clean HA installation on a 32Gb memory card. Raspberry Pi 4, 8Gb RAM.

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Duplicate of #100.

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!