MSR http PUT error
-
Using MSR on Docker. The automation is to send xml body to my Hikvision camera to change the WDR based on the time of day. But getting the following error:
TypeError: Cannot read property 'length' of undefined
at Engine._resume_reaction (/opt/reactor/server/lib/Engine.js:1319:192)
at Engine._process_reaction_queue (/opt/reactor/server/lib/Engine.js:1114:100)My MSR rule:
HTTP Request: PUT
HTTP Request: http://camipaddr/ISAPI/Image/channels/1/WDR/day
HTTP Header: Content-Type: application/xml; charset="UTF-8"
HTTP Body:
<?xml version="1.0" encoding="UTF-8"?>
<WDR version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<mode>open</mode>
<WDRLevel>40</WDRLevel>
</WDR>Any idea why I am getting the above error?
Thanks.
-
Do you get the error if the body is empty?
-
Hi Patrick,
I got a 403 when the body is empty, indicating it has passed through the MSR, it got rejected by the camera. So I say it is working without the body as MSR did not throw an error.
Thanks.
-
New docker images posted. Update and give it a try.
-
I updated to 21256 (docker). The http put is working for me now. Thank you for the quick fix to the issue.
-
Using MSR on Docker. The automation is to send xml body to my Hikvision camera to change the WDR based on the time of day. But getting the following error:
TypeError: Cannot read property 'length' of undefined
at Engine._resume_reaction (/opt/reactor/server/lib/Engine.js:1319:192)
at Engine._process_reaction_queue (/opt/reactor/server/lib/Engine.js:1114:100)My MSR rule:
HTTP Request: PUT
HTTP Request: http://camipaddr/ISAPI/Image/channels/1/WDR/day
HTTP Header: Content-Type: application/xml; charset="UTF-8"
HTTP Body:
<?xml version="1.0" encoding="UTF-8"?>
<WDR version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<mode>open</mode>
<WDRLevel>40</WDRLevel>
</WDR>Any idea why I am getting the above error?
Thanks.
@whyfseeguy I also have a Hikvision camera since a month and I'm playing with it. Now I read your post that you can set a variable remotely through ISAPI. That would be cool. Could you explain how you can do that with MSR. I want to turn the smart supplement light on and off at a certain hour. Now I do that with scheduled switch but it's better with sun rise and sun set with logic MSR
-
T toggledbits locked this topic on