Comments (3)
This is a superb idea. I wish there was a timer attached to the "temporary_on" message after which it will automatically send an off message and return to normal auto mode. This scenario is ideal for things like robot vacuum cleaners for which there can be a predefined schedule as well as a temporary_on with a timer to stop cleaning after a certain amount of time 👍
from node-red-contrib-light-scheduler.
Hello! I need exact the same function. Turn the lights off when I go to bed earlier as expected by the schedule (for example by override "off") but switch back to Auto on the next morning by the schedule.
Regards
from node-red-contrib-light-scheduler.
I am not sure if this helps, but it is something similar I came up with for my use case.
This functionally is possible to achieve using the default nodes. I included the aedes mqtt broker in the flow to ease illustration in the example.
Basically it allows manual overrides for the light with the ability to return to the schedules functionality by storing the Light schedulers output in an mqtt topic. It also has the functionality to "turn off" or ignore the schedules output while "LS OFF" is selected.
You could add an additional flow with a timer to toggle between "LS-OFF" and "AUTO" to set automatic temporary overrides.
Example Flow Below:
[{"id":"f6f2187d.f17ca8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"4fe0b93.de8e8c8","type":"aedes broker","z":"f6f2187d.f17ca8","name":"","mqtt_port":1883,"mqtt_ws_port":"","cert":"","key":"","certname":"","keyname":"","dburl":"","usetls":false,"x":170,"y":60,"wires":[[]]},{"id":"66be8603.8ea388","type":"mqtt out","z":"f6f2187d.f17ca8","name":"","topic":"control/state","qos":"","retain":"","broker":"1995de0d.2153ea","x":590,"y":320,"wires":[]},{"id":"5931ea4e.ca9a5c","type":"inject","z":"f6f2187d.f17ca8","name":"Light ON","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"ON","payloadType":"str","x":340,"y":200,"wires":[["66be8603.8ea388","285c67a0.07abf"]]},{"id":"4e3d1d6d.0e425c","type":"inject","z":"f6f2187d.f17ca8","name":"Light OFF","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"OFF","payloadType":"str","x":340,"y":240,"wires":[["66be8603.8ea388","285c67a0.07abf"]]},{"id":"2987e4de.29f724","type":"inject","z":"f6f2187d.f17ca8","name":" AUTO","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"AUTO","payloadType":"str","x":330,"y":280,"wires":[["66be8603.8ea388"]]},{"id":"7197fdb0.63694c","type":"mqtt out","z":"f6f2187d.f17ca8","name":"","topic":"LS_output","qos":"","retain":"","broker":"1995de0d.2153ea","x":1010,"y":240,"wires":[]},{"id":"1f29e368.1d6795","type":"inject","z":"f6f2187d.f17ca8","name":"ON","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"ON","payloadType":"str","x":830,"y":200,"wires":[["7197fdb0.63694c"]]},{"id":"14b8964a.56765a","type":"inject","z":"f6f2187d.f17ca8","name":"OFF","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"OFF","payloadType":"str","x":830,"y":240,"wires":[["7197fdb0.63694c"]]},{"id":"8d988fb8.6eaf58","type":"mqtt in","z":"f6f2187d.f17ca8","name":"","topic":"control/state","qos":"2","datatype":"auto","broker":"1995de0d.2153ea","x":350,"y":460,"wires":[["ded5567c.b390e8"]]},{"id":"15a758e.03e76a7","type":"mqtt in","z":"f6f2187d.f17ca8","name":"","topic":"LS_output","qos":"2","datatype":"auto","broker":"1995de0d.2153ea","x":340,"y":400,"wires":[["ded5567c.b390e8"]]},{"id":"ded5567c.b390e8","type":"join","z":"f6f2187d.f17ca8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":510,"y":460,"wires":[["ae7db69a.e7f45"]]},{"id":"b1226254.401f08","type":"debug","z":"f6f2187d.f17ca8","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":790,"y":460,"wires":[]},{"id":"ae7db69a.e7f45","type":"switch","z":"f6f2187d.f17ca8","name":"IS AUTO","property":"payload[\"control/state\"]","propertyType":"msg","rules":[{"t":"eq","v":"AUTO","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":640,"y":460,"wires":[["aa1124d1.cb8b3"]]},{"id":"aa1124d1.cb8b3","type":"change","z":"f6f2187d.f17ca8","name":"set payload to LS_output","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.LS_output","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":850,"y":500,"wires":[["c434ccb1.10648"]]},{"id":"5627d001.fb5fe","type":"debug","z":"f6f2187d.f17ca8","name":"LIGHT","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1060,"y":500,"wires":[]},{"id":"c5a00492.ded3a","type":"comment","z":"f6f2187d.f17ca8","name":"Put LS scheduler node here","info":"https://flows.nodered.org/node/node-red-contrib-light-scheduler","x":820,"y":160,"wires":[]},{"id":"f6f035b0.38c29","type":"comment","z":"f6f2187d.f17ca8","name":"Override controls","info":"","x":320,"y":140,"wires":[]},{"id":"1b3fcab2.a9f8ad","type":"inject","z":"f6f2187d.f17ca8","name":"LS OFF","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"LS OFF","payloadType":"str","x":330,"y":320,"wires":[["66be8603.8ea388"]]},{"id":"ea312a1d.317fe8","type":"comment","z":"f6f2187d.f17ca8","name":"AUTO","info":"The light will be controlled fully by the LS scheduler node.\n\nSetting to Auto will have the light resume the function of the schedule, if even if the schedule changed the lights state while the schedule output was overrided.","x":170,"y":280,"wires":[]},{"id":"61b21130.d57118","type":"comment","z":"f6f2187d.f17ca8","name":"LS OFF","info":"Turns off the schdule output.\n\nFor example, If you want a snooze button for a light scheduled to come on in the morning.\n\n","x":170,"y":320,"wires":[]},{"id":"eeadd225.6b5708","type":"comment","z":"f6f2187d.f17ca8","name":"Manually force light ON","info":"","x":120,"y":200,"wires":[]},{"id":"ead887f5.3391d8","type":"comment","z":"f6f2187d.f17ca8","name":"Manually force light OFF","info":"","x":130,"y":240,"wires":[]},{"id":"c434ccb1.10648","type":"mqtt out","z":"f6f2187d.f17ca8","name":"","topic":"light","qos":"","retain":"","broker":"1995de0d.2153ea","x":1070,"y":540,"wires":[]},{"id":"285c67a0.07abf","type":"mqtt out","z":"f6f2187d.f17ca8","name":"","topic":"light","qos":"","retain":"","broker":"1995de0d.2153ea","x":570,"y":200,"wires":[]},{"id":"243b0291.a4c376","type":"debug","z":"f6f2187d.f17ca8","name":"light status","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":530,"y":620,"wires":[]},{"id":"39cbe5e9.481fa2","type":"mqtt in","z":"f6f2187d.f17ca8","name":"","topic":"light","qos":"2","datatype":"auto","broker":"1995de0d.2153ea","x":330,"y":620,"wires":[["243b0291.a4c376"]]},{"id":"1995de0d.2153ea","type":"mqtt-broker","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
from node-red-contrib-light-scheduler.
Related Issues (20)
- Randomisation not working correctly (+ solution)
- Behaviour on inputs HOT 1
- Always Exporting OFF
- Document behaviour of Sun / dusk Dawn HOT 5
- Override Mode Intermittently Resets HOT 1
- Custom threshold for Dusk/Dawn HOT 3
- Lights turn on before schedule HOT 2
- Filter always off HOT 1
- Randomness not working
- Node-RED crashes in HA
- Add offset to scheduled times HOT 1
- extra iformation
- I don't have grahical editor HOT 1
- suggestion: make output ''minutely'' a chosen time
- Use sunrise/sundown together with random
- weekly schedule with just one definition
- JSON data output ..
- installed node red to have a look at your scheduler
- input via UI
- Add odd/even weeks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-contrib-light-scheduler.