Thank you. So this is for triggering the alarm. Do you also know how to stop the alarm after being triggered?
EDIT:
Ok, I got it that this is just for triggering the testalarm which is only being triggering the audio alarm 5 seconds by default. In my case I got it to work with a CURL command because I don’t want to use the basic authentication but only the digest authentication instead (which restful_command does not support, unfortunately) by creating a script with the following command (additionally I want to use https instead of http, just to make sure the traffic is encrypted):
curl -X PUT "https://<myHikvisionCamIPAddress>/ISAPI/Event/triggers/notifications/AudioAlarm/1/test?format=json" --user <myUser>:<myPassword> --insecure --digest
Unfortunately I did not find out (yet) how to trigger the audio alarm without the limitation of only being triggered for five seconds, but I’m on it. If anyone else finds out first, please post it here, thanks!
EDIT 2:
Ok, what I additionally found out is how to trigger the Alarm manually if you have attached an external audio alarm speaker so you can switch it on/off with the integrated relay on the Hikvision camera:
curl -T </path/to/my/file.xml> "https://<myHikvisionCamIPAddress>/ISAPI/System/IO/outputs/1/trigger" --user <myUser>:<myPassword> --insecure --digest
Where the content of the according XML files look like this:
Turn on alarm:
<IOPortData version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<outputState>high</outputState>
</IOPortData>
Turn off alarm:
<IOPortData version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<outputState>low</outputState>
</IOPortData>
Yes, I’m aware this is not the solution to trigger audio alarm signal of the internal Hikvision speaker, but maybe it helps someone with an external speaker attached. Still looking for a solution to trigger the internal speaker for more than 5 seconds though ![:wink: :wink:](https://community.home-assistant.io/images/emoji/twitter/wink.png?v=12)
EDIT 3:
Ok, I think there is no way to trigger the internal Hikvision audio alarm speaker manually, apart from the audio test alarm which is limited to only 5 seconds. Simply because there is no way to trigger the alarm via web interface and I also checked the capabilities according to the Hikvision manual which led me to the following commands:
curl -X GET "https://<myHikvisionCamIPAddress>/ISAPI/System/IO/outputs/capabilities" --user <myUser>:<myPassword> --insecure --digest
and
curl -X GET "https://<myHikvisionCamIPAddress>/ISAPI/Event/triggers/notifications/AudioAlarm/capabilities?format=json" --user <myUser>:<myPassword> --insecure --digest
but none of them gave me very promising capabilities according to manual audio alarm triggers. Only the capabilities that are available via the Web GUI were being listed, obviously.
As a workaround you could just repeat the trigger via HA script every 5 seconds as long as you need the audio alarm being triggered.
If someone finds out better, please post it here. Maybe also someone wants to place a feature request on Hikvision itself? I would definitely follow ![:wink: :wink:](https://community.home-assistant.io/images/emoji/twitter/wink.png?v=12)