Anyone knows how to make an automation based on addon state “stop/start/restart”?
I tried with the supervisor integration but it is not working…
I have frigate addon installed and I want to make an automation when the addon has been restarted.
Please don’t post your tokens. They can be used against you. I have edited your post and hidden the original.
Stopping the the addon should work. Not sure what the sensor scan interval is though (it is polled, not push). The addon might have to be off for somewhere between 10 to 60 seconds before the state updates.
Leaving aside your value_template issues, you’re definitely not going to catch a brief addon outage with this:
I would recommend not increasing this to the required 1 second. As calls to the HA API are quite CPU intensive.
Does the Frigate addon (not the supervisor integration) produce any sensors that you could monitor for the “unavailable” state when it is off?
Their state may be pushed and thus update virtually instantly.
It’s ok, I didn’t put the real token, thanks anyway for being cautious
The scan interval from that rest sensor, does really not matter because I get error in the log, as I said… so… it is useless
Yes, frigate from supervisor, have a very big delay, if I restart the addon, it won’t catch the state change, only if I stop it for 20-30 seconds, then it will catch the new state.
The frigate addon, no… nothing, only a sensor which is always unknown
I was looking at it the other way, even if we fix the state issue, it will have the same problem as the supervisor integration. Worse even, you’d have to wait up to 10 minutes for it to update. And as I said, it is not a good idea to poll the HA API too frequently.
Yeah ok, the polling interval must be 30 seconds.
I’m out of ideas then.
Why do you need to know if the Frigate addon is restarted?
There may be another way to accomplish what you need.
I understand.
I think the most helpful thing is something which can be requested and get the state… But I don’t have any idea.
I still search
Thank you!
I have 10 cameras configured in frigate and two of the cameras I want them to have motion enabled not always. All good, an automation with a time schedule will do this, it is ok. But when I restart the frigate addon, all the frigate settings for cameras are reinitiated, does not care about the automation.
In my mind, I said that if I will make an automation which will be triggered by the frigate restart and the first automation can be retriggered/rechecked, something.
Real case: I have recording and clips enabled for two cameras, but I always have these settings off (manually, everytime when I restart the addon), because I don’t need them on right now and I don’t want to change the settings in the yaml till I want them real on Thinking that maybe I can find a way to achieve this by having a sensor for addon state, could open me more ideas in the future…
Thanks for the idea. I will use switch.camera_kitchen_frigate_detect because the camera could go unavailable if is not working, but the switch it will be always available.
This switch entity it is from frigate integration, in the devices, not from the frigate addon. The addon produces the integration and the integration produces entities.
I think it was a little confusing because I looked straight to the addon part , but yes, if you follow the path, it will take me to the same result, now that I know what you have referred to.
Anyway, I didn’t know that the entities like switch/camera from the integration will go “unavailable” instantly, I was always watch other entities from frigate and those were not changing the state when frigate was off…