curl http code to change scene

Discussion in 'Hikvision' started by andycots, Sep 13, 2019 at 2:43 AM.

Share This Page

  1. andycots

    andycots n3wb

    Joined:
    Feb 21, 2015
    Messages:
    25
    Likes Received:
    6
    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: Sep 13, 2019 at 8:02 AM
  2. StewartM

    StewartM Getting the hang of it

    Joined:
    Dec 11, 2017
    Messages:
    151
    Likes Received:
    31
    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>
     
    alastairstevenson likes this.
  3. andycots

    andycots n3wb

    Joined:
    Feb 21, 2015
    Messages:
    25
    Likes Received:
    6
    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
     

    Attached Files:

    Last edited: Sep 14, 2019 at 1:35 PM
  4. StewartM

    StewartM Getting the hang of it

    Joined:
    Dec 11, 2017
    Messages:
    151
    Likes Received:
    31
    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>
     
  5. andycots

    andycots n3wb

    Joined:
    Feb 21, 2015
    Messages:
    25
    Likes Received:
    6
    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
     

    Attached Files:

    Last edited: Sep 15, 2019 at 1:22 PM
  6. StewartM

    StewartM Getting the hang of it

    Joined:
    Dec 11, 2017
    Messages:
    151
    Likes Received:
    31
    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.
     
  7. andycots

    andycots n3wb

    Joined:
    Feb 21, 2015
    Messages:
    25
    Likes Received:
    6
    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
     

    Attached Files:

  8. StewartM

    StewartM Getting the hang of it

    Joined:
    Dec 11, 2017
    Messages:
    151
    Likes Received:
    31
    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.
     
  9. andycots

    andycots n3wb

    Joined:
    Feb 21, 2015
    Messages:
    25
    Likes Received:
    6
    Here you go. Cheers
     

    Attached Files:

  10. andycots

    andycots n3wb

    Joined:
    Feb 21, 2015
    Messages:
    25
    Likes Received:
    6
    Hi, could it be because i have the camera cloned in BI.

    Andy