Mit Schalter Bewegungsmelder übersteuern

  • Hallo zusammen

    Ich bin recht frisch bei NodeRed angekommen, von daher hab erbarmen mit mir :*

    Ich hab mir mal zum Anfang eine einfache Schaltung für das Licht vorgenommen. Diese funktioniert auch soweit.

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    Denke ist mehr oder weniger selbsterklärend.
    Nun gibt es auch die Situation das ich mal in der Garage was am machen bin. Und wenn ich dann grad ausserhalb des sensors bin geht das licht logischerweise nach 2min wieder aus. Nun würde ich es gerne so machen, das auch wenn ich in die Garage rein gehe und den Knopf drücke (Taster mit Shelly bei der Lampe), auch wenn das licht schon an ist, da der Sensor schon reagiert wenn die Tür am aufgehen ist, und dann das Licht fix für 4 Stunden anbleibt (es sei den man drückt den Taster zum abschalten).

  • Ich werfe Dir mal aus Zeitgründen etwas vor die Füße und hoffe, dass du es dir umschreiben kannst. So habe ich es bei mir mit einem Homematic-IP BWM realisiert.

    Den Code unten kannst du über die Import-Fuktion von Node Red importieren.


    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.


    Code
    [{"id":"54dd54eacc6bf909","type":"mqtt in","z":"63a26414e7cd7d3d","name":"OG Flurlicht on/off","topic":"shellies/OG Flur Deckenleuchte/light/0","qos":"2","datatype":"auto","broker":"bf311140.13d2b8","nl":false,"rap":false,"inputs":0,"x":130,"y":1720,"wires":[["26230adc3f468646"]]},{"id":"e51c22bbb21910e0","type":"comment","z":"63a26414e7cd7d3d","name":"OG Flurlicht durch Präsenzm.","info":"","x":160,"y":1840,"wires":[]},{"id":"c753865d70bb210a","type":"InterruptFlowUltimate","z":"63a26414e7cd7d3d","name":"Interrupt Flow","triggertopic":"Taster","x":400,"y":1900,"wires":[["2b7b44d30c32fe43"]]},{"id":"5476ad33b57553d7","type":"mqtt in","z":"63a26414e7cd7d3d","name":"Taster OG Flurlicht","topic":"shellies/OG Flur Deckenleuchte/input/0","qos":"2","datatype":"auto","broker":"bf311140.13d2b8","nl":false,"rap":false,"inputs":0,"x":130,"y":1780,"wires":[["a5e3ceefe7377b3a"]]},{"id":"5e0ee4e6b460dbda","type":"change","z":"63a26414e7cd7d3d","name":"topic:Taster \"true/false\"","rules":[{"t":"set","p":"topic","pt":"msg","to":"Taster","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"false","tot":"bool"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":1740,"wires":[["c753865d70bb210a"]]},{"id":"a5e3ceefe7377b3a","type":"rbe","z":"63a26414e7cd7d3d","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":330,"y":1780,"wires":[["3c631dbf2f4f65cc"]]},{"id":"3586fcb47049bd18","type":"InterruptFlowUltimate","z":"63a26414e7cd7d3d","name":"Interrupt Flow","triggertopic":"OG Flurlicht","payloadPropName":"payload","x":660,"y":1780,"wires":[["5e0ee4e6b460dbda"]]},{"id":"3c631dbf2f4f65cc","type":"switch","z":"63a26414e7cd7d3d","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":450,"y":1780,"wires":[["3586fcb47049bd18"]]},{"id":"082b33af65389fd9","type":"change","z":"63a26414e7cd7d3d","name":"topic: OG Flurlicht \"off=true/on=false\"","rules":[{"t":"set","p":"topic","pt":"msg","to":"OG Flurlicht","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"num","to":"false","tot":"bool"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"num","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":1740,"wires":[["3586fcb47049bd18"]]},{"id":"26230adc3f468646","type":"rbe","z":"63a26414e7cd7d3d","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":330,"y":1720,"wires":[["082b33af65389fd9","93857f46aee50186"]]},{"id":"93857f46aee50186","type":"switch","z":"63a26414e7cd7d3d","name":"lässt nur Zustand \"off\" durch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":580,"y":1700,"wires":[["5e0ee4e6b460dbda"]]},{"id":"9441029bd7c93340","type":"switch","z":"63a26414e7cd7d3d","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":830,"y":1900,"wires":[["23185689e99f7448"],["9e63eedea5a1dd60"]]},{"id":"23185689e99f7448","type":"http request","z":"63a26414e7cd7d3d","name":"OG Flurlicht 15% ein; 1/2h","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://10.153.20.100/light/0?turn=on&Brightness=15&Timer=1800","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1020,"y":1880,"wires":[[]]},{"id":"9e63eedea5a1dd60","type":"http request","z":"63a26414e7cd7d3d","name":"OG Flurlicht aus","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://10.153.20.100/light/0?turn=off","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":980,"y":1920,"wires":[[]]},{"id":"6da1286a203f1930","type":"comment","z":"63a26414e7cd7d3d","name":"OG Flurbeleuchtung durch Präsenzmelder; Unterbrechung durch Licht \"ein\" per Taster","info":"","x":340,"y":1620,"wires":[]},{"id":"2b7b44d30c32fe43","type":"within-time-switch","z":"63a26414e7cd7d3d","name":"","nameInt":"","positionConfig":"6bcbc1fc.e76478","startTime":"sunsetStart","startTimeType":"pdsTime","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunriseEnd","endTimeType":"pdsTime","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":"","timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"","withinTimeValueType":"msgInput","outOfTimeValue":"","outOfTimeValueType":"msgInput","tsCompare":"0","x":640,"y":1900,"wires":[["9441029bd7c93340"],[]]},{"id":"1164d4ab4891c31f","type":"comment","z":"63a26414e7cd7d3d","name":"Interrupt blockiert Taster wenn Licht an, damit nicht beim Ausschalten auf true gesetzt wird","info":"","x":350,"y":1660,"wires":[]},{"id":"abb91f27cd8766c3","type":"link in","z":"63a26414e7cd7d3d","name":"OG Flur Bewegung","links":["15a4f361acd5f6ea"],"x":130,"y":1900,"wires":[["c753865d70bb210a"]],"l":true},{"id":"bf311140.13d2b8","type":"mqtt-broker","name":"MQTT Node-RED","broker":"10.153.1.3","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"6bcbc1fc.e76478","type":"position-config","name":"Uppen Drohm 9","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12","contextStore":""}]
  • Sorry für die Späte Antwort!

    Ich habs versucht aber so nicht hin bekommen. Konnte es aber anders lösen da die Beleuchtung über einen 2PM Shelly habe und wenn ich in der Garage was am machen bin, eh immer das "Licht 2" an habe, könnte ich es dadrüber abfangen. Funktioniert bis jetzt einwandfrei

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.