BigTimer not launching with sunrise

I have a flow that turns the lights on/off around my property. I have been switching over from other disjointed automation methods to Node Red (in Home Assistant).
Enter Bigtimer! I love what it is supposed to do, but I am confused why I can't seem to get it to work. I think it worked fine before the last time change (east coast of USA), but that could just be a false memory.
What am I doing wrong? Today, sunrise is at 705AM where I live. The instance of Bigtimer I am using to turn on my lights never launched -- I have a debug node connected. It should have launched at 505AM.



I took these screenshots at ~628AM, so you can see the timer doesn't align wtih when the ON function should have been launched??
Thanks for looking this over for me.

[{"id":"045e02bc190bbc17","type":"bigtimer","z":"da91a4002022d623","g":"73b4600cd687558c","outtopic":"","outpayload1":"on","outpayload2":"off","name":"Outside [Sunrise-120/Sunset-15 => Sunrise+5/2200]","comment":"","lat":"28.0321946","lon":"-81.747546","starttime":"5003","endtime":"5003","starttime2":"5004","endtime2":"1320","startoff":"-120","endoff":"+5","startoff2":"-15","endoff2":"+0","offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xday7":0,"xmonth7":0,"xday8":0,"xmonth8":0,"xday9":0,"xmonth9":0,"xday10":0,"xmonth10":0,"xday11":0,"xmonth11":0,"xday12":0,"xmonth12":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":true,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":240,"y":860,"wires":[["4008883336eae79e","e35d9fcb6c07a181"],[],[]]}]

Is your 'On Time' set correctly as it has Sunrise as the OnTime and OffTime ??

Here are some screen-shots of my use of Big Timer in Node-RED (not HA).



1 Like

It is correct. I have On Time set to Sunrise - 120 minutes and Off Timet set to Sunrise + 5 minutes.

Right now, it is ~10:10AM. Sunset is 19:50PM. In this screenshot, I can see that the math works for Off Time, which is Sunset - 15 minutes. So, it seems that sunset is being calculated correctly, but sunrise is off by what I think is 1 hour. At first, I thought maybe Bigtimer isn't using the current DST calendar, but that doesn't make sense if On Time (Sunrise) is wrong but Off Time (Sunset) is correct. Oh, and the Off Time (Sunrise + 5) works. I can see that the lights turned off at 7:07AM.


I cannot see anything obvious, are you certain it didn't turn on ? (debug is not fool proof)

Is there a log in HA for example ?

It might be helpful when debugging this to turn of randomize all offsets, as this may add or remove 5 mins from each event.

It definiltely did not turn on. All the lights outside were off when I got up to feed the pets a little before 6am. I triggered the flow by using the 6AM trigger I installed for testing. I noted that the flows did not trigger attempting to turn on the lights and the checks I built in to a repeater did not show they were launched either.

I didn't grab a screenshot of this this morning, but, as you can see, it launched at an arbitrary time because that's when I kicked it off for some testing.

Are you sure there was not a power fail at that time, or node red restarted?

The network reboots at 2AM. That's the only thing that happens on a regular basis. There definitely wasn't a power outage and I don't know why Node Red would have done a restart.

Regardless, the bigtimer time til next event doesn't line up with sunrise. That's why I'm so confused.

Right now, for instance, it is 11:10PM. Sunrise is at 6:59AM.

Bigtimer is telling me that the lights will remain off for 7hr 51m. That's until 6:59AM... not 3:59AM (Sunrise - 3 hours).

What am I not understanding? The sunset routine ran correctly this afternoon, so I know this stuff shoudl be working

image

I just did a quick test and it seems to work ok for me.

Can you export just that problem node, and I can see if it works on my system.

Thanks... I've never done the export (copy paste). Hopefully this will suffice?

> [{"id":"045e02bc190bbc17","type":"bigtimer","z":"da91a4002022d623","g":"73b4600cd687558c","outtopic":"","outpayload1":"on","outpayload2":"off","name":"Outside [Sunrise-180/Sunset-15 => Sunrise+5/2200]","comment":"","lat":"28.0321946","lon":"-81.747546","starttime":"5003","endtime":"5003","starttime2":"5004","endtime2":"1320","startoff":"-180","endoff":"+5","startoff2":"-15","endoff2":"+0","offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xday7":0,"xmonth7":0,"xday8":0,"xmonth8":0,"xday9":0,"xmonth9":0,"xday10":0,"xmonth10":0,"xday11":0,"xmonth11":0,"xday12":0,"xmonth12":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":true,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":240,"y":860,"wires":[["4008883336eae79e","e35d9fcb6c07a181"],[],[]]}]

It keeps converting the final square brackets into a square. Grrr. I imagine someone will set me straight on how to upload this better. I'm adding the screenshot so you can see how the brackets line up at the end.

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

You can edit and correct your post by clicking the pencil :pencil: icon.

See this post for more details - How to share code or flow json

Is this running on a Pi with a wifi connection to the network? There have been problems with some nodes in such situations because node red may startup before the wifi connects, which may mean that the clock has not synchronised and so may have the wrong time at the moment the node initialises. I don't know whether the big timer node suffers from that problem and unfortunately the author does not normally watch this forum and does not have his node in a github repository where you can ask questions by submitting issues.

You might like to consider switching to the cron plus node, secure in the knowledge that the author is active here.

Also, I built in a means of rebuilding the schedules when a system time change is detected to ensure accuracy

Again even with your exact node setup it seems correct to me -
(assuming your are in Winter Haven-Auburndale)

Thanks guys.

The mystery continues. It worked correctly today.

My theory is that the DST shifts aren't handled correctly for sunrise in my area? If not that, then the node is corrupt somehow?

Anyway, this morning, it started at the correct time.

I'll look at the cron node. Thanks for the suggestion. I didn't know it existed.

In the meantime, I'll let this run for tomorrow to see if today was an abberation.

This is running on a Synology NAS.

Thanks... I modified my post.

It looks like a Home Assistant screen. Therefore, you may want to use the sun integration (Sun - Home Assistant) and use the event or trigger node to start the flow on Node Red.

Doesn't explain the behaviour of the Big Timer.
I also prefer using cron-plus for this situation or chronos (node-red-contrib-chronos (node) - Node-RED). Both are very good tools.

Thanks. I'll look into chronos along with cron and cron plus.

Bigtimer seems to be working again. I didn't change anything (of course!), so I'm still not sure what is/was going on.