Hello ....
i only wanted to let you know .... maybe interested someone ....
well,
i have no solved my problems ....
not sure, where to post for now ... maybe you want to publish it ...
i will explain:
1.) i wanted to have my cameras - motion detection in home assistant
2.) i want that if a new alarm comes inot, that "holfer (input_boolean will be set to "state: on"
3.) this i can then use to play a audio file, if an alarm or whatever (in hass - autmation), and when alarm handling done, then i set the helper ((input_boolean ) to off, and so on ...
so, i checked on ONVIF, XM / IPC / http cgi what is possible and found that my NVR, can deliver the alarms to another server - typically 15002 or 15003 (not sure)
how i did it:
1.) in HASS:
create all helpers "input_boolean" to have them "read-write" eg: in my case 16 channels
nvr_alarm_motiondetection_ch01 to nvr_alarm_motiondetection_chch16
2.) on my hass server,
there rewrote an other existing "dvr-alarm-server" to my usage: "nvr-alarm-server" ... and install and running it as service
and listening on alarms on port 15003 (standard on xmeye nvr servers compatible (most on (XM IPC) port 34567 and 80 port to configure)
This perl service script is now getting the alarms, and then calling the HASS API to set the status as wanted ..
AND
2a) via curl cmd use the HASS rest api to call the "input_boolean" entities to set it to {"state": "on"} - based on alarm aevent and channel infos...
if an moton detection with "start" comes into .. then i update the entity ....
the rest .... can be done in home assistant to handle this entities on automation ...
thats it and working great ...
if anyone is interrested to get the code and infos ... let me know ...
basically - most of the parts were found on project: "sofiactl" (which is doing "alarm event 2 mqqt" .... but not sure, if that was on github ...
maybe i can send the code to the real code owner to review and adapt it ....
cu camel