I'm learning how to write batch files which use curl to execute InControl commands. I was able to get the activatescene example to work in a .bat with curl. I'm trying to use the SetDeviceState command and it's not working. I'm seeing "Endpoint not found".
curl -X PUT -H "Content-Type:application/json;charset=utf-8" -d "{""password"":""12345"",""nodeId"":""c142780a-5e60-4a13-8b93-075a63314a22"",""powered"":""True""}" http://localhost:1178/zwave/setDeviceStateByGuid
If I try the command using the webpage-based command, everything works:
http://localhost:1178/zwave//setDeviceState?nodeId=c142780a-5e60-4a13-8b93-075a63314a22&powered=true&password=12345
Any ideas?
In this case you'd want to use a GET instead of PUT.
Something like this:
curl -X GET -H "Content-Type:application/json;charset=utf-8" http://localhost:1178/zwave//setDeviceState?nodeId=c142780a-5e60-4a13-8b93-075a63314a22&powered=true&password=12345
Also, for what it's worth, one of our users AdamCaz has a cmd line utility he wrote to handle all this stuff automatically. He saw a post within the last 24 hours with a link to download it.