In the flow below i'm trying to get a timed alarm to trygger a yeelight. it works when triggered from the inject node, but the excact same json code does not work when triggered from the trigger node. i have also tried using a function node but that doesnt work either, have been working on it for quit a few hours now. Im sure there must be people who can explain this. i have been looking at the full debug and the outputs are different as well.
this is the output for the failing one :
8/20/2018, 8:14:01 PMnode: 43f4d1f7.07f8dmsg : Object
object
topic: ""
payload: object
on: true
bri: 171
duration: 5000
_msgid: "82e4f1d9.fe024"
this is the output when i inject the exact same code and it turns the light on.
8/20/2018, 8:14:25 PMnode: a830ea75.5221f8msg.payload : Object
object
state: object
on: true
bri: 171
colormode: "rgb"
hex: "#ab8a6f"
hue: 4929
sat: 89
name: ""
raw: object
name: ""
power: "on"
bright: "67"
rgb: "11242095"
ct: "4000"
hue: "359"
sat: "100"
color_mode: "1"
delayoff: "0"
flowing: "1"
flow_params: ""
music_on: "0"
here is the flow:
[{"id":"da41a101.b50c","type":"schedex","z":"4e43db21.ba2014","name":"","suspended":false,"lat":"-7.36","lon":"111","ontime":"","ontopic":"","onpayload":"1","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"2","offoffset":"","offrandomoffset":0,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":470,"y":1440,"wires":[["5daba965.9a26a8"]]},{"id":"a1a15b61.302d38","type":"debug","z":"4e43db21.ba2014","name":"","active":true,"console":"false","complete":"true","x":390,"y":1340,"wires":[]},{"id":"43f4d1f7.07f8d","type":"debug","z":"4e43db21.ba2014","name":"","active":true,"console":"false","complete":"true","x":790,"y":1340,"wires":[]},{"id":"784c4557.06acac","type":"ui_text_input","z":"4e43db21.ba2014","name":"","label":"alarm time","group":"443e46f0.105dd8","order":0,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"","x":170,"y":1440,"wires":[["a1a15b61.302d38","7411e8af.4e9548"]]},{"id":"7411e8af.4e9548","type":"function","z":"4e43db21.ba2014","name":"","func":"msg.payload = "ontime "+msg.payload\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1440,"wires":[["da41a101.b50c"]]},{"id":"1a63cf00.500a11","type":"inject","z":"4e43db21.ba2014","name":"","topic":"","payload":"{"on":true,"bri":171,"duration":5000}","payloadType":"json","repeat":"","crontab":"","once":false,"x":700,"y":1540,"wires":[["18ae08e9.92cfa7"]]},{"id":"5daba965.9a26a8","type":"trigger","z":"4e43db21.ba2014","op1":"{"on":true,"bri":171,"duration":5000}","op2":"{"on": false}","op1type":"json","op2type":"json","duration":"2","extend":false,"units":"min","reset":"","name":"","x":630,"y":1440,"wires":[["43f4d1f7.07f8d","18ae08e9.92cfa7"]]},{"id":"18ae08e9.92cfa7","type":"yeelight-compat-hue-out","z":"4e43db21.ba2014","name":"side room","server":"ff3a37f7.313238","x":840,"y":1440,"wires":[]},{"id":"443e46f0.105dd8","type":"ui_group","z":"","name":"Wake-up light","tab":"5be6df44.2a324","order":4,"disp":true,"width":"6"},{"id":"ff3a37f7.313238","type":"yeelight-compat-hue-config","z":"","hostname":"192.168.2.43","port":"55443","name":"Side room"},{"id":"5be6df44.2a324","type":"ui_tab","z":"","name":"Lights","icon":"dashboard"}]