Hi! I have a clean HA installation which I just setup using latest hassio on a rpi3. I’m trying to make it read my new Xiaomi Temperature and Humidity sensors v2 (this one https://www.aliexpress.com/item/4000434285871.html). I only enabled the samba add-on and added the following in my configuration.yaml.
When I restart hass.io I get the following errors:
TypeError: ord() expected a character, but string of length 15 found
2020-01-05 14:22:45 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.bedroom_temp_sensor_temperature fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/mitemp_bt/sensor.py", line 156, in update
data = self.poller.parameter_value(self.parameter)
File "/usr/local/lib/python3.7/site-packages/mitemp_bt/mitemp_bt_poller.py", line 126, in parameter_value
self.fill_cache()
File "/usr/local/lib/python3.7/site-packages/mitemp_bt/mitemp_bt_poller.py", line 59, in fill_cache
self.firmware_version()
File "/usr/local/lib/python3.7/site-packages/mitemp_bt/mitemp_bt_poller.py", line 106, in firmware_version
self.battery = int(ord(res_battery))
TypeError: ord() expected a character, but string of length 15 found
2020-01-05 14:23:06 WARNING (SyncWorker_5) [homeassistant.components.mitemp_bt.sensor] Polling error Could not read data from Mi Temp sensor A4:C1:38:4A:FA:DF
2020-01-05 14:23:33 WARNING (SyncWorker_16) [homeassistant.components.mitemp_bt.sensor] Polling error Could not read data from Mi Temp sensor A4:C1:38:4A:FA:DF
Any ideas? I hear that rpi bluetooth reception isn’t great so I currently placed the sensors just next to the pi.
It doesn’t work. Nobody knows for now what’s the exact reason. I’ve tried different RPs but without luck. After couple of hours it just starts throwing polling errors. I’ve heard that a solution based on ESPHome (https://esphome.io/components/sensor/xiaomi_lywsdcgq.html) is much more stable and my plan is to try it.
2020-07-28 20:52:21 DEBUG (SyncWorker_7) [homeassistant.components.mitemp_bt.sensor] Polling data for Kids_Room_Sensor Temperature
2020-07-28 20:52:21 WARNING (SyncWorker_7) [homeassistant.components.mitemp_bt.sensor] Polling error Could not read data from Mi Temp sensor A4:C1:38:9B:F7:55
2020-07-28 20:52:21 DEBUG (SyncWorker_0) [homeassistant.components.mitemp_bt.sensor] Polling data for Kids_Room_Sensor Humidity
2020-07-28 20:52:21 WARNING (SyncWorker_0) [homeassistant.components.mitemp_bt.sensor] Polling error Could not read data from Mi Temp sensor A4:C1:38:9B:F7:55
2020-07-28 20:52:21 DEBUG (SyncWorker_4) [homeassistant.components.mitemp_bt.sensor] Polling data for Kids_Room_Sensor Battery
this sounds really great! I will have a look at this and afterwards, I will give a shout if it was successful in my case, too. I also got 4 of them.
Can you give me an advise regarding HACS and this custom component? I am a bit careful regarding custom modules, because I am afraid of them breaking all my installation when I am upgrading my HomeAssistant version… Is it that “dangerous” I think about it?