Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addon mqtt_io.__main__ [ERROR] MqttIo crashed! #141

Open
TBobsin opened this issue Nov 14, 2024 · 3 comments
Open

addon mqtt_io.__main__ [ERROR] MqttIo crashed! #141

TBobsin opened this issue Nov 14, 2024 · 3 comments

Comments

@TBobsin
Copy link

TBobsin commented Nov 14, 2024

Problem/Motivation

These issues are closed but not resolved
RuntimeError: This module can only be run on a Raspberry Pi! #100
MQTT IO addon fails to start on RPI 4 with Home Assistant OS 12.1 #112

(Why the issue was filed)
the problem still exist

Expected behavior

Should run

Actual behavior

addon starts but fails and stop
mqtt_io.main [ERROR] MqttIo crashed!

(What actually happened)s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

[34m-----------------------------------------------------------[0m
[34m Add-on: MQTT IO[0m
[34m Expose GPIO modules and digital sensors via MQTT for remote control and monitoring.[0m
[34m-----------------------------------------------------------[0m
[34m Add-on version: 0.4.0[0m
[32m You are running the latest version of this add-on.[0m
[34m System: Home Assistant OS 13.2 (aarch64 / raspberrypi4-64)[0m
[34m Home Assistant Core: 2024.11.0[0m
[34m Home Assistant Supervisor: 2024.11.2[0m
[34m-----------------------------------------------------------[0m
[34m Please, share the above information when looking for help[0m
[34m or support in, e.g., GitHub, forums or the Discord chat.[0m
[34m-----------------------------------------------------------[0m
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
[08:49:03] INFO: [32mStarting MQTT IO...[0m
2024-11-14 08:49:09 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!
[08:49:09] INFO: [32mService MQTT IO exited with code 1 (by signal 0)[0m
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

Steps to reproduce

my config for mqtt-io

mqtt:
host: ha-home
port: 1883
user: "usr-mqtt"
password: "mqtt-usr"
topic_prefix: mqtt-io/ha-home/gpio

ha_discovery:
enabled: yes

gpio_modules:

  • name: rpi
    module: raspberrypi

digital_outputs:

  • name: usbcharger
    module: rpi
    pin: 26

My System

Core 2024.11.0
Supervisor 2024.11.2
Operating System 13.2
Frontend 20241106.0

on rpi4-64

(How can someone else make/see it happen)

Proposed changes

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

Copy link

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!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Dec 15, 2024
@TBobsin
Copy link
Author

TBobsin commented Dec 15, 2024 via email

@theofanisv
Copy link

I have the same problem. HAOS is installed on a RPI 4B and produces the same log.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants