I’m Peter Scargill and this is a scheduler for Node-Red (well, more of a timer really but someone surely has already used the term timer) for Node-Red which includes days and months, dawn and dusk with optional offsets and a time-out mode, You may notice this has improved since the first version – I’m learning as I go along.
Please note: This program was replaced some time ago with bigtimer – there is no down side – bigtimer is better. See https://tech.scargill.net/big-timer/
As you may know, I’m interested in using Node-Red on the Raspberry Pi (though for this purpose it could be any piece of kit) to control ESP8266 boards via a variety of mechanisms, one of them being MQTT.
Up until recently I would use a Node-Red standard Inject function to trigger an event, lets say once a day. The Trigger function however is very limited. It does not know about months and it has no idea about concepts such as “dusk” and “dawn” which you might reasonably want to use for a porch light.
So, I buckled down and learned how Node-Red nodes were made (with some help later from dceejay Dave and others in the googlegroups node-red group – for which I’m grateful) – and the first thing I did was to start off with the sunrise/sunset node (you’ll need that installed as I rely on one of their routines) to send the time, date, sunrise and sunset information to my boards based on longitude and latitude. In essence, in my case I use MQTT to tell boards about the time when they power up and at 12 hour intervals and in the meantime they maintain their own time in software.
However the more I get into Node-Red the more I see it doing the actual control… so the next thing I did was to sit down and wrote a node – again borrowing from the Sunrise calculations for dusk and dawn settings but gutted to actually send one of two messages (settable) to a message topic (settable and suitable for passing onto an MQTT node for example) at any given time with presets for dusk and dawn and allowing control over days and months as well as a time-out function (i.e. turn on at 10am for 5 minutes). So a typical example might allow us to turn something on every Wednesday at dusk until midnight but only from November to January. My node of course does not actually send an MQTT message – it just passed the topic and message onto the relevant node (the MQTT node shown in purple here). You could use that message for a variety of other purposes – like sending you a tweet at regular intervals. That is so easy in Node-Red.
The code handles summer time adjustments (well, it did this time, you might want to check that very carefully). You can even offset the dusk and dawn offset times in minutes to save, say, lighting energy, I find garden lights come on WAY before you need them – hence building in the offsets.
Here’s what it all looks like.
So every minute, my node (in blue) self-triggers (my thanks to dcjay for showing me how to add JS timers) to do it’s calculations and decide whether or not to send a message to the MQTT output node in purple (you could easily alter the code to do something other than send an MQTT output. You will notice in the image above that there are now TWO outputs.. the top output sends a message on change – i.e. when it wants to turn something on or off.. the lower output sends a simple 1 or 0 message every minute regardless – think of it as a regular status output just like the little text and icon indicator under the node itself in the picture above. In this case each output is also sending out a debug message to the debug window in green – that’s just for testing purposes.
If you double-click on my scheduler node, here’s what you get…
Simple enough, give it a name (any name), on-time and off-time which includes every 15 minutes of the day and dusk and dawn dropdown options as well as timeout options for off time… then set your longitude and latitude (from Google Maps or memory if you are like that), the topic you want to send and the two messages – one to turn something on and another to turn something off. In my case I have an MQTT message system going to ESP8266 units – I’ve detailed this elsewhere in the blog.
Tick or un-tick boxes for the weekday/month combination you want. The code is checked once every minute but the top output only sends something out at power up or when the state changes.
If this isn’t powerful enough for you? – let’s say you want something to happen twice a day? – put two of them in there.
So – to make this work – i.e. to make your own node there are two files – and you just create a directory in your node-red/node-red-nodes folder called scheduler, dump these two files in and restart Node-Red.
The two files are the HTML file and the .JS file called scheduler.html and scheduler.js respectively.
If you make good use of this mode, a credit would be encourage me to support it.
Also if you spot any mistakes especially in the timing – or have ideas for improvement – do let me know.
The purpose for the timeout to the end time options – is so you can say for example – turn a sprinkler on every night for 5 minutes after dusk. And that’s exactly what I plan to use it for – but only in the summer months!
Attach for example an MQTT node onto the first output and put your broker details in there. The node will pick up the topic and message from my node.
And finally – this code is deliberately NOT constantly sending out the ON instruction every minute but only when the state changes. At any time you can press the button on the left of the node to force an output of the currently relevant message.
Enough of this – here are the goods – no guarantee implied.
Some folk had issues reading the SOURCE CODE files – so I’ve put the files on Github here.. https://github.com/scargill/scheduler
This node is relatively simple but I think that’s the point. It still took me several days to get it right and I’d appreciate any testing reports. My next job is a thermostat node and that’s coming along nicely.
Make sure you sign up to the blog to be kept up to date or, if you prefer social media – there’s always http://www.twitter.com/scargill or http://www.facebook.com/petescargill
In directory /usr/lib/node_modules/node-red : there is no node-red-contrib-bigtimer (that i just installed before) but in the /home/pi/.node-red/node_modules the folder is there !
So i go to the directory /usr/lib/node_modules/node-red as a root and i install SCHEDULER and BIGTIMER, then i restart node-red and it work!
Thank you very much for your help and for this amazing technology blog. THANK YOU !
Thank you so much ! ikram is my partner
Yes things have changed a little and I’m updating my info – I have mine running in /home/pi/.node-red/node_modules now but if that is working for you – that is fine… suggest you scrap scheduler because it may have bugs – I stopped developing it some time ago – BIGTIMER is much, much better and you can use as many of them as you like in a project without any problems.
I’ve just realised – you’re installing scheduler. Don’t. Install node-red-contrib-bigtimer instead. Scheduler is an early version of this and no longer updated.
I will update the blog accordingly. You will get the same warnings.
i can’t understand, can you be more clear please
Simple. Don’t use scheduler. It is out of date. Use node-red-contrib-bigtimer instead.
even if i use node-red-contrib-bigtimer i have the same problem ; there is no bigtime icon in the localhost page of Node-red !
Unfortunately, Node-Red as installed (as against re-installed) in the Pi is not in the /home/pi directory – it is in /usr/lib/node_modules/node-red
Stand by for updated instructions
Hi,
I am a beginner in Raspberry pi and Node-red. I actually have a Raspberry Pi 3 I need to install the Scheduler Node but it doesn’t work.
I used that command to install the Scheduler Node : npm install node-red-contrib-scheduler
I don’t know if it isn’t compatible with the latest version of RPi or i need to install something else ?
Please help me !!
So.. sitting in your raspberry pi home page go to the .node-red folder
i.e. cd .node-red
From there (assuming you are in there as user PI) the command you gave should work – you do, when finished have to restart node-red – or reboot as you prefer. This applies to all node installs – they don’t normally show up until you restart node-red. If you do this from the right directory – you should find scheduler at /home/pi/.node-red/node_modules
even if the command i use to install Scheduler returns errors, in the directory /home/pi/node_modules i found a folder called : node-red-contrib-scheduler
i reboot the RPi and i there is no Scheduler Node in the localhost page of Node-red
I have no answer. Assuming you used an up to date Node-Red and installed everything as user Pi then this should work.
If your node-red is installed differently you will need to find where it is installed. The settings.js file in there has an option to include other directories.
Right now are there any other libraries appearing in your /home/pi/.node-red/node_modules directory?
I didn’t install node-red it’s include in the Raspbian Jessie last version.
In the /home/pi directory i have :
1: .node-red
2: node_modules (node_modules not include in .node-red !!)
… and others
In the /home/pi/node_modules directory i have a lots of files like:
firebase , nan , rpio, suncalc ….
In the /home/pi/node_modules directory i have a lots of files like:
firebase , nan , rpio, suncalc ….
and also node-red-contrib-scheduler
RPI3 is irrelevant – no incompatibilities.
this command end with some errors :
npm WARN enoent ENOENT, open ‘/home/pi/package.json’
npm WARN pi No description
npm WARN pi No reposity field.
npm WARN pi No README data
npm WARN pi No licence field.
These are not errors – they are warnings – ignore them. They are fairly self-explanatory.
Hi, what to do when the scheduler does not appears in the node red web gui after npm. I can see its folder installed correctly? Thank you
So awesome! I use it to manage my home automation.
I notice a strange behavior when there is no action planned. When no action is planned, 1st output ticks Off value. Is it possible to no more tick when no action is planned ?
Thank you!
Best regards.
hi. I just can’t get this recognised by node-red. when you say “install” do you mean just copy the files across to the required directory? i’ve done this and also issued the npm command as per their site but neither has resulted it in the node appearing in my menu bar. please can you let me know if i’m doing something wrong? i’m using thethingbox and have placed the files in root@thethingbox ~/thethingbox/node_modules/node-red/node_modules Others in that folder are in folders called ttb-node-NAME so I’ve tried that too but no joy.thanks, don
Forget scheduler… install using npm. So in your .node-red directory and NOT anywhere else…. npm install node-red-contrib-bigtimer
scheduler is the predecessor of bigtimer – you’ll love it. Don’t “place” any files – use npm install.
Pete.
bingo. thank you very much.
I’m new to node-red and love this module,
I have a home automation set up, using your module and XRF (radio) light and temp sensors.
I’m just wondering where the module gets its time from as in the UK we move our clocks back and fore twice a year.
I’ like to get the time from a local server.
Thanks again for a great module
SHOULD adjust automatically for winter summer. Let me know. Sorry for brief rely on mobile.
Raspberry Pi, running Thingbox. Pi configured to local time + DST. Debug window shows correct (DST) time.
Scheduler installed via npm Dusk dawn seems to work fine.
However I need to select a time 1 hour earlier than required to switch on / off lights. easy enough.
DST finishes at midnight tonight, so I’ll see what happens then.
Once again thanks for a great module.
Tony
Thanks Walter and Pete,
Followed the instructions and now got it working, good tip on using Putty from within WinSCP it made navigating around the folders a lot easier with copy the path from WinSCP to putty.
Now to get the S20 socket working from scheduler, I think that maybe a tad more difficult!
Thanks for the info. I just get loads of errors when I try it.
I think I’m going to start from scratch, I updated to the latest Node red and I have node red folders all over the place and I’ve lost the plot, some things install OK and others don’t ??
I’m a bigger Newbie!
Don’t knock yourself – it can be a pain to set up…. one option is – if you look at the home control page…. my friend made a script (which I can’t get to work on a PI yet) for those DROPLETS – explained in “Home Control 2015 or at least linked to – you get a month’s free trial – it’s basically linux online….. and the script sets up pretty much everything we do without any manual intervention – including Node-Red and all the various nodes… costs nothing but time if you want to give that a go.
Sorry, one thing was wrong, missed a new line feed
3) In Putty
wget https://bitbucket.org/scargill/scheduler/get/d959364ba13a.zip -O node-red-contrib-scheduler.zip
unzip node-red-contrib-scheduler.zip
mv scargill-scheduler* node-red-contrib-scheduler
wget https://bitbucket.org/scargill/duskdawn/get/0305d8365c4b.zip -O node-red-contrib-duskdawn.zip
unzip node-red-contrib-duskdawn.zip
mv scargill-duskdawn* node-red-contrib-duskdawn
Sounds great Walter. Having just finished updating a Pi to the spec I want, I wonder how the Thingbox version compares because my way is likely the hard way (takes a while to setup)… I have:
Node + node-red
Apache+mysql+PHP
Ramlog (important)
Webmin
Latest Raspbian with Linux 4.1+
MQTT (one has Mosquitto, the other has another MQTT server)
MywebSQL SQl manager
How does that compare to the Thingbox version?
Just as info if you would like to get the thing going in TheThingBox distro. This is what I did, partly manually copying:
1) Log in as root (default for TheThingBox) with Putty and WinSCP
2) In Putty
cd userdir
npm install suncalc
Check that it was installed in userdir/node_modules
3) In Putty
wget https://bitbucket.org/scargill/scheduler/get/d959364ba13a.zip -O node-red-contrib-scheduler.zip
unzip node-red-contrib-scheduler.zipmv scargill-scheduler* node-red-contrib-scheduler
mv scargill-scheduler* node-red-contrib-scheduler
wget https://bitbucket.org/scargill/duskdawn/get/0305d8365c4b.zip -O node-red-contrib-duskdawn.zip
unzip node-red-contrib-duskdawn.zip
mv scargill-duskdawn* node-red-contrib-duskdawn
4) In WinSCP
Move the newly created ‘node-red-contrib…’ folders from userdir to /node_modules
Navigate to /node_modules
Open the folder ‘node-red-node-suncalc’
Copy the subfolder ‘node_modules’ to a disk (to the left side of WinSCC gui)
Navigate now to /node_modules/node-red-contrib-scheduler
Copy the ‘node_modules’ folder to here
Repeat this for node-red-contrib-duskdawn
5) In WinSCP
Navigate back to /userdir and clean up downloaded files if needed
6) In Putty
Reboot
7) Once rebooted, you should find nodes in ‘advanced’ section for sunrise, scheduler and duskdawn
Hi Phil
I’ve no idea – my code is not in any registry and I’ve no great desire to ensure it is – a bit of a cheap the authors of that who are also volunteers… however… here without anything missing is what we actually have in our script – bearing in mind that you should be in your node-red directory when you do this – or if you set it up as root, in something like /usr/lib/node_modules (don’t ask me why – logically I’d have expected the node-red directory to be in the root folder if a root user set it up – but then I’m only a Linux relative newby .
# Install suncalc, duskdawn, grove, scheduler, mysql & pushbullet
echo -e ‘\n\n====================Installing Duskdawn node ================\n\n’
cd /usr/lib/node_modules
npm install suncalc
wget https://bitbucket.org/scargill/duskdawn/get/0305d8365c4b.zip -O node-red-contrib-duskdawn.zip
unzip node-red-contrib-duskdawn.zip
mv scargill-duskdawn* node-red-contrib-duskdawn
npm install node-red-contrib-duskdawn
wget https://bitbucket.org/scargill/scheduler/get/d959364ba13a.zip -O node-red-contrib-scheduler.zip
unzip node-red-contrib-scheduler.zip
mv scargill-scheduler* node-red-contrib-scheduler
npm install node-red-contrib-duskdawn
This definitely works – I’ve used it on Raspberry Pi and it has also been used in DROPLETS…
I keep trying to get this node but all I get is: –
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 ‘node-red-contrib-duskdawn’ is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Maybe try ‘npm search red contrib duskdawn’
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Linux 3.18.11-v7+
npm ERR! command “/usr/bin/node” “/usr/bin/npm” “install” “node-red-contrib-duskdawn”
npm ERR! cwd /home/pi/Node Red/nodes
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/Node Red/nodes/npm-debug.log
npm ERR! not ok code 0
Any suggestions?
Cheers
Thank you very much, I got it working
Best regards, Walter
Dear Pete,
I am about testing TheThingBox distro a bit and I wanted to install your Scheduler there. The thing is, I hardly remember how I did it earlier…just something tells me it was done manually…or was it possible with npm?
Great if you could enlighten me…
Thanks & best regards,
Walter
You’ll need duskdawn as a dependency.
NO guarantees but here’s what we use in a script – so assuming you’re in the node-red directory in a terminal – I now use WINSCP but not that horrible terminal – I installed putty and there’s an option in WINSCP to use putty – makes life easy as the right mouse button does a paste from windows..
So change below to wherever your node-modules directory is… and..
npm install suncalc
wget https://bitbucket.org/scargill/scheduler/get/d959364ba13a.zip -O node-red-contrib-scheduler.zip
unzip node-red-contrib-scheduler.zip
mv scargill-scheduler* node-red-contrib-scheduler
npm install node-red-contrib-duskdawn
option value=”1290″>21:30
option value=”1315″>21:45
option value=”1330″>22:00
option value=”1345″>22:15
option value=”1360″>22:30
option value=”1375″>22:45
option value=”1390″>23:00
option value=”1405″>23:15
option value=”1420″>23:30
option value=”1435″>23:45
option value=”5000″>Dawn
option value=”6000″>Dusk
Should be
option value=”1290″>21:30
option value=”1305″>21:45
option value=”1320″>22:00
and so on?
Walter – you are absolutely right thank you and I have just updated the repository accordingly. Thank you.
I don’t know why but what I tried to explain was not presented correctly in the posting, I try again modifying the tag (removing the initial 21:30
option value=”1315″>21:45
option value=”1330″>22:00
option value=”1345″>22:15
option value=”1360″>22:30
option value=”1375″>22:45
option value=”1390″>23:00
option value=”1405″>23:15
option value=”1420″>23:30
option value=”1435″>23:45
option value=”5000″>Dawn
option value=”6000″>Dusk
Should be
option value=”1290″>21:30
option value=”1305″>21:45
option value=”1320″>22:00
and so on?
Hello Peter,
Been testing your scheduler for a while and it is working fine. I looked deeper into it, actually wanted to extend the options to include also 2359. Then I saw something, for start value options starting from 1290 it looks like this:
21:30
21:45
22:00
22:15
22:30
22:45
23:00
23:15
23:30
23:45
Dawn
Dusk
Should it not be
21:30
21:45
22:00
and so on?
Kind regards, Walter
Hi Peter,
Thanks for your job on scheduler. Just a question… I don’t answer the folowing sentence :
“The purpose for the timeout to the end time options – is so you can say for example – turn a sprinkler on every night for 5 minutes after dusk. And that’s exactly what I plan to use it for – but only in the summer months!”
How do you specify the timeout and where?
Additonnaly, would you please explain the usage of {out1,1} option? Is it possible to add an other term ( like {out1,1};TRUE )? What separator have to be used?
Cheers
JPC
Jean-Philippe – when you select the OFF-TIME, in the dropdown box you’ll see near the end various timeout values.
Peter,
Since your post about node-red I’ve been getting deeper into it and am finding it really useful, I’ve just come across your scheduler node and have been trying to get it to work on my RPi, first model, but can’t seem to get it to appear in the list of nodes.
I’ve tried copying it to various folders but it just doesn’t seem to be recognised, will it work OK on the earlier RPi? and any suggestions as to where it should go?
Thanks,
Phil
I have no experience at all of the earlier Raspberry Pi but if node-red works – then it should work – make sure you’ve installed the sunrise node.
Hi, I had the same problem. For some reason I haven’t been able to fathom, it only works when put into Node-Red’s own nodes folder. It does not work if put into any of the user nodes folders.
Hi, just wanted to know what software do you use to make the little graphs on this article (and the others) with nodes and links between them. I found them very nice. thanks.
Node-Red !
Hi Peter, you probably saw that I cloned your repo to my own (TotallyInformation) any changes I’ve made have been committed back to there. Mainly just sorting out {} brackets and other JSHint issues.
I used to use NP++ but switched to SublimeText and then to Adobe Brackets, about the only good thing they produce! It is actually written using node.js. Has many of the features of Sublime but is a lot faster. With JSHint instead of the default JSLint and with the interactive linter plugin, you can immediately spot any issues.
For some strange reason I can only run your node if I put it under the main node-red/nodes folder not in the userDir/nodes folder. Odd but at least it works for now. I need to rethink my strategy for scheduling now I’ve moved everything onto my new Pi2. But I’m doing some work on email integration first. I want to be able to control NR by email and to be able to send info out on request. The last part is easy, the former not so much.
Good luck with your Thermostat code. Julian.
Hiu Julian
Your code will get out of date as I update mine??
Also – I tried Brackets. Looks good but if you take the scheduler.html file, dump that in there and mess up the formatting of the options for example – changing the indents on individuals – I could not find a beautifier for Brackets that would fix this for you? Ideas?
Hi again, I can simply update from your repo on a different branch and merge if I need to. Or if you let me know if you take the changes you want (if any) back into your code, I’ll just blitz it.
Re Brackets. There is Beautify (https://github.com/drewhamlett/brackets-beautify) which I’ve used to reformat HTML. But generally I don’t do that to JavaScript as I tend to want to understand the code as I go so I tend to reformat as I’m reading. Rather like I did with your code. In any case there are, of course, a number of different “house styles” and my style wont suite everyone (I hate having opening curly brackets on their own line for example as, to me, it breaks the pattern of reading – probably because I started life with COBOL, PL/1, APL and other high-level languages).
Thanks for the info Julian. I’m VERY new to GIT but as I understand it you can indeed make a copy and do your stuff. I would not mess about though as I’m about to make more changes:-) Right now I’m setting up a second Raspberry Pi2 with knowledge I’ve gained recently so as to have a “clean” version – as against the current one which is full of abandoned experiments 🙂
No problem Peter, I’ve moved on since your module works anyway – though I’ve not yet included it “live” in my project, I sure I will since I need something like it for some of our house lighting.
It would be really nice if you could package it for npm of course 😉
We will have to wait and see. There is a very similar device available that has a relay built in to open a water valve so they must be intended for permanent installation. If it does corrode then I’ll try different metals. The copper plated steel earth spike for the power system doesn’t corrode and, I guess as the currents are miniscule then galvanic erosion shouldn’t be an issue. I’m going to use one of the 24v irrigation valves that are very common in the merchants here.
On another issue, I’ve just ordered a ready built unit from Sophia, Bulgaria. http://www.ebay.co.uk/itm/251890956930. It looks nicely made, mains powered and perfect for a job I have. He has managed to set it up as a webserver on first power up to allow configuration from a browser which is clever. It then switches over to MQTT but (I think) still allows browser access as well. There are masses of code on GitHub for it, follow the WiKi link.
Yes, your point about galvanic current – that’s what I was thinking about – corroded battery compartments etc.. but if the current is tiny that’s not such an issue. I note the copper is tin-plated.. I don’t know whether that’s a good or a bad thing in a plantpot – do let me know how that turns out. I would have thought stainless steel was the answer but then you can’t plate that onto a board.
We’ve been working on VERY similar software. I’ve developed the MQTT software (TUAN’s code) to do all sorts of IO magic on the ESP-12 and right now we’re trying to integrate the power-up-web-server part but it’s messy right now and throwing out all sorts of warnings.. I really want to end up simply with a subroutine call at the start of my code that if a button is pressed goes off and creates a temporary website. The code that is out there involves web page compression that won’t compile under Eclipse/windows etc… (there is no need for images on a simple setup web page so I’d really like to find a much simpler version). That board looks good – not cheap though.
I’ve just bought a couple of these: http://www.ebay.co.uk/itm/271491679485. We are in Spain and not on mains water so we have to watch every drop. I’m hoping to water only when needed. Sun, wind, temperature and rain all affect the water requirement so maybe testing soil humidity is the answer?
Ah now I’ve always wanted to talk to someone who has bought one of these. Is this going to simply corrode in the soil? I thought you had to use stainless steel? That is exactly what I want too. I could read the analog value from a sensor via MQTT and then apply a timer accordingly… I have a watering system which runs on a 12vc solenoid (or will when I take the replacement 12v power supply over there in May – the last one died due to rubbish electricity). I’ve looked at these before and just though… corrosion… Have you done anyhing with these?
Hi Peter,
I can’t seem to get these to work. I’m using the latest NR release on a Pi2. Putting these files in my user nodes folder gives me an error that scheduler.js cannot be found. If I put them in the node-red/nodes folder, I get the error:
/home/pi/node/nr/node_modules/node-red/nodes/scheduler/scheduler.js:15
“use strict”;
^
9 Apr 12:48:23 – [warn] ——————————————
9 Apr 12:48:23 – [warn] [scheduler] SyntaxError: Unexpected token ILLEGAL
It’s OK, I got it. Copying from this website changed all the single and double quotes to “smart” quotes. It would be great if you could put the files up onto github.
Regards, Julian.
In fact, the whole things was a mess, I had to correct 3 different sets of quotes and a load of formatting issues.
I took the liberty of rationalising some of your block statement formatting too – the use of if and other blocks without {} is generally frowned upon as it can lead to logic errors that are hard to spot. Especially as you have a lot of nested if’s some in different styles.
Do you want me to put the corrected files up onto my github profile?
Drat! It’s no good, there is something else wrong that I cannot spot I’m afraid. I managed to get rid of the obvious errors but it will only load from the node-red/nodes location (rather than user nodes locations) and when I try, it hangs the admin interface.
Any chance you could send me copies of the working files? Or post them to the Google group?
Do you want to send yours… or do you want me to simply send you my latest copy? – Oh , I’ve just realised there’s an email like mine but diffent in the top left here next to your name… ??
So – the solution to the problem of reading the file – it is now on Github and the blog updated accordingly.
See the updated blog – I have removed the source code (I cannot find a decent source code utility for WordPress that doesn’t mess something else up) and put the files on Github.
Well of course it was a mess – I’m still developing it! If you’d care to send your update I’ll go through it as I’m busy making changes right now. I suggest at this point it would not be sensible to put it on a github for the same reason I have not. It’s new, I’m making it up as I go along and getting feedback. At some point in the future I’ll stick it up on NPM. Thanks. Oh, my email address… pete at scargill.org if you’d care to send your updates.
Pete.
Hi Peter, thanks for doing that. The email address is valid by the way, I just use a different address on every site! Helps manage spam issues.
As you’ve probably realised, you don’t need to worry about putting something half finished on github, most of the stuff there NEVER gets finished! Including most of mine – I’m TotallyInformation on github btw. In fact, the only fully finished repo I have is the NR moment node.
I’ll grab a new copy from github and get that to work first then I may send you some suggested reformatting if you are happy.
Hah, well yes I had gathered that a lot of stuff there never gets finished.. Thankfully I’ve found a few. Well I have 2 items up there (the first one I did so long ago I could not remember how to use GitHub. However now I have the Github desktop for Windows it is all coming back. I’ve added the icon up there as well and yes I did a little reformatting of the code. I’m new to node-red but I’ve been programming for some time and I do not like the way automatic formatters work I’m afraid. I generally use NotePad++ who’s formatting plug-ins are not that clever. I eventually formatted the JS file on Eclipse (Windows) but for reasons beyond me if I try to edit an HTML file it simply tries to display it in an internal browser so that was by hand in Notepad++
If I have my timings right this should work a treat now and I can concentrate on my thermostat node (which I urgently need as we’re moving house shortly!!)
Right – now the node has it’s own icon – I’ve improved my use of normal naming conventions, fixed an issue with timing and improved some of the naming for messages.
Hi Peter
Are these going onto https://github.com/node-red/node-red-nodes?
Or is there somewhere else we can install from.
(Trying to keep up with you!)
Regards
Ian
It’s down to time – it is a learning to use Github and I’m spending what time I have improving the code. As of 15 mins ago I’ve fixed a timing problem – did it completely the wrong way before…and to be honest right now having just a few people playing with this works for me. So – get the latest, read the blog – it now shows you how to add a test injector – and in timer mode the status is updated underneath the node itself. This is now a very useful tool. Just needs testing to make sure it will work utterly reliably 🙂 Thanks for comments and fixes so far – keep them coming. Like – do we want two on-off times or are we happy to use 2 modes for that…
Just added the timeout extras to endtime… great for sprinklers.