HIKVISION ISAPI instead of CGI

Hi,

I am using the HIKVISION integration for 4 camera and it’s work nice!
I have just bought a new camera and this doesnt have the CGI activation option.
I have check on HIKVISION site and it’s appear that since middle 2022, the new camera doesn’t include the management of the CGI! Hikvision sait that we need to us the ISAPI API.

ISAPI is existing since long time!
So my question is, somebody know what is necessary to add in YAML to configure the on/off from event motion detection ?

I have put this but for the moment it doesn’t work.

  - platform: command_line
    switches:
      motion_detection_hikvision:
        command_on: 'curl -k -u login:password "http://192.168.X.XXX/ISAPI/System/Video/inputs/channels/1/motionDetection" -X PUT -d "<MotionDetection><enabled>true</enabled></MotionDetection>"'
        command_off: 'curl -k -u login:password "http://192.168.X.XXX/ISAPI/System/Video/inputs/channels/1/motionDetection" -X PUT -d "<MotionDetection><enabled>false</enabled></MotionDetection>"'
        friendly_name: "Hikvision Motion Detection garage"
        icon_template: >-
          {% if is_state('switch.motion_detection_hikvision', 'on') %}
            mdi:video-account
          {% else %}
            mdi:video-off
          {% endif %}    

Thank

we can’t access the feed, or sub stream via URL anymore since the firmware update mid 2022… you can use Onvif which includes some of the hikvision events, like motion / linecrossing etc. but I have not been able to get the sub stream