hassio-addons/addon-mqtt-io

RuntimeError: unkown platform

Closed this issue · 1 comments

Problem/Motivation

Start of the addon fails with stacktraces.

`s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting


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.1
Home Assistant Supervisor: 2024.03.0

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
[19:42:23] INFO: Starting MQTT IO...
2024-03-17 19:42:28 mqtt_io.server [INFO] Connecting to MQTT...
2024-03-17 19:42:28 mqtt_io.server [INFO] Connected to MQTT
2024-03-17 19:42:38 mqtt_io.server [ERROR] Exception when retrieving value from sensor 'temperature':
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/mqtt_io/server.py", line 572, in poll_sensor
value = await get_sensor_value()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/backoff/_async.py", line 133, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/backoff/_async.py", line 66, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mqtt_io/server.py", line 567, in get_sensor_value
return await sensor_module.async_get_value(sens_conf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mqtt_io/modules/sensor/init.py", line 58, in async_get_value
return await loop.run_in_executor(self.executor, self.get_value, sens_conf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mqtt_io/modules/sensor/dht22.py", line 62, in get_value
humidity, temperature = self.sensor.read_retry(self.sensor_type, self.pin)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Adafruit_DHT/common.py", line 94, in read_retry
humidity, temperature = read(sensor, pin, platform)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Adafruit_DHT/common.py", line 80, in read
platform = get_platform()
^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Adafruit_DHT/common.py", line 63, in get_platform
raise RuntimeError('Unknown platform.')
RuntimeError: Unknown platform.
2024-03-17 19:42:38 mqtt_io.server [ERROR] Exception when retrieving value from sensor 'humidity':
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/mqtt_io/server.py", line 572, in poll_sensor
value = await get_sensor_value()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/backoff/_async.py", line 133, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/backoff/_async.py", line 66, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mqtt_io/server.py", line 567, in get_sensor_value
return await sensor_module.async_get_value(sens_conf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mqtt_io/modules/sensor/init.py", line 58, in async_get_value
return await loop.run_in_executor(self.executor, self.get_value, sens_conf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/mqtt_io/modules/sensor/dht22.py", line 62, in get_value
humidity, temperature = self.sensor.read_retry(self.sensor_type, self.pin)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Adafruit_DHT/common.py", line 94, in read_retry
humidity, temperature = read(sensor, pin, platform)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Adafruit_DHT/common.py", line 80, in read
platform = get_platform()
^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Adafruit_DHT/common.py", line 63, in get_platform
raise RuntimeError('Unknown platform.')
RuntimeError: Unknown platform.`

Proposed changes

Smells a bit like #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!