curl http code to change scene

andycots

Getting the hang of it
Joined
Feb 21, 2015
Messages
172
Reaction score
81
Location
West Yorkshire, UK
Hi, i have spent a while now trying to find the http request to pull the scene info from my cam, i can pull the usual image info, but the problem is it will not load the slow shutter settings for night time, i figured out if i could change the scene mode to day, night, indoor or outdoor through http, this will deal with the shutter problem.

i know i could change it through timings in the camera, but that does not allow for sunset, sunrise, so trying to let BI send a command.

Edit

the camera will not pull this info

/ISAPI/Image/channels/imageModes

Andy
 
Last edited:

StewartM

Getting the hang of it
Joined
Dec 11, 2017
Messages
260
Reaction score
75
Location
Cape Town
Enable CGI on the camera and create an admin user.

Day
PUT:
http://admin:xxxxx@192.168.1.64/ISAPI/Image/channels/1/ircutFilter
Body:
<IrcutFilter>
<IrcutFilterType>day</IrcutFilterType>
<nightToDayFilterLevel>4</nightToDayFilterLevel>
<nightToDayFilterTime>5</nightToDayFilterTime>
</IrcutFilter>

Night
PUT:
http://admin:xxxxx@192.168.1.64/ISAPI/Image/channels/1/ircutFilter
Body:
<IrcutFilter>
<IrcutFilterType>night</IrcutFilterType>
<nightToDayFilterLevel>4</nightToDayFilterLevel>
<nightToDayFilterTime>5</nightToDayFilterTime>
</IrcutFilter>

Outdoor
PUT:
http://admin:xxxxx@192.168.1.64/ISAPI/Image/channels/1/scene
Body:
<Scene><mode>outdoor</mode></Scene>

Indoor
PUT:
http://admin:xxxxx@192.168.1.64/ISAPI/Image/channels/1/scene
Body:
<Scene><mode>indoor</mode></Scene>
 

andycots

Getting the hang of it
Joined
Feb 21, 2015
Messages
172
Reaction score
81
Location
West Yorkshire, UK
Still struggling, i cannot still pull the scene info, i created a bat file with scene info, but still nothing, i have put a picture in to show what i am trying to change below, the first scene box will change the camera from mode to mode fine, but i cannot find the correct info to change this setting, i could just use the basic create my own and pull/curl xml files for day settings and/or night settings but it will not pull the slow shutter info, it does pull everything else, exept, i will put the 2 xml's on too one will be day with wdr on and the other will be night, but no slow shutter on the night one.

Edit

Been messing with other cams, curl, and finding out that if i create a bat file to night, it will automaticly turn wdr off and set the shutter and does it ok, but when i try in reverse i cannot, i have tried creating a middle file to shut the wdr off before then another to open the shutter at night, but this doesnt work either. it seems to work goint to night but not to day. This bit is related to a differant cam not the above problem. i have put the xml files below as frontcam.

Also i am not computer savvy and am learning, really slowly.

i have tried altering the xml file to shut the wdr of before it opens the shutter, that not work either.

And my head hurts now. lol

Edit

Getting closer, top problem solved, found out the are 2 xml versions in camera, v1 v2, one seems to use ISAPI and one not, not sure, anyone?

Andy
 

Attachments

Last edited:

StewartM

Getting the hang of it
Joined
Dec 11, 2017
Messages
260
Reaction score
75
Location
Cape Town
First check these settings on your cameras are enabled:
upload_2019-9-15_15-14-41.png

Regarding Slow Shutter - My G1 series cameras don't support many of the advanced exposure features so the following may not be totally accurate. If I tweak the http to show all exposure menu options, 'Slow Shutter' reveals as 'DSSLevel'. DSS is listed in your xml attachment, so it a good place to start.
upload_2019-9-15_15-18-3.png

Give this a try:
PUT:
http://admin:xxxxx@192.168.1.64/ISAPI/Image/channels/1/DSS
Body:
<DSS>
<enabled>true</enabled>
<DSSLevel>normal</DSSLevel>
</DSS>
 

andycots

Getting the hang of it
Joined
Feb 21, 2015
Messages
172
Reaction score
81
Location
West Yorkshire, UK
Thanks for your help StewartM, got one camera working ok which is the newest one/model, the other 2, still struggling, but chipping away, still got the going to night mode on both ok, which involves setting shutter to 1/6 and turning wdr off and this works on them both, but i cannot get either of them to do the reverse, which is turn shutter to 1/25 and turn wdr on for day mode.

Not sure but what is the differance between, ISAPI and no ISAPI then having the 1 behind the channels/, i ask because it seems to pull the info in various ways, eg: /ISAPI/image/channels/1 or /image/channels/1 or both ways without the /1, not sure if this is the problem with it maybe not getting or putting info back where it should be.

I will put a set of the problem files up, it goes to night mode ok but not back to day.

For what its worth i have done the .bat save in both ansi and utf-8, thingy

Andy
 

Attachments

Last edited:

StewartM

Getting the hang of it
Joined
Dec 11, 2017
Messages
260
Reaction score
75
Location
Cape Town
From my poking around - For WDR to accept the request to 'On', it requires the Exposure Time to first be set to 1/25 or above. Same with turning WDR off, it needs the Exposure Time to be first be set to anything lower than 1/25 before it accepts the request. Please post your bat file (amended to exclude passwords) so I can test it my side. Rename it .txt if the forum won't accept the bat format.
 

andycots

Getting the hang of it
Joined
Feb 21, 2015
Messages
172
Reaction score
81
Location
West Yorkshire, UK
Hi, i have put it all up, the side works ok now, its just the other 2 and like i say i can put both into night but not back to day. thank you.

Andy
 

Attachments

StewartM

Getting the hang of it
Joined
Dec 11, 2017
Messages
260
Reaction score
75
Location
Cape Town
Great, I'll have look and get back to you soonest. When you next have a chance please post the camera models and firmware, it might help narrow the issue down.
 

andycots

Getting the hang of it
Joined
Feb 21, 2015
Messages
172
Reaction score
81
Location
West Yorkshire, UK
if i am logged into the camera via webpage i can load isapi info ok but if i log out then it will not pull info.

Andy
 

andycots

Getting the hang of it
Joined
Feb 21, 2015
Messages
172
Reaction score
81
Location
West Yorkshire, UK
Found a bit of a solution, i have to xml the shutter to adjust first with a separate bat file before i can adjust the wdr and things, then i can adjust the wdr with another bat, which is a bit long but it works, i can adjust the contrast, bright and things along with the wdr xml, then i have do reverse things for night, turn the wdr off with a bat then a separate bat to open the shutter.

How to i make a bat file to do 2 things, i want to curl the shutter first then straight onto the wdr setting, how do i make the bat file do this.

Edit, found it &&

Andy
 
Last edited:
Top