THE SITUATION
Quite often after a cold reboot of HA I experience some add-ons or integrations fail to start.
THE HYPOTHESIS
Some add-ons, like e.g. Zigbee2MQTT, depend on other add-ons, link MQTT, to properly start.
MY WORKAROUND
To wait until HA stabilises to then manually restart the add-ons that failed the starting.
THE PROPOSAL
To define a mechanism to stagger the start up of add-ons and integrations based on a dependency table or similar where underlying add-ons integrations are listed and sorted so the latter cannot start until the former becomes available.
Thanks! I have clarified the text stating “cold reboot”. As you mention, fortunately I don’t cold reboot the system often although it happens often when I do. BTW, I don’t experience this issue with warm reboots/restarts.
initialize will start the add-on on setup of Home Assistant. system is for things like databases and not dependent on other things. services will start before Home Assistant, while application is started afterwards. Finally once is for applications that don’t run as a daemon.
A list of services that will be provided or consumed with this add-on. Format is service :function and functions are: provide (this add-on can provide this service), want (this add-on can use this service) or need (this add-on needs this service to work correctly).
Just some feedback in case someone falls in the same:
SHORT STORY
Make use of a high power USB cable.
THE LONG STORY
My R-Pi-3 has all its four USB ports in use:
External SSD
Zigbee module
RTL-SDR radio receiver
RFXtrx433E module
My guess is that during a cold boot there is a high surge of current that may cause a drop in the supply voltage if the power supply cable is not adequately dimensioned. The drop in voltage my lead some USB device to not get properly initialised. I found in the HA log an average of three undervoltage messages a day (supply voltage drops under 4.63V). I decided to go for my homemade 20cm AWG-15 USB cable. So far, it seems this cable has solved the situation.
The system boots accordingly.
No undervoltage message in the HA log.
Notes
a) The homemade cable sustains [email protected].
b) The USB power supply sustains 3A@5V.