Would be nice to be able to reload/restart individual integrations after having made a change to the configuration, instead if having to reload the entire configuration.
Also, if an integration fails, or happens to only do discovery on startup, the ability to re-load or restart integrations would be very helpful.
This could lead to never having to re-start unless there is an upgrade also (perhaps).
Yes I agree, if possible, this would be nice, especially when debugging integrations.
Mentioned this here:
Being worked on as we speak
Iāll also second this. I run zoneminder on the same server as HA, if I need to restart the box, then the zoneminder config doesnāt load until I restart HA.
Both are now merged!
Is the reload also exposed via a service call? (cannot find it)
This would really help me out as well.
Either service call or a python script?
I donāt believe thereās a service call for that currently. However it is possible via an API call.
If you look at the code for the tests, itās called via :
client.post(
f"/api/config/config_entries/entry/{entry.entry_id}/reload"
)
Iām not sure how you would write code that can interface with the API to make this call, but it seems possible at least.
Ok, thanks. Couldnāt wait and looked, and it is reload via an URL like:
POST /api/config/config_entries/entry/691c716d001011eba8bd99c0f2866538/reload HTTP/1.1
Tricky thing is to find the ā691cā¦ā id, that seems to be only in the .storage directory. As long I donāt delete the config entry, the id should stay the same
Can you help and show an example.
How exactly You trigger this URL?
Thanks.
If you got the URL, you can use CURL to execute it. If you want HA, put the following in your configuration (the api token you need to add to the secret file):
rest_command:
reload_sms:
url: http://192.168.1.1:8123/api/config/config_entries/entry/691c716d001011eba8bd99c0f2866538/reload
method: POST
headers:
authorization: !secret ha_api_token
Hey,
Is there already a Service to call ?
Like integration.reload or something else ?
No ā¦ Thatās why we need to resort to such REST API call.
Is this something that I can use already?
My IKEA integration i have to reload every time. At least once a day if it isnāt more.
So this is properly annoying me. I canāt see why its not working at all, it appears to be something wrong with authentication, but I canāt see whatā¦
https://10.n.n.n/api/config/config_entries/entry/a43bfad89c4487c518270203fb3b995a/reload
With
authorization xxx (long live access token)
In the header but I just get a 401 or 403 for http & https.
Iām running https on 443 (not 8123) using lets encrypt.
In the HA log I get
Login attempt or request with invalid authentication from 10.n.n.n
Iāve got api:
in configuration.yaml
Really stuck now.
I got it working. See my post in a different topic with an example:
- Feels like there should be a āreloadā menu option that uses this on every integration in the UI
- A native service call that can be called via automation not a just a REST call.
- Even better would be for there to be some form of native recovery option you could set for ALL integration to try and restart them at least once automaticly.
I have about 3 external services āOmbiā, āUnifiā, and āIkeaā that seem to break frequently and it is JUST because the service missed one poll or the service was not available on HA reboot.