Hi,
I must be blind or missing some essentials....
In the flow example below I try to disable the node but I do just get 400 as respond.
Getting the node information using GET works. Also the PUT "seems to work" when {"enabled":true} but there is in fact no change to the node even though the response is 200
The PUT method with the same msg structure fails when set to {"enabled":false}
Any hints are highly appreciated. Maybe I have misunderstod how this API call is ment to work??
NR version 4.0.5
[{"id":"97df91b22e59a2cf","type":"inject","z":"a6054234d3c15b43","name":"GET","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":240,"y":160,"wires":[["3395c0d386fc8989"]]},{"id":"88feaf9fbec3d558","type":"http request","z":"a6054234d3c15b43","name":"","method":"use","ret":"txt","paytoqs":"query","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":610,"y":160,"wires":[["6ecb55d63b6020f7"]]},{"id":"6ecb55d63b6020f7","type":"debug","z":"a6054234d3c15b43","name":"debug 388","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":160,"wires":[]},{"id":"3395c0d386fc8989","type":"function","z":"a6054234d3c15b43","name":"function 18","func":"msg.url = \"http://localhost:1880/nodes/node-red-node-suncalc\"\nmsg.payload.method = \"GET\"\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":160,"wires":[["88feaf9fbec3d558"]]},{"id":"83b331dca386e091","type":"sunrise","z":"a6054234d3c15b43","name":"","lat":"65","lon":"18","start":"sunrise","end":"sunset","soff":0,"eoff":0,"sendAtStartup":false,"x":260,"y":90,"wires":[[],[]]},{"id":"c1e71a8f07c622ad","type":"inject","z":"a6054234d3c15b43","name":"PUT","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":240,"y":230,"wires":[["0e00a4612dfb5936"]]},{"id":"b0aff947cd22449a","type":"http request","z":"a6054234d3c15b43","name":"","method":"use","ret":"txt","paytoqs":"query","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":610,"y":230,"wires":[["41faaa04dc1e642e"]]},{"id":"41faaa04dc1e642e","type":"debug","z":"a6054234d3c15b43","name":"debug 389","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":230,"wires":[]},{"id":"0e00a4612dfb5936","type":"function","z":"a6054234d3c15b43","name":"function 19","func":"msg.url = \"http://localhost:1880/nodes/node-red-node-suncalc\"\nmsg.method = \"PUT\"\nmsg.headers = {\"Content-type\":\"application/json\"}\nmsg.payload = {\n \"enabled\": true\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":230,"wires":[["b0aff947cd22449a","cf6c06b0999c78d5"]]},{"id":"cf6c06b0999c78d5","type":"debug","z":"a6054234d3c15b43","name":"debug 390","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":610,"y":300,"wires":[]}]