Eztimer programming errors, timer won't start

[{"id":"41815382.1586fc","type":"tab","label":"Testing","disabled":false,"info":""},{"id":"ae4ad29e.3e6848","type":"template","z":"41815382.1586fc","name":"Format","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload}}","output":"str","x":1060,"y":60,"wires":[["6b0ce139.46a668"]]},{"id":"567a58d0.925568","type":"ui_text_input","z":"41815382.1586fc","name":"ontime1","label":"On Time 1","tooltip":"","group":"7997af28.47b6c","order":1,"width":0,"height":0,"passthru":true,"mode":"time","delay":300,"topic":"ontime1","x":700,"y":60,"wires":[["53fb8a84.99c2bc"]]},{"id":"53fb8a84.99c2bc","type":"moment","z":"41815382.1586fc","name":"timer1format","topic":"timer1format","input":"payload","inputType":"msg","inTz":"America/Denver","adjAmount":"7","adjType":"hours","adjDir":"add","format":"HH:mm:ss","locale":"en_US","output":"payload","outputType":"msg","outTz":"America/Denver","x":860,"y":60,"wires":[["ae4ad29e.3e6848"]]},{"id":"13f7ffde.759668","type":"change","z":"41815382.1586fc","name":"mo false","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.mon","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":180,"wires":[["860518f0.9a537"]]},{"id":"dd649f83.1b4208","type":"switch","z":"41815382.1586fc","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":990,"y":200,"wires":[["13f7ffde.759668"],["987b6adf.d0805"]]},{"id":"987b6adf.d0805","type":"change","z":"41815382.1586fc","name":"mo true","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.mon","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":220,"wires":[["860518f0.9a537"]]},{"id":"d3c37913.b8f2c8","type":"change","z":"41815382.1586fc","name":"tu false","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.tue","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":260,"wires":[["860518f0.9a537"]]},{"id":"d823285b.073ec","type":"switch","z":"41815382.1586fc","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":990,"y":280,"wires":[["d3c37913.b8f2c8"],["98935100.0f6138"]]},{"id":"98935100.0f6138","type":"change","z":"41815382.1586fc","name":"tu true","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.tue","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1130,"y":300,"wires":[["860518f0.9a537"]]},{"id":"6141650c.fb7d2c","type":"change","z":"41815382.1586fc","name":"we false","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.wed","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":340,"wires":[["860518f0.9a537"]]},{"id":"859a5045.9f97c","type":"switch","z":"41815382.1586fc","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":990,"y":360,"wires":[["6141650c.fb7d2c"],["8c7df7b8.195208"]]},{"id":"8c7df7b8.195208","type":"change","z":"41815382.1586fc","name":"we true","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.wed","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":380,"wires":[["860518f0.9a537"]]},{"id":"4c3ba491.a08984","type":"change","z":"41815382.1586fc","name":"su false","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.sun","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":100,"wires":[["860518f0.9a537"]]},{"id":"d12d577f.f22cb","type":"switch","z":"41815382.1586fc","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":990,"y":120,"wires":[["4c3ba491.a08984"],["cfa50b4c.b3261"]]},{"id":"cfa50b4c.b3261","type":"change","z":"41815382.1586fc","name":"su true","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.sun","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":140,"wires":[["860518f0.9a537"]]},{"id":"3bc6db19.25a4b4","type":"change","z":"41815382.1586fc","name":"th false","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.thu","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":420,"wires":[["860518f0.9a537"]]},{"id":"3911383.2561348","type":"switch","z":"41815382.1586fc","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":990,"y":440,"wires":[["3bc6db19.25a4b4"],["34d12466.888234"]]},{"id":"34d12466.888234","type":"change","z":"41815382.1586fc","name":"mo true","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.thu","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":460,"wires":[["860518f0.9a537"]]},{"id":"eee79552.b18358","type":"change","z":"41815382.1586fc","name":"fr false","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.fri","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1130,"y":500,"wires":[["860518f0.9a537"]]},{"id":"7cdcfe62.916468","type":"switch","z":"41815382.1586fc","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":990,"y":520,"wires":[["eee79552.b18358"],["e6ffc243.3ffbc"]]},{"id":"e6ffc243.3ffbc","type":"change","z":"41815382.1586fc","name":"fr true","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.fri","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1130,"y":540,"wires":[["860518f0.9a537"]]},{"id":"97158f4a.35381","type":"change","z":"41815382.1586fc","name":"we false","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.wed","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":580,"wires":[["860518f0.9a537"]]},{"id":"5ad58196.bf9878","type":"switch","z":"41815382.1586fc","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":990,"y":600,"wires":[["97158f4a.35381"],["6f881f0d.55dd88"]]},{"id":"6f881f0d.55dd88","type":"change","z":"41815382.1586fc","name":"we true","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload.wed","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":620,"wires":[["860518f0.9a537"]]},{"id":"6b0ce139.46a668","type":"change","z":"41815382.1586fc","name":"Payload Ontime","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.ontime","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1240,"y":60,"wires":[["860518f0.9a537","4e725c8f.122694"]]},{"id":"860518f0.9a537","type":"eztimer","z":"41815382.1586fc","name":"","autoname":"17:00 - dusk","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"lat":"","lon":"","timerType":"1","startupMessage":true,"ontype":"2","ontimesun":"dawn","ontimetod":"17:00","onproperty":"payload","onvaluetype":"num","onvalue":1,"onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"dusk","offduration":"00:01:00","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":false,"tue":false,"wed":false,"thu":false,"fri":false,"sat":false,"sun":false,"x":1410,"y":160,"wires":[[]]},{"id":"4e725c8f.122694","type":"debug","z":"41815382.1586fc","name":"4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1480,"y":40,"wires":[]},{"id":"b6db1c44.1a62c","type":"ui_slider","z":"41815382.1586fc","name":"zone1duration","label":"zone 1 duration","tooltip":"","group":"7997af28.47b6c","order":1,"width":0,"height":0,"passthru":true,"outs":"all","topic":"zone1duration","min":0,"max":"59","step":1,"x":740,"y":680,"wires":[["a3afa9f5.c1ccc8","453d0f14.0d17d"]]},{"id":"a3afa9f5.c1ccc8","type":"function","z":"41815382.1586fc","name":"Format Duration","func":"var w = msg.payload;\nw = Number(w);\n\n\nmsg.payload = '12:' + w + ':00';\n\n\n\n\n\n\nreturn msg;","outputs":1,"noerr":0,"x":940,"y":680,"wires":[["f875e4b.6c7ee18"]]},{"id":"f875e4b.6c7ee18","type":"template","z":"41815382.1586fc","name":"Format","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload}}","output":"str","x":1110,"y":680,"wires":[["72cc95fa.b7ecb4"]]},{"id":"72cc95fa.b7ecb4","type":"change","z":"41815382.1586fc","name":"Duration","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.duration","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1240,"y":680,"wires":[["860518f0.9a537","9793a7f4.445f38"]]},{"id":"453d0f14.0d17d","type":"ui_text","z":"41815382.1586fc","group":"7997af28.47b6c","order":2,"width":0,"height":0,"name":"z1duration","label":"Z1 Duration","format":"{{msg.payload}}","layout":"row-spread","x":920,"y":720,"wires":[]},{"id":"e3eec6bb.3f9358","type":"function","z":"41815382.1586fc","name":"on","func":"\n    msg.payload = 1;\n\nreturn msg;","outputs":1,"noerr":0,"x":770,"y":320,"wires":[["d12d577f.f22cb","5ad58196.bf9878","3911383.2561348","7cdcfe62.916468","859a5045.9f97c","d823285b.073ec","dd649f83.1b4208"]]},{"id":"60b68df.1289af4","type":"inject","z":"41815382.1586fc","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":620,"y":320,"wires":[["e3eec6bb.3f9358"]]},{"id":"9793a7f4.445f38","type":"debug","z":"41815382.1586fc","name":"3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1410,"y":600,"wires":[]},{"id":"7997af28.47b6c","type":"ui_group","z":"","name":"Day","tab":"5b37a8b4.93b328","order":3,"disp":true,"width":"11","collapse":false},{"id":"5b37a8b4.93b328","type":"ui_tab","z":"","name":"testing","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

Ok, I'm going to get a little more serious here. The contrib-eztimer is programmed per the flow. This is an obvious test setup but I'm stumped. I'm fairly sure the days are getting programmed as when the flow starts it says no day set and when I inject the days that message goes away. I have the duration hard coded to over 12 hours and I'm not sure that either the duration or the ontime are going through correctly. Any thoughts would be appreciated.

info : msg : Object

object

topic: "info"

payload: object

name: "timer1"

on: "error"

off: "manual"

state: "off"

_msgid: "32ffbbdf.ab48c4

the debug tells me that on has an error which means to me that I'm not sending the time correctly to the timer. tried several different things and still no luck

I've never used that node but I'm guessing it should be eazy ?

Have you tried cron-plus node? It has example flows (via the import menu) and full documentation on the help info panel on the sidebar.

You can statically and dynamically setup single or multiple schedules and control them via msg (if you want to)

It uses the ultra flexible Cron format OR date OR timestamp OR and date parseable string that look like a date. The output includes many additional values to assist you in understanding what was triggered & what will next trigger etc.

I would think this would be an easy answer as well and I'm sure for some of the uber programmers it is probably laughably easy. However, I have literally spent hours and hours on this without stumbling on a solution. I'm going to assume that the eztimer node actually works since it is in the library so the problem lies directly with me. There are indeed a number of other timers I could use but nothing says I would be able to program them either. Changing to a different timer seems the cowards way out. At this point I have decided that for whatever reasons this was the timer I wanted to use and while it may not be the best decision it was the one that I made. I will keep hammering on this if for nothing else to improve my skills at this point. It's not just the destination but the journey to get there. If every time I hit a problem I go a different direction my ability will never improve. I'm hoping that there will be someone who has the knowledge that will be kind enough to share that with me. I would hope that helping less technically capable people like me would be the focus and goal of this forum but perhaps I'm too altruistic.

It is, but you are assuming someone here knows the answer.
Have you tried opening an issue on the nodes github page. Then the author who is the person who write the node will see it.

I have installed eztimer, imported your flow, begins with an error: invalid time: dusk.

This node seems quite (over)complicated (just like i think bigtimer is overcomplicated), what are you trying to schedule ? Even the inject node can schedule at intervals, use some trigger nodes to do additional actions.

Likewise - I change the off event type to be "sun event" so that dusk was ok - then at least it seems to do something...
If you add a dummy function node before the time then you can add a debug node as well to see what is going into the time node...

But as @bakman2 says this all seems rather complex (and def not ez )... what is you real requirement ?

I am trying to schedule an event UI selectable as to days and time. Say I want to turn on a pump on Mon, Tues, Fri at 8 am. This schedule will be fairly permanent but say in three weeks my needs change to Tues, Wed, Sat at 9am. I want to be able to do this without cracking back open the programmer. It seems to me that one should be able to programmatically change those settings. I am looking at cron plus but still would like to see if I can decipher an answer to this problem. You are correct in that I did make an assumption someone knew the answer. That didn't occur to me.

Trying to raise the issue on github but can't find the eztimer node

follow the link from the nodes page on flows.nodered.org

just raised the issue on github

Hey guys, dev here. This looks like a bug I introduced in 1.1.0 which has been recently fixed (2 days ago). I imported the test flow and (once changing the dusk 'off' event to a sun event rather than time of day), couldn't make it error.

Anyway - have responded to the issue on github also - make sure you're on 1.1.3, if you can reproduce, let me know, happy to look at it.

It's worth noting too - that although the concept of being able to update the flow via a UI is sound - any changes you make using input message won't survive a node-red restart which may be frustrating?

I am using the latest code, there is a flow at the top of this entry I can re-post but seems like it would be redundant. Several others reproduced the issue so I'm pretty sure there is an issue.

Also, prepared to deal with the power off, program gone issue.

OK, stand by. I was NOT on the latest build so please let me look at this again before you go to any trouble.

One more thing with your flow I have - I notice, after playing with it more, that you're using the duration input to alter duration - for this to function as expected, you need to change the node 'off' type to 'duration' rather than 'time of day' or 'sun event'. After doing that, I was able to use your UI slider to dynamically change the duration either for the next event (if off) or for the current event (if on).

At which actual point (when you give it what input) does it error for you?

Lesson learned. It appears - superficially at least - that it is now working. At least it's accepting commands. I'll have to test quite a bit further before I'm totally confident but it's not giving any errors now Thanks for the responses.

Good news - thanks for posting. Let me know if you find anything.

Cheers,
Ben.

So, here is what I'm trying to do and seem to be confused. I want to set the time to start at a time I input via the UI. The output from your timer is then used to start a series of events. I want to be able to select individual days of the week. I need the timer to fire an output of only a few seconds then turn back off. This event will be for one time of the day in the selected days.
So, on Monday I want the timer to output at 8 am one pulse of say 5 seconds then turn off till the next selected day. What would be settings in your node?
I think I'm starting to figure out your node and I like the basic concept, just need to fine tune my thinking.

After a play date with the node I think I have working the way I need. I like the basic concept of the node and the way to turn on/off days. Not as intuitive as I would have liked but does the job I need to do. Thanks to the dev for his prompt replies.

1 Like