Meanwhile, I do a integration reload through the API with curl.
My Meross integration is unavailable every time the internet goes down, it won’t become available after the internet comes up, so I do a reload through the API.
Thanks for the solution you are proposing, it seems it’s gonna solve my ZHA integration going down every now and then
Would you be so kind to help me on how exactly I can implement this? I have found my integration ID following your guidelines but not sure how to call the curl/REST API from my automation.
Obviously the above is not valid but I just wanted to demonstrate where I want to go.
I found that I can use the rest_command integration for that so will it be this in my case? Not sure… config.yaml
This would be very nice. I have an integration, Solax, setup via YAML (there’s no UI config available) and the only way to reload it now, is to restart the core.
Until the integration reloader is fully integrated in HA, I’m using an auto reboot script after startup and for the Ikea integration, I’m using a presence detection script.
So: if rebooted by an external cause, HA automatically reboots itself again. All internally automated reboots switch a toggle (Auto reboot) to “no” . So when you reboot HA by internal automation, you prevent a boot-loop. External reboots, caused by power outs etc will set off a second boot, to reconnect the intergrations.
I also have a ping/network presence entity which monitors the Ikea hub. The hub intermittently disconnects shortly and when it does that, HA reboots once. This seems to solve the known Ikea integration problem. A bit of a hassle, but it seems to work for me.
I too think this would be a great addition - could then be used to fix my Xiaomi devices that drop off the
ZHA network via a watchdog style automation that restarts the integration service if device/s are offline.
This would be a great addition to the services. It would solve my problems like: my bulb accidentally got disconnected or my Zigbee Devices suddenly lost connection.
Hi all, the same for me.
I have 2 Xiaomi gateway: one of them is disconnected from home assistant after a couple of hours. I can reload this integration manually through UI.
The other one is always connected.
Can you help me write down an automatic reload of integration every 2 hours?
The @Mariusthvdb integration.reload didn’t work
Thanks
To reset the IKEA connection automatically, I’m using this in an automation:
- alias: "Keep IKEA running"
mode: single
description: 'Check IKEA HUB down'
trigger:
- platform: state
entity_id: switch.kerstverlichting # use any entity that is an IKEA device
to: unavailable
for: 00:05:00
condition: []
action:
- service: rest_command.reload_ikea
data: {}
IP: is your home assistant IP
Config Entry: is the unique config entry for your Tradfri and can be found in your directory config/.storage/core.config_entries. Search for Tradfri and use code Identity
Long-Lived Access Token can be created in the HA menu under your instance name
Make sure this secret does not only contain the config entry that you have looked up, but also the wordt ’ Bearer’. Maybe it is already correct in your secret file, but I made the mistake myself before.
An example in het REST call would be:
authorization: 'Bearer xxxxxxxxxxxxxx’, where x is your code