I just play arround to find out how does that work, I am still leraning.
So I'm trying to get out how the variable works and you will find a manually date in my function node, which I change manually at any time.
As soon as I press the timestamp button I get this error message:
This is my function node:
this is the whole flow:
Here is the flow:
[{"id":"6c4e0b56.340e54","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"268bd29b.176e5e","type":"function","z":"6c4e0b56.340e54","name":"Setting Time","func":"var mydate = new Date("2019-11-01T22:45:00z");\n//msg.dates = "2019-11-01T23:20:00Z";\n//return mydate;\nmsg.dates[0] = mydate;\n\n\n\n","outputs":1,"noerr":0,"x":470,"y":220,"wires":[["dd1bf695.114358","e22db3ff.32b"]]},{"id":"8d9c2d86.b81d8","type":"inject","z":"6c4e0b56.340e54","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":260,"y":220,"wires":[["268bd29b.176e5e"]]},{"id":"dd1bf695.114358","type":"debug","z":"6c4e0b56.340e54","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":650,"y":360,"wires":},{"id":"e22db3ff.32b","type":"calendar-trigger","z":"6c4e0b56.340e54","name":"Time-Trigger","x":670,"y":220,"wires":[["8b7c16b.e7377e8","e331af53.ccd56"]]},{"id":"e331af53.ccd56","type":"cast-to-client","z":"6c4e0b56.340e54","name":"Radio","url":"xxx.mp3","contentType":"","message":"","language":"","ip":"192.168.178.31","port":"","volume":"25","x":890,"y":140,"wires":[]},{"id":"8b7c16b.e7377e8","type":"change","z":"6c4e0b56.340e54","name":"Switch on the light","rules":[{"t":"set","p":"payload","pt":"msg","to":"{"NewAIN":"XXXX","NewSwitchState":"ON"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":220,"wires":[["69319ef1.d043a"]]},{"id":"69319ef1.d043a","type":"fritzbox-in","z":"6c4e0b56.340e54","device":"eb9cf10f.83afb","name":"The lamp","service":"urn:dslforum-org:service:X_AVM-DE_Homeauto:1","action":"SetSwitch","arguments":"{"NewAIN":"value","NewSwitchState":"value"}","x":1240,"y":220,"wires":[]},{"id":"eb9cf10f.83afb","type":"fritzbox-config","z":"","name":"XXXX","host":"fritz.box","port":"49443","ssl":true}]