How can I get BI to send a HTTP command at sunrise and sunset

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,141
Reaction score
4,118
Location
Brooklyn, NY
Last edited:

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,825
Reaction score
6,377
Don't think that you can directly unless based on some other trigger.

ETA: Never mind... Read too fast. The day/night utility doesn't do quite what you want.
 

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,825
Reaction score
6,377
Post back if you figure out a good way to do. That would be useful.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,433
Reaction score
47,557
Location
USA
What does that API command do?

And let us know if you figure it out. I have a profile set up that I want to use to turn off certain features within the camera via API, but as the other Mike mentioned, it needs a trigger first.

It is on my list of things to figure out, but hasn't been a priority, but I am sure there is a way to do so on profile change.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,141
Reaction score
4,118
Location
Brooklyn, NY
And let us know if you figure it out.
It worked below are the steps

Step 1 create an sunrise/sunset override schedule.
Schedule.jpg

Step 2 create a trigger event 1 minute after sunrise
Sunrise Event.jpg

Step 3 create a trigger event 1 minute after sunset
Sunset Event.jpg

Step 4 create two trigger immediate actions
Trigger.jpg

Step 5 create sunrise Web Request
Sunrise Web Request.jpg

Step 6 create sunset Web Request
Sunset Web Request.jpg
 
Last edited:

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,433
Reaction score
47,557
Location
USA
Ah - right there in front of my face LOL. I already do that with one camera to move the PTZ to a different Preset based on time.
 
Joined
May 1, 2019
Messages
2,215
Reaction score
3,504
Location
Reno, NV
I mean...there is BP's Dahua sunrise/sunset utility program. Used it for a year and it works great.
I eventually relied on my LUX sensor that is built into a weather station to interact with Home Assistant that has Dahua integration. I just like the local control and figured relying on LUX instead of yearly calculated sunrise/sunsets would be more accurate (dark clouds, rain, etc).
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
Here’s another interesting option… one that uses Task Scheduler instead of triggering a camera via its events schedule.

Simply execute sunwait.exe as the first Action in a daily scheduled Task to delay execution of the remaining Actions (your urls) until the desired sun time. Click <here> to learn more.

An example ‘sunrise’ task follows… the task executes at 5am, executes sunwait.exe, then waits until sunrise at my location to execute its remaining actions. In this case two urls are executed from Chrome in the foreground - you’ll see new tabs opened In the browser.

1637738026717.png


1637738058800.png


Where Action #1 is...
'Program' = c:\bin\sunwait
'Add argments' = wait rise offset -0:02:00 36.xxxxxxN 109.xxxxxxW

and Action #2 is...
'Program' = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
'Add argments' = “your url”

and Action #3 is...
'Program' = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
'Add argments' = "another url"
 
Last edited:

Takeover

n3wb
Joined
Apr 4, 2021
Messages
2
Reaction score
1
Location
Oklahoma
You should consider using "Home Assistant" the Reolink and Dahua integrations allow these settings to be changed. For example I have an automation when a light turns on or off to also toggle "color/blackandwhite" mode. It is super simple to setup and I am a complete HA noob. There is also a Blue Iris integration that has alot of mqtt commands to control Blue Iris itself, you would then use this to make automations much more complicated then my little brain could :)

 
Top