I am trying to write a script in homebridge to integrate my Bond Bridge to Homekit. There is one already on GitHub but I received no support from the author, as such, I am trying to write a simple one for my own use.
The Bond Local API documentation has been very useful and it has an example of how to set the speed and is working great:
curl -H "BOND-Token: f074b61f628018fd" -i http://192.100.0.61/v2/devices/79135791/actions/SetSpeed -X PUT -d "{\"argument\": 3}"
But I run into issue trying to use the same format to TurnOn/TurnOff the fan. I used the following command in a attempt to TurnOff the fan:
curl -H "BOND-Token: f074b61f628018fd" -i http://192.100.0.61/v2/devices/79135791/actions/TurnOff -X PUT -d "{\"argument\": 1}"
but it gave me the following error:
HTTP/1.1 400 Bad Request
Content-Length: 45
Content-Type: application/json; charset=utf-8
{"_error_id":7,"_error_msg":“bad argument”}
What have I done wrong? Anyone has any clue?