Is there a way to restart an add-on in HAAS from MSR?
-
Good morning,
I have a service MQTT service that needs a restart occasionally. The add-on (Smartbed MQTT) is for the smart bed base for my bed. It has a "safety light" that I can control from HAAS & MSR as a light entity, and also moves the head of the bed to a preset at bedtime, and then lies it back flat in the morning The problem is, from time to time, the light becomes "unavailable" Restarting from the Add-ons tab in HAAS always fixes it, but I should be able to detect when it happens when "light.tempur_pedic_safety_lights" is not true or false, i.e., unavailable.What I don't know how to do is how to restart that service. Does anybody have experience in restarting add-ons from MSR?
Running:
- Reactor (Multi-hub) latest-24212-3ce15e25
- ZWaveJSController [0.1.24232]
HAAS:
- RPi5-64 (8GB)
- Core 2024.7.3
- Supervisor 2024.08.0
- Operating System 13.0
- Frontend 20240710.0
-
yup.
The hardest part is to get the ID. You have to get it via the browser tab, while reloading from the UI. https://community.home-assistant.io/t/add-service-integration-reload/231940/21?page=2
-
@therealdb, thanks for the quick response. I knew it had to be in the haas>system and some sort of system call, but I wasn't sure where. Thanks for the link. I have some reading to do.
-
-
I may have to try this at home. I'm going through Cloudflare to access my HA instance. Maybe it's interfering with what I'm trying to find.
-
That's the one.
-
ok, easier. Go to your homeassistant installation directory, look for an hidden .storage folder, and then core.config_entries.
entry_id
is the key you'll need. -
Revisiting. I never got this working. I think the issue is that the link provided talks about integrations, not add-ons.
I actually was able to create an automation through HAAS to do what I want to do through reactor. It looks like there is a addon_restart action in HAAS.
If this is an action, there should be in theory the same action in MSR.
@toggledbits, is there a way to call this action?
-
toggledbitsreplied to tamorgen on Oct 13, 2024, 7:02 PM last edited by toggledbits Oct 13, 2024, 3:03 PM
@tamorgen said in Is there a way to restart an add-on in HAAS from MSR?:
@toggledbits, is there a way to call this action?
Using Hass OS I assume? There's a command line tool you can use, described here. You would have to use that with a Shell action. If Reactor is running on the Hass OS system, that's probably easiest. Otherwise, you're going to have to write a script for the Shell action to execute that
ssh
's into your HassOS system to run their command line tool. -
@toggledbits said in Is there a way to restart an add-on in HAAS from MSR?:
Using Hass OS I assume?
Yes, I posted that on the first post of the thread.
I think I may have figured out how to do it. I just need to see if it works when the add-on goes unresponsive.
-
If it doesn't work, be sure to check the logs for how HASS responded (it will be logged). My guess that
data:
line in the service data is redundant, and it's going to complain about it, but let's see. -
@toggledbits said in Is there a way to restart an add-on in HAAS from MSR?:
If it doesn't work, be sure to check the logs for how HASS responded (it will be logged). My guess that
data:
line in the service data is redundant, and it's going to complain about it, but let's see.I thought it might be as well, but I figured I'd start with the way it was in the YAML code. If it doesn't work, I'll remove that line. The add-on hasn't gone unresponsive since I implemented this, so I can't say if it works or not.
-
-
-