I updated to 21256 (docker). The http put is working for me now. Thank you for the quick fix to the issue.
whyfseeguy
Posts
-
MSR http PUT error -
Using Hikvision HTTP API request with MSRHere is an example of what I did with my Hikvision camera settings using MSR and ISAPI to change the scheduled switch (day/night) based on sunrise/sunset daily etc. Nearly all configurable options on the Hikvision can be changed with ISAPI.
HTTP Request: PUT
Request URL:http://user:pass@ipcamaddr:80/ISAPI/Image/channels/1/ISPMode
Request Header:Content-Type: application/xml
Request Body:<ISPMode xmlns="http://www.hikvision.com/ver20/XMLSchema" version="2.0"> <mode>schedule</mode> <Schedule> <scheduleType>day</scheduleType> <TimeRange> <beginTime>${{hikvision_sunrise}}</beginTime> <endTime>${{hikvision_sunset}}</endTime> </TimeRange> </Schedule> </ISPMode>
Capture response to:
text_response
set the following expressions:
text_response= hikvision_sunrise=strftime( "%R" , ( getEntity( "reactor_system>sun" ).attributes.suninfo.sunrise + ( 30 * 60 * 1000 ) ) ) hikvision_sunset=strftime( "%R", ( getEntity( "reactor_system>sun" ).attributes.suninfo.sunset - ( 30 * 60 * 1000 ) ) )
I offset the sunrise and sunset time by 30 mins both ways (30 * 60 * 1000). You can use civil dusk and civil dawn too if that works better for you.
For IRCut Filter, which is where the supplemental light setting is located, set it to ON then control it with the scheduled switch (there is no ISAPI to set it on/off unfortunately)
Request:
http://user:passipcamaddr:80/ISAPI/Image/channels/1/IrcutFilter
Header is the same as above
Body:<IrcutFilter xmlns="http://www.hikvision.com/ver20/XMLSchema" version="2.0"> <IrcutFilterType>schedule</IrcutFilterType> <nightToDayFilterLevel>4</nightToDayFilterLevel> <nightToDayFilterTime>5</nightToDayFilterTime> <Schedule> <scheduleType>day</scheduleType> <TimeRange> <beginTime>${{hikvision_sunrise}}</beginTime> <endTime>${{hikvision_sunset}}</endTime> </TimeRange> </Schedule> </IrcutFilter>
With ISAPI, there are many more things you can set on the camera without using the GUI.
-
TTS in MSR?It is working now with your recipe. I had too many "data" in data field. I was following the examples above and got confused.