Trigger one hour before sunset

#1

I'm trying to figure out how to have something trigger one hour before sunset. I've found Bigtimer, but it's not respecting the offset when I use "Sunset" as the trigger time. I haven't found very detailed documentation on it, everything just points back to the blog post which isn't really comprehensive.

Here's how I have it setup:

I have tested the offset by manually setting an "On Time", then using a negative On Offset (just like shown here), and it triggers just when I expect it to.

But when the On Time is set to Sunset, it seems to ignore the On Offset and just fires right at Sunset. Is there another way to do this?

0 Likes

#2

YOur best bet would be to ask Peter Scargill on the blog you have referenced. He is very responsive and will point you in the right direction

regards

Craig

0 Likes

#3

Maybe try clearing out some of the extra fields. Here is mine which works:

You might want to setup a separate node with just Sunset and verify the off time's are same/different. I have 2 nodes below with the Evening set for Sunset and the Early Evening set 30 minutes prior (above). You can see the 30 minutes difference in the time when they will turn back on below:
image

0 Likes

#4

Another option would be to use the node-red-contrib-schedex

1 Like

#5

rogersmj,
As craigcurtin mentioned, contacting Peter is the best option.

If you like to go for a workaround,

, this flow could work. :neutral_face:

-anita

0 Likes

#6

Thanks all, I'll try posting on that blog.

Haha, I kept adding those other fields in an attempt to get it to work.

Weirdly, I can't set the on/off time 2 fields to empty, like you have. I have to choose something -- it's defaulted to 00:00. But I don't think that would make a difference here, and it's not firing at midnight.

OK I'm trying that out, but my coordinates are correct and it's firing exactly at sunset right now.

0 Likes

#7

That's because I deployed mine long before he added the 2nd on/off time. From looking at it I suspect if the 2nd times are equal it doesn't deploy.

Have you tried with a hard coded time? I just did a quick test of deploying a new node, using the default lat/long, setting it to an exact time in the near future, deployed, verified the time until on, then added a negative offset, deployed, and verified the time had decreased by the appropriate amount.

Maybe also make sure your system time is set correctly on your server.

0 Likes