I have a support ticket it already. But perhaps someone may have the knowledge to get this issue resolved for me.
I have the device connected to wifi network: IP - 192.168.3.181
On windows machine attempting to post curl: Obtained token via curl -vvv -X PUT 192.168.3.1:16021/api/v1/
Auth_token: s49qXATy83ERn7O9xedvk57R3W4CQ3o1
ON command prompt i'm executing: curl -vvv -X PUT 192.168.3.181:16021/api/v1/s49qXATy83ERn7O9xedvk57R3W4CQ3o1/state -d '{"on":{"value":true}}'
My response is:
- upload completely sent off: 19 bytes
< HTTP/1.1 422 Unprocessable Entity
< Content-Length: 0
<
- Connection #0 to host 192.168.3.181 left intact
Same results on other machines in the same network. I've tried variations of the curl post with the auth_token and they are all giving me the 422 Unprocessable Entity. If I'm able to make the request to get the key, why is it not able to process the request to turn the device on/off in this method.
To clarify.
The Nano device ip is the 3.181
I've obtained the auth_token as described above
the post to execute a state change is not working, it returns the 422 error.
Computer running post is on same network
I've gotten this to work now with the following:
curl -vvv -X PUT http://192.168.3.181:16021/api/v1/XrcyA9jyy6keydvHr29gvStVBXTeIJJa/state -H "Content-Type: application/json" -d "{"on":{"value":true}}"
curl -vvv -X PUT http://192.168.3.181:16021/api/v1/XrcyA9jyy6keydvHr29gvStVBXTeIJJa/state -H "Content-Type: application/json" -d "{"on":{"value":false}}"