Hi to all,
i need help for a very simple code but i don't find a solution.
i've a RGB matrix display and a motion sensor in a room. I need to stop a timestamp with a delay 1 sec if if is motion sensor is safe. Can any one help me?
[{"id":"6b2c6ddb.cdfec4","type":"text-to-matrix","z":"9254773b.8426f8","name":"Clock 255","xOffset":"7","yOffset":"6","rgb":"","font":"10x20.bdf","prefix":"","source":"msg.payload","matrix":"341032d2.642a4e","zLevel":"","x":3480,"y":3420,"wires":[]},{"id":"49e60b56.7e4654","type":"switch","z":"9254773b.8426f8","name":"luminositĂ ","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"06:45:00","vt":"str","v2":"21:00:00","v2t":"str"},{"t":"btwn","v":"21:00:01","vt":"str","v2":"23:59:59","v2t":"str"},{"t":"cont","v":"false","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":3,"x":3040,"y":3240,"wires":[["feabec13.cfad7"],["b2d8c21b.eeb5d"],[]]},{"id":"1da66f68.d493f1","type":"mqtt in","z":"9254773b.8426f8","name":"","topic":"home/status/122/value","qos":"2","datatype":"auto","broker":"af265a6b.1019a8","x":1780,"y":3420,"wires":[["cafa33a0.2342e"]]},{"id":"cafa33a0.2342e","type":"hc2-device","z":"9254773b.8426f8","name":"Motion (Cucina)","deviceID":"122","server":"f29d11a7.dd269","x":1980,"y":3420,"wires":[["b97a246f.5114b8"]]},{"id":"30f35f8d.34f78","type":"switch","z":"9254773b.8426f8","name":"","property":"payload.motion","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"jsonata"},{"t":"eq","v":"false","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":2,"x":2370,"y":3420,"wires":[["1279e607.349f3a"],["b2d8c21b.eeb5d"]]},{"id":"b97a246f.5114b8","type":"change","z":"9254773b.8426f8","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.motion","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2170,"y":3420,"wires":[["30f35f8d.34f78"]]},{"id":"1279e607.349f3a","type":"change","z":"9254773b.8426f8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":2640,"y":3240,"wires":[["8655e4.6637ea2","4f22dbc8.f37564"]]},{"id":"4f22dbc8.f37564","type":"delay","z":"9254773b.8426f8","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":2640,"y":3300,"wires":[["1279e607.349f3a"]]},{"id":"3023fb77.92ab74","type":"debug","z":"9254773b.8426f8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":3490,"y":3240,"wires":[]},{"id":"8655e4.6637ea2","type":"moment","z":"9254773b.8426f8","name":"HH:mm:ss","topic":"","input":"data","inputType":"msg","inTz":"Europe/Rome","adjAmount":0,"adjType":"days","adjDir":"add","format":"HH:mm:ss","locale":"it_IT","output":"","outputType":"msg","outTz":"Europe/Rome","x":2850,"y":3240,"wires":[["49e60b56.7e4654"]]},{"id":"feabec13.cfad7","type":"function","z":"9254773b.8426f8","name":"on red","func":"var out = {\"data\":msg.payload,\n \"rgb\":\"255,255,255\"\n}\nnode.send({\"payload\":out})","outputs":1,"noerr":0,"x":3250,"y":3240,"wires":[["3023fb77.92ab74","6b2c6ddb.cdfec4"]]},{"id":"b2d8c21b.eeb5d","type":"function","z":"9254773b.8426f8","name":"OFF","func":"var out = {\"data\":msg.payload,\n \"rgb\":\"0,0,0\"\n}\nnode.send({\"payload\":out})","outputs":1,"noerr":0,"x":3250,"y":3420,"wires":[["3023fb77.92ab74","6b2c6ddb.cdfec4"]]},{"id":"341032d2.642a4e","type":"led-matrix","z":0,"height":"32","width":"64","chained":"2","parallel":"1","brightness":"100","refreshDelay":"500","mapping":"adafruit-hat","rgbSequence":"RGB","autoRefresh":true,"cmdArgs":""},{"id":"af265a6b.1019a8","type":"mqtt-broker","z":"","name":"Raspi3","broker":"192.168.0.75","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"f29d11a7.dd269","type":"hc2-server-config","z":"","name":"HC2","ipaddress":"192.168.0.163","output_topic":"home/status","globals_topic":""}]