# Bigtimer/Light Schedule all day schedule

**URL:** <https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449>\
**Category:** General\
**Created:** [3 December 2018 18:48 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449 "2018-12-03T18:48:48Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnster80](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@johnster80](https://discourse.nodered.org/u/johnster80)\
**Post date:** [3 December 2018 18:48 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/1 "2018-12-03T18:48:48Z")

</div>

Ok so I've been having ome issue with Bigtimer/Schedex/schedule node. What I'm trying to achieve is that I want my lights to start at say 6 am and end when sun has risen. And then start again when sun set until 11.30 pm.

Can I solve this with Bigtimer? Tried to have to Bigtimer but the first said on to the light and the second said off so nothing happened.

Or can I solve this with Light Schedule Node? But this node sends a command every minut so if the lights are off according to schedule but it's cloudy so I want to turn them on manually I don't want them to go off the next minute the schedule node runs.

The image below kind of decribes how I want it with the Light Schedule and a switch wether it's a on or off message. (No connection between them due to above problem).

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/72156d64387eeba23a9784da341c408c4914b7b4.png)

Hoping for some easy fix here that someone can share. Much appreciated.

Thanks!

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [3 December 2018 19:58 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/2 "2018-12-03T19:58:49Z")

</div>

> [@johnster80](#):
>
> I want my lights to start at say 6 am and end when sun has risen. And then start again when sun set until 11.30 pm

Well it depends on where you are in geographical means but I think you should also take account situations where sun rise occurs before 6 AM? Do you still want the lights to turn on? Also if sunset occurs after 11:30 PM ...

I have such kind of logic created for my "walk thru lights" . I don't use any of ready made scheduler nodes except the Sun events node. But as my flows do much more with time based events it is not directly exportable to share as example.

Basically you dont need any scheduler. Basic inject node can be set to emit at specified time.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/6d3f82723d05819fcd724bcc16f0a1ca86db8be3.png)  
Sun event node emits on surise and sunset (there is more sun related events of course if needed). By listening all those events you can make your own logic based on those events and current state of your lights, using built in Switch and Change nodes (or Function node).

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [3 December 2018 20:21 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/3 "2018-12-03T20:21:38Z")

</div>

Like hotNipi, I don't use any ready made scheduler nodes, but I do use `node-red-node-suncalc` to determine sunrise/sunset which I've built into my flow.  
It works pretty well, and by adding your lat/lon coordinates, it will be relevant to your location.

---

<div class="post-metadata">

**Author:** ![johnster80](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@johnster80](https://discourse.nodered.org/u/johnster80)\
**Post date:** [3 December 2018 20:44 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/4 "2018-12-03T20:44:10Z")

</div>

Thank you for your replies. Although I'm a newbie to this so I'm won't get any further unfortunately. Anyone care to share a basic flow regarding this? Must be the absolut most common flow ever in my mind?!

I know I had the logic you saying hotNipi in my previous Domoticz rpi so you got a point there since the sun rise before 6 am during summer etc. Will need to find a way around this as well.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [3 December 2018 20:58 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/5 "2018-12-03T20:58:07Z")

</div>

The quickest way to learn is to try it for yourself. I also use the suncalc Paul has already recommended. It’s very easy to configure.

I also moved this thread to General as Share your projects is for projects you have completed as per the description

---

<div class="post-metadata">

**Author:** ![Urs-Eppenberger](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/urs-eppenberger/32/28_2.png) [@Urs-Eppenberger](https://discourse.nodered.org/u/Urs-Eppenberger)\
**Post date:** [4 December 2018 11:38 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/6 "2018-12-04T11:38:17Z")

</div>

I had a similar requirement: Switch the lights on in the morning for a certain amount of time, and then again in the evening, also for a certain amount of time.  
The node I used is called BigTimer. It needs the latitude and longitude, then it calculates dawn and dusk. Clever.

I used two BigTimer nodes for this: A morning BigTimer and an Evening Bigtimer.  
The trick is to prevent them to interfere with each other. At the very beginning of my experiments the 'morning BigTimer' sent out a message to switch the light on, and the 'evening BigTimer' said no, forget it, keep the lights off, it is not time yet to switch them on. It is fun to watch, but not what I wanted. The author of the BigTimer node already built in the solution: At the very bottom of the quite big configuration panel, uncheck the 'repeat output' and 'output at startup' options, then you are fine.

Regards,  
Urs.

---

<div class="post-metadata">

**Author:** ![johnster80](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@johnster80](https://discourse.nodered.org/u/johnster80)\
**Post date:** [5 December 2018 19:20 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/7 "2018-12-05T19:20:21Z")

</div>

Thank you all for your suggestions. A special thanks to @Urs-Eppenberger who had exactly what I was hoping for, too bad I didn't find myself.

Sure it's always best to try for yourself although I'm quite happy with trying and have made it so far that I now have a fully operational HA with several lights and Sonos to control but got stuck with a "simple" scheduling. After many hours of googling I was still stuck and hence saw no other option than to find an answer at a forum. So thank you for you extensive answer @ukmoose.

Peace HA'ers..

---

<div class="post-metadata">

**Author:** ![Bernd](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@Bernd](https://discourse.nodered.org/u/Bernd)\
**Post date:** [28 December 2018 09:41 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/8 "2018-12-28T09:41:13Z")

</div>

hi there!  
i´m not able to update bigtimer via node-red manage-palette.  
So for the previous version (2.07) i did an updte via termnal ( sudo aprt-get install node-red-contrib-bigtimer).  
For the new - version (2.0.8) this won´t work.  
i get an error ( E: Unable to locate package node-red-contrib-bigtimer )  
i update the packages before with apt-get upate as well.

Anyone an idea what i´m doing wrong?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [28 December 2018 09:49 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/9 "2018-12-28T09:49:35Z")

</div>

using apt-get is your mistake

Node-RED nodes are generally installed using npm. As per most nodes ReadMe’s. Although you can install and upgrade using the Manage Pallete option inside Node-RED.

---

<div class="post-metadata">

**Author:** ![Bernd](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@Bernd](https://discourse.nodered.org/u/Bernd)\
**Post date:** [28 December 2018 10:01 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/10 "2018-12-28T10:01:20Z")

</div>

Thanks for fast reply.  
I also tried this and get the notification that bigtimer is not installed locally.  
That is why i tried to do it manually via terminal....

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [28 December 2018 10:27 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/11 "2018-12-28T10:27:03Z")

</div>

> [@Bernd](#):
>
> I also tried this and get the notification that bigtimer is not installed locally.  
> That is why i tried to do it manually via terminal....

Find out where it is installed, remove it and then reinstall in the correct place via the palette.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [28 December 2018 10:47 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/12 "2018-12-28T10:47:34Z")

</div>

> [@TotallyInformation](#):
>
> Find out where it is installed, remove it and then reinstall in the correct place via the palette

Or, if you're on Node-RED 0.19.4 then you do not need to remove the existing one and just install it locally by running `npm install node-red-contrib-bigtimer` in the directory `~/.node-red`.

---

<div class="post-metadata">

**Author:** ![Bernd](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@Bernd](https://discourse.nodered.org/u/Bernd)\
**Post date:** [28 December 2018 13:25 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/13 "2018-12-28T13:25:46Z")

</div>

thanks knolleary,  
when i do this, i get the following warning:  
npm WARN node-red-project@0.0.1 No repository field.  
npm WARN node-red-project@0.0.1 No license field.

- node-red-contrib-bigtimer@2.0.8  
added 2 packages from 2 contributors and audited 993 packages in 16.946s  
found 0 vulnerabilities

Sry - i´m not very familiar with the command line.....

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [28 December 2018 13:38 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/14 "2018-12-28T13:38:39Z")

</div>

Just a warning, nothing to worry about. The final line confirms it installed.

Restart Node-RED and you should have the updated version available - assuming you are on Node-RED 0.19.4 or later

---

<div class="post-metadata">

**Author:** ![Bernd](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@Bernd](https://discourse.nodered.org/u/Bernd)\
**Post date:** [28 December 2018 13:51 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/15 "2018-12-28T13:51:23Z")

</div>

ok - perfect. That´s it!  
Thanks a bunch!

---

<div class="post-metadata">

**Author:** ![Dayve](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@Dayve](https://discourse.nodered.org/u/Dayve)\
**Post date:** [12 January 2019 16:35 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/16 "2019-01-12T16:35:17Z")

</div>

I have made a flow using bigtimer to control the heater in my garage. What I would like to do is have the timer turn on at 4am and off at 7am during the week days and turn on and off at different times on the weekend. Can this be done with just one timer or will I need to have two timers?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8809b6cb54b300b8e0205114109e80b2e17b48a2.png)

---

<div class="post-metadata">

**Author:** ![rgerrans](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@rgerrans](https://discourse.nodered.org/u/rgerrans)\
**Post date:** [12 January 2019 17:16 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/17 "2019-01-12T17:16:16Z")

</div>

You would need to use two timers, one setup for the weekday and one for the weekend using the day of week options at the bottom of the node:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e655455d69b87777c1e4fba1432bd56e46c30690.png)

What I do is because I use the time of day for so many different aspects of my home automation (outside lights on/off - different lights for weekends vs weekdays, ceiling fan run times, light dim levels, etc.) is abstract it into a series of global variables and trigger nodes. I then setup a string of time of day definition irrespective of the day type and then us separate nodes to define day time (weekday, weekend, holidays). Then I can use time of day trigger links / variable checks combined with day of week variable checks to control everything vs. setting up multiple bigtimers throughout all my flows.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/4031f866a67da024de9f9bdfc8b4bcefc4821df8.png)

---

<div class="post-metadata">

**Author:** ![niklaswall](https://avatars.discourse-cdn.com/v4/letter/n/bb73d2/32.png) [@niklaswall](https://discourse.nodered.org/u/niklaswall)\
**Post date:** [3 May 2019 10:00 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/18 "2019-05-03T10:00:41Z")

</div>

Sorry for bumping an old thread, but this the exact use-case for what Light Scheduler was written (node-red-contrib-light-scheduler)

The default behavior of that node is to only send output when something changes, which will make it possible to control the lights manually as well (if you want to turn the lights on when cloudy).

Definging a schedule which turns on at 6am and off at 11.30pm and with a "Dusk / Dawn override" that says "Only when dark" will work the way you expect it!

Se more details here:

> **[Node-RED Light Scheduler](https://faulty.cloud/projects/node-red-contrib-light-scheduler/)**
>
> The faulty cloud

/Niklas Wall

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [16 May 2019 22:03 UTC](https://discourse.nodered.org/t/bigtimer-light-schedule-all-day-schedule/5449/19 "2019-05-16T22:03:04Z")

</div>

Thats a very nice looking scheduler node there Niklas - well done !

WIll implement that to replace a couple of other nodes i am using

Craig
