hassio-addons: Addon doesnt start [Supervisor Installation]
Select Add-On (place a lowercase x
for the relevant add-on)
- Xiaomi Mi Scale
Describe the bug When starting the addon, everything seems normal with no errors, but the addon does not start / it crashes directly after.
To Reproduce Reproducible by (re-)starting the addon. Unfortunately, there are no errors and there seems to be no logging scheme that prints more (no “verbose” option). If I refresh the addon page in HA, it says “Start” again (indicating that it has terminated).
Expected behaviour Startup and stay up.
Logs No real error logs. Only this in the supervisor:
22-10-06 18:27:58 INFO (SyncWorker_7) [supervisor.docker.addon] Starting Docker add-on lolouk44/xiaomi-mi-scale-ha-add-on with version 0.3.4
22-10-06 18:28:02 ERROR (SyncWorker_7) [supervisor.docker.interface] Container addon_79ff755f_xiaomi_mi_scale is not running
AddOn Log:
-------------------------------------
2022-10-06 18:27:58 - Starting Xiaomi mi Scale...
2022-10-06 18:27:58 - Loading Config From Add-On Options...
2022-10-06 18:27:58 - Config Loaded...
2022-10-06 18:27:58 - MQTT Discovery Setup Completed...
-------------------------------------
2022-10-06 18:27:58 - Initialization Completed, Waiting for Scale...
Scale (please complete the following information):
- Name Mi Body Composition Scale
- Model XMTZC04HM
Device running Home Assistant (please complete the following information):
- Supervised Hassio on Ubuntu
- USB Bluetooth Adapter Dongle
- Addon Version: 0.3.4
Additional context hcitool
16:33:30 › hcitool dev
Devices:
hci0 XX:XX:XX:XX:XX:X
Comment
- Reinstalling the Addon does not help.
- I moved my hassio recently (new ssd) via offical backup restore. Every other Addon is working fine.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 23 (7 by maintainers)
Just pushed 0.3.6. Should be available within 15-20min. Thanks a bunch @MariusHerget for your help.
Closing as working and New issue created by @mesut3000
It was an permission problem of accessing and communicating via the system bus with MQTT and BlueZ. If it works on BLE it is most likely the same issue on your side so just wait a little bit 😉
@MariusHerget discord is probably best: lolouk44#7180
@lolouk44 thanks! Before my first insights: I restarted my server this morning (unrelated to hassio) and afterwards it worked again. Now I did another restart and it stopped working again.
Regarding the log level: On my side it defaults to
error
in the config after updating, setting it toDEBUG
worked fine.Log
So it definitely looks like a special bug for the supervised Hassio installations. I looked a little bit in the Hassio documentation and found this: https://developers.home-assistant.io/docs/add-ons/presentation/#apparmor
I am not experienced in any Hassio AddOn development or their underlying infrastructure, but it seems that we need an
apparmor.txt
in the repo with the correct permission settings (maybe something in the direction of this?).@MariusHerget just pushed 0.3.5, which should be on docker in the next ~10-15min. The new verson adds more logging. Defaults to INFO level, I’d suggest you set it to DEBUG so we get more info (check the doc for more) Also after moving to bleak I realised I had forgotten to take care of multiple HCI interfaces, this has now been restored, in case it was your issue. Let me know how you get on.
due to many breaking changes when bluetooth changed over i had something similar. check the diagnostic file from the bluetooth adapter in devices to see if your mac address is in it, if not, its probably a bluetooth issue before it gets to the addin. my fix was to stop and start the bluetooth device from a putty console
check with service bluetooth status
then bluetooth stop, bluetooth start, bluetooth restart if needed
Can you share your [redacted] config please? I’ve removed the no longer required MISCALE_VERSION, wondering if it’s still in it and maybe stopping the container from running?