bp2008 / dahuasunrisesunset Goto Github PK
View Code? Open in Web Editor NEWA Windows Service which changes the profile of dahua cameras between Night and Day at each sunset and sunrise.
License: GNU General Public License v2.0
A Windows Service which changes the profile of dahua cameras between Night and Day at each sunset and sunrise.
License: GNU General Public License v2.0
Hi,
I have 10 Dahua EZ-IP IPC-D20B20-ZS cameras, and unfortunately It seems your tool gives me an exception:
Exception thrown attempting web request (http://192.168.0.130/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1): The request was aborted: The operation has timed out.
Opening that link on a browser returns a 404 error page (generated by the camera, not the browser)
I tried to sniff the browser data being changed while sapping the Day/Night options via the web interface and I got this:
Message: POST
To: 192.168.0.130:80/RPC2
Authorization: Basic Authentication (user+pass)
Body: JSON with contents: {"method":"configManager.setConfig","params":{"name":"VideoInMode","table":[{"Config":[X],"Mode":0}],"options":[]},"id":0,"session":"528b19ba62cb02611358896"}
Where [X] is 1 or 0 depending on the day or night profile, the session ID its generated somewhere.
Has anyone contacted you related to any API changes? Since I am not able to find the cgi-bin directory.
Thank you so much for the information
If the camera is unreachable at sunrise or sunset, but comes online later, it remains stuck in the previous mode. The service should retry all http requests until they are successful or until the next sunrise/sunset event, whichever happens first.
the program works with my dahua zoom camera but not the turret cams their model numbers are IPC-HDW4631C. when i try on those cameras the program just freezes indefinitely
Hello, I have some issues with this great tool an the set of sunset and sunrise.
I am running Win2019 HomeServer (english, display language englisch but keyboard german and country region german). This means:
Short date: 07.06. 2022
Long date: Dienstag, 07.06.2022
Short time: 21:13
Long time: 21:13:51
My area is:
Long: 51.374336
Lat: 6.938794
However, if I user the above 51.374 / 6.938 the parameter are not saved correctly. They are saved as 51374 and 6938, which means that "View sunrise/sunset" gives an error. Therefore I am using only 51 and 7.
"View Sunrise/Sunset" is now 07.06.06.2022 21:43:41 and 08.08.2022 05:20:20 which is correct.
I am uisng "Sunrise/Sunset Offset Hours" 1/-1 which shows:
07.06.06.2022 22:43:41 and 08.08.2022 04:20:20
So far so good.
If I now (07.06.06.2022 21:28:41) start the service the profiles goes to the "Night profile" !!
Something is wrong with time setting (perhaps due to german region ?).
I tried to configure this app to use the alternate code as that's what works for my camera, but the option does not get activated. Thanks for building this.
Could you update to set beginTime and endTime straight from he inputs rather than a cron job? This way your code for sunrise and sunset can be used straight away rather than having a long wait.
Hello,
In addition to the existing functionality, it would be really helpful to have a field for FPS (and possibly max bitrate) for day and night modes. Is this something that can be added? I'm happy to fund this modification.
The upside of this functionality is for tourism cameras where color night mode can be greatly enhanced with longer exposure time and lower frame rate. The longer exposure time can be adjusted within the camera's night mode, but the FPS is independent of day and night modes.
Thank you.
Hello,
DahuaSunriseSunset.exe does not work after daylight savings -- it did not change the profile of the cameras as it normally would.
When the "View rise/set" is clicked, the message box says "label1" instead of the expected output.
Note: Sunrise Offset Hours are 0, and my Sunset Offset Hours are -0.1.
Error log is as follows:
27/09/2021 12:06:19 PM DahuaSunriseSunset 1.8.0.0 Service Manager Startup
27/09/2021 12:09:05 PM Application_ThreadException
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Time offsets cannot be greater than 12 or less than -12.
at CoordinateSharp.Coordinate.set_Offset(Double value)
at DahuaSunriseSunset.SunHelper.Calc(Double lat, Double lon, DateTime& nextRise, DateTime& nextSet, Boolean& timeZoneAndLongitudeAreCompatible, Double sunriseOffsetHours, Double sunsetOffsetHours)
at DahuaSunriseSunset.ViewNextSunriseSunset.ViewNextSunriseSunset_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Hello.
I appreciate your code and I'd like to be able to modify it for my purpose, but I'm not so skilled to do it.
I have two Dahua cameras (HDW5442 and HDW5449) and both of them have the problem that when I change the profile from nigth to day, FTP stops to upload the snapshots to my server. If I reboot the camera, FTP starts to work again.
Can you consider to add the option to invoke a reboot after profile change?
Thank you
Would you consider letting this application control Hikvision cameras also? I have a python script I run to control them, i could add it into this utility.
If you live in a UTC+00:00 timezone (Dublin, Edinburgh, Lisbon, London) but your location has a negative longitude (West of the meridian line so most of the UK/Ireland and all of Portugal), the following error occurs when clicking View Sunrise/Sunset and the app appears unable to calculate a valid sunrise/sunset time.
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.