frigate-hass-integration
frigate-hass-integration copied to clipboard
Access the event id from a binary_sensor.*_occupancy state change
I would like to access the event_id so I can build an image URL.
I am triggering now on the state change of binary_sensor.*_occupancy from off to on. But after that I am not able to access the event_id (Or maybe I am overlooking things...).
Is this a new feature? Am I overlooking things? Or is it a bug?
We recommend using the MQTT topic for this, the binary sensor / frigate doesn't have this info and I think it would be quite difficult especially in cases where multiple objects enter at the same time and also for different zone binary sensors.
If you just want an image you can use /api/<camera>/<label>/thumbnail.jpg
to get the latest image for that camera and label
I'll try that. But I thought I was doing /api/<camera>/<label>/snapshot.jpg
and that lagged just one event behind. I'll report back if this still happens
Unfortenately the /api/<camera>/<label>/snapshot.jpg
lags one event behind.
Just tested with /api/<camera>/<label>/thumbnail.jpg
that also lags one event behind.
You likely need to give it some delay, it takes time after the object is first detected before a snapshot / thumbnail is saved. But it will return a snapshot / thumbnail for in progress events. The same would happen if trying to get the thumbnail via event id
In any case, if you want granular control using MQTT topics is the way to go.