Node–RED is a fantastic and powerful yet easy to use programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. For more information on Node-Red go to the Node-Red site.
After all, you probably don’t turn the outside lights ON at 6pm!! You most likely want them ON when it gets DARK. Nice to see BigTimer featured HERE.
BigTimer is my own creation and is (IMHO) the most powerful and best-ever, most comprehensive timing node for Node-Red, providing a general purpose timer as well as handling summer/winter correctly as well as (importantly) lighting-up time (for which you should provide your longitude and latitude from Google maps or similar).
THIS page is the home of BigTimer. Questions about BigTimer should be placed in the comments section here. I’m currently pondering how to add winter and summer options for on-off times without making the setup page more cluttered – ideas welcome.
Update February 2023
Fixed a mistake in the July-December exclusion months
Update January 9, 2022
Added new “away” command – in minutes for now (away X) which can be as long as you like and will hold the first output off until you clear it with (away 0) or it runs out – this should be fully tested before deploying and you MUST have “repeat” ticked in the dialog for this to work . Also, one helpful blog subscriber pointed out an issue – special day included – month 9 was faulty – fixed – many thanks to everyone for you feedback on this very popular timer).
V2.8.1 fixed bug introduced in 2.8.0 to 2nd output payload.
End of update
I do not plan to spend any more time hunting through Node-Red forums for BigTimer queries, sorry… and the source is NOT in GITHUB – you have the full source when you have BigTimer itself – the whole thing is only 2 files (a .js file and an .html file).
In version 2.5.0 I added separate on-off randomisation options.
The panel on the right is quite out of date now with many additional items in the actual panel.
For clarity: BigTimer works in minutes – in a DAY which consists of hours and minutes 00:00 to 23:59, where minute 1439 is the last minute of the day – that is why there is no MIDNIGHT in the settings. If you need something to happen at or near midnight – I’ve now added a DAY END option to the OFF dropdown boxes – equating to 23:59 or one minute before “midnight” (the latter is in fact is the beginning of the next day).
At it’s simplest, BigTimer is a single block which can be used as the equivalent of a simple mechanical timer, seeding other Node-Red nodes or directly manipulating devices by, for example, MQTT protocol. The MQTT-compatible payload (ON and OFF msg) is the main output and you should put a value in there even if not using MQTT. ON and OFF TEXT fields are optional – for speech or whatever use you have in mind.
BigTimers can be used singly or in groups. Full support is provided for dusk/sunset dawn/sunrise and variations also for day/week/month (and special days) control.
BigTimer has three outputs, the first of which updates when there is a change of state and presents one of two messages (for, for example, MQTT or other control mechanism)
The node offers outputs suitable for MQTT, speech and databases (but you don’t HAVE to use any of these). You can also manually over-ride the UTC time setting on the host computer if required.
The second of three outputs offers a simple 1 or 0 every minute in the output “payload” and also presents additional information reflecting the status message in msg.state, message.time and others – see the entire msg object output in debug for more.
The third output presents a message which could be used for speech or debugging.
There is also real-time status information displayed below each BigTimer node.
As always, the latest node-red-contrib-bigtimer is available at node-red-flows and at npmjs.com – put “scargill” in the search and you’ll see all my nodes and flows.
I’ve had the odd comment about BigTimer not giving the output someone wants… if the msg.payload from output 1 isn’t what you need, change it. Let me give an example, the segmented switch in BLYNK, assuming 3 outputs for this example – gives and needs values “1”, “2” and “3” – which I use for “off” “auto” and “on” states in BigTimer. A simple function node on either side of BigTimer sorts out that problem.
Note the Blynk “Write Event” node on the left and the Blynk “Write” node on the right.
The functions are easy. Blynk might be controlling the lighting or the grey manual overrides, OR BigTimer may be running a schedule – it is important that all 3 methods are compatible and that they stay in SYNC.
First function node:
if (msg.payload=="1") msg.payload="off"; else if (msg.payload=="2") msg.payload="auto"; else msg.payload="on"; return msg;
Second function node:
if (msg.state=="off") { msg.payload="1"; return msg; } if (msg.state=="auto") { msg.payload="2"; return msg; } if (msg.state=="on") { msg.payload="3"; return msg; }
Easy – I have a ton of variations on that for different scenarios.
Back in February 2018 I added moonrise and moonset – as well as improving the layout and docs. The “moonrise” code in module sunCalc seems less than perfect so although I added the moonrise and moonset properties in 2.1.3 BigTimer, there were issues resolved in moonrise and moonset (from version 2.17 on) thanks to adding my own checking to the sunCalc module.
Recent additions/changes include timestamp on outputs, additional on/off inputs, improvements to “timer” input option (default seconds) example:
timer X (mins)
timeoff X (mins)
Features added in December 2018 include a seconds timer and even/odd day of the month selection. In manual override (injection), assuming the timer is off, inject “timer 30” to turn it on for 30 seconds. This is also handy if you have lights turning off at midnight for example and you need an extra hour of light and don’t want to have to remember to turn them off at the end of that period. Inject “timer 3600”.
As early as 2017, I added “toggle” override mode and as I then realised that the little icon was not quite the right format and might look odd on some people’s systems – something pointed out by the FRED people who want to use my nodes… I updated node-red-contrib-bigtimer, node-red-contrib-timeout, node-red-contrib-diode, node-red-contrib-grove and node-red-contrib-esplogin and also moved them to the “advanced” category.

What: Node-Red-Contrib-Bigtimer is both a simple timer – and a full-function timer – depending on your needs. At it’s simplest, you set on and off times, the topic and payload you need to go out to, say, MQTT and your longitude and latitude (most browsers will fill this in automatically), you then set your schedule and you are done.
Why: Existing timers didn’t do what I wanted – also – I have a watering system – I want it to run at dusk and dawn every day – but not in December through February (ice)! I had to have control over both days of the week and months. Existing timers didn’t do that either. Many seemed to be based on the old mechanical timers but without moving parts. That won’t do.
Firstly: the name. It’s a timer – but it’s a BIG one – so I called it BigTimer. (note: the original “Scheduler” node is no longer developed – BigTimer does everything Scheduler did and much, much more).
Secondly: it has an input. You can inject various words into BigTimer – and get instant over-ride action. “1” or “on”, “0” or “off”. “auto” or “default”, “timer”, “sync”, “manual” etc.
Does that need explaining? “on” for manual override to on, “off” for manual override to off (both of which reset on the next auto state change), “default” or “auto” to return the timer to normal operation. More details further on.
Manual Override: If you set the timer to turn on, say at dusk and off at midnight, you can override the setting during the day by sending “on” to the input. This override will reset at the next auto change of state.
Please note: “night” and “endNight” are included for completeness but are not guaranteed to work depending where you are in the world. Perhaps better to stick with dusk/dawn, sunset/sunrise etc.
If you inject “manual” in conjunction with “on” and “off”, the state will change until the set timeout (in minutes) times out – so if you turn the lights on in manual mode (as against simple override) and forget you did it?
The unit will return to default operation in X minutes (which you can set – defaulting to 24 hours – 1440 minutes) after any manual change you make.
You can also send a “sync” command which simply outputs the current state with a side effect of decrementing the timeout counter – handy for testing.
Here is a test setup for BigTimer, just using simply injection nodes:
And here’s what happens if you manually press ON (a simple inject in this example – you can send that message in the payload by any means you like)…
But what are those other two outputs?
Output 1: is a message – you control the topic and payload – so I use it, for example, as I do, to send a message to MQTT to control something. You can have this message go out once – or every minute. There are other components to the msg object on the first and second outputs, use these extra messages or not as you prefer.
In this example (version 1.5.5 of BigTimer onwards) you see various items in the output -also note that this view is in Node-Red 0.18.5 – I strongly recommend you upgrade if using an earlier version.
You can see the value in msg.payload which is whatever you enter in order to fire a message off to another node or function to make something happen. In addition (and not essential for normal operation) we have msg.state, msg.value, msg.AutoState, msg.manualState and others.
For simple use, you can of course ignore the additional outputs, but they are handy for checking. msg.state shows “on”, “off”. “auto” or “none” and in the case of the first two outputs, msg.duration shows the time until the next change of state and msg.now shows the time in minutes since midnight.
Output 2: outputs a 1 or 0 every minute when checking (in msg.payload) – you can use that to light up something.
Output 3: puts out another text message in msg.payload which you can set – I point it to a speech synth so it might say “external lighting coming on”. There is one message for the ON state, another for the OFF state. Ignore it if you don’t have a use for it.
December 2018: Typical use of BigTimer in my home, controlling ESP8266 and other devices and accepting control from manual overrides either directly in Node-Red or for example in the Node-Red Dashboard (mobile or PC screens).
And to get this node?
Make sure you are in your Node-Red installation folder (for example /home/pi/.node-red) and type:
npm install node-red-contrib-bigtimer
So in my case, I keep all my nodes under /home/pi/.node-red/node-modules. So I do the install from /home/pi/.node-red
Restart Node-red and Bob’s your uncle – it should appear on the left with the other Nodes.
Actually today (in 2020/2021) there is no longer any need to use NPM install; simply install using the palette manager in Node-Red itself.
In addition, I have recently, as a response to a sensible request from one of our blog readers, changed the code so that if either the ON payload or OFF payload is blank – then no message will be sent at that time – this means you can now easily OR timers together. So if you need several time intervals in a day or other complicated setup you can simply use a number of timers and feel the first output to one common destination!
Here’s an example of TWO timers simply sending stuff to a debug node for testing…
Backtrack for Beginners: Node-Red is a simple-to-use but very powerful visual tool for wiring the Internet of Things and a tool for connecting together hardware devices, APIs and online services in new and interesting ways. It is also a lot of fun.
I control a range of ESP-8266/ESP32 devices using RPi4 (though older versions of RPi work well). You can of course run Node-Red and the other tools on a wide range of machines – Orange Pi, Odroid C2 etc using Debian, DietPi, Xenial etc. I’ve even had my normal installation script “The Script” running on a laptop using Mint Linux (some time ago).
On this particular RPi I run MQTT (Mosquito with Websockets), SQLITE, NGINX and Node-Red. I started using Blynk as my mobile remote controller then went on to using ImperiHome then Node-Red Dashboard which has (IMHO) so very much potential, however it also has lousy RGB control so for a while I reverted back to Blynk. I then used Nextion touch-LCD display devices for local displays and now (2021) I use low-cost ILI9341 displays with ESP-HOME, the code talking back to Node-Red. All of this can be managed within Node-Red. If you find this interesting you might like my old home control 2018 post here or the early Nextion Wi-Fi Touch Display article.
Above is a screenshot of a typical setup… click on the image to enlarge.
So in total you have a timer you can set to go on and off at specific times of the day, or dusk and dawn, on certain days, certain months, you can even set it to run on specific days of the month (Christmas day?) or even certain weekdays of every month (second Tuesday) – as of version 2.0.0 (August 2018) these can be included or excluded.
You can tick a box to have output on power-up or not, you can tick a box to have the node auto-repeat the message every minute or not. You can add positive and negative offsets to the times (including dusk and dawn etc.), you can optionally add your OWN offset to the UTC time of the host computer and you even select a random value within the limits of the offsets (security lighting etc.) You can temporarily suspend the schedule via a tick box or a message.
And here are the words the node will accept at the input to override automatic operations. The input is not case-sensitive.
sync | simply forced output |
on or 1 | turn the output on |
off or 0 | turn the output off |
default or auto | return to auto state |
stop | stop the scheduler |
on_override | manually override the on time ( specify time as minutes or hours:minutes) – also if you specify the time in minutes, you can use special values like: 5000=dawn 5001=dusk 5002=solarNoon 5003=sunrise 5004=sunset 5005=night 5006=nightEnd |
off_override | manually override the off time( specify time as minutes or hours:minutes) – also if you specify the time in minutes, you can use special values like: 5000=dawn 5001=dusk 5002=solarNoon 5003=sunrise 5004=sunset 5005=night 5006=nightEnd |
timer | a recent feature allowing manual override for X seconds (timer X) – handy for watering systems etc. |
In August 2020 I added geo_override, fixed some minor “timer” issues and also with help from one of you – added on_offset_override and off_offset_override – updating the second output message accordingly.
In the drop-down boxes for on and off times you can select times or words like dusk, dawn, sunrise, sunset, night etc. All are dependent on the longitude and latitude you put into the relevant boxes and will adjust every day as necessary.
A good way to learn about BigTimer is to put a debug node (set to show the complete message) on the top output – and inject text payloads (using the INJECT node) to the inputs as demonstrated above.
From the first output, as well as the normal msg.payload, you can extract msg.state which might be “on”, “off”, or “auto” – and msg.value which might be 1 or 0. This is so that if you are using say, ImperiHome and store states in global variables, if the time reverts back to auto, you can let ImperiHome know what is happening.
Another way to test BigTimer is as follows..

In the FUNCTION nodes to the right of BigTimer, I’ve simply put node.error(msg); and node.error(msg); respectively. The only difference is one has a red bar (error) the other a yellow bar (warn). These make a handy alternative to using the debug node for testing.
Recent additions to the inputs include on_override and off_override. These are in response to requests to be able to change the on and off times from the Dashboard. Please note that override information you inject here (in hours and minute or just minutes, space-delimited) is lost when Node-Red is restarted or the board rebooted.
Not shown on the photos above are two new options – to kill the output on even days of the month, odd days (or of course both).
If you make good use of this node – please put a link to this blog entry somewhere in your writings so people will come back here. Or if the node proves REALLY useful you could feed my Ebay habit – there’s a link on the right of the blog.
See the Node-Red info panel in Node-Red for up-to-date information.
July 2022 Quick Test
I juat added a new timer to a flow and did nothing more than test outputs 1 and 2 on the currently OFF timer – and got the expected results when injecting “auto” then “manual on” then “manual off” to a timer prefitted with payloads “on” and “off”. The first 2 debug outputs appeared on completing the flow update, the others on injecting auto, manual on and manual off respectively. All other settings were defaults.
[ { "id": "403d2aae837a4874", "type": "tab", "label": "bigtimer test", "disabled": false, "info": "", "env": [] }, { "id": "e1483686f071ce5d", "type": "bigtimer", "z": "403d2aae837a4874", "outtopic": "", "outpayload1": "", "outpayload2": "", "name": "Big Timer", "comment": "", "lat": 0, "lon": 0, "starttime": 5001, "endtime": 1425, "starttime2": 0, "endtime2": 0, "startoff": 0, "endoff": 0, "startoff2": 0, "endoff2": 0, "offs": 0, "outtext1": "", "outtext2": "", "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": false, "randon1": false, "randoff1": false, "randon2": false, "randoff2": false, "repeat": true, "atstart": true, "odd": false, "even": false, "x": 1600, "y": 220, "wires": [ [ "b9a7d7728562fa9e" ], [ "674e3a0fab0f9036" ], [] ] }, { "id": "b9a7d7728562fa9e", "type": "debug", "z": "403d2aae837a4874", "name": "out1", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1850, "y": 160, "wires": [] }, { "id": "674e3a0fab0f9036", "type": "debug", "z": "403d2aae837a4874", "name": "out2", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1850, "y": 260, "wires": [] }, { "id": "2b5f995c17a902ec", "type": "inject", "z": "403d2aae837a4874", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "auto", "payloadType": "str", "x": 1430, "y": 140, "wires": [ [ "e1483686f071ce5d" ] ] }, { "id": "3e5bc965ead87fd7", "type": "inject", "z": "403d2aae837a4874", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "manual on", "payloadType": "str", "x": 1430, "y": 240, "wires": [ [ "e1483686f071ce5d" ] ] }, { "id": "a233611e23b794bb", "type": "inject", "z": "403d2aae837a4874", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "manual off", "payloadType": "str", "x": 1430, "y": 280, "wires": [ [ "e1483686f071ce5d" ] ] } ]
Enjoy and please do report any issues back here.
If you like this post – please share a link to it by social media, by email with friends or on your website.
More readers means more feedback means more answers for all of us. Thank you!




Hi Peter, In Bigtimer there is an output called msg.duration. This calculates the time left in minutes till the next event. However, if not every weekday is checked e.g. It’s running on tuesday but wednesday is checked off it is still showing the duration until the next eventrigger in de start section. But after 0.00 hours (midnight) there is no output anymore because there are no events on wednesday (checked out)
Q: How do I get the duration from the last event on e.g. tuesday until the next change on e.g. thursday (so I should be e.g. 2 days, 3 hours ande 7 minutes). But as it is now Bigtimers duration only lasts up to 24 hours
Is it possible to get the below output somehow to the msg.payload? So I can set up a function node to calculate te remaining time to the next on/off event?
“sun”: true,
“mon”: true,
“tue”: true,
“wed”: true,
“thu”: true,
“fri”: true,
“sat”: true,
Hi Peter,
Thank you. I’ve just come across BigTimer and love it. I want to introduce it to all my automated flows. I’m having trouble though with motion sensor flows. I’m using a state node for the motion sense on/off but I want it active only from dusk to dawn (for external lights).
The trouble I have is the state node will not accept input from bigtimer and in reverse, the state node as an input to bigtimer forces the override on bigtimer so every time there is a motion detection then it overrides the schedule in bigtimer.
Ideally I’m trying to create a simple flow to have the motion sensor active at night time using bigtimer’s dusk/dawn options. Do you have any suggestions on how I could do this ?
Thanks
Gav
Good morning, first of all thank you for your node, it is a great help. Although I’ve been using it for a while, I have a question that I can’t solve. I have a lighting system that I have put 3 options on the dashboard: On, off and timer. What I try is that if I put it on, it stays on without a time limit (an on in the payload), if I put it off, that it is off and does not turn on (an off in the payload) and if I put a timer, I have a time selector in the dashboard and I send it in the on_override and the off_override and a timer in the payload too. I have been using this last option for a while and it works perfectly, it turns on and off when it touches. I am having the problem if I put Off, apparently the node indicates OFF in red, but when the time comes it turns on. I think I have the problem with the manual or auto option, I don’t know which one I have to put. Could you help me with this configuration? Thank you and best regards.
Hi,
Just started using Big Timer. I have noticed that if I set on time at lets say 18:00 and off time 19:00, the commands execute sometimes up to 1 minute after the time. So my light comes on at 18:00:54. Same for off time. But it varies. I am trying to figure out why. I played with a different timer (timer node) and it executes dead on based on my iphone. So I know it isn’t the clock on my NUC. This is thru Home assistant. Any thoughts on this it drives me nuts.
The software is set to work at the minute at 0 seconds or later. Depends I guess what else your Node-Red is doing. I don’t use Home Assistant so can’t advise…
Anyone else please feel free to step in…
Pete
Hi,
I’m new to Big Timer. It looks very useful!
I saw the opportunity to exclude and include certain days and thought that could be used to include public holidays into my weekend timers and exclude them from my workday timers!
Is it possible to define date ranges in some way? I googled around and saw a few other who had asked the question and tried but not been able.
For example I always have vacation between x-mas and new-years, so I would to include/exclude Dec 24-31 and then there are a bunch of other days.
Just putting 24-31 does not work according to other people who have tried I don’t remember if anyone tried ” or ‘ or some brackets. I’m not that experienced in programming, so I don’t know what’s best chance to test and it takes some time to try it out as I have to wait till next day for each test…
Is it possible to add date intervals, or can it be made possible (please!) :-))
Other things that I think could be useful is other Public holidays like Easter that are “floating” would be nice to be able to include/exclude as well. Is that possible in some way?
I saw someone gave an example with the function node, but I could not make that code working and it was dependent on an external web server.
In Sweden, we celebrate Midsummer Eve, that is the Friday of June 19-25 and that can be week 3 or 4 of June…is that possible to define in Big Timer in some not too complicated way?
Hi – I’ve not added new features to BigTimer for a while – as it is in use by LOTS of people and I’m the sole developer – continuous change is likely to cause issues for existing users who are happy with the current feature set. However as the souece is freely available (2 files – a JS file and an HTML file both exist in your installation), if anyone feels like submitting changes I’m more than happy to trest them and if happy, approve the changes.
Hi again!
Thanks for replying!
I understand and have found what I thought was a perfect and even better way to handle holidays.
I set up HA sensors for workday and workday+1 (workday tomorrow) (in/via configuration.yaml).
Then I use those sensors to toggle my BigTimer schedules on and off by sending auto/stop.
In that way I can take both weekends and public holidays into account.
I have also two HA helpers/toggle switches for “vacation” and “guest mode” that can turn off weekday schedules and turn on weekend schedules when we take time off or have guests.
It works perfectly well to have those sensors and switches toggling my BigTimers on and off the way I want.
BUT – when those sensors and switches toggle BigTimers from auto-stop or stop-auto, BigTimer send actual state as payload just as when time conditions are met.
Is there any way to have BigTimer only sending payload on configured times and not when toggling auto or stop?
New user of BigTimer, and now a BigFan.
I’m passing my Lat/Long in via msg.payload. Is there a way to verify (using debug) that the lat/long are set properly other than to wait for the pre-defined times (sunset, et. al.)?
-Larry
I don’t think there is, but welcome anyway, Larry. Happy New Year.
Ok, no pic it is then!
Here’s the pic. I think a NoScript setting clobbered it first time:
Hi Pete,
I have a question about the ‘stop’ command. I was expecting it to make the timer go completely dormant and not do anything, but when ‘stopped’ it outputs the current status (on/off) at the scheduled times, which is causing me some grief.
In my case, I have the timer setup to turn on an office heater from 0745 to 10.30 when required: When we know someone will be in the office, we set the timer to ‘auto’ beforehand, otherwise it’s set with ‘stop’ to disable it because this saves money when the office is not occupied (it’s not in use every day).
Trouble is, the timer sends out an ‘OFF’ at 0745 and 1030 when ‘stopped’, so if someone manually turns on the heating for the day at, say, 0910, the stopped timer turns it off at 1030.
Is this expected behaviour, or should ‘stop’ completely silence the timer output?
The pic shows a test setup. When ‘stopped’ BigTimer sends an ‘OFF’ at 0745 and 1030.
Thanks
I’m seeing an odd issue with the “AWAY X” feature. When I set “away 30”, the actual length of time before the timer expires is just under 10 minutes, “away 3” give me an actual away time of around 1:40. Node red is running on a Raspberry Pi 4 and I don’t see any other time related issues – BigTimer works fine in all other ways I’ve used it, just not this one.
(flow removed) as not fomatted)
I’m back from hols. Will try to check that. Not used “away” for ages.
I removed your flow as nor formatted henc messing WordPress reply – no matter – I tested and simplied even furthe to inject:
away 5 mins
If does not work – you are correct – no idea why and about to go away for a few days.
// manual override
if ((inmsg.payload==1) || (inmsg.payload===0)) inmsg.payload=inmsg.payload.toString();
if (inmsg.payload > “”) {
inmsg.payload=inmsg.payload.toString().replace(/ +(?= )/g,”);
var theSwitch = inmsg.payload.toLowerCase().split(” “);
switch (theSwitch[0]) {
case “geo_override” : change=1;
switch (theSwitch.length) {
case 3:
lonOverride = Number(theSwitch[1]); latOverride=Number(theSwitch[2]); break;
default: lonOverride = -1; latOverride=-1; break;
}
break;
case “away”:
if (typeof theSwitch[1] === ‘undefined’) awayMinutes=0; else awayMinutes=Number(theSwitch[1]);
if (typeof theSwitch[2] === ‘undefined’) { awayMod=”mins”; awayDisp=0; }
else if (theSwitch[2].toLowerCase().substr(0,1)==’h’) { awayMod=”hrs”; awayDisp=0; }
else if (theSwitch[2].toLowerCase().substr(0,1)==’d’) { awayMod=”days”; awayDisp=0; }
else { awayMinutes=Number(theSwitch[1]); awayDisp=0; }
// }
awayMinutes++;
break;
Ideas welcome. The JS file is in your folders along with the HTML file – any ideas anyone – only this override fails.
Comment here from one of our subscribers – I offered advice on an issue he was having – up to now I don’t have good enough examples to be able to test this at an arbitrary time…
I have to say that simply firing back flows in this format doesn’t help me a lot. BigTimer has thousands of users and most of the feedback i get is very positive.
Here’s the feedback from reader “Sander” – anyway I’ve updated BigTimer accordingly:
“This are my nodes:
[{“id”:”11e2de82.7acf79″, “type”:”bigtimer”, “z”:”80438958.3845e8″, “g”:”7d0c4b3abd1aec47″, “outtopic”:””, “outpayload1″:”on”, “outpayload2″:””, “name”:”Weekdagen 7:30 + 15m random”, “comment”:””, “lat”:”xx.xxxxxxx”,
“lon”:”yy.yyyyyy”, “starttime”:”450″, “endtime”:”5000″, “starttime2”:0, “endtime2”:0, “startoff”:”15″, “endoff”:0, “startoff2”:0, “endoff2”:0, “offs”:0, “outtext1″:””,
“outtext2″:””, “timeout”:1440, “sun”:false, “mon”:true, “tue”:true, “wed”:true, “thu”:true, “fri”:true, “sat”:false, “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″:””, “xmonth7″:””, “xday8″:””, “xmonth8″:””, “xday9″:””, “xmonth9″:””, “xday10″:””, “xmonth10″:””, “xday11″:””, “xmonth11″:””, “xday12″:””, “xmonth12″:””, “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”:false, “randon1”:true, “randoff1”:false, “randon2”:false, “randoff2”:false, “repeat”:false, “atstart”:false, “odd”:false, “even”:false, “x”:193, “y”:942, “wires”:[[“c0c69585.274fe8”], [], []]},
{“id”:”ee055a73fa1be45b”, “type”:”bigtimer”, “z”:”80438958.3845e8″, “g”:”7d0c4b3abd1aec47″, “outtopic”:””, “outpayload1″:”on”, “outpayload2″:””, “name”:”Weekenddagen 8:30 + 15m random”, “comment”:””, “lat”:”52.0194446″,
“lon”:”4.431991″, “starttime”:”510″, “endtime”:”5000″, “starttime2”:0, “endtime2”:0, “startoff”:”15″, “endoff”:0, “startoff2”:0, “endoff2”:0, “offs”:0, “outtext1″:””, “outtext2″:””, “timeout”:1440, “sun”:true, “mon”:false, “tue”:false, “wed”:false, “thu”:false, “fri”:false, “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″:””, “xmonth7″:””, “xday8″:””, “xmonth8″:””, “xday9″:””, “xmonth9″:””, “xday10″:””, “xmonth10″:””, “xday11″:””, “xmonth11″:””, “xday12″:””, “xmonth12″:””, “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”:false, “randon1”:true, “randoff1”:false, “randon2”:false, “randoff2”:false, “repeat”:false, “atstart”:false, “odd”:false, “even”:false, “x”:210, “y”:1006, “wires”:[[“c0c69585.274fe8″], [], []]}]
This is my flows start:
(see included image)
I am not smart / capable the read/alter flow files, only to use them 😊.
I noticed with this setup:
1. From last Friday to Saturday at 0:00 the flow was kicked off (not wanted)
2. From last Sunday to Monday at 0:00 the flow was kicked off (not wanted)
And now I just wrote it as above I see some pattern… it is when the actual flows are “swapped”… As I do not know tha code and logic behind I do not know if this would be something to work with?
Thank you so much! I really love this node and use It big time 😊!!!
Regards,
Sander”
I’ve now updated the photo (now 3 segments) as BigTimer has changed a lot since that original photo at the start of the blog. Check updated entry.
Pete
In your description (picture above) On Time2 is empty. In mine I can’t get that. I think it ever was empty but can’t recall. Now I have them set at 0.00 actions also fire at that time (unwanted).
2 questions. Nowhere is described what “On Time2” even is for, what is it for? And secondly, how can I disable On Time2?
Please assist me quickly since my holiday schedule ow starts midnight now unwanted due to On Time2.
Thank you!
Right now I’m on holiday so the short answer is I cannot do testing at the moment. Also, which picture? By default on a new BigTimer, “on time2” will be 0:00 and “off time2” will be 0:00
I just injected auto and manual on, manual off one after the other to a timer currently off – and the outputs performed as they should..
I put it into an example at the end of the blog entry here due to the difficulty in inserting images in this reply.
Regards
Pete
Hi Peter, thanks for replying. I mean the first big picture above in your blog. On time2 is empty there. Further, what is on time2 for? Indeed by default it is 0.00 and it just fires along on time1. I only need 1 time, and would like to disable on time2. Same here: https://discourse.nodered.org/t/big-timer-node-how-do-i-disable-timer2/12930
With timer2 set at default 0:00 on and 0:00 off respectively – it should have no effect.
Unfortunately it does (did) fire at 0.00.
Although I must admit I have seen this behaviour only a couple of times before. This night I had a look and saw in nodered it fired at 0.00 also next to 7.30 in on time1 (see other link where people have the same behaviour- https://discourse.nodered.org/t/big-timer-node-how-do-i-disable-timer2/12930)
I’ve now updated the photo (now 3 segments) as BigTimer has changed a lot since that original photo went into the blog. Check updated entry.
Pete
Thanks for updating the photo. Can you please also answer the main question? What is on time2 for and how can I disable that due to it actually does fire (along time1)?
ON time 2 and OFF time 2 are for anyone wanting a second time period within a single 24 hour period.
Hi Peter, I have 2 nodes with output I’d like to send. they are indentically confgiured, but one (weekenddays) seems to also output on the swith (friday-saturday) on 0:00 via the ON1 output… (I only have the ON1 connected). Can I send a picture of the flow and the 2 bigtimer nodes to you for help?
I’d love to help but I get WAY too many responses to tackle individual flows. I can only imagine they are not absolutely identically configured.
Regards
Pete
They are, except for the days…
I think something must be wrong with the nodes? Where can I get some support for this? As seen above I am not alone with this issue 🙁
Hello,
Been using Big Timer for about a year or two.
It works great for me when using no inputs, but seems strange when using “stop” or “manual” as input.
I have a switch node after Big Timer which routes the payload by “on” and “off”. Everything is ok when input is “auto”.
When input is “stop” or “manual”, Big Timer sends “off” payload at “On Time” and at “Off Time”.
Is this a normal behavior? If yes, how can avoid sendig “off” payload when stopped or manual?
Hi – I just checked your example. When you hit your MANUAL button there is an output on OUTPUT2 only, incidating that the output is zero. OUTPUT 1 gives no output. I’m not seeing what’s wrong with that…
object
payload: “off”
topic: “”
state: “off”
value: 0
autoState: 0
manualState: 0
timeout: 0
temporaryManual: 0
permanentManual: 1
now: 394
timer: 0
duration: 0
stamp: 1658810080100
extState: “OFF Man. override. ”
_msgid: “dca599cea1a5fa8c”
I then set the on time in the timer to 5 minutes ago, no further output – no chang except in the BigTimer status – that’s because of the manual OFF command – that’s expected.
I then injected AUTO and shortly thereafter – output 1 said the output was ON. Again expected.
What’s wrong there? I’m not following the problem…
I think it is easyer with an exapmle.
Pease paste the code below, set the nearest on and off timers to your time, deploy and inject “manual off”. Debug 2 will show “off” immediatly, will show “off” again at “On Time” and again at “Off Time”
In my example will show “off” when injecting “manual off”, at 17:45 and at 18:00.
Hope this is a clear explanation of my situation.
[{“id”:”e0d69f6e49f8dfe8″, “type”:”bigtimer”, “z”:”58265a15.3b5ce4″, “outtopic”:””, “outpayload1″:”on”, “outpayload2″:”off”, “name”:”Big Timer”, “comment”:””, “lat”:0, “lon”:0, “starttime”:”1065″, “endtime”:”1080″, “starttime2”:0, “endtime2”:0, “startoff”:0, “endoff”:0, “startoff2”:0, “endoff2”:0, “offs”:0, “outtext1″:””, “outtext2″:””, “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”:false, “randon1”:false, “randoff1”:false, “randon2”:false, “randoff2”:false, “repeat”:false, “atstart”:false, “odd”:false, “even”:false, “x”:700, “y”:1140, “wires”:[[“a6f0d209504f0405”], [], []]}, {“id”:”a6f0d209504f0405″, “type”:”switch”, “z”:”58265a15.3b5ce4″, “name”:””, “property”:”payload”, “propertyType”:”msg”, “rules”:[{“t”:”eq”, “v”:”on”, “vt”:”str”}, {“t”:”eq”, “v”:”off”, “vt”:”str”}], “checkall”:”true”, “repair”:false, “outputs”:2, “x”:850, “y”:1140, “wires”:[[“8d940836f54ffd0b”], [“7df5a0fc8d88f022”]]}, {“id”:”33fe66595ed02387″, “type”:”inject”, “z”:”58265a15.3b5ce4″, “name”:””, “props”:[{“p”:”payload”}], “repeat”:””, “crontab”:””, “once”:false, “onceDelay”:0.1, “topic”:””, “payload”:”manual off”, “payloadType”:”str”, “x”:480, “y”:1140, “wires”:[[“e0d69f6e49f8dfe8”]]}, {“id”:”8d940836f54ffd0b”, “type”:”debug”, “z”:”58265a15.3b5ce4″, “name”:”debug 1″, “active”:true, “tosidebar”:true, “console”:true, “tostatus”:true, “complete”:”true”, “targetType”:”full”, “statusVal”:”payload”, “statusType”:”auto”, “x”:1030, “y”:1100, “wires”:[]}, {“id”:”7df5a0fc8d88f022″, “type”:”debug”, “z”:”58265a15.3b5ce4″, “name”:”debug 2″, “active”:true, “tosidebar”:true, “console”:true, “tostatus”:true, “complete”:”true”, “targetType”:”full”, “statusVal”:”payload”, “statusType”:”auto”, “x”:1030, “y”:1180, “wires”:[]}]
Hi, Peter
Please have a look at that example.
It is expected to output when is stopped?
Hello, Peter
I just tested the new version, 2.8.2. Seems it is working as 2.8.1.
My english is not so good, hope I can explain better this time.
Big timer is working great on auto, as expected.
On “manual on” and on “manual off” it outputs at scheduled times, not as expected.
For example, on time is 18:45, off time is 19:00. All great on auto. On “manual off” it sends “off” at 18:45 and again “off” at 19:00. Is this expected?Expectation is to send nothing on manual.
Hope my explanation is more understandable this time.
Thank you.
Hi, Thanks very much for BigTimer. It’s really a great tool for scheduling in Node-Red.
Is there any way to override through an input message the days of the week that are selected in the node ? Ideally something like on_override and off_override but for days of the week instead of start and end times.
Hi
There isn’t – if enough people erquest such a feature, anything is possible but I’m averse to making changes without demand – no-one has ever asked for this before. Hope you enjoy BigTimer otherwise.
Pete
Thanks for your answer. Right I understand.
After asking here, I started to look around and ended up on Schedex (node-red-contrib-schedex) a timer node inspired by BigTimer that already implements overrides for a lot of features (including day of the week).
You might want to have a look if you don’t know it yet 😉
I have of course checked out other available timers 🙂
Hi, I am just starting to try and understand Node Red. I have been using Bigtimer for my lights. For some reason I cannot find out how “randomise outputs” should work. I would like to set the “Off time” to e.g. 23:00 hrs, and would like the lights to switch off randomly somewhere between 22:30 and 23:30. Is there a way to set the randomisation timerange or do I use the “Off offset” for that? Many thanks.
Its a long time since I used that but… if the random flag is ticked the ofsets will be between 0 and whatever you set as an offset.. it’s in the javascipt file in case you want to look.
if (actualStartOffset == 0)
{ if (node.random) actualStartOffset = randomInt(0, node.startOff); else actualStartOffset = node.startOff;
if (node.randon1) actualStartOffset = randomInt(0, node.startOff);
}
if (actualEndOffset == 0)
{ if (node.random) actualEndOffset = randomInt(0, node.endOff); else actualEndOffset = node.endOff;
if (node.randoff1) actualEndOffset = randomInt(0, node.endOff);
}
if (actualStartOffset2 == 0)
{ if (node.random) actualStartOffset2 = randomInt(0, node.startOff2); else actualStartOffset2 = node.startOff2;
if (node.randon2) actualStartOffset2 = randomInt(0, node.startOff2);
}
if (actualEndOffset2 == 0)
{ if (node.random) actualEndOffset2 = randomInt(0, node.endOff2); else actualEndOffset2 = node.endOff2;
if (node.randoff2) actualEndOffset2 = randomInt(0, node.endOff2);
}
That’s really helpful! Many thanks for your quick reply and clear information.
I am trying to turn on a light at 6AM and have it turn off at sunrise. It works fine in winter when sunrise is after 6am, but in the summer when sunrise is before 6am the light comes on and stays on all day. Is this the expected behavior?
No ides Greg, I’ve never seen sunrise before 6am…. as the timer only thinks in terms of a single 24 hour period starting at 00:00 and ending at 23:59 that is quite possible.
Where I live sunrise can be between 5am and 8 am.
I think I will use two timers in parallel and use a function node to check the current month and redirect traffic to the summer timer or the winter timer.
Let me know how that goes…
The current version (2.8.1) appears very broken, something with the on and offtimes. Take a default Big Timer instance with no changes other than on time and off time, leaving on time2 and off time2 untouched:
On 01:00, Off 03:00
When I deploy it shows ON for 1h 20m (current timestamp is 10:40 fyi so it should be off).
Change to: 02:00 > 03:00 and it should show on for 0h 20m, instead it shows OFF for 0h 20m.
I have been monkeying with this for about 45 minutes now and cannot get any consistency out of it. I have been using it for about 2 years without a problem until I upgraded this week.
Hi
I just took the Bigtimer on my PC, added an instance to a spare flow…. and did absolutely nothing other than set it to ON at 10:45am and OFF at 11:00am with ON payload being “1” and OFF payload being “0”, topic being “testtopic”- this was at 11:42am. I attached a debug to the first output and noted a pair of “0” messages before the “1” message came out, bang on time.
I’m using version 2.8.1 which has been out for months – and has been installed on this PC for about the same time – I’m on GMT+1 here in Spain if that helps. Oh and seconds after 11am I noted the output in the debug was now showing “0” as expected.
feature request:
I’m using sunset/sunrise and dusk/dawn,as triggers, however, the weather conditions have an impact on how much light there really is. I have assembled a light sensor module (WSL125 – https://www.jameco.com/z/WSL125-Velleman-Light-Sensitive-Switch-Kit-12VDC-NO-NC-24V-5A_2196473.html), this input (off=light, on=dark – can be reversed) gives an idication of the real world experiance, for example:
– last night sunset: timer: 1657396657 (21:57:37), sensor: 1657397916 (22:18:36)
– this morning sunrise: sensor 1657423622 (05:27:02), timer 1657424634 (05:43:54)
would it be possible to provide an extra input for bigtimer, that allows:
– a delay for sunset / dusk if the sensor is indicating there is still sufficient light (still enough light, despite sunset / dusk).
– an advance for sunrise / dawn if the sensor is indicating there is already sufficient light (already enough light, despite remaining time before sunrise / dawn)
Hello,
I’m going through this amazing project. The use case I’m looking for is the control of a boiler switch.
1. set the daily schedule for the morning and evening shower
2. stop the schedule when we are on holiday
For the first part, the duration changes throughout the year (sun/electric boiler) and if the kids are home or not. Secondly, the starting point changes throughout the year.
Based on my testing, the manual override is one for 1 schedule. Ideally, I would love to have a second override schedule. Is this something feasible to add ?
Hi Pete,
I hope that my note find You well in that strange times.
A lot of time flown since my first contact with BigTimer. It is working for months, mainly for irigation system. I decideed to polish it a little bit and found two questions:
1. what is ‘temporaryManual’ key in first node? It has value “0” for “stop” and “manual” (while ‘permanentManual’ for “stop” and “manual” shows alway “1”
2. I was trying how does Timeout is working. I set it for 1 minnute to observe. I put “manual” but after 1, 2, 3 minutes the second node did report always “OFF Man. override. “. And that same below Node-Red node. For sure for longer time it does work but why not for 1 minute?
verybest regards
Qba
Hi Peter
I hope you are well.
I would just like to know if it will be possible to set the times trough a UI and is this something you would be able to help me with?
I am busy with a patent and I don’t want to give the users access to the backend hens the UI.
Good afternoon Henk
As per the blog, time setting is done via html or (see the table in the blog entry above) by manual override (on_override, off_override) – I guess you could feed that information in via a UI – not something I’ve done personally.
Hello Peter
I’m a newbie at HA and Node-Red.
I’m using Big Timer in an automation to turn on lights at (ideally) dusk with an offset of around -45 minutes, then off again at 23:45 (if we have not turned them off manually).
Is it possible to obtain the time of dusk – I understand there are a few “dusks” (civil, nautical and astronomical (see: https://www.timeanddate.com/astronomy/different-types-twilight.html) – which “dusk” does Big Timer use?
I’ve also noticed the lights are on on the morning. I see from the light history that HA Supervisor turns on the lights at a minute or two after midnight (I used the Timer2 On and Off defaults of 00:00). I suspect this is due to ‘finger trouble’!
I would appreciate advice on debugging something like this.
Temporarily, I have used an inject node to turn off the lights off at 00:02.
Appreciate any help you can give.
Regards
Stuart
There are two relevant not-that-big files in the node-red-contrib-bigtimer folder… one is .js and that will tell you all you need about dusk and dawn (the other is .html) – neither are compressed or obfuscated. The timer is also dependent on a 3rd party library (again Javascript).
Regards
Pete
Hi Pete
Thank you for the prompt reply, I’ll take a look.
Cheers
Stuart
Is it possible to override the days in a week when the alarm goes off? I know I can set the days in the config, but is it also possible to override them, just like you can use “on_override” for overriding the time?
I want to add toggle switches to my dashboard for each day of the week. When I am working normally, I just switch on Monday-Friday, but for example when I don’t have to work, I would like to just manually toggle a switch to prevent the alarm from turning on on these days – without completely turning the entire timer off.
Alarm?
No, set the days in the web page. There will be ways to do what you want using a function node.
I have a BigTimer component On-time set to “06:45” and the Off-time set to “Dawn”. My expectation is that if this resolves to a negative time window on a 24h scale, the BigTimer does not fire the “On” event, but it seems, this is not true.
During winter time, dawn is as late as about 08:00h in my area and then I the component fires the ON event at 06:45 and the off event at the respective dawn time. Which is exactly what I want.
But now, dawn is at around 06:30h and since this is before 06:45h I was hoping the component would not fire, since this evaluates to a negative difference between the two points in time.
Instead, the component simply fires at about 06:30h (dawn) for the OFF-time and then at 06:45h for the “ON”-time. I see that there might be use cases for exactly that behaviour, but wouldn’t it make sense to have a setting to disallow negative time difference?
How could this be accomplished?
TIA, Andre
My current solution is to evaluate the “duration” property. If that is something higher than 3hrs I assume this is due to dawn being before 06:45h. I guess an additional indicator would be cleaner.
Not much more to clarify – the override commend to inject is for example “geo_override aa.aa bb.bb” without the quotes where aa.aa and bb.bb are longitude and latitude..
Need the ability to tell bigtimer to use the lat/long from Home Assistant. It’s already set up there. I don’t want to repetitively copy/paste these values across dozens of nodes. This is a maintenance burden if I ever move or need to update the values for other reasons. I’d even be OK with the ability to override the values with an input. Just let me pass in `msg.latitude` and `msg.longitude`.
It’s already in there – geo_override lon lat
Pete
Could you clarify?
Hello Peter, Great node with so much flexibility. I did happen to run into a particular issue using your manual override feature by injecting an “on” into the input of Bigtimer. I was having an issue with it not working at all and finally discovered it was because I have Bigtimer configured for Monday – Friday on this particular schedule and was trying to do some troubleshooting on a Saturday. Apparently, the manual override does not work outside of the weekday limitation on my schedule. When I updated Bigtimer and checked Saturday I was then able to use the manual override. You may be aware of this but thought I would mention it since I struggled with doing some testing today (Saturday) due to this. Thanks again for continuing to support Bigtimer.
Hi there – manual overrides “does what it says on the box” i.e. vverrides settings – if there are no settings for that day there is nothing to overrride.
Regards
Pete
Ok, I will keep looking.
I am using Node-red via Home-assistant plug-in.
So far, I add no issues.
I will update the HA core and restart again.
Really puzzling, ouput 2 and 3 are running really fine, but not output 1…..
If I don’t find anything, I will revert to using output 3 instead.
Thanks for your help.
Output 1 HAS to be giving something out – that’s the main output (unless you hit the REPEAT option, it will only output on change, not every minute).
Pete
Indeed, this how I have ever used it.
But currently, I can’t find why, I have zero outputs, no matter whether the “repeat” is ticked or not.
On the other hand, on output 2, it repeats every minutes ONLY if option “repeat” is ticked. If not ticked, I have only at start-up or changed …
It could look like my output2 has the intended behavior of output 1.
And output 3 is as expected.
Thanks for looking at it Peter,
indeed, this is really weird, because I have restarted everything (host, HA, Node-red, …) etc. and I still can’t get any output out of output_1…
Do you actually use more the output_2 ou the output_1?
Who you have any advice about a direction to look into for the root cause of such behaviour?
Hi
No, I rarely use output 2 which is why I didn’t spot the issue earlier – I use Output 1 Payload on several BigTimers and all is well, some are feeding simple 1 and 0 to Tasmota devices via MQTT, others are feeding more complex text to my ESP-GO units – no problem – if there was, I’d know about it as we’d have no heating 🙂
I should stress I’m using the 2.8.1 update exactly as published – on a RPi4 – no docker, just simple Node-Red 2.1.3 and Mosquitto MQTT.
Hello,
me again,
after the first automation trigger check of the day, and it seems I have no output 1 at all anymore.
It is not even empty, it is just not sent…
Output 2 working fine, but I’d rather use the one-off message…
Not sure what’s happening there as my entire home is runninf on the RPi4 I did the updates on – and all my lights etc are running – I did not have to replace the timers. I did reboot Node-Red after making the changes to ensure all was well, otherwise everything is running smoothly – if it were not, I’ not be able to find my way around the office to write this reply – the light are all on BigTimer.. as is my office heating.
Regards
Pete
Good Morning Peter,
Thanks for keeping a look and updating your node.
It is indeed a great one that I use.
In particular, I am relieved to see that you have been aware of the issue I have faced, like others, since early Jan, as my bigtimer nodes started to NOT trigger at the expected time, as it seems I had the same “empty” payload issue.
In my case, notice that it was on both outputs 1 and 2 that I had empty payload.
I have just updated to your latest version 2.8.1 this morning and I will keep you informed.
It seems ok on the short term debug I could run, but I’ll wait to see all my triggered automations run through the day today.
Also, a bit weird, after updating the palette and restarting Node-red, I also had to delete the “old” pre-existing bigtimer nodes and plug in new ones pulled from the palette. Is it a normal way to do? Should have the palette updated the already used nodes after the restart?
Thanks again
Vdelab
(PS : I’d love to rate your node contrib, but it seems I do not have such action rights on the flow page).
Hi, I’ve been using BigTimer for a while but today I’ve had issues with it. After updating to NodeRed 10.3.1 overnight, this evening all my BigTimers failed to trigger, using a debug the Payloads are all coming back as blank (“”). BigTimer version being used is 2.7.8.
Thanks
Ok now you have me at a loss, the latest Node-RED that I’m aware of is 2.1.3 – not 10.3.1 – and I updated BigTimer to 2.7.8 on my main RPi – and my lights etc (all using BigTimers) are still working. Want to check and elaborate? For reference I’m on npm 6.14.5 and node 14.18.2 – all of that is reasonably up to date.
I published the code wtraight from my main Pi so no chance of mistakes on the way.
Apologies, this is Node-Red 2.1.4 (Home Assistant add-on page lists it as 10.3.1 hence my confusion!).
Same here!
As I have no IDEA when this change occurred as I’ve never noticed it before (I use output1 payload normally), I’ve just downed tools and fixed it. To clarify – output2.payload is now identical to output1.payload and as I watch my lights go off and on as I use my NR dashboard to check this.
Hence, cacheing permitted you will now find that the current version of BigTimer is 2.8.0 (as of 7.55pm UK time on Jan 1, 2022)
https://flows.nodered.org/node/node-red-contrib-bigtimer
You can imagine as the sole developer I am always worried about making hasty changes – 1574 downloads this week alone. However, that was percisely one line of change. Could someone please comment in here that 2.8.0 is up there. And if it is ok can you please rate it. (Every little helps as they say at Tesco or somewhere).
I just updated bigtimer to v2.8.0 via the Node-red palette manager in HA. I am running Node-Red 2.1.4 (as listed in the actual HA node-red info page) BUT I am still running v10.3.0 of the Node-red Add-on in HA (I have not upgraded to v10.3.1). Bigtimer appears to be working fine. I will upgrade the node-red add-on from 10.3.0 to 10.3.1 which is the latest version available and report back. I’ll do that a bit later today.
Pete – where would I go to rate it please?
Over on the right at node-red flows page – “rate” https://flows.nodered.org/node/node-red-contrib-bigtimer/
Ta.
I had not seen those stars before so thanks Pete. Done.
I must admit they weren’t obvious to me either until now.
Hi, I’ve updated to 2.8.0, unfortunately the payload is still coming back as blank. Hopefully Windsurferw can update their node-red addon to 10.3.1 and be able to confirm if they also have the issue or it’s just me.
It is coming back blank for me, too. 🙁
Check cacheing – I definitely saw the issue, reliable blank payloads on the second output – somewhere along the way, the line copying msg1.payload to msg2.payload had gone astray so I fixed it – and here is the result again after a reboot… I now repeatedly see the same output on the second payload as I do on the first. See debug image included here.
I just updated the Node-red add-on version in HA to 10.3.1. It seems to give me the same output as 10.3.0 (yes I’m getting a payload from output 2). I did restart the add-on and to test and also I clicked on the Deploy drop-down then ‘Restart Flows’. In my case my payload is: “turn-on”.
Let me know if there is something I can try for you.
Hi All,
First thanks for BigTimer, very usefull node.
I too had issues with the latest update. I was using output 2 and expecting a 0 or 1 (and recently when I added a ON Time2 a “2”), as per the documentation.
“Output 2: outputs a 1 or 0 every minute when checking (in msg.payload) – you can use that to light up something.”
That 0 and 1 disappeared with the latest update, and was just putting out “”. I was able to just put 0 and 1 into the on ON Msg and Off Msg fields and that works fine for me. I didn’t need the “2” output for On Time2, but it would still be a problem if I did.
You are right – it should output 0 or 1. My mistake – I’ll work on that.
You and Greg are both right… 0 and 1 is in the spec I guess (wrote that a long time ago) – I’m checking that now…
And now v2.8.1 fixes the output2 payload issue that you guys spotted – BigTimer now has 0 or 1 as second output payload. If the new command “AWAY” is in action, it will also be 0.
I’ve just been over to node-red flows page to make sure it’s updated to 2.8.1
Updated to 2.8.1 and payload is now working. Appreciate the work sorting it out, rated as requested!
Well done – thanks.
I also updated and it’s still outputting an empty string “”. It should default to a 1 or 0 according to the help section. However it does not.
A workaround for me was to set the msg to “on”/”off” and then in the switch node right after change the logic. However this is a hefty task for those who have a lot of bigtimers implemented.
Yessir I did. Thank you for your contributions to my successful home automation! I’ll be continuing to watch your blog for more….
Steve
Hello,
Since the 1/6 update, the msg.payload of the middle output (the one which outputs every minute) is always “”. I’ve worked around this by parsing msg.state, but that doesn’t seem like an ideal solution.
Loren
Okay that was amazing turn-around! Working flawlessly, thanks so much!
Magic. Enjoy.
If I have this right – you just made a donation to the blog – THANK YOU – much appreciated.
Pete.
Pete, your update heading should be “Update January 6, 2022”. Don’t make me relive 2021 again. 🙂
Where would I be without you. Fixed.. No, no-one wants to relive 2021 – horrible year. Best forgotten. It’s 2022 now – and I belive our Prime Minister has developed some balls and is going to start lecturing the anti-vaxxers 🙂
Hi Peter,
I think I found the issue. Would you mind checking line 137 in bigtimer.js? I am using release 2.7.6. I believe the current line
node.month9 = n.month;
should be
node.month9 = n.month9;
Thank you in advance for checking
Thank you so much for your feedback – now fixed (v2.7.8) – and AWAY X command added – see BIGTIMER blog entry (near start) for more. Great start to 2022.
Hi Peter – not sure if I entered my post correctly; sorry for any duplication.
Happy New Year! I am enjoying my first holiday season using bigtimer – kudos to you for this. I’m not sure if this is the best place to report a possible issue..
Everything has been working well until today my lights did not activate, in fact my bigtimer nodes all report for today ‘No action today’. What I have determined by experimenting is that – under ‘Include special days of the year’ – Day 9 does not activate. If I put today’s date (Jan 5) in the Day 9 position, it does not work. If I put today’s date in any other position under ‘Include special days’, then bigtimer triggers just fine.
Is there some other setting that I’m possibly missing that could be causing this?
Hello Peter,
really great work, thanks a lot for the node 🙂
I’m wondering how to configure BigTimer to avoid switching off on the given day? i.e. “switch on” today but “switch off” tomorrow?
Bigtimer is a 24 hour timer. If you want to invert operations on alternative days consider a function on the be output to invert the operation.
Pete
Can BigTimer do an off-on transition every 30-45 minutes or do I need another tool? I own a Super Feeder automatic cat feeder. When its power is applied, it dispenses a programmable amount of pet food. I bought it with a mechanical rotary lamp timer that has a plastic detent for every 15 minute interval and use a pencil to set the detents to try to get it to power up for 15 minutes and down for 30, repeating all day. (My fattest cat would eat the whole tank of kibble and barf it up, so I have to do this to slow him down.) Ideally, I’d like to say “on at 00:00, off at 00:15, repeat every 00:45”. I’ll also be hooking up an Inject node to be able to “treat” the cats in between cycles from my desk or phone.
BigTimer id meant as a sophisticated version of old-fashioned wall timers, not what you are after – so one timer can do 2 on-off times a day – of course – as they are free you could probably use several to get what you want. On the other hand look at my node-red-contrib-timeout… ???
Pete.
oh and here’s a picture of my flow
Hi
Thx for making this great node for node-red. I use it for christmas light and now for outdoor light.
I have a wish for adding a 3rd ontime/offtime if possible.
The reason for this is following usercase:
1. Want light to turn on at 6am and off at sunrise.
2. turn on again at sunset and off at 1-2 am.
This is not possible because 1-2am crosses the midnight and then runtime starts over.
If there was a 3rd ontime it could be as following:
Ontime1: 00:00 offtime1: 02:00
Ontime2: 06:00 offtime1: sunrise
Ontime3: sunset offtime3: 00:00
Hope you can see the point.
Thx again for the node and merry christmas.
Kind regards
Thomas
And merry Christmas to you, Thomas
Given the emails I’ve had over the second timer, I’ll politely decline adding a third as there is too much risk of introducing issues with previous versions.
Regards
Pete.
Fair enough.
rethought it, and found out I can just offset time2 to cross midnight.
It is truely a great timer.
Thomas
Thank you so much.
Merry Christmas
Pete
Hi – I would like to set the Big Timer to turn on exactly at 11:10 a.m. and turn off exactly at 11:15 a.m. Unfortunately, I noticed that the on/off is shifted by several seconds (please look at the attached screenshot). The offset depends on which second the deploy occurred.
Is this a deliberate action or a bug?
Second question, how to disable the second timer (Time2)? Is it enough to set it to 00:00? (but then how to set the 2nd timer to 00:00)?
A1: The timer works on the minute. If the time on your RPi or whatever you are using for NR, is not correct, then NR node timings will not be correct.
A2: Second timer – either leave unused or set start and stop to 00:00
Pete.
Dear Peter, thank you for your prompt reply.
1: This seems to be standard in NR – I did a test for a regular Inject node, deployed it at 52 second past the minute, I get outputs every minute (at 52 second).
Unfortunately, I still don’t know how to set the Big Timer to a specific time (e.g. 14:00, 00 seconds).
If I set it to 14:00 and deployed a node at 15 second (e.g. at 13:45:15) then I get output at 14:00:15….
2 – I don’t understand. I would like to disable Time2 (leave it unused), but there is no such selection in the drop-down… I can leave it on 00:00 but then it is disabled or set to 00:00?
Set the 2nd ON time to 00:00 and the second OFF time to 00:00 – I just did that and that effectively disabled the second on and off times. BigTimer never intended to be aurate to the second, just accurate to the minute – it depends what the rest of your NR installation is doing.
Pete
Thank you.
You wrote (Set the 2nd ON time to 00:00 and the second OFF time to 00:00 – I just did that and that effectively disabled the second on and off times.) – the question then is how to set Timer 2 to 00:00?
Wouldn’t it be the simplest and most elegant solution to add the option to the drop-down list (Disabled)?
It would be great if every timer had an option to disable (1st On, 1st Off, 2nd On and 2nd Off) – many people would like to use only 1st On for example.
I don’t want to be stubborn, but I saw that many people have the same problem – the inability to disable Timer 2 and pointed to the above solution as expected.
Anyway, thank you for your work!
If timer2 is never used it is disabled. If it has been set, setting the start and end to 00:00 disables it.
I just disabled timer2 a few minutes ago by putting in 00:00 for both start and stop times.
You do that as you would set any other part of the timer…. in the dropdown box – select 00:00
See image.
I’ve made a local version with overrides for the second timer and second set of offsets but I’ll want to see this running for some time before publishing – so easy to get that wrong.
Pete.
This doesn’t work very well. When i set this to 00:00 and 00:00 the light goes on for a second and turns off.
Do we assume you’re talking about time 2 (with time1 set to something useful) and which version of bigtimer?
But then, the node only checks every minute, if it checked every second, this would take up unreasonable resources, especially where multiple Bigtimers are used in a single installation.
Pete
I’m using the fantastic BigTimer with options on on Dask and off on Dawn
The On Offset and Off Offset parameters mean that the timer switch before or after the Dask time ? Negative value are supported ? ie if I set On Offset to -30, the timer switch on 30 minutes before Dask ?
Thank for yuor time !
Dusk 🙂
Henrik, for that kind of routines You do not need swiss knife as BigTimer. Simple inject-node in NodeRed does this job. Just change “Repeat” for “at specific time”.
Correct, I would still have to do the Countdown node for the unplanned starts, though. Thus I could keep it as it is.
My question remains: Have I misunderstood BigTimer or am I doing it wrong?
If no schedule is set, BigTimer will do nothing- the overrides are just that, overrides.
Hi there.
I’m trying to start my car heater every weekday morning. All good and well, the tick boxes at the bottom of the list does the trick.
However, I also would like to be able to start the car heater on command for other times. But; when the tick boxes for saturday and sunday is empty, Big Timer doesn’t answer to any commands. Not “timer 3600”, not “Auto”, heck, not even “sync”. Ticking the boxes makes it answer to the same inputs, though. For now I’ve put an external countdown timer to do the trick, but it would be neater to have it inside the same node. I’ve scorched through the manuals, videos and forums, but to no avail. Is this as designed or am I doing something wrong? The image is with the boxes unticked.
Hi Peter
Seems lige BigTimer is very nice indeed. But im having a single problem,
I want to start some lights 1 hour before sunrise, and then turn them of again 30 min after sunrise, but if i set OnTime and OffTime both to sunrise, but with -120 and +30 offset respectively, the timer is disabled, as on off is the same. Maybee dont disable a timer if OnTime and OffTime is the same, but the offsets differ?
Or did i misunderstand something?
If the on and off times are the same, Bigtimer will not operate – that is the correct behaviour.
Regards
Pete.
Hi there,
I am kind of new to Home Assistant, Node-red and BigTimer, but so far, so good and enjoying it.
My use case, that I want to set up, is: turn on garden lights in the morning, then turn them off after some short time (in reality based on position of the sun), and do the same (on/off) in the evening, again based on sun.
At first I did not quite understand how to set up BigTimer, or at least did not get it to work properly (thinking I did understand). But working on this test of mine (see picture attached) I think/hope I can figure it out, and make it work… 😉 Reading a manual is not my best skill, and maybe it is not even in there… Trial and Error are my friends…
Points of attention:
* for my use case, all four elements ontime, offtime, ontime2 and offtime2 needed to have their own ‘unique’ time settings. Not yet looked at exactly what makes them disabled or not.
* when looking at the relevant flow in Node-red, then the status (indicated with A in the image) below the BigTimer node -tmo- is somewhat misleading: when on/offtime1 finished, their (on/offtime1) own indication for the next period is shown, NOT the one next for on/offtime2. This will be shown right after on/offtime2 was activated. In my head I was expecting to see the time untill the next action, in my case for on/offtime2…
* the payload value is different for on/offtime2, compared to on/offtime1. See attached image: 0, 1 and 2. Value for “state” is constant in my test (“ON Auto” / “OFF Auto”).
* I will use the second output from BigTimer. I disabled both ‘Repeat output’ and ‘Output at startup’
Just posting this so it might be of help for the reader.
Cheers,
Jaro
Hi,
Just wanted to say a huge “thank you” for Bigtimer, I’ve finaly managed to find a clever timer!
Thank YOU for taking an interest….
Regards
Pete
Hi,
I would like to set the offset from input, because then it can be possible to read the weather data for example if it is raining and set the offset to turn on early that day or if the sun is shining then it can delay the offset for that day.
Can this be done?
Thanks.
Hi
Towards the end of the BIGTIMER blog entry – tells you what you can do with the input.
Regards
Pete
I am new to node-red I try to understand, I have tried this:
to set msg.onOffsetOverride and msg.on_offset_override to -60 and other but it does not work. Can you please give me a push in the right direction? Thanks.
Hi Peter,
I just stumbled across BigTimer and am trying to accomplish the same thing as Talzac, and can’t figure out how to use the input for msg.on_offset_override to work properly. I have only been able to find vague references about this input, and no examples.
I set the On Time to Dusk, Off Time to 23:45 (On & Off Time2 values are default 0:00), Lat to 40.014, and Long to -83.143 (Eastern UTC -4). As I write this it is 2:23 PM EST on my comuter, and the BigTimer node status shows “Off for 3 hours 24 minutes”. I have tried using an inject node with different values for msg.on_offset_override (60, -60, 400, -400, 1:00, -1:00, 4:00, & -4:00). The status never changes other than counting down the minutes.
Please provide details with an example of how to use this input.
Here is debug output from inject node:
{“_msgid”:”301dd3f12a1eceda”,”on_offset_override”:”1:00″}
Here is debug output from BigTimer node resulting from injection:
{“payload”:0,
“reference”:”:::877″,
“topic”:”status”,
“state”:”OFF Auto”,
“time”:”03hrs 10mins”,
“name”:”Big Timer”,
“lon”:”-83.143″,
“lat”:”40.014″,
“start”:1067,
“end”:1425,
“dusk”:1067,
“dawn”:409,
“solarNoon”:738,
“sunrise”:438,
“sunset”:1038,
“night”:1132,
“nightEnd”:344,
“moonrise”:923,
“moonset”:149,
“now”:877,
“timer”:0,
“duration”:190,
“onOverride”:-1,
“offOverride”:-1,
“onOffsetOverride”:-1,
“offOffsetOverride”:-1,
“stamp”:1636918639183,
“extState”:”OFF for 03hrs 10mins”,
“_msgid”:”ba613505e8749b86″}
Hi Peter
Thanks for using your time on this plugin 🙂
I can see that this has been asked before, but the only answer I can find is that time2 should be later than time1 and that it is.
I have this simple timer, but On Time2 doesn’t run.
I haven’t touched any settings that can’t be seen on the screenshot.
The last debug message is manual override just to make sure the On Time2 time was passed. When the Off Time1 has been triggered, it also says “OFF for 23 hrs 56 mins”.
Hello Morten,
i had the same problem and found the solution here:
https://githubmemory.com/repo/gablau/node-red-contrib-bigtimer/issues/5
The setting times of (1) On-Time and Off-Time and (2) On-Time and Off-Time must be different.
Sincerely
Jürgen
I’m assuming you meant “On-time1 and Off-time1” also “On-time2 and Offtime2” there 🙂
Hey
I try to get Bigtimer to On Time 4:30 p.m. and Off Time 1 minute, every month on the 24th. I configured Day 1: 24 and Month 1: 1-12, I deselected everything else. However, the status always reports no action today, even on Day 24.
What am I doing wrong?
Thanks
Heinz
You’ll have to send a photo of your setup, I’m not grasping that.
Pete
Great, got it. Thanks.
Another questions. I’d like to inject an event at specific days in a month (e.g. every 10th and 20th at 02:00am every month in a year). How do I configure that?
Hi Peter,
first thanks for the node and the value you provide to the tech community every day.
I have a very basic issue with big timer. I just does not work. I’m working with node red for some time and have a good knowledge but I cannot get the timer to work. Even not the simplest flow.
2 Injects with msg.payload – String “on” and “off” and “on text” and “off text” configured in the big timer node. I can see that it works because of the mini text below the node saying “on-temp override” etc. But I do not get a message from output 1. I’m getting a message from output2 (debug) but output 1 channel is dead. Even with inject not pushing the sync command, output 3 remains quite.
I have NR version 1.2.3 and Bigtimer version 2.7.5.
What have I missed?
thanks
Horst
Its “on msg” etc you need to use, on text is not for output 1.
Request for new feature
Hello Peter,
first of all I want to thank you for the bigtimer, which is really fantastic and one of my favorites in nodered.
However, I have a question about whether the name of a timer can somehow be generated automatically from the values stored in the timers field values.
For example, it would be ideal if the name could be generated from the field values of “On Time”, “On Offset”, “Off Time” and “Off Offset” (see screenshot). The result would then be shown in the screenshot. This would make it easier to keep track of what time a timer becomes active, when using several timers.
many greetings
Michael
I must admit, not something I’d ever thought of.
…would it be something, you thing it would be for you easy to implement in the bigtimer?
I have always had trouble getting my head around the connection from variables back to the webpage-entered name. As you have the source code (one JS page and one html page) in your /home/pi/.node-red/nod_modules/node-red-contrib-bigtimer folder – feel free (make a backup first) to attempt changing the JS to suit (in a simple text editor). If it works, send back to me with your changes commented and I’ll give it a whirl.
Hi, seems to me as if “manual on” and “manual off” are effective until the next scheduled action (on/off) while based on the description the “manual” should be permanent, did I understand correctly? (Thanks for your great work!)
ok seems like an upgrade solved, was 2.4 before, is it possible?
Hi, is it possible to output the full message just once a day? I know I can get it from the second output, but I don’t need it every minute.
My use case is that I want to calculate how many minutes are between sunrise and sunset. I am going to be making an API call to OpenUV, but my account only has 50 calls / day. So I was going to do something like [minutes of daylight] / [45] so it dynamically picks the correct call rate through the whole year.
Thank you!
Just stick a function or change node on the output depending on your needs.
Thanks for the reply. Is there a way to force the output from Output 2 to go through 1 or 3 instead? I only need to calculate once per day, so was hoping to not have to have the output firing minutely.
No, that’s why BigTimer has 3 separate outputs. Each has it’s own purpose.
Pete
I’m sorry, I was probably not clear enough.
When using only On and Off the timer shows On/Off Temp override and the status shows On/Off override which like you said is OK.
When using Manual and Off the timer shows OFF Man. override and the status OFF Manual which is OK I think.
However when using Manual and On the timer shows On Man. override (correct) but the status shows On Override which is not correct.
Regards, Ed
“manual on” shows “ON Man. override” in the status
“manuual off” shows “OFF Man. override” in the status
all of which is correct.
Hi Peter,
I ran into a small issue with bigtimer. When using “on/off” with “manual” the state is not reflected correctly. Using “on” with “manual” gives “on override” where “off” with “manual” gives “off manual” (as it should be). I’m having some leds based on the status so would appreciate it to be corrected.
Thanks for all the work,
Ed
When I use on and off as manual overrides, in the first output, state=”on” and state=”off”. If I look at the second output, I get state=”ON Override” and state=”OFF Override” (without quotes of course).
Regards
Pete
Maybe this helps better.
kind regards, Ed
Hello Peter,
First off, like many that have come before me, thank you for developing, and maintaining, BigTimer.
I am having a problem that I am hoping you can assist with. Through trial and error I have gotten my setup for BigTimer working to randomize my living room lights to come on and turn off during the day and night. However, I want 2 of the lights to come on specifically at 4 PM (16:00) EST/EDT. I previously had set the “On Time2” with a -30 minute offset and to randomize the turn on. Now I have the “On Time2” set at 16:00 with no offset (0) and unchecked the box to randomize On 2. Ever since making the change, the lights are still coming on randomly around 16:00. What am I missing? Please help!
Thank you!!!
P.S. – If I remove the offset from “On Time1” it seems to fix the problem, which shouldn’t be the case.
That’s odd. Well, I’ll check next time I’m doing updating but meanwhile, you have full access page /home/pi/.node-red/node_modules/node-red-contrib-bigtimer/bigtimer.js – a mere 35K long readable file – if you happen to spot any issue, please do write back in. BUT a word of caution, back up the file before tinkering – and whenever yyou make changes to any NR file, it is as well to restart NR when you’re done. NOT doing that has caught me out in the past. Also when you unchecked the box – did you restart NR before coming to the clonclusion that something was wrong? Same thing… a restart ensures that NR is working wityh the latest changes.
Pete,
I’m using the latest version of your BigTimer and have a small problem. By using “On Time2” and “Off Time2” and Sunrise was before “On Time2” setting it should not switch but it does.
See attached PNG.
Is that a fault or do I miss something?
At first glance might the issue be that you have set time 2 early in the day than time 1? Time 2 settings should always be later than time 1 off. The timer does not understand overlapping days – just a 24 hour period starting at 00:00 and ending at 23:59:00
Hi Pete,
I did that what you suggested with no luck. I think you should compare ontime and offtime as long as one of each is variable like sunrise. If sunrise already accured before ontime then you should not switch.
Should be possible to manage in BigTimer.
Regards
Easy except it is AGES since I looked at that code. Suggestion – for a quick fix, in /home/pi/.node-red/node_modules/node-red-contrib-bigtimer there are only two relevant files – an .html and a .js – calcs are done in the .js file – you have full access to them as usre pi – but don’t forget to restart node-red if you make a change (and I suggest backing them up first).
I only wish to set one timer, how do I do this? There are two timers in the interface and no option to clear the ON / OFF times. So how do I ensure it doesn’t send ON and OFF on the second timer?
I can’t help thinking I wouldn’t be the only person to ask this, but having searched this page clearly I am!
Peter, thank you for Big Timer. This page probably has the longest comment section in all of the Internet. And now I’ll add to it.
What is the recommended approach to have a timer that is only active between specific dates? There are months than can be checked but what would I do to have the timer act only between December 25 and April 15?
Hi Mark
The timer works by months as that is the most common use-case.
One way around this would be to put the output through a function node who’s output only operates if a global variable is true.
In that case you could use an INJECT node firing out a timestamp every 5m minutes (for example) into a function node.. if you are greater than or equal to December 25th, the funcion could send the “auto” command to bigtimer.. sfter April 15th it could send the “stop” command to BigTimer….
Just a thought..
Regards
Pete
Hi Pete,
Thank you for your response and the suggested workaround. I also thought about some additional filtering function but wanted to make sure I didn’t miss a setting.
Regards
Mark
Have fun…
Hello,
How do I disable ‘On Time2’ and Off Time2? Do I have to set it to same values as On/Off Time1, if applicable also use the same offset as for Time1?
I believed the default values of 00:00 for Time2 meant they are disabled by default, but they arent in my case.
Hello,
Thank you for your excellent work on this node! I have been using it flawlessly for months, but all of a sudden (the day after DST) it is 2 hours “off”, my timer that is supposed to end at 23:00 is set to turn off at 01:00 the next day. I am a bit confused as to how bigTimer actually gets the UTC offset, but I have confirmed the following: my system time is correct UTC -0600, and my docker time is correct UTC -0600 and I have also entered in the lat/long in the bigTimer (not sure what this is used for if the system time is used), I have also confirmed the MAN UTC is 0. if I run a debug to print out the system time, it is correct. Everything seems as it should, except the bigTimer node.
Please help, I don’t know even where to look at this point.
I can only say that my BigTimers take DST into effect and are working fine. I don’t know what you are using but in my case it is a Raspberry Pi – and it is running on Brussels time correctly. The long/lat determine dawn/dusk etc.
Thank you for taking the time to reply, and I know everything is working fine for you, but I am hoping as the designer you would have potential insight into why it would not be working for others. Or maybe how to troubleshoot where the node is picking up the localization.
What information could I provide you to help? I am running the latest node-red in a docker container, which I believe is built on a ubuntu distro.
Hi Brian
The node picks up it’s time from the Raspberry Pi – and gets it’s dawn/dusk information from the longitude/Latitude.
There is one Javasscript file containing the code – this sits at (in the case of user Pi on Raspberry Pi) /
/home/pi/.node-red/node_modules/node-red-contrib/bigtimer
I am on CET (Central European time).
Regards
Pete
Thanks again… after a late night, later then I would care to admit, I can confirm there is a system problem that is not directly related to BigTimer. even though all the components in the system appear to be set correctly Node-Red is pulling and reporting times that are 2 hours off.
Thank you for your time,
Hey, again thanks for the help. The js you pointed out to me gave me the code needed to run in a function within node-red, to prove that even though everything was “set correctly” the date being returned was in the wrong timezone. This had nothing to due with BigTimer but you helped me troubleshoot it. For those interested I had to force my docker instance to have my timezone, even though everything was setup correctly with the localtime.
-e TZ=[your timezone]
What’s the phrase “I love it when a plan comes together”? Well done Brian, glad you got it sorted and thanks for the feedback.
Regards,
Pete
Hello, I have unchecked the boxes Repeat output and Output at startup, but keep sending outputs every minute out of output 2.
Should I stop sending when you uncheck the boxes?
Thanks.
That’s what Peter written one post before:
The output 2 will ALWAYS send every minute.
Use output 1 to send only on status change !
hi i’m new to nodered. Thank you very much for creating bigtimer.
I have a problem: output two of the node sends the status every minute and also at power up. I have unchecked the options at the bottom of the settings tab, but it keeps happening.
Thanks a lot.
Thats what output 2 does.
Hey
Im trying to get Bigtimer to send On 06:45 and Off 01:00 under the date interval of 11th of December to 10th of January.
But I dont get it to work. It send on/off every day.
Hi Niclas. That’s not making sense. Two things… OFF time should be later than ON time – and also BigTimer control does not specifically include date interval control. There are 12 special days for the purpose of date intervals (holidays etc) – but generally you can control by month and if needed, by day of the week.
Hi,
thank you for creating the BigTimer node.
I’ve tried some time but couldn’t figure out what’s wrong.
I tried to switch on a plant lamp in the morning and in the evening.
On 120min before sunrise, off 60min after sunrise.
On 60min before sunset and off 120min after sunset.
But my BigTimer config switch only On Time and On Time 2 is ignored.
Any idea for me ?
[{“id”:”b09c3664.113068″,”type”:”bigtimer”,”z”:”29af218d.34f36e”,
“outtopic”:””,”outpayload1″:”an”,”outpayload2″:”aus”,
“name”:”Big Timer 1″,”comment”:””,”lat”:”49.4664926 “,”lon”:”8.5003212″,
“starttime”:”5003″,”endtime”:”5003″,”starttime2″:”5004″,”endtime2″:”5004″,
“startoff”:”-120″,”endoff”:”60″,”startoff2″:”-60″,”endoff2″:”120″,
“offs”:0,”outtext1″:””,”outtext2″:””,”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”:false,”randon1″:false,
“randoff1″:false,”randon2″:false,”randoff2″:false,”repeat”:false,
“atstart”:false,”odd”:false,”even”:false,”x”:290,”y”:200,
“wires”:[[“755a6749.1a6498”],[],[]]}]
The screenshot wasn’t attached in my question from February 8, 2021 at 2:10 pm
Hi,
any idea why this don’t work ?
Nobody can help me ?
Well,sorry Ralf, I can’t see why that’s not working… I just did a very quick test – I set a timer to some on at 10:45am and off at 10:45am and as it was a little earlier than 10:30am, I set the on and off offsets at -15 and -13 minutes respectively.
It worked a treat. See image. The output stayed on for a couple of minutes.
Hello Peter,
thank you for your help.
Maybe it’s a problem with sunset/sunrise and the change of the day at midnight ?
I’ve tested again (see the screenshot) and although I set sunrise (timer1) and sunset (timer2) the bigtimer shows “Off for 19h” (I tested it at 11:00).
So it set only the sunrise at the next morning.
Erm, have you tried dawn and dusk – I use those mainly..
When I use in both timer something else as a strikt time it’s only working for timer 1.
But I’m building now a workaround with 2 bigtimer.
Hi Ralf
Did you find a solution to timer2 not being triggered? I have exactly the same problem, where time2 is being ignored.
Thanks
Thank you for answering my previous post. I did get this working after your comments and some trial and error.
I have 9 Bigtimers now in this automation to control an InputSelect for various special days to control a lighting setup.
Due to how BigTimer handles added days, I simply used multiple for some things and some extended times. No big deal.
My challenge is to add a specific day, but one that the date varies but is always on the same day (US, Labor Day, the first Monday of September)
I appreciate a suggestion how to configure BigTimer for the first Monday in the 9th month.
Hi Peter,
Love the BigTimer node but I’m trying to use it in a situation where I can turn the schedule on and off… I can’t figure out how to STOP the schedule and KEEP it stopped unless I turn it on again…
Using the ‘stop’, ‘manual’ and ‘off’ payloads all work temporarily but the schedule always reverts and starts again the next time around. Is there something I’m missing?
Cheers,
Liam
Hi Liam
I just turn off certain months if I’m not planning to use a Bigtimer – for example no hottub in winter months.
Hi Peter,
I have a few use cases for the functionality of being able to have the schedule persistently on or off but not based on a time schedule like you mention.
For an example, having a timer turn a light on & off if I am away, but disabling it if I am at home.
Is the temporary nature of the overrides intended? Or would it be possible to include this functionality in Bigtimer, eg. ‘on/off’ being temporary but ‘manual/start/stop’ functioning as a permanent override…
I could have sworn one of the overrides was permanent… ok, it’s on the mental TODO list. Erm, but… your first requirement… if you are at home presumably you have some kind of sensing to know you are at home – so a simple function node after BigTimer would stop it turning something on…
Yeah it seemed to me like one of the override options was intended to function that way, as there are many options! But alas… they all seem to reset.
I am currently using workarounds for these cases similar to what you have described but it would be cleaner having this ability baked in 🙂
2.6.4 -> 2.7.3 changelog available? Just curious get to know what has changed between last version 2.6.4 and new 2.7.3 before I do an update
I don’t do changelogs. Cosmetic and docs changed/improved. Suggestion: if it works, don’t change it.
Hi
just started to used node red and have added the big timer to the first project. it is set to turn on and off at sunrise and sunset, both with an offset of +30 minutes.
I want to be able to change that +30 minutes via a numeric spinner. I have tried several things to try to send the numeric value to bigtimer but with no luck. is there a way to do that?
TIA
Paul
Both the on offset and off offset can be overriden numerically… it’s in the bigtimer.js file – you can see it alongside the other manual override inputs…
case “on_offset_override”: change=1;
switch (theSwitch.length) { //DJL this case block
case 1: onOffsetOverride = -1; break;
case 2: var switch2 = theSwitch[1].split(“:”);
if (switch2.length==2) onOffsetOverride = (Number(switch2[0]) * 60) + Number(switch2[1]);
else
{
switch(theSwitch[1])
{
case ‘dawn’ : onOffsetOverride=5000; break;
case ‘dusk’ : onOffsetOverride=5001; break;
case ‘solarnoon’ : onOffsetOverride=5002; break;
case ‘sunrise’ : onOffsetOverride=5003; break;
case ‘sunset’ : onOffsetOverride=5004; break;
case ‘night’ : onOffsetOverride=5005; break;
case ‘nightend’ : onOffsetOverride=5006; break;
case ‘moonrise’ : onOffsetOverride=5007; break;
case ‘moonset’ : onOffsetOverride=5008; break;
default: onOffsetOverride = Number(theSwitch[1]); break;
}
}
break;
case 3: onOffsetOverride = (Number(theSwitch[1]) * 60) + Number(theSwitch[2]); break;
}
break;
case “off_offset_override”: change=1;
switch (theSwitch.length) { //DJL this case block
case 1: offOffsetOverride = -1; break;
case 2: var switch2 = theSwitch[1].split(“:”);
if (switch2.length==2) offOffsetOverride = (Number(switch2[0]) * 60) + Number(switch2[1]);
else
{
switch(theSwitch[1])
{
case ‘dawn’ : offOffsetOverride=5000; break;
case ‘dusk’ : offOffsetOverride=5001; break;
case ‘solarnoon’ : offOffsetOverride=5002; break;
case ‘sunrise’ : offOffsetOverride=5003; break;
case ‘sunset’ : offOffsetOverride=5004; break;
case ‘night’ : offOffsetOverride=5005; break;
case ‘nightend’ : offOffsetOverride=5006; break;
case ‘moonrise’ : offOffsetOverride=5007; break;
case ‘moonset’ : offOffsetOverride=5008; break;
default: offOffsetOverride = Number(theSwitch[1]); break;
}
}
break;
case 3: offOffsetOverride = (Number(theSwitch[1]) * 60) + Number(theSwitch[2]); break;
}
break;
Thank you @Scargil,
Bigtimer has become the heart of my home automation for water pumping and boiler. Thanks for the great work.
I have a small problem however. Only one of the timer seems to work. Time2 does not work in all the nodes I used it. That forced me to run multiple nodes to accomplish a task that one bigtimer node should be able to handle. In addition, is it possible to have more than 2 timers?
Thanks.
I just tried the second timer (who’s start and end time should always be greater than the first one in order to use successfully. I set the second timer to come on at 12:15 and off at 12:30. At 12:12 the output was still off – but as expected at 12:15 the output came on and a debug node on output 1 confirmed this.. it would be possible to have multiple timers – but then the menu would start to get so big as to be unfeasible – It is already past a typical screen full…
Thank you. I will still check. Kindly consider adding one more timer. Or just simply make it possible to add the number of timers needed like it is implemented in “timerswitch” node.
Thanks for this very useful node.
Oh I only catch this now : “the second timer (who’s start and end time should always be greater than the first one in order to use successfully)”.
Well I like to have my covers opened around at a fixed hour or later if dawn is later… But Dawn is sometimes before sometimes after that fixed hour depending the season in the year… Does it mean I have to use 2 nodes somehow because the 2 timers in one node would not be robust ?
Sorry to ask, but I am a bit stuck.
I am helping someone with using the node.
Reading the docs:
Whether or not you use the optional Topic Msg (MQTT Topic), the first output sends out a message with the text from the ON Msg (MQTT Payload) and OFF Msg (MQTT Payload) fields at your set ON and OFF times (and if the repeat tickbox is ticked – every minute)
The second output has a topic of “status” and simply sends the state – 1 or 0 every minute as well as echoing the status in msg.state and msg.time. (from v1.5.6 onwards several properties have been added to msg)
The third output sends an optional message, ON Text and OFF Text – suitable for speech output or a log (this happens only at ON or OFF times, NOT every minute).
The node is configured to send a `0` or `1`.
Why am I seeing a `2`? (Middle output)
On the second output, msg.payload shows the state of the output which could be 1, 0 (on, off) or 2 (auto). It is not the same as the payload of output 1 which shows the actual control message you entered.
Ok, but unless I am seriously having problems reading the docs in NR (I pasted an extract) a `2` isn’t mentioned.
Again – from the node’s help screen:
“`
Whether or not you use the optional Topic Msg (MQTT Topic), the first output sends out a message with the text from the ON Msg (MQTT Payload) and OFF Msg (MQTT Payload) fields at your set ON and OFF times (and if the repeat tickbox is ticked – every minute)
The second output has a topic of “status” and simply sends the state – 1 or 0 every minute as well as echoing the status in msg.state and msg.time. (from v1.5.6 onwards several properties have been added to msg)
The third output sends an optional message, ON Text and OFF Text – suitable for speech output or a log (this happens only at ON or OFF times, NOT every minute).
“`
> The second output has a topic of “status” and simply sends the state – 1 or 0 every minute
I think the documents need updating.
Actually that was incorrect, the second output – payload SHOULD only show an output of 0 or 1. My comment of Jan 6 at 11:12 was wrong, I’ve no idea why you would see “2” on that output. The payload for output 2 should only show 1 or 0.
Ok thanks.
It seems I can’t post code here.
Not to rub it in, but more seeking help, how could I show you it failing?
(Sorry)
I did a bit more digging and found this to be happening.
If you only have the node and no `inject` nodes setting it up the middle output sends a `2` every minute.
So if the person uses the node and forgets to *establish* the node’s mode (auto,sync,on,off etc) it sends unexpected/undocumented messages out the ports.
Or so it seems
Well now – I just went into an empty flow – and dragged three BigTimers into it – with the second output of each feeding into a debug node…. and here is the result…. so if there is something wrong, that’s not it. See photo.
Thanks.
I hope you understand I (sort of) had to ask.
Otherwise it would be a non-determined situation.
Mr. Scargill,
Thank you for your contributions. I’ve been using BigTimer for two years without intervention to open and close a chicken coop door and it’s worked perfectly.
You are a great man ! Thank you for taking into account my user feedback ! If you find that the menu too long, I guess few people would mind – not even me – if you limit the stacks to 9 days and not 12 (so that you keep your menu length unchanged as a whole).
I have only 2 ways to contribute as I am not a developer :
1/ user feedback – Done !
2/ pay you a coffee for your superb node – I have yet to find your Paypal button ( ? may be my antipub)
Hi Jerome
Not the first time anyone has had trouble with the Paypal Link. You have to be logged into the site and I guess viewing on a PC to see the right side info.
If you don’t end up seeing the link, please do let me know – I try not to be too overt with that and I don’t do things like popup ads or sponsors etc so I really need that link to work 🙂
I did the update to 12 includes and excludes. If anyone looking in knows how to TAB the info section in the node – that would help, I never did figure that out.
Happy to help with another feedback !
Well, I did some tests with 2 web browsers, logged in into an newly created site account or not, with anti-pub active or not, cache reloading or not.
If I do no wrong, I can tell that your PayPal button only appears when logged in, else it never appears.
May be it is the behaviour you wish… Only you can tell.
I did make it logged in only but I’m having a rethink on that….
Regards
Pete
Indeed you might lost the (many?) willing donators not enough perseverant to go through registering.
You are probably right – well – thank you! Your perseverance is appreciated 🙂
Congratulations for this wonderful node !
I’ve got a simple “request”.
Lucky man I am as there is more “not working” days in my country than 6.
The node configuration lets include up to 12 days a year to take this into account, but lets exclude only 6 days a year.
Symetrical numbers of exclude / include days a year would help make my automations at the simplest, let says 9 and 9 (if you need to keep the same whole number of lines in the UI) or 12 and 12.
Best Regards
Jerome – this could be your lucky day. Node-Red-Contrib-Bigtimer as of this afternoon thanks to your input, now has symetrical include and exclude days – 12 of each. That menu is starting to get long – but there we are. I also fixed a minor bug at the same time in one of the months.
Regards
Pete
(and now back to working on this months new gadgets so far).
Good afternoon Jerome – first sensible upgrade suggestion of the year.
Hi there,
i’m trying to use big timer, i currently have version 2.7.2.
I have configured the node with my GPS coordinates, on time to be dawn, off time is dusk. on msg and off msg are respectively on and off. everything else is configured to default.
In my output i selected, i expect to receive a message once at dawn and once at dusk but instead i receive the full message every minutes as if i had chose the “outputs every minutes” output, which i didn’t …
am i doing something wrong, or is there a bug?
At the bottom where all the options are – there’s a REPEAT tick box – untick it.
The SECOND output of BigTimer is every minute – the FIRST output is one-time ronly unless the “repeat output” tickbox is ticked. It IS ticked by default I believe.
🙂
Pete
To the many BigTimer users out there – thanks for using BigTimer.
A comment and a request..
The comment first. As many of you know, Bigtimer is based on a 24 hour period starting at 00:00 – well, I just realised that my own OFF OFFSET can wrap around to the next day – problably many of you already realised that. I have a pergola light that comes on at dusk and goes off at 23:45. I put a 45 mionute OFF OFFSET on it just to check and sure enough it works – turning off at 00:30 in the morning. Just in case you’d been wondering.
And now the request: I just cannot get my head around GitHub markdown. I put a trial BigTimer repository on Github – I generally don’t do that as I don’t have the time or patience to maintain local and remote repositories. SO I’m experimenting with STACKEDIT which SHOULD make life easy according to the docs – I have the test github repository at
scargill/node-red-contrib-bigtimer
but when I try to edit my readme.md, can I HELL get STACKEDIT to accept any path I try, to sync my Stackedit updates in the browser directly with GitHub, can anyone put me out of my misery?
Hi Pete… as per my previous comment – I wrote some code that works for me… could you review it?
Purpose: I want a timer that has one fixed and one dynamic time to not “invert” over seasonal variation (ie a light that should only come on on during dark mornings should not suddenly be on all day and night in the summer!)
https://github.com/phedders/node-red-contrib-bigtimer/commit/4eff4c257371f34d1906f15a3283397cd2381d9c
I really would like to spend a little more time on the inversion logic. At the moment it is very simple: is the end time going to be earlier than the start time – ie will it wrap through midnight. Ideally it would really check to see if the “on” time will be greater than 12 hours which would allow for timers over midnight still not inverting.
(I would paste a diff but the blog will make it unreadable – sorry!)
Hi
I’ve added your mod to the code – going from v 2.6.3 to 2.6.4
Seems ok – please do come back to me if you spot any problems.
Pete
Hi Pete – love BT but there is one thing missing. (Yea really.. 😉 but only one.. I think.)
Say I want a thing to come on from 7 -> Sunrise, it would seem easy.
But as the year progresses and Sunrise goes from being after 7am to before 7am, a timer running from 0700->Sunrise will actually run all day and night until sunrise – the timer gets inverted.
So I think what is missing (at least for me it would complete BT) is a “midnight cutoff” or “no inversion” option that would circuit break “inverse” behaviour.
Perhaps a logical way of thinking would be a “short time only” ie if the timer would be over 12hrs – disable it.
Apologies if I missed a blindingly obvious option there…
Thanks!
Hi Peter,
I think I may have found unexpected behaviour when using the timer mode of the BigTimer (see image). In this case I wanted to set a timer for 17:10, which is not an option in the dropdown so I set an on time of 17:15 and an on offset of -5 minutes to trigger it at the time I wanted. I then set the off time to “1 minute” later, thinking it would then go off at 17:11. This was however not the case, instead it went off at 17:16, so 1 minute after the set on time, but 6 minutes after the actual on time because of the offset. As you can understand from why I am writing you, this confused me. I modified the off offset (see image) to account for this by setting this to -4 but I think this should not have been necessary and also gives unwanted results when using randomised offsets.
Can you tell me what your thoughts are on this?
With kind regards,
Thomas
So – I set bigtimer to come on at 23:45 – it is now 23:41 – I added an offset of -10 then OFF time 23:45 and offset 3 and it is already on and will turn off in 7 minutes.
Hi Peter,
Can you tell me what off time you were using for that case? Like I said, I expected the timer to be on for 1 minute after being triggered (so On Time – offset -> on Time – offset + 1 minute), as that seems to be implied by the “1 minute” part, and what I saw was not the behaviour I expected.
Also, I found what I believe is truely a bug with positive on offsets when dealing with “x minute” off time. I managed to inverse the on/off time contradictory to how BigTimer seems to be configured. Please see the image attached. It was 00:00 (UTC+1) at the time of the image (approximately).
With kind regards,
Thomas
Addendum because I was too fast responding and too slow in reading:Could you try it with “Off Time x minutes” as I did in my case instead of setting a pre-defined end time from the dropdown menu, without setting an off offset too?
Thank you
Hi
I only ever use absolute off times with possible offsets – maybe I should remove any options indicating you can use something else.
Hi Peter,
But that would remove the following scenario:
On time set to 20:00
On offset set to -60
Randomised (on) offset enabled
Off time: 30 minutes
In this case, someone might want to trigger actuator A to be on for exactly 30 minutes, but not at the same start time every day but between 19:00 and 20:00. There is no absolute off time when dealing with the randomised on offset, except for “on time – offset + 30 minutes”. I know this might be a bit of an outlier in terms of scenarios but it was the best I could come up with at this time.
If I read between the lines correctly I can see you have no intention to changing the current behaviour. Thats a pitty, but thanks for replying though.
With kind regards,
Thomas
You can’t have exact time with randomised offsets. The off time range of say 30 minutes was never meant to compensate for that. Last time I looked at that part of the the code has to be at least 2 years ago. But you have the full source if you want to tinker. Changing the current behaviour is fraught with potential ssues. How long after such a change before someone gripes that it now doesn’t do what they expected.
I’ll take a look over Xmas – always possible it could be easier than I remember.
Hey, I’m new on this forum stuff so apology in advance if a make any mistake.
I just want to say this node is wonderful and it is fantastic how good it works. It adapts so fine to home automation!!
One question, is it expected to be possible (sooner or later) to override special days?
I’d like to configure the special periods from the dashboard and i cannot figure out how to do it with bigtimer as it is right now…
Again, thanks for this node and i hope it can even gets better!!
I must admit I’d never thought of overriding special days…..
I’ll take a look next time I’m doing updates.
Hi Peter.
I hope you are well.
I use your bigtimer in many flow.
Now I’m trying to have an output with the same input message during a specific timing. I know that can I use 0 or 1 in a function to enable or disable a variable and then enable my message, but I’d like to simplify my flows. I’m trying to insert something link msg.payload in ON text box, but doesn’t work.
Do you have an idea for me?
Thanks and greetings from Italy
Fabio
BigTimer reports an MQTT Topic containing a space as an error (invalid properties: – outtopic). This is not an error as MQTT allows spaces in topic names.
See spec at: https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901247
4.7.3 Topic semantic and usage
The following rules apply to Topic Names and Topic Filters:
· Topic Names and Topic Filters can include the space character
Talk to the MQTT client designer about that – not me.
Hi, I’m a Node-Red beginner and bigtimer looks great but I’m having trouble passing in the lat/lon via “geo_override”.
If I manually enter the lat/lon in bigtimer, I noticed the values appear as a string in the status output and all the calculations are correct.
However when passing in the lat/lon via the node input using, for example “geo_override 41.680015 -85.698192”, the lat lon values appear as a number and many of the related calculations (sunrise, sunset, dusk, dawn, etc.) all show as NaN.
Is this a bug or is it me? I am passing the lat/lon this way because my automation project is on an RV and the location changes frequently. I’m primarily hoping to use bigtimer to get accurate sunrise/sunset times regardless of location.
Thanks for your help!
No idea as I’ve not tried the geo_override – it is indeed a number. It may take time to check…..
I also have this problem and this override is very effective. I face the same problem as Rob
I am new to bigtimer and trying to implement four processes that will fire an ON message at the beginning of every day, week, month, and year. I am stuck and would appreciate your help. I am using version 2.6.3.
For new day, I have On Time set for 0:00 and Off Time set for 1 minute. All days and months checked. Repeat output unchecked. Status message on dashboard indicates Off for n hours, n minutes, which is correct.
For new week, I have On Time 0:00, Off Time 1 minute, special weekdays Day 1-5 set to 1, Week 1-6 set to 0. Sunday is checked, Mon-Sat unchecked. Jan-Dec checked, Repeat output unchecked. Status message on dashboard shows No action today.
For new month, I have On Time 0:00, Off Time 1 minute, Day 1-12 set to 1, Month 1-12 set to 0. All days and months are checked, Repeat output is unchecked. Status message on dashboard indicates Off for n hours, n minutes, which is incorrect.
For new year, I have on Time 0:00, Off Time 1 minute, Day 1 set to 1, Month 1 set to 1, Day 2-10 set to 0, Month 2-12 set to 0. Sun-Sat are checked, Jan is checked, Feb-Dec unchecked. Status message on dashboard indicates Off for n hours, n minutes, which is incorrect.
Please advise what is needed to make these process perform as desired.
I’m a bit lost on this – BigTimer is for repetitive situations – typically I would set a light to go on at dusk and off at 11:45pm (with options to manually override).
Thanks for your timely reply. I will pursue another solution.
Peter,
The sidebar text should clearly state that the first output comes from ON Msg and OFF Msg fields and not from ON Text and OFF Text fields. Myself included, I know of 3 people that have been tripped up by this just this week and spent far too long trying to get it to work as expected. It wasn’t until I came upon this web page that I saw it clearly stated.
Thanks
Call me slow- where? This is the first time I’ve heard of ANYONE having an issue with this – but send an image with what you think should be added where….
Pete
The desription of BigTimer (right panel) says that “The first output sends out a message at your set ON and OFF times……”
Yes it does but it is ambiguous which fields should be populated with text to send on the 1st output. And there is no clarification in https://flows.nodered.org/node/node-red-contrib-bigtimer either.
In the 6th paragraph of this page you write “The MQTT-compatible payload (ON and OFF msg) is the main output and you should put a value in there even if not using MQTT. ON and OFF TEXT fields are optional” which removes the ambiguity.
So a user has to be fairly intrepid to come upon the clarification. My suggestion is change the (right panel) description from
“The first output sends out a message at your set ON and OFF times……”
to
“Whether or not you use the optional Topic Msg (MQTT Topic), the first output sends out a message with the text from the ON Msg (MQTT Payload) and OFF Msg (MQTT Payload) fields at your set ON and OFF times……”
and just below that
“The third output sends an optional message, ON Text and OFF Text, – suitable for…”
Done – current version 2.6.3
I need a break….
Thank you! And quick too!
Found a bug, the second output (that outputs a message every minute), use topic “status” for it’s messages, regardless of what topic is set to in the node configuration.
The first output, that only sends a message on state changes, is using the correct topic, set in the configuration.
Also, have you considered putting the project on github / gitlab, so others can contribute to the project?
Hi Thomas
You nearly had me there, it is a long time since I added the second output… however, not a bug… as the README.MD file clearly states that on the second output, the topic is “status”. As for Github.. anyone using BigTimer has the two .js and .html source files.
So… from readme.md
The second BigTimer output (v1.55 onwards) now outputs a range of values every minute (in minutes past the beginning of the day) including sunrise and sunset.
Example:
payload: 0
reference: “sonoff02/toesp:{out12:1}:{out12:0}:1287”
topic: “status”
state: “OFF Not-today”
time: “”
timer: 0
name: “Office Green Light Timer”
start: 1395
end: 1425
dusk: 1108
dawn: 372
solarNoon: 740
sunrise: 407
sunset: 1073
night: 1190
nightEnd: 290
now: 1287
timer: 600
duration: 0
timer_left: 10
onOverride: -1
offOverride: -1
stamp: 1544959537232
Hi Peter
That is not reflected in the online help (I’m running mine in docker, so I’m not looking at the readme file at all):
— copy from the online help —
The first output sends out a message at your set ON or OFF times (and if the repeat tickbox is ticked – every minute)
The second output simply sends the state – 1 or 0 every minute as well as echoing the status in msg.state and msg.time. (from v1.5.6 onwards several properties have been added to msg)
The third output sends an optional message for ON and OFF both states – suitable for speech output or a log (this happens only at ON or OFF times, NOT every minute).
—
About github, yes I know that everyone got a copy of the files, but collaboration is so much easier with things like github.
Hi
Well, sorry if you’re not reading the readme – that’s where I put that info – I’m not using Docker – and BigTimer has managed to attract many, many users – NPM shows 2100 downloads a week – BigTimer is available from https://flows.nodered.org/ and as of 2.6.1 (just now) I’ve made that second output topic even clearer in the readme file and the online doc.
Putting it on GitHub means more work for me – keeping Github and my local PCs in sync
It’s actually not that hard to keep github up to date. if you are using git for version control (Which I think is the only tool for version control these days), then it’s only
git push <- to push local changes to github
git pull <- to fetch changes from github to local pc.
It will also make it easier to collaborate on the project.. But of course, it's up to you..
Feature request: In some curcumstances it would be nice to be able to change the input without sending an output. like “ON_No_Out” for on with no output
Ok, I’m failing to see the point in a new command that doesn’t do anything.
Pete
its because if you connect the input of bigtimer to a same light switch (button) that it controls it causes a loop. That is easily fixed but also causes other problems. The reason I do this is to use The timeout feature in bigtimer from the switch. I have solved the problem with functions by blocking the input when there is an output and blocking the output when there is an input only from the switch. Some of the new Tuya MCU switches flashed with tasmota cannot send a unique topic if the switch is pressed from the location or if its turned on by bigtimer.
Hi Peter,
thank you for that greate node! I’m using it for controlling lights and RC sockets via the RaspyRFM radio module. Would it be possible to select the datatype of the payload sent out like the inject node? With this feature bigtimer could send numbers, strings, JSON objects, …, without the need of an additional change node.
Kind regards
Stefan
That’s quite an undertaking including debugging. As you have the source for Bigimer (one html page, one JS page) if you’d care to have a go and let me know the result I’ll be happy to consider incorporating the change.
Implemented configurable payload, see here:
https://github.com/Phunkafizer/node-red-contrib-bigtimer
Seems to be backward-compatible as payloadtype string is set by default.
I use bigtimer for many things, contrlling our general exterior lights to turn on in the evening and off when the sun comces up, control nightlites for the kids, etc.
I used the node frequently.
However, I am trying to apply another scenario using bigtimer that I cannot seem to get to function the way I expect.
I have several exterior lighting setups that I do for specific times of the year (halloween, and christmas), but only during a specific date range (i.e. Christmas from 11/20 through 1/5 for example).
I want to create something that will change and input select based on the time of year. I was hoping to use bigtimer for this. But I cannot seem to get a date range to work.
I add two bigtimer nodes, one configure for Halloween dates (10/20-11/2) and one for christmas (11/20 – 1/5), but they show show up as ‘on’ during the time window. Only one should be one given the current and non-overlap of date.
I put in ‘include’ special days 20-30 include month 11 in one instance of bigtimer but not in the other instance, but both say on for the same amount of time.
Not sure how to fix this
BigTimer does months – when I’m back in the UK I don’t leave certain lights on in Spain etc, so they only run during certain months. I can’t satisfy every requirement I’ve read in here or I’d end up with a menu a mile long. I have 12 special days – if you turn OFF the months they are in – you can select them.
Pete
Understood, I certainly wouldn’t expect you to do everything people have requested. Let me make sure I follow your statement above.
If I want ‘on’ (or whatever the on message is) to be from November 20 to January 5, I would turn OFF the months at the bottom (Nov,Dec,Jan) and add months 11, 12, and 1, and the days under the add days/months area?
The rest of the time it would show/send the ‘off’ message?
Do I have that correct? if so, thats perfect.
CJ Ramseyer, Did you get your Halloween and Christmas scenario working using Big Timer? I’m looking to do the same with Big Timer. I don’t want to go the function node/JavaScript route just yet
Mark,
I did in-fact get it to work. I have it shared on GitHub. Sorry I took so long, I did not see your message til now coming back here to try and add to the solution.
In any case, you can find my NodeRed automations here: github.com/cjramseyer/nodered I welcome input and suggestions for improving my automations. But please drop a comment in GitHub if you have any questions or comment
Hi Peter,
I took the liberty and added global variable support to my version of your amazing node. I wanted to use values stored in global variables as message payload. I am not good at writing code but it does its job. Perhaps you would like to add it (in a more polished fashion) to a future version.
In the settings, when I put an On Message value in double curly brackets it is interpreted as a global variable name and the value is read from the variable when the message gets sent. E.g. {{heating.daytemp}} becomes whatever is stored the the global variable ‘heating’ under the key ‘daytemp’.
Here’s what I did:
// At the beginning of the bigTimerNode function I added this:
var globalContext = this.context().global;
function getGlobalVarIfCurly(string)
{
if ((/[^{\{]+(?=}\})/).test(string)) {
var gvar = string.match(/[^{\{]+(?=}\})/)
return String(globalContext.get(gvar));
} else {
return string;
}
}
// I modified the definition of var outmsg2 as follows:
reference: node.outtopic + “:” + getGlobalVarIfCurly(node.outPayload1) + “:” + node.outPayload2 + “:” + today,
// in the check for ‘actualState’ I modified the outmsg1.payload assignment to this
outmsg1.payload = getGlobalVarIfCurly(node.outPayload1);
This is pretty basic and just a proof of concept but perhaps it is useful to you or others.
When you come up with the “more polished version” as I’m sure you will – be sure to give it a thorough test and send it in here. I’m all for adding new function ality but paranoid about breaking backward compatibility as you can imagine.
Pete
Hello,
I’ve an issue with Bigtimer.
For some reason and I really cannot figure out why, the Bigtimer is sending out an off payload while the Bigtimer has been “Off Manually Override” by an input signal “Manual” or “stop”.
As I can read in the instructions of Bigtimer when you send a “Manual” or “stop” input the timer should pause/stop, but then why is it sending out an Off payload causing my lights to go off while the timer shouldn’t do anything. Now it is causing my lights to go off while I’m home instead of the timer to be off until I’m away from home.
Hope to solve the issue with you, thanks!
because before that was added I had people complaining that when the timer was set to “not today” – there was always the possibility of the output being left ON. Can’t win really.
Make it a toggle/option so the user can choose, if that is even possible?
I am using BigTimer to manage a few schedules and trying to use “sync” to reset the state after exceptions. While testing, I find that excluding days (like the weekends), “sync” does not result in an “off” message being sent during these days. Is this by design?
A specific example that breaks with the current BigTimer sync design:
– Turn the heat on m-f, 7:00 – 18:00.
– When a light is turned on, always turn on the heat.
– When a light is turned off, send sync to bigTimer
(heat stays on during normal heat time and goes off any other time)
When the timer is turned off (ie, not acive, if you exlucde weekends for example) then nothing happens as the timer is turned off.. I’d have to think very carefully about changing that behaviour.
Understood. In my opinion, the current design is not clear and more limiting. However, I understand your logic. A mention of this in the blog is probably warranted.
Thank you for your consideration.
Picking up on the timezone. It seems that timezone settings (Man UTC) is being applied both to manual set fixed times, and to sunrise / sunset.
Shouldn’t this only be applied to the manual set times? The sunrise / sunset etc. is calculated for the location, and it seems that these are working correctly with an UTC offset of 0.
Timezone of nodered is CEST. Semi workaround is to just subtract the offsets from all manually set times, so if I want to turn on lights at 6am (CEST) I just put in 4am instead.. But it looks a bit awkward when looking at it after a couple of months..
I’m really pleased to see there is no ‘midnight’! There’s a very good reason military operations start at 23:59 or 00:01 – need I say more? 🙂
Hi Peter,
I’ve been using your fantastic node for some time now.. but after an update (I think) I’m sort of stuck and need some advice, because big-timer stopped outputting the one-off messages, the every minute and speech/log are working. Am I doing something wrong?
I’m running version 2.5
Thank you, Zareh
No issues that I’m aware of but upgrade to 2.6.3 here https://flows.nodered.org/node/node-red-contrib-bigtimer
Wow thats great, thanks Peter! Again, fantastic node, so many options and easy to use.
Just discovered Bigtimer, fantastic, thank you! Regarding the random offset function – is it possible to only randomize one of the offsets eg the OFF offset? Easy to do with both ON and OFF randomized but I want the ON time to stay static (well half hour before dusk at least)
would like
ON – 30 minutes before dusk
OFF – randomize within 15minutes of 22:30
Hi Matt
The random value is between 0 and the offset values used for the on and off times. If you want the ON time to be FIXED, simply don’t add any offset to that time.
That of course means you can’t set the ON time to half an hour before dusk.
In principle it would be easy to add extra tickboxes for individual on and off times (i.e. 4 new options in addition to the existing overall random tickbox). If someone were to motivate me I could add that in. 5 minutes programming, a couple of hours to ensure there is no compatibility break.
Regards
Pete
I couldn’t help myself – I just had to go ahead and add in the separate randomise tickboxes (I’ll never make a salesman). It is published now – v2.5.0.
I’m fairly new to Node-Red, but found Big-Timer early on, and have found it to be very useful many of my automations for Home Assistant. Currently I’m using a few Big-Timers in a build out of automations for a pool pump and chlorinator.
Most of the time I have the pool pump in “Auto” mode which will run the pump twice per day. On occasion, I want to be able to run a timer for a few hours to circulate the water for chemicals. I have everything setup to input “timer 120 m”, which works great, unless I’m close to the end of one of the schedules. Let’s say the auto schedule has 30 minutes left, if I set the timer for 120 minutes, the auto schedule still shuts off the timer 30 minutes later, rather than allow the 120 minute timer to complete. Is that the expected behavior? If so, is there a recommendation to easily do what I’m looking for? Thanks so much for any help
Auto should reset any manual settings – the idea being you can manually turn a light on – but at the next change of state of schedule, that will automatically reset in case you forget.
Thanks for the confirmation and quick reply. I could use a function to set it to manual, then turn on the timer. Before I do that, wanted to confirm there isn’t a way to already do that in one input string? Thanks!
Hi,
I’m kind of stuck here and need some advice.
I’m trying to build a flow, where big timer is automatically disabled in some situations. I just need it to be completely silent, at least on output 1.
After some failures, I just built a test setup that can be seen in the image. No matter, how I externally configure big timer, it always generates outputs. I tried to inject “stop”, “quiet” and “manual” and get outputs for on- and off-events from all of them. The only possibility to turn of the timer seems to be to check the “suspend” checkbox. However, that can not be externally configured.
Am I doing something wrong?
I’ll post the code for my test setup as a reply
Just put a function node on the output to make it silent when wanted.
So that is not the purpose of “stop” and “quiet”?
Hi Peter,
I notice that when the schedule is disabled for a day, bigTimer does not taken even manual “on” “off” etc commands. Is this expected behavior? I thought by disabling a schedule it should disable only schedules actions. Shouldn’t it allow manual actions?
Node state shows – No action today and does not take any manual commands.
Well actually it *does* take manual commands, provided that the command spells “manual on” or “manual off”
Thanks for this great extension to NodeRED! I noticed something that *may* be an error (or intended behaviour).
I’m focusing on the second output:
“The second output simply sends the state – 1 or 0 every minute as well as echoing the status in msg.state and msg.time. (from v1.5.6 onwards several properties have been added to msg)”
and I’m using those properties for various functions. I noticed that a message is sent each minute as mentioned plus immediatly when I’m giving a command at the input (“off manual”, “default” etc).
The problem is that while in a day not configured for operations, the status is not generated each minute. It indeed happens that a “off manual” is mirrored at the output, while a “default” never appears. Intended or glitch?
It looks like – you will see output if the node is not suspended AND either it is a good day OR permanent manual is on….
Long time since I wrote that code and I’ve not changed any conditions recently – so it looks like that was deliberate. It is all in the same area near the end of the .js file if you wish to tske a look and suggest specific improvements.
Pete
Thanks a lot Peter I’ll try to have a look and suggest some improvements, or maybe also develop a slightly different approach and submit. You’re not using github/gitlab for code aren’t you?
Hi – no I’m not using GitHub – it is simpler for me given that there are only 2 files to just develop locally and publish when I’ve tested. Doug just recently made a souple of simple additions which only involved the one file – so I took a look at his mods and incorporated them with my own improvements before publishing.
Hi Peter, I modified bigtimer.js so that now it consistently emits msg2 even when in a “No action today” status. The emitted state is “OFF” and extStatus “No action today”.
Affected lines are between 1018 and 1047 in this gist:
https://gist.github.com/stefanoco/59a1b913436223a4c35031bea61e44a6
(tested on a Dockerised NodeRED)
Thanks Stefano – I’ll take a look and if I can convince myself that I’m not opening up a can of worms I’ll look at incorporating the changes – current version is later than the one you’ve worked on..
Yes sorry, I worked on the current install of Node-Red and realized later that was not the latest. But i don’t see any difference in this part of the code, do you want me to switch to latest?
No worries – I’m looking at your mods now.
I wanted an input override for setting off_offset so I could use a Dashboard element or stored configuration file to set the off_offset from the special times(Dawn, dusk, etc). ie setting On and Off time to dawn with a 15 hour off_offset_override allows the off time to move as dawn moves.
The input is a string in the HH:MM format for hours:minutes and called with off_offset_override {{payload}}
I’ve uploaded my modified version of bigtimer.js if anyone wants to use or look at it.
https://drive.google.com/file/d/1cB2G0QIkprP26aHeMcTGzvz0B9it9-jB/view?usp=sharing
Hi Doug – I’d check this out myself but I’d need you to mark the lines where you’ve made changes…
Regards
Pete
Hi Peter, I’ve added a comment( //DJL ) to the lines I changed and since 2 case statements were added, I noted in the comment that the entire case block was new. I’ve been using the off_offset_override functionality and it seems to work well but have not tested the on_offset_override functionality but it “should” work the same right. 😉
The commented file is called bigtimerDJL.js and can be found at this link:
https://drive.google.com/file/d/1lwVzDKD88MvbfMT6GB9vpUqHTW6y97QX/view?usp=sharing
PS, thanks for pointing out the node-red-contrib-ui-led nodes in one of your videos. They are nice UI elements.
Hi – you missed the comment on a couple of lines at the end… anyway all sorted – my geo_override is in, the timer issue is fixed and I’ve just uploaded v2.4.0 – it could take a few hours to appear – DO let me know if you spot any issues 🙂
Hi Peter, Oops, I just reran my GUI diff tool and sure enough, there they were at the bottom. I will check the update out and ping if I find anything.
As always thanks for the helpful feeback – if you spot anything do let me know.
Pete
Hi Peter,
I’m using bigtimer with Home Assistant and it works great. Just wondering if there’s a way to use global context data as latitude and longitude instead of hard coding it in the bigtimer node?
The reason I ask is because Home Assistant automatically passes in latitude and longitude as part of global context data, so keen on using that instead of hard coding. 🙂
Keep up the amazing work as always.
Regards,
Davy
Davy – I’ve made changes adding a new command ll_override but it’s going to need some testing before being officially updated to v2.4.0 to ensure it does not break compatibility – lots of people use BigTimer. I’ve also made improvements to the timer command and that too needs a good checkout before being released.
Did this latitude and longitude override got implemented ?
NodeRed has access to my HA configured latitude and longitude values. So i would like to inject them instead of hardcoding them in every instance of BigTimer.
Implemented yes, fully tested no.
Output 2 repeats every minute – output 1 and 3 do not…
Initially I thought the suspicious behavior is only with 3rd output (speech/log). Yet I performed more tests with debug nodes on 1st and 3rd outputs. I found that this is the same behavior with both 1st and 3rd outputs.
I have taken few snapshots during my test and attaching theme here.
I cannot enlarge your image…. I note in your original message you mentioned issuing a command to turn the timer off. When the timer expires – the off message is activated – this has nothing to do with manual overrides and simply means the timer has expired.
Exactly – when “off” command is issued, Big Timer shoots out “OFF” messages appropriately and instantly. The problem is Timer continues to run until expiry and once expired it shoots out yet another set of “OFF” messages — these extra messages are the problem.
2.4.0 pending testing before releasing with this behaviour suitably amended.
Regards
Pete
Awesome. Thank you. I am looking forward to it.
Works great. When commanded to go “off” Timer stops instantly and we don’t get any duplicate “off” outputs any more.
Many Thanks Peter.
I have been using the bigTimer for years now and I find it the most effective component in my home automation project.
Lately I have been noticing a possible glitch with BigTimer.
I use a command “timer 40 mins” to turn ON my water pump. If the over head tank is filled before 45 minutes, sensors pick it up and issue a command “OFF” to the bigTimer and the pump in turn is turned off. Say this event happened at 37 minutes duration. BigTimer keeps running till 40th min and then shoots another output “OFF” from the 3rd output as soon as timer expires.
This does not create a problem for my pump. But it adds an extra “OFF” state to my transaction database (and create other problems there on).
Is there a way to supress this extra “OFF” when the output is already turned “OFF” before timer expiry and timer expiry is triggering this extra output?
I’ve not made any changes to BigTimer recently so I can only imagine you have REPEAT turned on in the options.
I double checked and “Repeated output” option is unchecked. I also upgraded the bigTimer node and functionality remains same.
Simple to recreate the behavior –
– turned ON the output using command “timer 5 mins” -> node status is – ON, ‘Timer’ 5 mins left.
– after a minute – issue a command to turn off – “off”
– output is turned off with appropriate outputs from all 3 outputs.
– Node status now shows – OFF ‘Timer’ 3 mins left.
– after 3 minutes, timer expires and we get another output with payload “OFF” from the 3rd outlet (speech/log output)
this last “OFF” seems to be unnecessary as the output is already “OFF” and it is just that timer is expired.
Ideally, once we issue “off” command, timer should have been killed along with the paylof “off”. Instead, payload is switched OFF and timer continues to run.
Right I think I’m with this – The OFF time should be a time, not a duration, so you could set the timer to start at 20:00 and end at 20:15 for example. Another example might be to start at dusk and end at 23:45
And you need to fill in your longitude and latitude as provided by Google maps
Hi,
I’m using Bigtimer to fire some events. Duration does not matter to me. I encountered some strange behaviour using offsets: The duration seems to be computed wrong (see screenshot). Although duration is set to 1 min, the status is “on for 04hrs 12mins”. I’m using latest node-red and latest bigtimer…
Ok, I’m done – there is nothing wrong – it is Saturday – I just set a brand new timer to TURN ON 8am – saturdays only. It is 8:29pm – and as it should, the timer says ON.
Peter,
I am not sure how I can explain it more clearly.
If timer is set to turn on on Saturdays 8AM ONLY and we have Saturday 8PM, the start was in the PAST or will be in NEXT Saturday.
(I made here another thread as previous one started to have very narrow place for text; but in fact I am talking about new issue here but connected somehow to the previous one)
Moreover:
If You set “Turn On on 8am” and “only at Saturdays”.
At Saturday evening, let say at 8PM, You will see “Off for 12 hrs 00 mins”. What is not true. It will no turn on for next 6 1/2 days.
So I expect rather “Off for 156 hrs 00 mins” or the best “Off for 6 days 12 hrs 00 mins” or at least “No action in 24 hrs”.
Peter, I still see there a bug.
(And I was asking about disappearing because I have no info that You changed Your message and/or delete mine).
I just tested exactly what you referred to Saturday only 8am start – works perfectly. If you wish to progress this I need an exact description – version of big timer, version of Node-Red, any other relevant installation info, on time, off time, any other changes from the default settings. My (standard Raspbian Buster) installation is working perfectly as are numerous BigTimers.
‘If You set “Turn On on 8am” and “only at Saturdays”.
At Saturday evening, let say at 8PM-
I will be back in my office after travelling, probably by friday.
Hi, I faced another questions in BigTimer. Is it true/intended that:
1. When Big Timer is in OFF Manually mode, than HA reset and even Deploying, reset ting BigTimer to AUTO mode?
2. When it is Tue evening and BigTimer is set for 8AM and only in the Wednesday, BigTimer node is showing in NodeRed “No action today”
3. 2nd output node do not resend every minute when the OFF Msg is not set? ON Msg, Topic Msg has no this impact.
best regards
Jakub
Did you mean for HA Home Assistant? If so , BigTimer has nothing to do with Home Assistant, it is a node for Node-Red.
You didn’t say if 8am is start or end time. Best use for BigTimer is in one 24 hour period. Say for example start at dusk, end at 11:45pm.
2nd output, I don’t recall stating if the second output is repeated or not. Check the two files in your installation – /home/pi/.node-red/node_modules/node-red-contrib-bigtimer – there is one .html file and one .js file, the latter will tell you. After making a backup you can of course change the behaviour.
Thanks Pete for prompt answer.
Ad. 1. HA = Home Assistant, sorry. It is node for Node Red but I do have Node Red as add-on for HA. But what about “deploying”?
Ad. 2. 8AM is start time. End time in that example doesn’t matter. 24 hour counting as a time window from now for 24 hour or as 0:00 – 23:59?
Ad. 3. 2nd output is repeating (beside that example). 1st output should repeat when “Repeat” box checked.
Anyway, I do see that BigTimer is not Your favourite kid now;) I completely understand and thanks for that You’ve already done. Anyway it is worth for someone to tune it to not waste Your great work. Unfortunatelly I am not skilled in this area.
I will put that on issues to not loose that thoughts if someday someone will have time to work on it.
On ther contrary I use BigTimer every day to control loads of devices – I’m the author of BigTimer – but with loads of users out there I tend not to make changes very often as it just works for most folk. Right now after months of lockdown I’m gtting ready to head off to the sun, so you can imagine my time is limited.
Bigtimer works as well in Node-Red when it is loaded HA as it does stand-alone – but I’m not about to comment on HA use until I have more experience.
Time starts at 0 minutes offset from midnight – 1440 minutes in a day. First output does repeat when the box is checked.
I just took another look – if the start time is 8am and you have selected Wednesday-only operation then of course yes on Tuesday you will see “no action today”.
Generally speaking You are completely right but… when BigTimer is set to start e.g. everyday at 8AM, in this same situation (we have evening the day before start) it will tell in how many hours it will start instead of telling “no action today”.
So the messages in this cases are a little bit inconsistent.
I must admit I’m not following this at all.
Let me try outline it:
Two settings:
1. BigTimer set to start at 8am every day of the week
2. Bigtimer set to start at 8am every Wednesday.
Suppose we have Tuesday, 8pm.
1. in the first case – we we can see, under the node, info “Off for 12hrs 00 mins”
2. in the second case we will have “no action today”.
Is it clearer now a bit?
I changed that to Friday and Saturday as that’s what it is right now. So, 1: running all days – start 8:00am, off 11:45pm – at 6pm it correctly says “on for 5 hours 45 minutes” 2: only running on Saturday – so today (Friday) it correctly says “no action today”
strange, my comment disappeared.
Anyway, if what You stated is no mistake than it looks like a bug (but I do not notice that).
In my opinion, in Your case at 6pm You should see “Off for 14 hrs 00 mins”
Your comment disappeareed because I fixed the error in my comment above – didn’t you see? There’s no bug.
Hi Pete,
thanks. I know about that. But I want to change the value during the runtime. I would like to do that in the same way as the import parameter ‘off_override’. Example: OFF-Time in the main panel = dusk
offset -120. result of the Big Timer is e.g. 10:00 p.m. If I had an Import parameter “off_offset” and would set them to -60 the result of Big Timer would be 11:00 p.m.
Many thanks in advance.
Spunckie
Hi Pete,
I like the Big Timer very much and use ist for all my time depending projects. But now have a little problem. I would like override the offset-fields via input. Obviously there is no input for this case. Is this correct or I am not able to find the right way? If it’s not possible, could you please add this possibility to the Big Timer?
Thank you.
Spunky
Hi there – the offsets if used are set in the main panel.
Regards
Pete
First of all – great work with BigTimer!
What I miss is a simple tweak, I hope you could think of implementing it in future version… it’s a different output on 1st and 2nd On / Off command.
For example: I want my roller blind to:
– open full at 7:00 (100%)
– close partially at 11:00 (like 15%)
– open full at 14:00 (100%)
– close full at 21:00 (0%)
I use the On/Off fields to send the percentage. Any chance to go with this suggestion?
Bonjour
Comment simplement régler le ON TIME1 et OFF TIME1 depuis de dashbord ?
How to simply set ON TIME1 and OFF TIME1 from dashboard?
thank you
You set them in the panel in Node-Red, along with long-lat, any other requirerments like which months they should operate etc. All documented in the blog entry on BigTimer.
what’s this long-lat ?
See Google maps – the URL with your coordinates in it.
Bonjour
Comment simplement régler le ON TIME1 et OFF TIME1 depuis de dashbord ?
How to simply set ON TIME1 and OFF TIME1 from dashboard?
thank you
Great work!
I’m trying to use it for starting my vacuum robot every other night at 00:30 and it work fine. At 00:30 it switches to ON and 00:31 it switches back to OFF. The vacuum starts at the ON command and runs until I has finished.
The only issue is that I would like to know how much time is until the the vacuum starts again.
I have configured the timer to skip ODD days to only start every other day which works fine, but the time displayed that shows how much time is left until the next “ON” does not take into account that I have chosen to skip ODD days and will show a countdown on EVEN days and when the time passes 00:00 and the day gets ODD the countdown will stop showing until it passes 00:00 again and we have an EVEN day…
I would like to create a alert or turn on some lights to indicate that within the next 12 hours the vacuum will start, but that is not possible as the counter only starts correctly 30 minutes before my start time 00:30.
Can this be fixed you think?
BigTimer general math does not think outside of the 24 hour period in minutes. You have the source of the two files (bigtimer.html, bigtimer.js) most likely in your /home/pi/.node-red/node-modules/node-red-contrib-bigtimer folder. Backup before tinkering – and restart node-red before testing changes.
Thanks Qba for the link & your thoughts on this. I had not seen that others were having issues with the 2nd time slot. I am “sheltering in place” and have some time so ran another experiment.
This experiment worked & I certainly think it will do the job for me. I am hoping it works when I substitute “Sunset” for “18:45” (3 places). If so I am good with it. All messages synced with Sunset time.
Experiment #3 (this one worked as expected)
Configuration;
On Time 18:45 Off Time 18:45
On Time2 18:45 Off Time2 5 minutes
On Offset -2 Off Offset -1
On Offset2 3 Off Offset2 4
ON Msg 3 OFF Msg 4
Debug messages;
6:43pm, payload “3”, duration 1, “on for 1 mins”
6:44pm, payload “4”, duration 1439, “off for 23hrs 59mins”
6:48pm(45+3), payload “3”, duration 6, “on for 6 mins”
6:54pm(45+5+4), payload “4”, duration 1429, “off for 23hrs 49mins”
There were reported problems with 2nd timer (On Time2).
https://bit.ly/2AV2LyJ
I think the problem occurs when 2nd timer has this same value for On and Off (18:00 or Dusk in both fields) regardless of the Offset.
E.g.
DON’T works: On Time2 = 18:00, On Offset2 = 0, Off Time2 = 18:00, Off Offset2 = 15
DO works: ……On Time2 = 18:00, On Offset2 = 0, Off Time2 = 18:15, Off Offset2 = 0
Dear @Peter Scargill,
could You please comment this issue as an author? Am I right about 2nd timer issue?
best regards
Jakub
Right now Jakub – fixing user registratopn isssues – can’t stop – not aware of Timer 2 issues – if anyone wants to tackle – you have the source locally, just one html file and one js file. backup first…. /home/pi/.node-red/node_modules/node-red-contrib-bigtimer
Thanks Peter for a prompt answer. Not expecting immediately repair, it is your hobby and free, huge contribution in the NodeRed community in spare time.
Unfortunately, I have no sufficient knowledge to try repair so what I can do only, I can report an issue on GitHub to collect that data for the future if anybody will find time to look at it.
I found also another issue. Minor one. BigTimer is generating the wrong time in `msg.time` and `msg.exState`, not taking into consideration the second timer. Despite it shows right in Node-Red under the node.
Recently updated my NodeRed bigtimer node to v2.3.1 and am running with
NodeRed v0.19.3.
Previously using 10 bigtimer nodes (v1.x.x) and was very happy with them.
Saw the 2nd On/Off Time configuration fields and the 2nd On/Off Offset
fields and was interested as I had several things that had 2 On/Off time
slots in each 24 hours. Could see the opportunity to reduce the number
of bigtimers in my flow.
So configured them and ran into a bit of a problem in that I was not seeing
the 2nd time slot On/Off messages.
Did some experiments with fixed times and found the following:
Experiment #1 (this one worked as expected)
Configuration;
On Time 17:30 Off Time 17:30
On Time2 17:30 Off Time2 17:45
On Offset -2 Off Offset -1
On Offset2 0 Off Offset2 0
ON Msg 3 OFF Msg 4
Debug messages;
5:28pm, payload “3”, duration 1, “on for 1 mins”
5:29pm, payload “4”, duration 1439, “off for 23hrs 59mins”
5:30pm, payload “3”, duration 15, “on for 15 mins”
5:45pm, payload “4”, duration 1423, “off for 23hrs 43mins”
Experiment #2 (this one did not work as expected, no 2nd slot messages)
Configuration;
On Time 18:00 Off Time 18:00
On Time2 18:00 Off Time2 18:00
On Offset -2 Off Offset -1
On Offset2 0 Off Offset2 15
ON Msg 3 OFF Msg 4
Debug messages;
5:58pm, payload “3”, duration 1, “on for 1 mins”
5:59pm, payload “4”, duration 1439, “off for 23hrs 59mins”
Looks like the last non zero offset (Off Offset2 15) killed the 2nd
slot messages here. My aim is to change the four “18:00” to
“Sunset” and use all 4 Offsets here so the messages are synced
to Sunset time. Anyone run into this and/or have a solution?
Hi Peter, thanks for your great work on Big Timer!
I wonder if there is a way to do the following: I have a function, that, based on a precipitation sensor, outputs a number which I want to use as “OFF Offset” in a big timer schedule.
Just add a function node?
Hi Peter,
Thanks for your work on the big-timer !
I just started to use it and already love it, especially the ‘every minute’ output which contains a ton of useful information. However I am missing some basic useful info like year, month, dayofmonth, dayofweek, maybe you could add that in a future release ?
Also I found no way to automatically correct for ‘daylight saving’ is there already a way ? Or could it be added ?
Regards,
Peter Goderie
Daylight saving is handled by the device on which BigTimer operates – as is local time. Check thte README file for the other items you mention.
The strange thing is that date on rpi gives correct time. node-red timestamp => moments gives correct time, but bigtimer (and bigtimer.stamp => moments) gives incorrect time without utc correction.
I am UK based and at various times I spend months in Spain, in both cases BigTimer is fine – Mr Shark just confirmed it is fine in Italy too.
I need to add, I Only want to offset dusk not the time entries
Sorry I wrote that post without actually looking at the node and realise that Offsets should fix that requirement!. It would appear an offset of -15 (mins?) can be set. I will give that a try tonight!
Sorry to hear about the dismal weather where you are Pete. Here in Sydney Australia we have lots of clear sky and sunshine 😎. So much so bigtimers interpretation of dusk seems to be to late. I suspect that it is actually correct and legal however I would like to have it turn on 15 minutes earlier. Can someone please help me with a correction to my lat&long, (33.806152,151.237737) to move me 15 minutes east
Hi, there is the possibility to set an offset from input?
For example i added a block with this code:”on_override sunset”
I’d like to add an offset to sunset, for example in this way “on_override sunset + 5 minutes”.
I’m trying every possible way to add 5 minutes but i can’t (00:05; 0:5; +5; …).
Could you help me?
Thank you very much!
Offsets are documented – in minutes – plus or minus.
do i have to set “override + 5″? I tried but It didn’t work”.
Can you show me an example of msg.payload structured for input?
Thank you so much for your help
Offsets are not on the inputs – they are available in the main panel for BigTimer…
I thought I could also use it as input. Thanks for the help!
Love your blog; whatever projects I play with google always sends me back to you; you got there first!
Playing with Dawn/Dusk and timers over midnight and things get…interesting.
For example, for a light setting a timer from Dusk till 20:00 I was hoping it just wouldn’t turn on if dusk was after 20:00, but I think it’s turning off at 22:00 and on at Dusk, so on most of the time.
if (actualStartTime = actualStartTime) && (today = actualStartTime) || (today < actualEndTime)))
autoState = 1;
}
I guess this falls into "undocumented design decision which doesn't suit my use-case"!
Anyway, keep up the good work.
How do I make a delay of 10 min. work?
Currently it is turning off when I switch of the light, with out the delay of 10 min.
Looking forward to hear from you!
Robert
BigTimer does on and off times – it does not make tea, perform time travel or add additional delays. Yould could of course use a delay node on the output depending on your application (the delay node comes with Node-Red). Presumably you don’t want a delay whhen turning on so mayeb add a funtion node, so if turning on, pass the instruction through immediately, if turning off, delay to minutes.
Here’s a test I did to make sure I’m not dreaming… a simple flow – inject, function, delay, debug. Instead of inject you want your BigTimer – instead of debug you want your MQTT or whatever output node you are using… depending on your output for on and off you might want a different comparison in the function – and I use 5 seconds delay for testing – you want 10 minutes. Works a TREAT. Just paste that into wherever you need it.
[
{
"id": "e356bd4.d3f5a4",
"type": "delay",
"z": "2cc9e9b.cf76b16",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 920,
"y": 120,
"wires": [
[
"7518d098.24d13"
]
]
},
{
"id": "a1416eba.a62ad",
"type": "function",
"z": "2cc9e9b.cf76b16",
"name": "ON or OFF",
"func": "if (msg.payload==\"ON\")\nreturn [msg,null];\nelse return [null, msg];",
"outputs": 2,
"noerr": 0,
"x": 750,
"y": 80,
"wires": [
[
"7518d098.24d13"
],
[
"e356bd4.d3f5a4"
]
]
},
{
"id": "7518d098.24d13",
"type": "debug",
"z": "2cc9e9b.cf76b16",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 1070,
"y": 80,
"wires": []
},
{
"id": "b4fd712d.4f916",
"type": "inject",
"z": "2cc9e9b.cf76b16",
"name": "",
"topic": "",
"payload": "ON",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 570,
"y": 80,
"wires": [
[
"a1416eba.a62ad"
]
]
},
{
"id": "67fa70df.5bce1",
"type": "inject",
"z": "2cc9e9b.cf76b16",
"name": "",
"topic": "",
"payload": "OFF",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 570,
"y": 120,
"wires": [
[
"a1416eba.a62ad"
]
]
}
]
Hi Peter,
First of all thank your for all your work you have put into Big Timer!
I have a problem getting it to work.
I would like to have a delay after I witch off the timer.
For a test I set the OFF time to 1 min.
The Mqtt Topic is: cmnd/ventilator/power
I’m using a Tasmota Sonoff version 8.2.0 with Node red and your plug in Big Timer.
What kind of OFF MSG chould I use?
Kind regards,
Robert
Off time,. like ON time, is the time of day. The payload for ON and OFF would typically – with “on” or “off” in the scenario you describe.
Hello Peter, very nice node. Thank you for developing this one!
A simple question: for some reason it looks like when I am applying a temporary override with a timeout of 2 minutes or bigger, the override is accepted. Now when I apply a timeout of 1 minute (instead of the 1440), the temporary override does not seem to function. No fancy coding here, just replaying your ‘BigTimer Update’ on youtube with adjusted values.
Rgds,
Sander.
As the timeout was intended to stop the likes of heaters staying on I will have set that to the nearest minute in real time, not one minute in seconds from now…
Yuri
Probably by morning – BigTimer version 2.3.0 will appear – and there are now 12 special days/month combos (there were 6 and the last one didn’t work) so you can turn on the timer only one day a month if you wish. That will cover the whole year.
Regards
Pete
Thanks Peter.
Hi Peter:
Question about Man UTC and how to get Big Timer to use my local timezone (including daylight savings.)
Does Man UTC = 0 mean ‘don’t use a manual offset’ (i.e. use local timezone), or does it mean ‘use an offset of zero hours’ (appropriate for London but not elsewhere)? A blank Man UTC field generates an invalid properties error, so I’m trying to figure out how to get it to use my local timezone. Maybe a checkbox for ‘enable Man UTC offset’ would be appropriate?
Thanks for your good work! Best regards,
DC
Not Bigtimer’s responsibility – your Raspberry Pi or whatever you are using shoul dbe doing that.
Thanks for the reply, Peter.
I’ve confirmed my Pi’s TZ and time are correct. Only Bigtimer is off unless I manually override the TZ by setting it to my local UTC offset. This has only started happening in the a couple of days ago, and I’ve not updated anything. Before this Bigtimer was flawless. Is there a dependency that could have changed that I can check?
DC
Not anything I’m aware of – my BigTimers appear to be working ok and the change I made yesterday to BigTimer had nothing to do with time. I’ll just check one of my lights… Nope, all coming on when they should. I’m in the UK.
Pete
(Peter Scargill – Administrator)
Thank you for checking, Pete. I believe you would not see the issue I am seeing in your timezone. Steps to reproduce what I am seeing:
1. enter ‘date’ at the Pi command prompt and confirm that the local time and timezone are correct. I am in California and my local timezone is PDT.
2. create a new Node-RED flow, add a Bigtimer node (v2.2.6), set its longitude and latitude fields to my location (37,-122), set the ON time to one hour in the future (local time) and the OFF time to two hours in the future (also local time.) Make no other changes to Bigtimer. Deploy.
3. wait a few seconds and observe Bigtimer’s status text. In my case it says “off for 18 hours.” I would expect it to say “off for 1 hour”
4. open Bigtimer and set Man UTC to ‘-7’ corresponding to my PDT offset. Deploy.
5. observe Bigtimer’s status now correctly says “off for 1 hour.”
Is this the expected behavior? If you were to override your system’s timezone do you see this?
I will upgrade to V2.3.0 and recheck.
Thanks again for your time. Stay safe!
DC
I have a timer that says “on for 6 hours” right now – if I go in and set man utc to 1, it says “on for 5 hours”. If I change man utc to -1 it says “on for 7 hours”. Seems reasonable.
Pete
Yes, I would expect that as well. Man UTC works as expected.
My system is behaving as if Bigtimer is getting UTC from the system instead of local time. Or rather it is unable to get the correct local TZ from the system and is using London as the default when making its TZ offset calculations. Overriding via Man UTC can correct this sort of, but doesn’t automatically account for daylight savings, TZ change, etc.
I just upgraded to V2.3.0, rebooted the Pi, and re-ran the steps above with no change in behavior.
DC
Well, I’m at a loss as mine gets it right all the time..
Yes in London’s TZ, everything will work fine. Can you try overriding your system’s timezone to confirm it works as intended in other TZs? Thanks! DC
Hi Peter:
I traced the issue: I didn’t realize it but Node-Red was actually running inside a Docker container, and the container’s TZ was out of sync with the system’s. Editing the container’s TZ environment variable to match the systems’ fixed it. Hopefully this post can help others with this issue.
Thanks again, and best regards. DC
Glad its all working.
Hi David – I have the exact same issue, but I can’t tell that Node Red is running inside a docker container. How is it that it was running there without you knowing? I’m not sure if I have the same root issue. Bigtimer was working great for me until recently as well.
Soerry Yuri – I don;t understand. The month tickboxes are how you set a whole year or part of it.
I would be glad, but it does not work with marks. If not difficult, try setting the timer to run once every day for every month. only 12 times a year and show a screenshot.
please, you need to be clear… what does it mean “once every day for every month”??? So, just MONTHLY?
I think he meant monthly – but not a good explanation. Now sorted as I found a bug anyway and it makes sense to allow 12 special days as there are 12 months in the year. Quite a LOT of updating to do that – took me all night.
Yes, Peter. I apologize if it is not clear I am writing through a translator, while I think in Russian. But you get the point. But maybe 12 special days are not necessary? Maybe all the same ranges will look better? 1-12 or 1,2,3? Outwardly, it will be more compact.
obviously it seems. the timer should work on a certain day, for example, today 26 and so on a monthly basis. Total 12 times a year. January 26, February 26, March 26, etc.
second part
and it works like that. But if you specify the period, then no.
yet
No, this does not work. It only works if I specify the month number specifically. For example 3. And with checkmarks, he does not work out on the necessary day of the month.
Thanks for your work. But some things are not obvious to me. For example, I thought that if it says month = 1-12, then I can indicate this interval 1-12. But no, that doesn’t work. But as? How to specify a period of 1 year?
Thanks in advance. Yuri.
At the bottom of BigTimer properties window – tick the months you want the timer operating – all of them if you want the timer to run every months – etc.
I have a wish that I can let the bigtimer to be the master schedule for a group of lights.
So eg if the schedule for a set of lights should be on between 8-10 it will tell and sort that out and trigger on at 8 and off at 10. Great!
But then I would like to have an input to the bigtimer for the same group of lights affected. (The off trigger) to the big timer if someone turns any of the the lights off and IF its done in between 8-10 nothing should happen, since the schedule is the master.
But that input is an OVERRRIDE, that is it’s purpose.
So what’s the difference between an override and auto? My purpose is to have all OFF triggers verified against the big timer and send the corresponding output.
The AUTO input simply returns the Bigtimer to Auto state, killing off the manual override on or off.
Can I have a GUI or Dashboard Connected Bigtimer to change all the settings ?
When I say all settings ,it include the day selection ,offset ,start time or anything which we configure in the Node.
See readme file or NR status panel for how to set up BigTimers
I went through readme ,but I did not see any configuration to change the settings for a day .Say I have checked Sun in the Node ,now I need to unckeck or disable it using input so that it will not run on Sun.
Is there a way to inject and overide this setting .Any documents which explain how to change each and every configuration in the node?.
Hi Peter,
I have a quick question. Is it possible to have the BigTimer outputting nothing during “Off Time” times, even if there is an ON or OFF in the input?
I only get no output when the status of the timer is “No Action Today”, but if the status is “Off for x hours”, if I input an Auto or OFF, I get an output. The idea is to have no output at any “OFF Time” period. Is this possible?
Thanks
Rui
Simply add a funtion node on the end if you want no output if off
Hello,
I LOVE BigTimer!
…. but i’m missing one “override” feature 🙂
I’m using BigTimer to change heating-modes in my smart home. BigTimer toggles between normal heating and economy-heating by sending thus modestates via ON/OFF payload. But sometimes it is necessary to activate the boost-mode (full-power-heating) by sending a payload differing from the ON/OFF payloads.
It would be nice if BigTimer gets a second input where you can put manual payloads for the override function and passes them to the output (at least output one). After the set timeout it should fall back to “default”.
Thanks for the fantastic work on BigTimer
Sebastian
When I’m done working on floods etc 🙂
Hi Peter,
I’m struggling with this for months and I can’t figure it out. No one seems to have the same issue as far as I can see.
My big timer nodes are sending an ON signal at midnight. I originally thought this was at time2 wasn’t set and was defaulting at 00:00, but I’ve since changed this to duplicate the first settings and I still have an on signal coming from the node at 12:00am.
The offending node is only being used for turning on lights at sunset and switching off at a certain time, so it’s not complicated.
Can you maybe point me in the direction of what I could check to debug this? I have a logger connected to the output of the node, so I can see the on signals being sent.
What’s interesting is that I use two separate timers, one for the weekend and one for during the week. The midnight signal only gets sent from the timer that’s currently active. It also doesn’t get sent every night. It seems to be sent on the day the timer becomes active?
Here’s a screenshot of the weekend timer logs, showing the on, off and errant midnight signal: https://i.ibb.co/gW7DzsS/image.png
Here’s the timer settings. I’ve left out all the calendar stuff, it’s all set to 0.
https://i.ibb.co/v1Lq8wc/image.png
https://i.ibb.co/Rjdv365/image.png
Here’s the setup: https://i.ibb.co/BNCHQG6/image.png
Thanks for your time. I really love big timer and had a plan to use it for a heating node, but I need to make it reliable before I can trust it with more than turning on a few lights 🙂
Thanks!
Hi James, I dont understand in first settings photo why you are using BOTH timer settings and both the same. In those circumstances I make the second set zero. Personally I also tick REPEAT OUTPUT. I use several BIGTIMERS, one from 8pm to 11pm, the rest dusk to 11:30pm or thereabouts – all 100% reliable. v2.25
As I said, I filled in the second timer as I thought it may be causing the issue with it being 00:00. I can’t use repeat output for my purpose and it wouldn’t help fix my issue anyway.
if on and off are identical they have no effect.
Hi Peter,
To get back to the issue. Have you any idea why this midnight output is happening? (see the log in my previous post)
Sorry James I don’t. Can’t really test where I am either.
Oh, that’s unfortunate. Thanks for your time anyway Peter!
I’m going to try and hack something together that throws away any output from the timers at midnight 😀
Hi Pete.
Really like BigTimer, and use it with Home Assistant and Node-Red to control lights (nothing complicated). I had a node set to use On/Off Time 1, and used the second output to pass the times to a function to calculate on/off times (again, nothing complicated).
I then added to that node to use On/Off Time 2, but noticed that these times weren’t passed to the output. So, I hope you don’t mind, but I added these two times to outmsg2 in bigtimer.js. They are now passed to the output and I can calculate the second pair of on/off times. Nothing for you to do here, this is just feedback for your info.
Thanks for a very useful node, and a very interesting blog.
Hope you’re having fun. I’m on holiday right now so can’t verify any comments anyone makes about BigTimer or other nodes I’ve written. I have only a tablet – no Node-Red etc. I can follow anything up later.
Pete
I’m trying to set up BigTimer so it’ll be completely manual. No scheduled time at all. Ocassionally, it should get on_override [time] and off_override [time] which will trigger something. After this override times are over, it should revert back to doing absolutely nothing.
I did this simply by selecting the same on time and off time in the drop-downs, realized that if I do that then when that on\off time occurs it does nothing. So then I can override these with my own times whenever I want. Is this a normal behavior I can count on? Putting the same time for on and off is supposed to do nothing? If so, then great… The intuitive move should be a toggle in UI for manual override (that’s what I thought the “Suspend” option was for, turns out it just permanently suspends the node). Using the “manual\on\off” input parameters are less intuitive IMHO.
Pete – Bigtimer is a great tool, it is a silly question, but does it need a constant route to the internet to work?
I ask as my test bigtimer turns on at dusk and should turn off at dawn. But it turns off at 2345hrs and stays off until the next expected event the following day.
Now 2345hrs is when my Draytek internet router is set to do a restart. So at that time internet drops, dhcp server restarts etc. I dont think that the pi hosting the nodered / bigtimer gets upset about the the Draytek restarting.
Any suggestion?
Any thoughts anybody?
Does not need constant connection to the Internet. The Pi should be able to access the Internet once in a while.
In the BigTimer parameters, I can not blank out the “On Time2” fields, so it defaults to “00:00”. It is not clear to me if this will trigger now an ON event at midnight or not?
Hi
Just starting out with Node-Red and Big-Timer.
I have Big-timer set with 2 timers.
Timer one starts at Sunrise + 2hr and stops at Sunrise + 4hr
Timer two starts at Sunset – 4hr and stops at Sunset -2hr
An inject node sends ‘Auto’ every 5 minutes.
Output 3 sends ‘On’ or ‘Off’ accordingly to control a water pump.
‘Repeat Output’ is unchecked.
After the first timer expires, the status shows ‘Off’ till next Sunrise + 2hr, not Sunset – 4hr. Is this expected behaviour?
Also, how can I extract timer information like ‘time to run’?
Thank you.
bad timing guys – just off to visit friends for a couple of days
Hi
Still trying to figure out Time2.
It does not trigger as can be seen in the 5th & 6th message in the debug window when the payload should be ‘2’
I have Big-timer 2.2.5
.
Hi
Trying to figure out why Timer 2 is not working in some cases.
The screenshot shows my settings
If I understand it correctly, sunset is at 1023. On Time2 is set to sunset-400 ie 623. Off Time2 is set to sunset-120 ie 903
The current time is 744. Payload is 0.
Shouldn’t the timer be on at this time?
Or have I got it all wrong?
I have this same issue.
I am using bigtimer to build a sprinkler system. I am using timer X to trigger the zone run times.
What I have found is the timer will not run for more that exactly 24 minutes “timer 1,440”. No matter what value you put in over that barrier.
Hi I am using the timer trigger for a water system but I have found that the timer resets after exactly 24 minutes no matter what time you set (over 24 minutes).
It displays the correct time left when running but it will always reset (stop) after 24 minutes.
I am running version 2.2.5
I need to run a zone for an hour.
I’m using the big timer node to build a heating system that will switch on the heating 3-times/day – morning, lunchtime and evening. Your upgrade to 2-off timings per node simplifies things significantly. A third timer entry per node would be awesome. I wonder whether others would benefit from such a further upgrade?
I have attached a screenshot of the front end and backend.
The time to the start of the next “on” or “off” is brilliant.
Nice job by the look of it. That LCD looks familiar. I took a different route for my thermostat – you can see on the blog. I have hourly settings. Node-Red Dashboard of course. And I monitor the stat in Graphana – various temperatures and humidities.
Pete,
I have been lurking and learning for quite a while. Your one is brilliant and I did explore the background code to understand how you programmed it. (actually it was your work that got me into the WEMOS D1) I started my project as a joint thing to help my brother who was late in his MSA (Multiple System Atrophy) journey and a personal habit of me being lazy. I wanted something that closely reflected the physical Drayton controller to make it instantly usable. I started in PHP and Crontab and swapped to node-red. I dropped it a few years ago when the circumstances changed and the customer became only me. I have just picked it up again. I continued to use crontab up until the point the bigtimer had two activation times which made using it more fruitful. I’m more a mechanical engineer rather than a programmer so my coding is more by trial and error. I have chosen the Pi ZeroW as the hardware as I wanted the system to be independent of the WiFi. Yes you also spotted your timer front end, it is brilliant. I’m also working on using WH2A sensors and RTL_433 and/or Wemos d1 & BME280 as my distributed temp/humidity sensors.
I am working most successfully with bigtimer and Home Assistant with node-RED. I have been using the “Random Interval” option but see no variations other than a few seconds to almost a minute late.
Can you tell me how “Randomise offsets” works in three use cases…
When I set On or Off Offset to a value > 0?
When I set On or Off Offset to a value < 0?
When I set On or Off Offset to 0?
Can I adjust the range of Offset?
thnx, Jim D.
It will be in the Javascript you get with every copy of BigTimer. Care to look and report?
Not sure if I got the right source. I used bigtimer.js R 2.2.0 @ https://github.com/gablau/node-red-contrib-bigtimer and collected the following.
– When Offset is set to 0, Randomise has no effect.
– When Offset is set > 0 e.g. 6, Randomise will use a value between 0 and Offset. I.e., between 0 and 6.
– When Offset is set < 0 e.g. -6, Randomise will use a value between 0 and Offset. I.e., between 0 and -6.
Offset can be either a randomized positive or negative offset from On or Off. I.e, not a range of On and Off around a central On-Off set point.
A few experiments verify this. Comment and verification welcome.
https://flows.nodered.org/node/node-red-contrib-bigtimer – the source you have there has been cloned from mine – goodness knows what changes are in there.
I see no changes to this feature. Thanks for the link.
Hi,
I am trying to schedule my heating system with NodeRed. I would like to use BigTimer to trigger the heating, but I would like to use the ON and OFF_override function with an input_datetime in order to be able to change the on and off in my home assistant interface.
However, I don’t understant how to connect the input_datetime with the BigTimer node. Could you give me an easy example ?
Thanks
Manual override is covered here – in the INFO page in Node-Red for BigTimer. You can enter time manually – beware it will not survive power cycling. I don’t use Home Assistant so I can’t comment about that. If you want to send something in a different format, simply run it via a function node first to get from the time ormat you have to the format expected by BigTimer manual override.
Inputs
The input can be used as an override by simply sending a text or numeric message. Valid (case-insensitive) messages passed in via msg.payload include:
1 (or on)
0 (or off)
auto (or default)
manual
sync
stop
on_override
off_override
timer
Manual Overrides
The first two override messages (1/0) time-out after 24 hours (1440 minutes, user-settable) OR at the next change of schedule. If you have also selected “manual” – the outputs will NOT revert back at change of schedule (auto to reset).
The schedule can be paused by the interface tick box or by the “manual” command (use the “auto” command to return to normal)
The on_override and off_override fields can be used to supercede the set inputs for on and off times (in minutes) – “on_override 20:15” for example (without the quotes) for 8:15pm. These settings are volatile, i.e. not restored when Node-Red is restarted. It may take up to a minute for these controls to take effect. Use for example “on_override” with no arguments to set the auto-on time back to normal.
Manual UTC is optional offset (hrs) in case you have a special reason not to have the right time on your computer! Normally 0.
Hi Peter, as first, thank you for your great work.
I’ve been using BigTimer for some time now, and I love it.
I use it to set different temperatures depending on weekdays or weekend and day/night time.
I’m just wondering if it’s already possible to use flow or global variables to set ON and OFF time (or maybe if you can modify BigTimer to implement it), this would really help me and maybe others, and BigTimer flexibility, I think.
Thanks again !
I’ve just commented to another user.
Manual override is covered here – in the INFO page in Node-Red for BigTimer. You can enter time manually – beware it will not survive power cycling. I don’t use Home Assistant so I can’t comment about that. If you want to send something in a different format, simply run it via a function node first to get from the time ormat you have to the format expected by BigTimer manual override.
Inputs
The input can be used as an override by simply sending a text or numeric message. Valid (case-insensitive) messages passed in via msg.payload include:
1 (or on)
0 (or off)
auto (or default)
manual
sync
stop
on_override
off_override
timer
Manual Overrides
The first two override messages (1/0) time-out after 24 hours (1440 minutes, user-settable) OR at the next change of schedule. If you have also selected “manual” – the outputs will NOT revert back at change of schedule (auto to reset).
The schedule can be paused by the interface tick box or by the “manual” command (use the “auto” command to return to normal)
The on_override and off_override fields can be used to supercede the set inputs for on and off times (in minutes) – “on_override 20:15” for example (without the quotes) for 8:15pm. These settings are volatile, i.e. not restored when Node-Red is restarted. It may take up to a minute for these controls to take effect. Use for example “on_override” with no arguments to set the auto-on time back to normal.
Manual UTC is optional offset (hrs) in case you have a special reason not to have the right time on your computer! Normally 0.
I use bigtimer to switch the relay of a sonoff device which has my own firmware using MQTT.
Unfortunately the WiFi is unreliable where the device is placed.
This means from time to time the sonoff misses a switching command.
I compensate this with a node-red flow which stores the desired state triggered by bigtimer into a global variable. The sonoff anyway sends its status each minute. I then compare the received status with the stored status and resend a switching command if necessary.
If bigtimer could do this for me this would reduce the complexity of my flow significantly.
Bigtimer would need a second input where incoming messages are compared with the internally stored status. If it matches, do nothing. If it does not match, resend the msg.
Does this make sense to anyone else than me?
with repeat output on, BigTimer will snd the output every minute.
First off thank you Peter Scargill for Bigtimer – a vital & versatile addition to Node Red.
For some time, I’ve been successfully controlling a number of Ikea Tradfri lights and sockets around my home using Bigtimer and node red. I’ve already managed graphing outputs from my solar panels, central heating and Darksky weather, using Grafana & Influxdb, but my grey cells are failing with Bigtimer.
One thing i’ve tried and failed to do is to produce a bar chart of the day lengths over the year, using something like sunset – sunrise to calculate the day length.
However I’m having trouble getting these two values out of the Bigtimer payload.
Could someone explain how it’s done? (I’m a newbie to javascript so please keep it simple.)
Hi
Bigtimer outputs a lot more than just msg.payload. It is only MQTT that is limited to handling msg.payload and msg.topic. The msg object as more than that info and this is documented with bigtimer…. if there was a demand I could add even more.
hi, great compliment: great node!
i am wondering why the timepinput is fixed dropdown with 15 min presets.
the node “within-time-switch” allows that. what about big-timer?
why cant i put just free timedates in numbers like 06:12, or 21:21?
thx,regards,
toz
You could ask.. why doesn’t it make coffee… Because that’s how I put it together. Big timer contains the html and JS, all there when you install it. If you want finer grain control, by all means change your copy.
It would be nice to have a .pdf file of the big-timer post so I could print it out as a reference. I would like to not include the clutter not related to it.
Let me know how you get on with that.
Hi, I have “problems” when there is two of “Big timers”…
I made first one, set “On Time”, “Off Time”, “On Time2” and “Off Time2”. Everything fine.
Then I made copy of that timer and changed only “Topic” to point different lamp. Still fine.
Now I change (at that copy) “On Time2” to one hour later and everything goes wrong. Timer seems to “forget” it’s location and moves itself from GMT+2 to GMT
Peter,
Not sure if i am missing something but i thought i would be able to over ride the MAN UTC of zero by sending a payload of Man UTC -3 or something like that to what ever desired offset needed to be. Is this not the case? I need to be able to change the offset via an input node as my server is stationary but my outputs go to locations that change regularly and the schedule needs to be in the timezone of the location of the outputs.
Thanks Tim
Hi Peter,
using node-red-contrib-bigtimer 2.2.5 in node-red 1.0.2 in docker container on RPI-4B.
On the Output 1 (one-off message) are appearing messages in one minute period together with messages on output 2 (outputs every minute).
Quick idea where to look?
Thanks
Bottom of the main edit screen you can turn repeat on or off – defaults I believe to ON.
Peter, Thanks, repeat was on, Problem Solved.
I dont want to use “off” feature, and not timer 2.
How do I disable the send of “off” and timer 2?
I cant see any “disabled” in the drop down menus?
Quick answer?Put a function on the end?
Man UTC is described as optional and intended for situations where the rpi doesn’t have the right time. I’m seeing it being required, and BigTimer does not activate at the correct time without it. I have to set it to the -4 instead of the default 0.
I don’t know if this makes a difference, but the flows were exported and reimported after updating to raspbian 10 Buster from the previous raspbian version and probably an older BigTimer.
I’ve attached a screenshot of the output of timedatectl showing that the raspberry pi has the correct time and timezone set up.
Installed version 2.2.5 of BigTimer.
Hi, this same issue has been bugging me since I started using BigTimer (which is excellent BTW, except for this longstanding bug). In my case I notice the following:
– `date` on the CLI shows correct UTC and correct local time (GMT+1 in winter, GMT+2 in summer), system time is configured correctly;
– debug nodes in Node-Red also show the correct timestamp for each debug message (timestamp in local timezone), so Node-Red is fine too;
– “sunset” in BigTimer works fine too;
– specific On and Off times in BigTimer are off by my timezone’s offset, i.e. 1 hour (or 2 in summer), it’s as if those times were always interpreted as UTC.
I can fix both of these issues combining various offsets, but it’s still a bug. Do note, that it’s not even possible to have correct behaviour with only the manual UTC offset (with this I can fix the regular On/Off timers, but then sunset/sunrise are wrong…)
My main use case for BigTimer is turning some lights around sunset and turning them off at a fixed time. This combination is particularly impacted by this issue.
(Also, over the last week I’ve redone my whole Node-Red setup for unrelated reasons and, yeah, the bug is still present. Node-Red is running on Alpine Linux in an LXD container, but that should be irrelevant, given that everything else seems to show and use the correct time.)
I’ll gladly provide more info if needed. (E.g. output of some low-level time/date functions that BigTimer uses, etc. Just tell me.)
Hmm, you may disregard my previous comment. I really don’t get it, but now the time in my node-red setup is indeed wrong. I must have messed up with all the (re)configuration stuff I did recently.
I fixed my time setup and it seems as though now it’s fine.
Anyway, Bigtimer is great 🙂
Hi Peter,
First of all, great work. I’ve been using BigTimer for some time now, and I love the flexibility and functionality.
I recently upgraded my NodeRed palette nodes, and I’ve noticed some different behavior w/ BigTimer. I’m not sure if this is as design, so I won’t equate it to a bug, but instead I’ll run the use-case by you.
I had some BT nodes that I used for seasonal purposes (eg Halloween, Christmas, etc), and therefore were disabled most of the time (payload=stop). Let’s say the BT config had ON @ dusk and OFF @ dawn, for example. Nothing would trigger (neither ON or OFF) at these times when payload=stop (Halloween is off), which was exactly what I was looking for.
When Halloween mode was turned on, I’d have BT use the set times as set in the node configuration by setting payload=auto. With auto, an ON would be sent at dusk, and an OFF would be set at dawn, again exactly what I was looking for.
I noticed that after the update, when I’d turn Halloween back off (payload=stop), at dusk I’d get an OFF, and at dawn and I’d get an another OFF. Basically, the timer was still running, but just sending OFFs at each time “thresholds”, even if payload=auto.
I was able to verify this in a stand-alone BT flow – setting ON and OFF times, setting payload=stop, and observing the outputs at the respective ON and OFF times (seeing offs sent each time).
Is this a bug or running as designed? If I manually turned on individual Halloween lights, they’ll now turn off even if the schedule is disabled. I’ve created a workaround in my node-flow, but wanted to verify if this is the expected behavior.
Thanks!
I had requests to turn off once schedule was stopped I believe….
Hi Peter,
Yes – funny enough I would send a 0 prior to stopping the schedule, so that made sense to me, but still having the schedule run but send OFFs at the scheduled times seems a bit weird – as I interpret the schedule as being OFF as analogous to disabling a cron job as opposed to outputting OFFs at the existing schedule, but that’s just my opinion. I’m not in a position to complain, as I stated, I enjoy using BT.
My workaround is to use a switch node after the BT to conditionally send the output (if the schedule is ON or disabled). I’ll just apply my workaround across all my flows. No worries.
Thanks for the clarification.
-Roy
Actually I have a use for something not un-similar, as I need to lower he heating during the day if it is sunny – I don’t have a light sensor on the system so using the forecast might be helpful.That does not have to be attached to the timer but it might help. As BigTimer already knows the longitufe and latitude you would think it would make sense to tie that into the forecaster reader – but this would make for excessive use of the forecaster if one has LOTS of bigtimers, so now you bring it to my attention I’ll put some thought into this.
Here is what I ended up doing:
I have setup the following variables:
– Threshold of rain amount (in mm) (eg: 4mm)
– Threshold of % chance of rain (eg: 80%)
I have a timer that runs each hour that checks the rain forecast, and if both the rain amount, and chance of rain is greater than my thresholds, I set the BigTimer to STOP. Once the forecast is below the Thresholds, I set the BigTimer back to AUTO.
I’ve then added some sliders to my dashboard so that I can tweak the thresholds to get it working accurately.
Seems to be holding up quite well.
Excellent…
Hey Pete,
My watering system has been working flawlessly for a number of years, based around your Big-Timer. Thank You!
I was hoping to integrate some rain forecasts into the flow, so that if it is going to rain today, or has rained a lot in the last day, don’t allow the current schedule to run.
How would you suggest this might be achieved? Can you tell the timer to stay on AUTO, but skip a schedule?
Or a separate timer that checks the weather, and depending on the forecast/actuals turns the auto feature on/off?
Cheers!
Nathan
could this not be achieved by having a node after bigtimer which will block message if it is going to rain ?
Hi Peter,
I’m using your powerful, best ever BigTimer node all around my home system and with very good results 🙂
I’m changing and adding some functionalities to my installation and found something that I’m not sure if it’s a bug or it’s working as designed but I missunderstood. I’m operating stuff based on external temperature, hour of day and manual change from a blynk operation, and I need to know if the output of bigtimer is because of a manual input (on/off), a stop input or time, so I’m reading the “temporaryManual (tM)” and “permanentManual (pM)” outputs. I built a simple flow to check. Here are my resuls and what I would expect:
case a
1) inject auto => tM=0, pM=0
2) inject stop => tM=0, pM=1
3) inject on => tM=0, pM=1 shouldn’t it be tM=1, pM=0?
case b
1) inject auto => tM=0, pM=0
2) inject on => tM=1, pM=0
3) inject stop => tM=1, pM=1 shouldn’t it be tM=0, pM=1?
4) inject off => tM=1, pM=1 shouldn’t it be tM=1, pM=0?
Thank you for your help!
test flow:
[{“id”:”72c18c62.2ee7e4″,”type”:”bigtimer”,”z”:”7947db3d.fb3ae4″,”outtopic”:””,
“outpayload1″:”me enciendo”,”outpayload2″:”me apago”,”name”:”Big Timer”,”comment”:””,”lat”:”40.526″,”lon”:”-3.932″,”starttime”:”1020″,
“endtime”:”1320″,”starttime2″:0,”endtime2″:0,”startoff”:0,”endoff”:0,
“startoff2″:0,”endoff2″:0,”offs”:0,”outtext1″:””,”outtext2″:””,”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,”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,”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”:false,”repeat”:true,”atstart”:true,
“odd”:false,”even”:false,”x”:580,”y”:280,”wires”:
[[“d156bae6.9f8cf8”],[],[]]},{“id”:”c81df84c.8f3bd8″,
“type”:”inject”,”z”:”7947db3d.fb3ae4″,
“name”:””,”topic”:””,”payload”:”auto”,”payloadType”:”str”,
“repeat”:””,”crontab”:””,”once”:false,”onceDelay”:0.1,
“x”:330,”y”:220,”wires”:[[“72c18c62.2ee7e4”]]},{“id”:”a1287347.9ffe6″,
“type”:”inject”,”z”:”7947db3d.fb3ae4″,
“name”:””,”topic”:””,”payload”:”stop”,”payloadType”:”str”,
“repeat”:””,”crontab”:””,”once”:false,”onceDelay”:0.1,
“x”:330,”y”:340,”wires”:[[“72c18c62.2ee7e4”]]},{“id”:”2c6d39bc.8691b6″,
“type”:”inject”,”z”:”7947db3d.fb3ae4″,
“name”:””,”topic”:””,”payload”:”off”,”payloadType”:”str”,
“repeat”:””,”crontab”:””,”once”:false,”onceDelay”:0.1,”x”:330,
“y”:300,”wires”:[[“72c18c62.2ee7e4”]]},{“id”:”9b74522c.c748a”,
“type”:”inject”,”z”:”7947db3d.fb3ae4″,
“name”:””,”topic”:””,”payload”:”on”,”payloadType”:”str”,
“repeat”:””,”crontab”:””,”once”:false,”onceDelay”:0.1,
“x”:330,”y”:260,”wires”:[[“72c18c62.2ee7e4”]]},{“id”:”d156bae6.9f8cf8″,
“type”:”debug”,”z”:”7947db3d.fb3ae4″,”name”:””,”active”:true,
“tosidebar”:true,”console”:false,”tostatus”:false,
“complete”:”msg.payload & \” – tM: \” & msg.temporaryManual &
\” pM: \” & msg.permanentManual”,”targetType”:”jsonata”,”x”:760,
“y”:260,”wires”:[]}]
Busy fixing heating systems and blogging etc will check this during the week, ta.
Pete
Hi Peter, any thoughts on this?
Thank you!
Hi
When I have time to go through your flow I’ll take a look, right now still problem solving heating systems, catching up etc and upgrading my UK installation to Busterfor RPI4. NOT easy – which is probably why the RPI guys just cop out by saying “do a fresh install”.
Hi Peter,
absolutely great node, but a little hard to get the best out of it 🙂
One question: Is there a way to combine on_override and off_override in one payload? I have the problem, that when i send both payloads in succession the bigtimer node get’s triggered twice and this leads to two “Window shutter open” (for example) commands.
Wouldn’t it be better to have “msg.on_override” and “msg.off_override”?
Hi there Kai – I’ll have to have a think about that, but bad timing I’m afraid, we’re in Spain for the summer and leaving this weekend, returning to the UK Northeast on Wednesday night, so I’ll be out of action in the meantime then as you can imagine after 6 months absense I have some duties to attend to before I can even look at this – I’m leaving this email marked for review. If you wish, on your local copy (after backing up of course) you can play with the bigtimer.js files.
case “on_override”: change=1; switch (theSwitch.length) {
case 1: onOverride = -1; break;
case 2: var switch2 = theSwitch[1].split(“:”);
if (switch2.length==2) onOverride = (Number(switch2[0]) * 60) + Number(switch2[1]);
else
{
switch(theSwitch[1])
{
case ‘dawn’ : onOverride=5000; break;
case ‘dusk’ : onOverride=5001; break;
case ‘solarnoon’ : onOverride=5002; break;
case ‘sunrise’ : onOverride=5003; break;
case ‘sunset’ : onOverride=5004; break;
case ‘night’ : onOverride=5005; break;
case ‘nightend’ : onOverride=5006; break;
case ‘moonrise’ : onOverride=5007; break;
case ‘moonset’ : onOverride=5008; break;
default: onOverride = Number(theSwitch[1]); break;
}
}
break;
case 3: onOverride = (Number(theSwitch[1]) * 60) + Number(theSwitch[2]); break;
}
break;
case “off_override”: change=1; switch (theSwitch.length) {
case 1: offOverride = -1; break;
case 2: var switch2 = theSwitch[1].split(“:”);
if (switch2.length==2) offOverride = (Number(switch2[0]) * 60) + Number(switch2[1]);
else
{
switch(theSwitch[1])
{
case ‘dawn’ : offOverride=5000; break;
case ‘dusk’ : offOverride=5001; break;
case ‘solarnoon’ : offOverride=5002; break;
case ‘sunrise’ : offOverride=5003; break;
case ‘sunset’ : offOverride=5004; break;
case ‘night’ : offOverride=5005; break;
case ‘nightend’ : offOverride=5006; break;
case ‘moonrise’ : offOverride=5007; break;
case ‘moonset’ : offOverride=5008; break;
default: offOverride = Number(theSwitch[1]); break;
}
}
break;
case 3: offOverride = (Number(theSwitch[1]) * 60) + Number(theSwitch[2]); break;
}
break;
Add in a third option called on_off_override and say goodnight to several hours – I suggest a cup of coffee first.
For now I’m out of time here.
Pete
Hi Pete,
spending the summer in Spain sounds good and makes me a little jealous, but the german summer wasn’t that worse this year, so i’m okay 🙂
Thanks for the quick response and hints, but i don’t think i will get this working because of two things: Lack on coding knowledge and hassio running on a Rpi 3 (can’t find bigtimer.js)
All the best for you and myabe you can look into it if your time allows it.
Kai
Hi Peter,
A very basic question. Apologies. I read every single article and post to setup a schedule which runs on 10rd of every month at 9am. But I am not able to figure out how to do this basic thing.
I entered time as 9am in ‘ON time’ box and then entered text I want to send in ‘ON Text’. I also set ‘DAY 1’ as 10 in Include special days. I didn’t fill anything in months (let it be 0) since i want it to trigger every month.
But bigtime status just show that it is waiting until next day’s 9 am and not until 9am of 10th.
I am sure this should be stupid easy, but I can’t figure out what I am doing wrong.
Please help.
What is 10rd of every month?
Apologies for typo. I meant 10th. I think if you include few examples on how to configure different schedules, it will immensely help people using this node.
any help ?
Hi Pete or anyone else that knows a whole lot more than me about Node red and bigtimer. Im having an issue with the on offset. I have a timer set to turn on at Dusk (Off for 3hr 52 mins for example). If i put -10 into the On offset i get (Off for 03hrs 42 or so minutes). But, if i put +10 into the On offset i get (On for 03hrs 52 mins). I was expecting (Off for 4hr 02 mins). Maybe im not understanding how this offset works. Id like to delay Dusk turning on by x number of minutes? Any ideas?
I mean i could always use a delay node but was wondering about the positive offset.
I’ve been asked if it is possible to override the on and off set times (other than manual on-off controls) – of course you can. The commands “on_override” and “off_override” are for that purpose.
Used as above with no arguments, they return the on and off times to that set in the NR control flow. Used with values they can override the settings you originally put in the node settings area…
i.e. “on_override 21:00” “off_override 22:00”
Hi Peter, Many thanks for your answer which is logically correct if stop means stop and not suspended. In my case however for a switch [OFF – AUTO – ON] I want bigtimer to suspend and give not any output while in suspend mode, especially if when manually ON is selected because it would go off as soon as the time ON_TIME or OFF_TIME occurs. However output 3 will be sufficient for my solution as long as it does not change at next version. My code snipped below for better illustration and perhaps there is a better way to implement. Best Jens
[{“id”:”64b2a292.56b004″,”type”:”inject”,”z”:”fc0a89b.3d584f8″,”name”:””,”topic”:””,
“payload”:”0″,”payloadType”:”str”,”repeat”:””,”crontab”:””,”once”:false,
“onceDelay”:0.1,”x”:190,”y”:140,”wires”:[[“fbf67018.8f7b58”]]},
{“id”:”cce694f5.6c3a2″,”type”:”inject”,”z”:”fc0a89b.3d584f8″,”name”:””,
“topic”:””,”payload”:”1″,”payloadType”:”str”,”repeat”:””,”crontab”:””,
“once”:false,”onceDelay”:0.1,”x”:190,”y”:180,”wires”:[[“fbf67018.8f7b58”]]},
{“id”:”42c29b86.f63284″,”type”:”inject”,”z”:”fc0a89b.3d584f8″,
“name”:””,”topic”:””,”payload”:”2″,”payloadType”:”str”,”repeat”:””,”crontab”:””,
“once”:true,”onceDelay”:0.1,”x”:190,”y”:220,”wires”:[[“fbf67018.8f7b58”]]},
{“id”:”fbf67018.8f7b58″,”type”:”switch”,”z”:”fc0a89b.3d584f8″,”name”:””,
“property”:”payload”,”propertyType”:”msg”,
“rules”:[{“t”:”eq”,”v”:”0″,”vt”:”str”},{“t”:”eq”,”v”:”1″,”vt”:”str”},
{“t”:”eq”,”v”:”2″,”vt”:”num”}],”checkall”:”true”,”repair”:false,
“outputs”:3,”x”:360,”y”:180,”wires”:[[“7a5c2773.89d47″,”354f2bfc.07c0f4”],
[“354f2bfc.07c0f4″,”7a5c2773.89d47”],[“6c5b21cf.f24a”]]},
{“id”:”7a5c2773.89d47″,”type”:”function”,”z”:”fc0a89b.3d584f8″,
“name”:””,”func”:”node.status({fill:\”green\”,shape:\”dot\”,text:\”Status: \”+msg.payload});
\n\nreturn msg;”,”outputs”:1,”noerr”:0,”x”:870,”y”:180,”wires”:[[“c2271c5d.13c04”]]},
{“id”:”6c5b21cf.f24a”,”type”:”function”,”z”:”fc0a89b.3d584f8″,”name”:”auto”,
“func”:”msg.payload = \”auto\”;\nreturn msg;”,”outputs”:1,”noerr”:0,”x”:490,”y”:300,
“wires”:[[“96fb52ec.c3134”]]},{“id”:”354f2bfc.07c0f4″,”type”:”function”,&