I'm a node red beginner. I'm trying to solve what I think is a simple problem.
An illumination sensor (MQTT) supplies the brightness as a value between 0 and 15000.
The goal is a NODE with an output (true/false) which outputs true from a certain brightness value. switches back to false when the brightness value falls below.
my attempt is:
[{"id":"e0c6a123.6cfe58","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"710896e58f65c071","type":"mqtt in","z":"e0c6a123.6cfe58","name":"bre_snsbx170_lux","topic":"/BRE-SnsBx170/STAT/Lux","qos":"1","datatype":"auto-detect","broker":"e314300a.e8a55","nl":false,"rap":true,"rh":0,"inputs":0,"x":130,"y":100,"wires":[["aafe50798cd70349"]]},{"id":"18e506ec766aa592","type":"debug","z":"e0c6a123.6cfe58","name":"IstHell","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":930,"y":100,"wires":[]},{"id":"435b8e162aa6632e","type":"inject","z":"e0c6a123.6cfe58","name":"Daylight-1k","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1000","payloadType":"num","x":160,"y":200,"wires":[["aafe50798cd70349"]]},{"id":"ae85673a31a3fa68","type":"debug","z":"e0c6a123.6cfe58","name":"debug 18","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":680,"y":220,"wires":[]},{"id":"0dd661bc63f89f66","type":"inject","z":"e0c6a123.6cfe58","name":"Daylight-2k","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2000","payloadType":"num","x":131.48333740234375,"y":158.48333740234375,"wires":[["aafe50798cd70349"]]},{"id":"aafe50798cd70349","type":"switch","z":"e0c6a123.6cfe58","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"1500","vt":"str"},{"t":"lte","v":"1500","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":430,"y":120,"wires":[["7b0d2d7dc631bb54","ae85673a31a3fa68"],["7878c77ba3104cf6","ae85673a31a3fa68"]]},{"id":"7b0d2d7dc631bb54","type":"change","z":"e0c6a123.6cfe58","name":"Gr1500","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"topic","pt":"msg","to":"Gr1500","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":100,"wires":[["18e506ec766aa592"]]},{"id":"7878c77ba3104cf6","type":"change","z":"e0c6a123.6cfe58","name":"Kl1500","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"},{"t":"set","p":"topic","pt":"msg","to":"Kl1500","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":140,"wires":[["a7164ec93382d121"]]},{"id":"a7164ec93382d121","type":"debug","z":"e0c6a123.6cfe58","name":"IstDunkel","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1000,"y":140,"wires":[]},{"id":"e314300a.e8a55","type":"mqtt-broker","name":"Server-Mqtt","broker":"192.168.10.136","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"3","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]
ni node red it looks like this:
the problem is the Change-Node never go to false. the true at the output is only ever updated.
what am I doing wrong?