Hallo all
What is the best way to make a timer, there turn light OFF at dawn and ON at dusk, but set it to 10% at 23:00 ?
When I use bigtimer, I only have on or off. and then I have to use a "time range" node.
are there a better way ?
Hallo all
What is the best way to make a timer, there turn light OFF at dawn and ON at dusk, but set it to 10% at 23:00 ?
When I use bigtimer, I only have on or off. and then I have to use a "time range" node.
are there a better way ?
The CRON+ node is, without doubt, the most flexible of the many scheduling nodes and can do everything you are asking.
WOW...thx alot.... love it
I cant get it to work whit a "inject" node to get status. Do you know if I can do that ?
yes, I have try it, but I cant get it to work
[{"id":"6e6ed394a01251ce","type":"debug","z":"c4afb74715a93d10","name":"debug 16","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":940,"y":680,"wires":[]},{"id":"6a1c0407c2352fe0","type":"cronplus","z":"c4afb74715a93d10","name":"","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"fanOut","defaultLocation":"55 9","defaultLocationType":"fixed","outputs":5,"options":[{"name":"Sunset","topic":"Sunset","payloadType":"str","payload":"1","expressionType":"solar","expression":"0 45 21 * * *","location":"55.05302635383441 9.321497082710266","offset":"0","solarType":"selected","solarEvents":"sunsetStart"},{"name":"23:00","topic":"23:00","payloadType":"str","payload":"2","expressionType":"cron","expression":"0 0 23 * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"},{"name":"Sunrise","topic":"Sunrise","payloadType":"str","payload":"3","expressionType":"solar","expression":"20 45 21 * * *","location":"","offset":"0","solarType":"selected","solarEvents":"sunrise"}],"x":760,"y":700,"wires":[["6e6ed394a01251ce"],["6e6ed394a01251ce"],["6e6ed394a01251ce"],[],[]]},{"id":"5350aa4417a5988c","type":"inject","z":"c4afb74715a93d10","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":400,"y":700,"wires":[["71f2851c4a0ca19f"]]},{"id":"71f2851c4a0ca19f","type":"change","z":"c4afb74715a93d10","name":"trigger","rules":[{"t":"set","p":"payload","pt":"msg","to":"trigger","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":700,"wires":[["6a1c0407c2352fe0"]]}]
[{"id":"f32b22fe72eed204","type":"cronplus","z":"30fdd9a9702231b0","name":"","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"default","payload":"","expressionType":"cron","expression":"0 * 1 * * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":580,"y":1580,"wires":[["3d81cc9771111bb6"]]},{"id":"94124fe5a8014cd1","type":"inject","z":"30fdd9a9702231b0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"status","payload":"schedule1","payloadType":"str","x":340,"y":1580,"wires":[["f32b22fe72eed204"]]},{"id":"3d81cc9771111bb6","type":"debug","z":"30fdd9a9702231b0","name":"debug 121","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":810,"y":1580,"wires":[]}]
Okay, I had also come to that conclusion.
But what I can't with "CRON+", as I can with the "BigTimer", is the ability to send an "inject" node with "payload auto" and have it send out the signal I need.
When I do that with CRON+ and use "trigger-all" or some of the others, it sends out all three signals even though I only need the current one.
I would like to have a button that I can press, and it simply sends a signal through the CRON+ node, and then it outputs the result depending on the time of day.
[{"id":"6e6ed394a01251ce","type":"debug","z":"c4afb74715a93d10","name":"debug 16","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":800,"y":820,"wires":[]},{"id":"6a1c0407c2352fe0","type":"cronplus","z":"c4afb74715a93d10","name":"Test","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output2","defaultLocation":"55 9","defaultLocationType":"fixed","outputs":2,"options":[{"name":"Sunset","topic":"Sunset","payloadType":"str","payload":"1","expressionType":"solar","expression":"0 45 21 * * *","location":"55.05302635383441 9.321497082710266","offset":"0","solarType":"selected","solarEvents":"sunsetStart"},{"name":"23:00","topic":"23:00","payloadType":"str","payload":"2","expressionType":"cron","expression":"0 0 23 * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"},{"name":"Sunrise","topic":"Sunrise","payloadType":"str","payload":"3","expressionType":"solar","expression":"20 45 21 * * *","location":"","offset":"0","solarType":"selected","solarEvents":"sunrise"}],"x":650,"y":820,"wires":[["6e6ed394a01251ce"],[]]},{"id":"5350aa4417a5988c","type":"inject","z":"c4afb74715a93d10","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"trigger-all","payload":"Test","payloadType":"str","x":490,"y":820,"wires":[["6a1c0407c2352fe0"]]}]
I'd probably do that with one of the gate nodes. Use CRON+ or similar to open/close the gate at the appropriate times then have your inject direct to the gate.
okay...
The is my best...
[{"id":"658ec2724aea6cf9","type":"link in","z":"c4afb74715a93d10","name":"Solstyring","links":["5eedc4eb25b6533f","d3ebfcad2baefbbd"],"x":75,"y":220,"wires":[["85efaa9e574f9c08"]]},{"id":"f5b032aa34e3b7ed","type":"link out","z":"c4afb74715a93d10","name":"4 Bottom Wall Switch Køkken - 2","mode":"link","links":["f39c5419cf92b1ba"],"x":1135,"y":220,"wires":[]},{"id":"9e4c301c707afacc","type":"function","z":"c4afb74715a93d10","name":"set varable || Have OFF","func":"// define variable\nvar value = \"off\"\n\n// set global variable\nglobal.set(\"Have\", value)\nglobal.set(\"Kuglelampe_Stor\", value)\nglobal.set(\"Kuglelampe_Lille\", value)\nglobal.set(\"Smartplug_Pavillon\", value)\nglobal.set(\"Gardenpole_L\", value)\nglobal.set(\"Gardenpole_R\", value)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":970,"y":220,"wires":[["f5b032aa34e3b7ed"]]},{"id":"ddf41dd164b2bd82","type":"function","z":"c4afb74715a93d10","name":"set varable || Have ON","func":"// define variable\nvar value = \"on\"\n\n// set global variable\nglobal.set(\"Have\", value)\nglobal.set(\"Kuglelampe_Stor\", value)\nglobal.set(\"Kuglelampe_Lille\", value)\nglobal.set(\"Smartplug_Pavillon\", value)\nglobal.set(\"Gardenpole_L\", value)\nglobal.set(\"Gardenpole_R\", value)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":300,"wires":[["f5b032aa34e3b7ed"]]},{"id":"d66064cb9384ba5e","type":"change","z":"c4afb74715a93d10","name":"0 - Default","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"scene_recall\": 0\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":280,"wires":[["ddf41dd164b2bd82"]]},{"id":"b3cfe6b00ca6de26","type":"change","z":"c4afb74715a93d10","name":"OFF","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"state\":\"OFF\",\t \"transition\": 2\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":220,"wires":[["9e4c301c707afacc"]]},{"id":"a8843dd6a7a755de","type":"change","z":"c4afb74715a93d10","name":"1 - Nattelys","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"scene_recall\": 1\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":340,"wires":[["ddf41dd164b2bd82"]]},{"id":"6a1c0407c2352fe0","type":"cronplus","z":"c4afb74715a93d10","name":"Solstyring","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"fanOut","defaultLocation":"55 9","defaultLocationType":"fixed","outputs":5,"options":[{"name":"Sunrise","topic":"Sunrise","payloadType":"str","payload":"1","expressionType":"solar","expression":"20 45 21 * * *","location":"","offset":"0","solarType":"selected","solarEvents":"sunrise"},{"name":"Sunset start","topic":"Sunset","payloadType":"str","payload":"2","expressionType":"solar","expression":"0 45 21 * * *","location":"55.05302635383441 9.321497082710266","offset":"0","solarType":"selected","solarEvents":"sunsetStart"},{"name":"23:00","topic":"23:00","payloadType":"str","payload":"3","expressionType":"cron","expression":"0 0 23 * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":420,"y":300,"wires":[["b3cfe6b00ca6de26"],["d66064cb9384ba5e"],["a8843dd6a7a755de"],[],[]]},{"id":"72e16223cd2b30cf","type":"time-range-switch","z":"c4afb74715a93d10","name":"","lat":"55","lon":"9","startTime":"sunsetStart","endTime":"23:00","startOffset":0,"endOffset":"0","x":450,"y":220,"wires":[["d66064cb9384ba5e"],["a8843dd6a7a755de"]],"icon":"node-red-node-suncalc/sun.png"},{"id":"85efaa9e574f9c08","type":"time-range-switch","z":"c4afb74715a93d10","name":"","lat":"55","lon":"9","startTime":"sunrise","endTime":"sunsetStart","startOffset":0,"endOffset":"0","x":240,"y":220,"wires":[["b3cfe6b00ca6de26"],["72e16223cd2b30cf"]],"icon":"node-red-node-suncalc/sun.png"}]
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.