Windows utility to set Hikvision Image Parameters Switch Scenes based on local sunrise sunset times

johnfitz

Getting comfortable
Joined
Feb 4, 2021
Messages
319
Reaction score
452
Location
NY
Hi... I created this utility to set the Image Parameters Switch on Hikvision cameras using local sunrise/sunset times... I have attached a copy of the Windows utility if anyone wants to try it out...


Screenshot 2024-03-22 083522.png

Screenshot 2024-03-22 083725.png

PLEASE USE LATEST VERSION AT END OF THREAD!
 

Attachments

Last edited:

johnfitz

Getting comfortable
Joined
Feb 4, 2021
Messages
319
Reaction score
452
Location
NY
a few instructions:

The first time you run it, enter your latitude and longitude coordinates... you can get these by right clicking on you location in google maps... after entering these, you should see correct sunrise/sunset times for the current date/location...

enter your camera's username and password... enter an IP address and port number for a camera you want to add... for cameras on the LAN, the port number will most likely be 80... for cameras connected to NVR PoE ports, use the NVR IP address and 65001, 65002, etc. as the port number... "virtual host" must be enabled on the NVR for this to work...

hit the add button... the utility will then send a http get "/ISAPI/Streaming/channels/101/capabilities" request to the camera to see that it exists and get the camera name... if it is found, it then sends a http get "/ISAPI/Image/Channels/1/displayParamSwitch" request to check which version of the image parameters switch the camera uses...

the camera is then added to the camera list... you can use the edit button to change the sunrise/sunset scenes or minute offsets from sunrise/sunset you would like to use... while in edit mode, you may also delete any cameras that have been added... add as many cameras as you like... then hit the "IPS On" button and http put requests will be sent to each camera to set the image parameter switch schedules.

The utility uses the sunrise/sunset times for 15th day of each month to set the schedule. Older cameras with a version 1.0 image parameters switch look like this:

Screenshot 2024-03-22 094829.png

These V1.0 cameras only have one setting (not 12 months) so the 15th of the current month is used to set those... I have two older cameras like this, so I intend to run the utility once a month to keep these updated.

On first use, the utility will create a configuration file (.ini) that saves the username, latitude, longitude, and camera information for subsequent runs. The configuration file is updated anytime changes are made... the camera password is not saved and will need to be entered each time the utility is run... one limitation is that all cameras must be using the same username and password.

I'm looking forward to any feedback and will help/correct any issues found!
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
736
Reaction score
230
Location
Croatia,Zagreb
you should start working on all in one. I saw you made an SD download form app, just integrate more options/tabs in one. Not necesarilly needs to be more damnding, as you free delegates once form is closed.

Worst part is having a good idea and plan :D

1 suggestion. Use ,net core as its multi platform

If you want we can colab if its c#. Make a github repo
 

johnfitz

Getting comfortable
Joined
Feb 4, 2021
Messages
319
Reaction score
452
Location
NY
If you want we can colab if its c#. Make a github repo
It's in Visual Basic... I can rewrite in in C# pretty quickly and then get it on github... that will be new for me so may have github questions for you once I have it rewritten!
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
736
Reaction score
230
Location
Croatia,Zagreb
Create github acc, In visual studio you have

1711139475985.png


You should have option create repository, mine is already created. Name it, and push it. By default its private repository, if you want anyone to access it uncheck that, otheerwise its an invitation only.

Once its up i can clone your repository and continue to add/modify and push to different branch as a patch which you can merge to master branch if you deem so
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,677
Reaction score
14,029
Location
USA
Top