Have a home assistant supervised in ubuntu. Now trying to setup mitemp_bt integration and i’m completely lost. Where shoul i put --net=host
and what needs to be configured on the host?
If you run HassOS, you don’t have to do anything.
That option is given when starting the container (and I’m not actually sure it’s needed to access bluetooth, tbh).
I am running HassOS Supervised on top of Ubuntu. So it is a container.
Same. The supervisor handles the docker networking stuff.
Well i’ve enabled the debug for mitemp_bt.
On host os
~$ bluetoothctl
Agent registered
[CHG] Controller 00:1A:7D:DA:71:14 Pairable: yes
[LYWSD03MMC]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:13 Discovering: yes
[NEW] Device A4:C1:38:94:96:1E LYWSD03MMC
And all i see in HA logs
Logger: homeassistant.helpers.entity
Source: components/mitemp_bt/sensor.py:147
First occurred: 15:50:26 (2 occurrences)
Last logged: 15:51:40
Update for sensor.mitemp_bt_temperature fails
Update for sensor.mitemp_bt_temperature_2 fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 446, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 641, in async_device_update
raise exc
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/mitemp_bt/sensor.py", line 147, in update
data = self.poller.parameter_value(self.entity_description.key)
File "/usr/local/lib/python3.9/site-packages/mitemp_bt/mitemp_bt_poller.py", line 126, in parameter_value
self.fill_cache()
File "/usr/local/lib/python3.9/site-packages/mitemp_bt/mitemp_bt_poller.py", line 59, in fill_cache
self.firmware_version()
File "/usr/local/lib/python3.9/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
So maybe i should try to pass the USB device into the container? Still can’t find the docker-compose. And shall it go into HA or superviser docker?
There is likely some confusion. Your log suggest you have LYWSD03MMC (the square ones), while the integration only supports the LYWSDCGQ (the round ones). The LYWSD03MMC needs a decryption key with stock firmware.
See https://github.com/custom-components/ble_monitor for a custom component supporting those (and more).
Thanks! Will try it out and submit a PR for documetnatnion if that is the case so the docs would be more clear