Bond command via http/curl does not work

I got a new Artika Aiden 24 Fandelier with costco and manually added the fan using the commands. However, when trying to rename a few commands I am unable to do so. For example, this if I curl /devices/ , I get a response. However, when I try to list commands, I get 401 unauthorized. This is a fan connected to the Bond Bridge.

Any guidance on how I can make it work ?

curl -H “BOND-Token: xxxxxxxx” -i http://xxx.xxx.xxx.xxx/v2/devices/1433344c4327ef7d

HTTP/1.1 200 OKConnection: close
BOND-Flags: 4Content-Length: 381
Content-Type: application/json; charset=utf-8

{“name”:“Study Fandelier”,“type”:“CF”,“location”:“Office”,“tech”:240,“actions”:[“DecreaseSpeed”,“IncreaseSpeed”,“SetDirection”,“SetSpeed”,“Stop”,“ToggleDirection”,“ToggleLight”,“TogglePower”,“TurnLightOff”,“TurnLightOn”,“TurnOff”,“TurnOn”],““:“185b7070”,”__“:“d83c8ec7”,“commands”:{””:“6ed23cb5”},“state”:{““:“a3152d6c”},“properties”:{””:“69bfa35c”},“skeds”:{“_”:“00000000”}}
kdvlr@linsrv:~/venv$ curl -H “BOND-Token: 7de7b752d435bc3c” -i http://xxx.xxx.xxx.xxx/v2/devices/1433344c4327ef7d/commandsHTTP/1.1 401 UnauthorizedConnection: close 
BOND-Flags: 4
Content-Length: 0

One possibility is those quote characters. Use ascii double quote rather than the unicode directional double quotes.

" is correct, is incorrect.

2 Likes