With some effort, I have figured out how to get Home Assistant to turn on this camera's siren (or issue any of the other API commands listed in the sources that
@TonyR listed above). In case someone else uses Home Assistant and wants to try this out, here's a basic description of what I did.
Here's the setting... I'm running a standard Home Assistant OS installation on a Raspberry Pi 4. My ip cameras are connected via a Netgear POE switch to a separate computer running Frigate in a docker container on Ubuntu Server 22.04 (which I refer to as my Frigate NVR below). Home Assistant is on a different subnet from the ip cameras. The Frigate NVR has two NICs and physically connects to both. Home Assistant is on 192.168.X.X and the ip cameras are on 192.168.Y.Y.
One of the sources
@TonyR pointed to shows that the siren can be trigger using curl:
curl --digest -g ""
where 192.168.Y.Z is the ip address of the IPC-T5241H-AS-PV and username and password are the credentials you use to access it via its web GUI.
When I issue this command in my computer running Ubuntu Server, it triggers the siren. The challenge is that I cannot issue this command in Home Assistant because it is operating on a different subnet and cannot see 192.168.Y.Z. The solution is to have Home Assistant to log into the Frigate NVR and issue the curl command above. Here are the steps.
1. Create a new user account on the Frigate NVR (called "
ha-script"). This will be the account that Home Assistant uses to log into the Frigate NVR.
2. Create ssh keys using the command line in Home Assistant (using the "SSH and Web Terminal" add-on). I put a copy of the keys in folder called
/config/cert on the Home Assistant computer.
3. Copy the public key over to the Frigate NVR using
ssh-copy-id
(Note: I need to edit the
/etc/ssh/sshd_config file on the computer running Frigate so that
PubkeyAuthentication yes was not commented out.)
4. Now I can run the following command in Home Assistant which essentially tells Home Assistant to log into the Frigate NVR and execute the curl command above:
ssh -i /config/cert/id_rsa -o StrictHostKeyChecking=no [email protected] 'curl --digest -g ""'
where 192.168.X.X is the ip address of the Frigate NVR.
My next step will be to make a button in Home Assistant so that I can manually trigger the siren there. Once I get that working, I will create more elaborate automations. For example, I going get a Google Coral USB and have the siren go off if a person is detected in the vicinity of my ground floor windows.
Also, one observation, the siren only goes off for approximately 10 seconds so there is no point to having Home Assistant to turn it off. It seems to turn off automatically. This means I have to have Home Assistant continue to repeat the process as long as someone is outside my windows.
Hopefully this helps someone out there.