Hello,
i am new on Node-red. I managed to make a simple switch on, light on.
Also i managed to trigger pir to switch on the light.
mein main problem is now:
The light needs only be triggerd on time after it is dark (sunset or before sunrise). AND it should not turn off when the switch is ON.
so the switch sould have "automatic" or "ON"
need some Help with the mechanic.
here is the flow:
[{"id":"ad478da0.376af","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"b468130f.791ea","type":"debug","z":"ad478da0.376af","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":130,"y":60,"wires":[]},{"id":"706880d3.1dbd7","type":"mqtt in","z":"ad478da0.376af","name":"PIR Sensor Online?","topic":"tele/tasmota_7C7AA1/LWT","qos":"2","datatype":"auto","broker":"ceba0b4b.cd64b8","nl":false,"rap":true,"rh":0,"x":130,"y":140,"wires":[["b468130f.791ea","5943044c.1f6b7c"]]},{"id":"c326c00e.893cd","type":"mqtt in","z":"ad478da0.376af","name":"Drausen Licht Schalter Status","topic":"stat/tasmota_107217/SWITCH1","qos":"2","datatype":"auto","broker":"ceba0b4b.cd64b8","nl":false,"rap":true,"rh":0,"x":160,"y":380,"wires":[["ed4fb0bc.16043"]]},{"id":"ed4fb0bc.16043","type":"mqtt out","z":"ad478da0.376af","name":"DrauĂźen Licht Power","topic":"cmnd/tasmota_107217/Power1","qos":"","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ceba0b4b.cd64b8","x":440,"y":380,"wires":[]},{"id":"52da26fa.13a858","type":"mqtt in","z":"ad478da0.376af","name":"","topic":"tele/tasmota_7C7AA1/SENSOR","qos":"2","datatype":"auto","broker":"ceba0b4b.cd64b8","nl":false,"rap":true,"rh":0,"x":170,"y":200,"wires":[["228c033b.11093c","d9270bbc.559d38"]]},{"id":"228c033b.11093c","type":"debug","z":"ad478da0.376af","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":430,"y":280,"wires":[]},{"id":"5e736e5c.ec74","type":"mqtt in","z":"ad478da0.376af","name":"","topic":"tele/tasmota_7C7AA1/STATE","qos":"2","datatype":"auto","broker":"ceba0b4b.cd64b8","nl":false,"rap":true,"rh":0,"x":160,"y":260,"wires":[["228c033b.11093c"]]},{"id":"5943044c.1f6b7c","type":"switch","z":"ad478da0.376af","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Online","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":80,"wires":[["d9270bbc.559d38"]]},{"id":"d9270bbc.559d38","type":"trigger","z":"ad478da0.376af","name":"","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"13","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":570,"y":140,"wires":[["1516a72b.d0bb09"]]},{"id":"1516a72b.d0bb09","type":"mqtt out","z":"ad478da0.376af","name":"","topic":"cmnd/tasmota_663943/POWER","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"ceba0b4b.cd64b8","x":690,"y":220,"wires":[]},{"id":"ceba0b4b.cd64b8","type":"mqtt-broker","name":"local broker","broker":"localhost","port":"1883","clientid":"","usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]