mrgadget / node-red-contrib-eztimer Goto Github PK
View Code? Open in Web Editor NEWThis project forked from biddster/node-red-contrib-schedex
A simple-yet-flexible timer/scheduler for node-red
License: MIT License
This project forked from biddster/node-red-contrib-schedex
A simple-yet-flexible timer/scheduler for node-red
License: MIT License
Hi,
unfortunately I did not find what I was looking for so I am asking here.
Do I have the possibility to trigger eztimer so that it checks its schedule again and generates output again?
When I send a string into the eztimer "onpayload 22.0" to change the ON Payload but nothing happened. Maybe I dont understand the readme.
onpayload my_payload - Sets the payload for the on event (no spaces)
Is "my_payload" a variable or just a example for a value?
Thanks for help
Spent a few hours trying to get this node to work with programmatic input. Ran into too many problems. From diving into the code, came up with the following:
I appreciate your efforts.
Is there a way to programmatically set the on or off type? I noticed that if I have it set to "Sun Event" If I then inject say "ontime 12:00:00" it doesn't work. I must set the type in the node to "Time Of Day" before being able to inject a time.
Thanks
the geographical night is define as: 18° below the horizon.
source: "https://en.wikipedia.org/wiki/Twilight"
So, complete darkness does not occur for "some time" for many Regions on Earth who live above 48.7° of latitude.
source of picture: "https://www.openstreetmap.org"
The Big problem is, that the "Node Red Flow" will work at "winter time" but will produce an error at "sommer time" for many people.
I would suggest not to give the option "night" @ Sunevent.
There we have the salad,
B0F1B0
Hi, i am getting "unsupported input", when i am sending
msg.payload.mon = false; return msg;
via function-node. Is that wrong? This is what i am understanding when interpreting your readme.
kind regards
When sending out a payload in number format data 1 is send correct as number, but 0 is send as String
Hi! Seems that "info" is not working while node is set for sun triggered event...
Getting: "TypeError: Cannot read property 'topic' of null" error
[{"id":"5e9cfc74.d5d804","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"efeec0fa.d158d","type":"debug","z":"5e9cfc74.d5d804","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":610,"y":160,"wires":[]},{"id":"543e3157.05871","type":"inject","z":"5e9cfc74.d5d804","name":"info","topic":"payload","payload":"info","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":160,"wires":[["e25aa494.38d568"]]},{"id":"e25aa494.38d568","type":"eztimer","z":"5e9cfc74.d5d804","name":"triggered at Noon","autoname":"solarNoon","tag":"Noon","suspended":false,"sendEventsOnSuspend":false,"lat":"50.040609","lon":"21.999437","timerType":"2","startupMessage":false,"ontype":"1","ontimesun":"solarNoon","ontimetod":"17:00","onproperty":"OnTest","onvaluetype":"str","onvalue":"Noon","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"1","offtimesun":"dusk","offtimetod":"dusk","offduration":"00:01:00","offproperty":"payload","offvaluetype":"num","offvalue":"test","offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":410,"y":160,"wires":[["efeec0fa.d158d"]]}]
When trying to send an ontime programmatically the node always gives an error. Sending status shows that "on" has an error status. This was verified by node-red forum users. Duration also gives an error. It appears to be related to time entries as the days of the week can be set.
I am having a problem when the system time changes (ex: NTP after a restart) and the events are late.
More details about the problem here https://discourse.nodered.org/t/inject-node-runs-late-sometimes/30365/56?page=2
Please take a look at this :
razvanstanga@62119b5
It's not tested. I will test it soon. Is the logic correct suspend() -> resume() ? I am not very familiar with the code.
Latest is throwing the "Invalid object (msg.payload) input." error when sending in a msg.payload.ontime
string formated as per docs.
{"payload":{"ontime":"06:30:00"},"_msgid":"xxx"}
Hi, I search everywhere but I can't find an answer. It is possible to somehow emit also a time of events for example msg.times? That same time what is under node if it running ( ON until xxxxx ).
It would be nice to have the opportunity to save this time for example for the countdown to the next sunrise etc..
Thanks for your nice work
weird bug here; programatically setting "offtime" or "duration" only works if on event is defined as something other than manual. If on event is "manual", then you can no longer programmatically control the off event. Here's a quick example of one flow that works and two that doesn't.
[{"id":"46d08053.6030e","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"3e05f308.1a2c8c","type":"eztimer","z":"46d08053.6030e","name":"works","autoname":"20:50 - ","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"lat":"32.0853","lon":"34.7818","timerType":"1","startupMessage":false,"ontype":"2","ontimesun":"sunset","ontimetod":"20:50","onpropertytype":"msg","onproperty":"payload","onvaluetype":"str","onvalue":"on","onoffset":"0","onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"","offduration":"01:00:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"str","offvalue":"off","offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"sun":true,"x":397.0057678222656,"y":107.01619720458984,"wires":[["d527b81c.5862e8"]]},{"id":"d527b81c.5862e8","type":"debug","z":"46d08053.6030e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":700,"y":100,"wires":[]},{"id":"b29e7dd3.4cda4","type":"inject","z":"46d08053.6030e","name":"","topic":"","payload":"offtime 20:51","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":100,"wires":[["3e05f308.1a2c8c"]]},{"id":"1082901f.d271e","type":"eztimer","z":"46d08053.6030e","name":"doesn't work","autoname":" - ","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"lat":"32.0853","lon":"34.7818","timerType":"1","startupMessage":false,"ontype":"9","ontimesun":"sunset","ontimetod":"20:50","onpropertytype":"msg","onproperty":"payload","onvaluetype":"str","onvalue":"on","onoffset":"0","onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"","offduration":"01:00:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"str","offvalue":"off","offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"sun":true,"x":370,"y":200,"wires":[["e94eeb42.7475f8"]]},{"id":"58e2bd0f.dd2164","type":"inject","z":"46d08053.6030e","name":"","topic":"","payload":"on","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":122.99423217773438,"y":192.98380279541016,"wires":[["1082901f.d271e"]]},{"id":"e94eeb42.7475f8","type":"debug","z":"46d08053.6030e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":652.9942321777344,"y":192.98380279541016,"wires":[]},{"id":"41019be2.1a28e4","type":"inject","z":"46d08053.6030e","name":"","topic":"","payload":"offtime 20:53","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":142.99423217773438,"y":272.98380279541016,"wires":[["1082901f.d271e"]]},{"id":"f34ce8fe.33e3e8","type":"eztimer","z":"46d08053.6030e","name":"doesn't work","autoname":" + ","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"lat":"32.0853","lon":"34.7818","timerType":"1","startupMessage":false,"ontype":"9","ontimesun":"sunset","ontimetod":"20:50","onpropertytype":"msg","onproperty":"payload","onvaluetype":"str","onvalue":"on","onoffset":"0","onrandomoffset":0,"onsuppressrepeats":false,"offtype":"3","offtimesun":"dusk","offtimetod":"","offduration":"","offpropertytype":"msg","offproperty":"payload","offvaluetype":"str","offvalue":"off","offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"sun":true,"x":370,"y":340,"wires":[["ffeb7881.d04f28"]]},{"id":"4c4fd2ba.7f449c","type":"inject","z":"46d08053.6030e","name":"","topic":"","payload":"on","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":122.99423217773438,"y":332.98380279541016,"wires":[["f34ce8fe.33e3e8"]]},{"id":"ffeb7881.d04f28","type":"debug","z":"46d08053.6030e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":652.9942321777344,"y":332.98380279541016,"wires":[]},{"id":"d7f8bec8.e0a17","type":"inject","z":"46d08053.6030e","name":"","topic":"","payload":"duration 00:02","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":142.99423217773438,"y":412.98380279541016,"wires":[["f34ce8fe.33e3e8"]]}]
Is there anyway to use a property as long and values?
I would like to use some global setting for these values instead of having to set them each time a new eztimer is dropped on the canvas...
Would be great if it was possible to use global values for example from home assistant.
I'm using eztimer for an irrigation system. All my parameters are send programmatically to the timer.
If the timer is "on" and I send a suspend "on" the timer came "off" as supposed but when I send a suspend "off", the timer dont return to "on" state as supposed, It jump to the next event.
I tried using "direct" parameter and everything is fine...
So is it a "bug" or a normal way to work for programmatic control.
(Hope it's clear, i'm french so my english is not as good as I would like!)
Hello,
is it possible to use the localtime (timezone) instead of UTC?
Thanks
By setting the node config though the GUI I could set a value for tag
(something that no other node I'm using is taking note of) but not for topic
(something that is relevant for many nodes).
Feature request:
Please support setting the value for topic
that is then added to the sent message from the eztimer node.
eztimer: 1.1.6
node-red: 1.0.3
Tested in Chrome 79 & Firefox 59 on a Mac
When I'm trying to store a property in a context (flow. or global.) like so and save:
...and then re-open the edit dialog the context is always reverted to msg.:
I'm very new to node-red and don't know how to go about debugging this myself.
Please let me know if I can be of any help. Maybe I'm just using this thing the wrong way ;-)
Finally found a timer that could just trigger at a certain time of day!
In keeping with your ethos of a simple interface I suggest you hide the General Info - Lat/Long fields if they're not being used. I assume these are required only if a Sun Event has been selected?
Hi
I am only new so maybe reading the instructions wrong however the following basic flow does not seem to change the ontime...
[ { "id": "551f9a9a.3fe7ac", "type": "eztimer", "z": "78ad6fef.9c0bb", "name": "timer for air conditioner to turn off", "autoname": "00:00", "suspended": false, "lat": "-33.91642", "lon": "147.23387", "timerType": "2", "startupMessage": true, "ontype": "2", "ontimesun": "dawn", "ontimetod": "00:00", "onproperty": "payload", "onvaluetype": "num", "onvalue": "4", "onoffset": 0, "onrandomoffset": 0, "offtype": "1", "offtimesun": "dusk", "offtimetod": "dusk", "offduration": 0, "offproperty": "payload", "offvaluetype": "num", "offvalue": 0, "offoffset": 0, "offrandomoffset": 0, "mon": true, "tue": true, "wed": true, "thu": true, "fri": true, "sat": true, "sun": true, "x": 530, "y": 140, "wires": [ [] ] }, { "id": "d5b21b2b.ec73c8", "type": "function", "z": "78ad6fef.9c0bb", "name": "get string values", "func": "\nvar newmsg = {payload: {ontime:\"05:45\"}}; \nreturn newmsg;", "outputs": 1, "noerr": 0, "x": 180, "y": 180, "wires": [ [ "551f9a9a.3fe7ac", "2f5d037e.a4282c" ] ] }, { "id": "2f5d037e.a4282c", "type": "debug", "z": "78ad6fef.9c0bb", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "x": 480, "y": 260, "wires": [] }, { "id": "753b3a21.a4f92c", "type": "inject", "z": "78ad6fef.9c0bb", "name": "", "topic": "", "payload": "", "payloadType": "date", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "x": 120, "y": 80, "wires": [ [ "d5b21b2b.ec73c8" ] ] } ]
node-red keeps crashing and I was able to capture this:
2 Jun 20:52:33 - [red] Uncaught Exception:
2 Jun 20:52:33 - ReferenceError: manual is not defined
at status (/data/node_modules/node-red-contrib-eztimer/index.js:280:23)
at Timeout.event.callback (/data/node_modules/node-red-contrib-eztimer/index.js:164:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
[edit]: note, i haven't changed anything via these nodes for some time, but just updated to latest version from previous...
I use the eztimer to start and stop a light at a random time when we are not at home. I want to sent a "cancel" when we arrive home when the timer is running so the light is not going out when we are at home. the cancel should stop the timer without sending an off event. But it is not stopping the timer, it just sets a new random stop time. I use latest version of ezhome and node-red. can this be an issue or am I doing wrong?
[{"id":"592e1d79.022884","type":"eztimer","z":"84aa0aec.49b6d8","name":"Dusk - 22:00","debug":true,"autoname":" - 22:00:00","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"manual","latLongHaZone":"zone.home","lat":"","lon":"","timerType":"1","startupMessage":false,"ontype":"9","ontimesun":"dawn","ontimetod":"17:00","onpropertytype":"msg","onproperty":"payload","onvaluetype":"str","onvalue":"on","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"22:00:00","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"str","offvalue":"off","offoffset":"30","offrandomoffset":true,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":630,"y":100,"wires":[["5de15b3f.21a844"]]}]
Hello,
I've used EZTimer since the early days without issue - sometime recently my sunset / sunrise flows stopped working reliably (sunset / sunrise), they appear to trigger after they are due - example, today sunrise was 8am, they triggered at gone 9am (I'm not sure if this always happens, sometimes I don't see them trigger at all).
Has something changed recently that could have caused this?
Note, I use trigger only, the debug / node status shows the correct time, it just doesn't trigger at the correct time.
Howdy,
I'm looking to move off of BigTimer, but I cannot seem to figure out how to have eztimer re-emit the output at a timed internal like BigTimer does. Is this built in or do I need to use something else to re-trigger eztimer?
First, I apologize for bothering you so much with issues. I'm a very heavy eztimer user, it's very important for my home automation...
As for the current issue I discovered. To reproduce, set a timer node, I tried with on\off timer with Time of Day for both on and off. Wait for the On time to pass. The node with trigger On properly and the node status will change to On, Until [Of Time]. So far so good. Now redeploy Node-Red.
The status changes to Off, Until [Next Day On Time]. So this is wrong. But when the actual original off time arrives, the node will properly trigger "Off". So the node status doesn't match the behavior.
This is a minor issue, because the node works properly, it's just the status that's wrong upon re-deploy.
Thanks.
Hi,
thanks for your effort on the timer.
When i trigger an on/off timer with an with msg.payload = info
event i´m having some trouble with the result.
The values seem to be mixed up. Can you have a look at this?
object | value | expected value |
---|---|---|
payload.on.property | msg.OnTest | msg.OnTest |
payload.on.value | 0 | Night |
payload.off.property | msg.OnTest | msg.payload |
payload.off.value | 0 | test |
[{"id":"38fe4c57.2a7b24","type":"debug","z":"f035508.fdbebb","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":410,"y":2040,"wires":[]},{"id":"80a6d3db.b07c4","type":"inject","z":"f035508.fdbebb","name":"info","topic":"payload","payload":"info","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":270,"y":1940,"wires":[["ff60548e.71cdb8"]]},{"id":"ff60548e.71cdb8","type":"eztimer","z":"f035508.fdbebb","name":"set Night","autoname":"night - dusk","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"lat":"51.4995","lon":"7.4717","timerType":"1","startupMessage":false,"ontype":"1","ontimesun":"night","ontimetod":"17:00","onproperty":"OnTest","onvaluetype":"str","onvalue":"Night","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"1","offtimesun":"dusk","offtimetod":"dusk","offduration":"00:01:00","offproperty":"payload","offvaluetype":"num","offvalue":"test","offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":440,"y":1940,"wires":[["38fe4c57.2a7b24"]]}]
It took me quite some time to figure the problem.
I have this outside light that is triggered by eztimer. It's being a month, and two times the light didn't turn on.
I've checked nodered, and the flow is correct, the button was on, and the light was off.
After some test, I realized that, if I deploy, eztimer trigger faster than mqqt, thus the subscriber doesn't get the message. Since eztimer doesn't keep injecting, the light stays off cause it never receiver the last state.
For some awkward reason, this is happening in my system. I get this strange uptime failure.
The fix I found so far was to delay inject message.
Also, using retain true for publisher doesn't have effect.
A tigger time is set by input message, and displays correctly next to node, but when that time comes, NPM appears to stop...aka all flows stop and only fixed by Node-red-stop and node-red-start command. No errors reported in log or debug screen, but it takes over a minute to stop NR, and looking at the log it was unable to stop some process. The errors reported below.
Stopping Node-RED graphical event wiring tool...
nodered.service: State 'stop-sigterm' timed out. Killing.
nodered.service: Killing process 10213 (node-red) with signal SIGKILL.
nodered.service: Main process exited, code=killed, status=9/KILL
Stopped Node-RED graphical event wiring tool.
nodered.service: Unit entered failed state.
nodered.service: Failed with result 'timeout'.
The Node-red editor continues to work but if you try a deploy or commit, it also locks up.
Dashboard also has ceased to work
Here is the eztimer configuration
[{"id":"5506a524.00646c","type":"eztimer","z":"ea51febe.392e5","name":"","autoname":"17:00","suspended":false,"sendEventsOnSuspend":false,"lat":"-35.31","lon":"149.68","timerType":"2","startupMessage":false,"ontype":"2","ontimesun":"sunsetStart","ontimetod":"17:00","onproperty":"payload","onvaluetype":"str","onvalue":"true","onoffset":"-2","onrandomoffset":0,"offtype":"9","offtimesun":"dusk","offtimetod":"dusk","offduration":"500","offproperty":"payload","offvaluetype":"str","offvalue":"false","offoffset":0,"offrandomoffset":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":630,"y":240,"wires":[["6e5f5853.c14378","543b1a39.2a9ff4","84696923.eeb0d8"]]}]
And here is the input message used to set trigger time
{"_msgid":"50379394.154d0c","topic":"","payload":{"ontime":"16:45","Zone":{"Number":0,"Name":"Spare","Description":"Spare outlet on Vege Patch Solinoids for solinoid switched hose","FlowRate":20,"Area":10,"Enable":"Off","Fixed":{"Duration":60,"Period":2},"Evap":{"Defined ":false},"DayLastWatered":17960}},"thisZone":0,"Today":17971}
I really appreciate the addition you made for controlling "ontype" and "offtype" and they work well.
I recently started tweaking my project again adding more user flexibility to it and assumed that if I programmatically set "on/off type" to "Sun Event" that I could then possibly use msg.payload.ontime or offtime to then set the type of Sun Event, like change Dawn to Sunrise or any other option that is available from within the node already. Obviously that appears to not be the case. Maybe there could be msg.payload.onsunevent and offsunevent properties?
Hi,
I'm a second day Node-RED user, so I might be doing something wrong, but I'm seeing this error in the debug window whenever I do a deploy. "Error stopping node: TypeError: Cannot read property 'timeout' of null" I get an error message for each eztimer node that is set for "trigger only".
Kind regards,
Bill
Hi, i'm very happy with your EZtimer... I would like to know if it's possible to extract and use the message sent by the timer in debug panel ( msg.string[64] )
I want to extract the planned "off" time to do some automation before the time is over.
I tryed many thing to use it in my flow without succes...
Thanks!
my version: node-red-contrib-eztimer 1.0.11 (1.0.10 also not working, lower version not testet)
in your node properties the Sun Event "Night" is not working --> 100% CPU Load and Node Red Crashded
all other Sun Event are working
{
"id": "84e078fb.7f3db8",
"type": "eztimer",
"z": "fb52a136.39c91",
"name": "bad",
"autoname": "solarNoon - night",
"suspended": false,
"sendEventsOnSuspend": false,
"lat": "51",
"lon": "34",
"timerType": "1",
"startupMessage": true,
"ontype": "1",
"ontimesun": "solarNoon",
"ontimetod": "20:00:00",
"onproperty": "payload",
"onvaluetype": "bool",
"onvalue": "true",
"onoffset": 0,
"onrandomoffset": 0,
"offtype": "1",
"offtimesun": "night",
"offtimetod": "05:00:00",
"offduration": "00:01:00",
"offproperty": "payload",
"offvaluetype": "bool",
"offvalue": "false",
"offoffset": 0,
"offrandomoffset": 0,
"mon": true,
"tue": true,
"wed": true,
"thu": true,
"fri": true,
"sat": true,
"sun": true,
"x": 70,
"y": 320,
"wires": [
[
"bf81d22b.b5a01"
]
]
}
Hi
Any idea why I get this error ?
Node-RED version 1.1.1
Originally posted by @Icegames-dk in #6 (comment)
hey,
i´ve got another issue when the on/off node is triggered by info.
In my example both states are off
while night should be on
.
Can you have a look at it?
cheers again. Export
[{"id":"1c5b2df7.a43262","type":"eztimer","z":"f035508.fdbebb","name":"isMorning (6:45)","autoname":"06:45:00 - night","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"lat":"51.4995","lon":"7.4717","timerType":"1","startupMessage":false,"ontype":"2","ontimesun":"sunrise","ontimetod":"06:45:00","onproperty":"payload","onvaluetype":"str","onvalue":"Morning","onoffset":"","onrandomoffset":0,"onsuppressrepeats":false,"offtype":"1","offtimesun":"night","offtimetod":"dusk","offduration":"00:01:00","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":"0","offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":2600,"y":1400,"wires":[["ebb8220d.b1024"]]},{"id":"6adcc7a6.b3cdd8","type":"eztimer","z":"f035508.fdbebb","name":"isNight","autoname":"night - 06:45:00","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"lat":"51.4995","lon":"7.4717","timerType":"1","startupMessage":false,"ontype":"1","ontimesun":"night","ontimetod":"17:00","onproperty":"payload","onvaluetype":"str","onvalue":"Night","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"06:45:00","offduration":"00:01:00","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":2580,"y":1460,"wires":[["d4811025.2103"]]},{"id":"ebb8220d.b1024","type":"debug","z":"f035508.fdbebb","name":"morning","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":2920,"y":1400,"wires":[]},{"id":"d4811025.2103","type":"debug","z":"f035508.fdbebb","name":"night","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":2910,"y":1460,"wires":[]},{"id":"2988949f.ea970c","type":"inject","z":"f035508.fdbebb","name":"info","topic":"payload","payload":"info","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":2390,"y":1440,"wires":[["1c5b2df7.a43262","6adcc7a6.b3cdd8"]]}]
Hi,
I would like to have the eztimer switched ON when the 'Vacation Mode' is TRUE and OFF as long as the 'Vacation Mode' is FALSE.
Currently with the payload Off, eztimer resumes activities on the next schedule.
Thanks a lot in advance for your help.
Regards
still an issue/remark after yesterday fix?
after sending cancel, the action is stopped without sending off, so far so good. But I set the on trigger to manual, so I should not expect to receive a new schedule tomorrow except if I sent a new 'on' payload. currently I receive a new off event when the schedule is off.
Hi again!
I am trying to programmatically set the day on which a timer will be enabled (the user can choose via a drop-down).
I have used the string and property variants (e.g. 'wed false') to enable and disable days, but neither work for me.
Repro:
I've included a flow to show this sending both 'wed false' in the payload and using 'payload.wed:false'.
From the code, it looks like the weekdays array is not being updated - if I understand NodeRed, it is initially populated via the editor values, but thereafter, even if config.wed is updated, the weekday array remains constant which is what is used to update the schedule?
Thanks.
[{"id":"d7569b3b.7891c","type":"debug","z":"459a5f7b.667b08","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1070,"y":175,"wires":[]},{"id":"f252469a.a6f05","type":"inject","z":"459a5f7b.667b08","name":"emit config","topic":"","payload":"info","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":435,"y":225,"wires":[["f658e672.4f331"]]},{"id":"f658e672.4f331","type":"eztimer","z":"459a5f7b.667b08","name":"Disable day","autoname":"18:00 + 00:00:10","suspended":false,"sendEventsOnSuspend":false,"lat":"","lon":"","timerType":"1","startupMessage":false,"ontype":"2","ontimesun":"dawn","ontimetod":"18:00","onproperty":"payload","onvaluetype":"num","onvalue":1,"onoffset":0,"onrandomoffset":0,"offtype":"3","offtimesun":"dusk","offtimetod":"dusk","offduration":"00:00:10","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":770,"y":175,"wires":[["d7569b3b.7891c"]]},{"id":"1e08e22f.383f0e","type":"inject","z":"459a5f7b.667b08","name":"Disable for today (string)","topic":"","payload":"wed false","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":485,"y":175,"wires":[["f658e672.4f331"]]},{"id":"286c627d.fef786","type":"inject","z":"459a5f7b.667b08","name":"Disable for today (property)","topic":"","payload":"{\"wed\":false}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":495,"y":125,"wires":[["f658e672.4f331"]]}]
I just started to use this node. Although I found it quite useful I also found some potential for improvement.
Have the need to suspend the scheduling and at the same time make sure that the device controlled by the timer is turned on. To do this I figured that you need to first send a message with payload = "on" and then send another message with payload.suspend = true.
I suggest that you add "turn_on", "turn_off" and "cancel" as new options under "programatic control".
When using trigger type, nothing seems to get triggered.
This example flow has (optional) inject, a eztimer and a debug message.
But nothing happens at the set times (10:45:00 or 8:20:00) on a weekday.
[{"id":"a5cb759b.aa0da8","type":"tab","label":"Flow` 1","disabled":false,"info":""},{"id":"822b5b05.7b4db8","type":"eztimer","z":"a5cb759b.aa0da8","name":"8:20 M-F Time to Leave","autoname":"8:20","tag":"","suspended":false,"sendEventsOnSuspend":false,"lat":"43.48446","lon":"-80.0662","timerType":"2","startupMessage":false,"ontype":"2","ontimesun":"dawn","ontimetod":"8:20","onproperty":"payload","onvaluetype":"num","onvalue":1,"onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"1","offtimesun":"dusk","offtimetod":"dusk","offduration":0,"offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"sun":false,"x":730,"y":500,"wires":[["9a70cff8.f769b"]]},{"id":"bd00b888.454678","type":"inject","z":"a5cb759b.aa0da8","name":"","topic":"","payload":"{\"ontime\": `\"10:45:00\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":420,"y":500,"wires":[["822b5b05.7b4db8"]]},{"id":"9a70cff8.f769b","type":"debug","z":"a5cb759b.aa0da8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":990,"y":500,"wires":[]}]
Hi,
first of all thanks for this nice node.
I'm using NodeRed as a Home Assistant Addon.
When I set "Geo Source" = "HomeAssistant Zone" then the "HA Zone" DropDownMenu shows no entries.
Can you tell me why?
Did I miss some thing in my Home Assistant configuration?
I have already configured two additional Zones (in addition to the default "Home" Zone) over the "Map" Tab in HomeAssistant.
used to work, not sure when it stopped. Or perhaps just doesn't update the status?
[{"id":"bf5fdc4.f54112","type":"eztimer","z":"d915f934.44fb08","name":"8:20 M-F Time to Leave","autoname":"8:20","tag":"","suspended":false,"sendEventsOnSuspend":false,"lat":"43.48446","lon":"-80.0662","timerType":"2","startupMessage":false,"ontype":"2","ontimesun":"dawn","ontimetod":"8:20","onproperty":"payload","onvaluetype":"num","onvalue":1,"onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"1","offtimesun":"dusk","offtimetod":"dusk","offduration":0,"offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"sun":false,"x":330,"y":1820,"wires":[[]]},{"id":"9638b139.cd757","type":"inject","z":"d915f934.44fb08","name":"","topic":"","payload":"{\"ontime\": \"10:45:00\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":300,"y":1940,"wires":[["bf5fdc4.f54112"]]}]
Input with msg.payload = "cancel" does not seem to have desired behaviour. I have suspended scheduling and have [on] event "manual" and [off] event "duration" of 00:00:07.
When I input "on", the node emits "On", as desired. With no other input, it emits "Off" after 7 seconds, as desired.
I was expecting that "on" followed in one second by "cancel" would not emit "Off" after 7 seconds, but it does.
Even if I do "on" (emits "On") followed immediately by "off" (emits "Off), after 7 seconds I get another "Off" as the timer pops.
So it seems to be that "cancel" has no effect. What might I be doing wrong?
It would be great if there was an option, to use this plugin as as time range check. I know I could use another node for this, but there I have to enter lat,lng every time. In this plugin I can use HA zone and that's great.
Maybe an new input, eg. "check" could be used.
Hi, it me again.
Thanks for updating to 1.0.12 --> so i can test and debug it @my own.
The library suncal is very bad / not working right.
It is right, that some locatin on earth have some days/weeks/month in the year where is no "NIGHT". But all the Location are above 66° of latitude (maybe some less, i am not an astrophysicists).
But as i test your new Version, i find out that the "suncalc" begin to produce "NULL Events" @ latitute above 48.7°.
{
"id": "84e078fb.7f3db8",
"type": "eztimer",
"z": "fb52a136.39c91",
"name": "bad",
"autoname": "sunsetStart - night",
"suspended": false,
"sendEventsOnSuspend": false,
"lat": "48.8",
"lon": "13.4",
"timerType": "1",
"startupMessage": true,
"ontype": "1",
"ontimesun": "sunsetStart",
"ontimetod": "20:00:00",
"onproperty": "payload",
"onvaluetype": "bool",
"onvalue": "true",
"onoffset": 0,
"onrandomoffset": 0,
"offtype": "1",
"offtimesun": "night",
"offtimetod": "05:00:00",
"offduration": "00:01:00",
"offproperty": "payload",
"offvaluetype": "bool",
"offvalue": "false",
"offoffset": 0,
"offrandomoffset": 0,
"mon": true,
"tue": true,
"wed": true,
"thu": true,
"fri": true,
"sat": true,
"sun": true,
"x": 90,
"y": 220,
"wires": [
[
"bf81d22b.b5a01",
"e25d469e.e12758"
]
]
}
There we have the salad,
B0F1B0
Sometimes I want only "on" event without an "off" event. So I set a time for "on" and for "off" I select "Input Trigger". That does it, the node will only fire when the "on" time arrives. However, the status of the node turns into "Invalid Time:" or "Invalid Time: [time]".
The correct behavior: if the user selects "Input Trigger" and there's no input available then the status should only be "ON @ [ontime]".
When setting a payload event, value to type "boolean", eztimer sends a string instead.
took me a long time to figure out why my automations weren't working with eztimer :(
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.