There was a PR that made a fix for the PUSH and a number of other channels made here. It is in openHAB V5.0 Stable just released…
https://github.com/openhab/openhab-addons/pull/18833
Seems that the motion alarm is missing a POST content like the other commands have and looking into it in more detail with their V8 API.
Can you test the following curl commands?
Make sure to replace CAMERA_IP, USERNAME, and PASSWORD:
Enable Motion Detection:
curl -X POST "http://CAMERA_IP/cgi-bin/api.cgi?cmd=SetMdState&user=USERNAME&password=PASSWORD" \
-H "Content-Type: application/json" \
-d '[
{
"cmd": "SetMdState",
"action": 1,
"param": {
"channel": 0,
"value": 1
}
}
]'
Disable Motion Detection:
curl -X POST "http://CAMERA_IP/cgi-bin/api.cgi?cmd=SetMdState&user=USERNAME&password=PASSWORD" \
-H "Content-Type: application/json" \
-d '[
{
"cmd": "SetMdState",
"action": 0,
"param": {
"channel": 0,
"value": 0
}
}
]'
Change Sensitivity on newer camera models/firmware
curl -X POST "http://CAMERA_IP/cgi-bin/api.cgi?cmd=SetMdAlarm&user=USERNAME&password=PASSWORD" \
-H "Content-Type: application/json" \
-d '[
{
"cmd": "SetMdAlarm",
"param": {
"MdAlarm": {
"channel": 0,
"type": "md",
"useNewSens": 1,
"newSens": {
"sensDef": 40,
"sens": {
"sensitivity": 40,
"beginHour": 0,
"beginMin": 0,
"endHour": 24,
"endMin": 0,
"priority": 0,
"enable": 1
}
}
}
}
}
]'
@dniklas1
I made some changes after testing with my camera and have created a V4 and V5 jar file found here