[{"id":"132a311fdb8354c4","type":"http request","z":"c3c9206917830458","name":"Switch sturen [1]","method":"POST","ret":"obj","paytoqs":"body","url":"https://app1pub.smappee.net/dev/v3/servicelocation/59792/actuator/1/on","tls":"","persist":false,"proxy":"","authType":"","senderr":true,"x":460,"y":340,"wires":[["0568392c58ab7aa4"]]},{"id":"0568392c58ab7aa4","type":"debug","z":"c3c9206917830458","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":770,"y":340,"wires":[]},{"id":"9cd6ac5162824796","type":"inject","z":"c3c9206917830458","name":"Switch ON","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"duration\": 300}","payloadType":"json","x":180,"y":340,"wires":[["132a311fdb8354c4"]]},{"id":"3cca0cbf31139cd5","type":"http request","z":"c3c9206917830458","name":"Switch sturen [0]","method":"POST","ret":"obj","paytoqs":"body","url":"https://app1pub.smappee.net/dev/v3/servicelocation/59792/actuator/1/off","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":460,"y":380,"wires":[["5d11ae9ab9d89b4f"]]},{"id":"5d11ae9ab9d89b4f","type":"debug","z":"c3c9206917830458","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":770,"y":380,"wires":[]},{"id":"7f723fe72df17ab1","type":"inject","z":"c3c9206917830458","name":"Switch OFF","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"duration\": 300}","payloadType":"json","x":170,"y":380,"wires":[["3cca0cbf31139cd5"]]},{"id":"72db6a0f32dffb78","type":"comment","z":"c3c9206917830458","name":"info switch on/off","info":"switch on/off, hiermee kunnen we de switch gaan aan- en uitsturen. We sturen zelf de duration mee, daarnaast moeten we nog de on/off gaan meesturen indien we het willen vanuit één blok doen","x":460,"y":300,"wires":[]},{"id":"f9316e19.7381e","type":"inject","z":"c3c9206917830458","name":"","props":[{"p":"token","v":"a733c03b-a21e-3d95-94f1-ecf782696280","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":130,"y":500,"wires":[["7387c36c.54496c"]]},{"id":"7387c36c.54496c","type":"change","z":"c3c9206917830458","name":"","rules":[{"t":"set","p":"headers.Authorization","pt":"msg","to":"\"Bearer \" & $base64encode($$.token)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":480,"wires":[["132a311fdb8354c4","3cca0cbf31139cd5"]]}]
Yes I tried this, but it didn't work