Closed mbierman closed 4 years ago
Well a line below there it is:
characteristic "On": expects a boolean "value"
It is required to look to the notification-server-repo for the actual POST request, as this information is shared between all my plugins: https://github.com/Supereg/homebridge-http-notification-server#implementation-in-the-http-application-sender
There it notes:
{
"characteristic": "On",
"value": true,
"password": "your-top-secret-password",
"accessory": "example-accessory", // optional, plugin defined
"service": "switch-service", // optional, plugin defined
}
Now you can deprive from the line characteristic "On": expects a boolean "value"
how the request should look like.
characteristic
must be "On" and the value
must be boolean (signaling On or Off state)
meaning a POST body of the following should work (assuming you don't have a password)
{
"characteristic": "On",
"value": true // or false if you wan't to turn it off
}
This is probably more of a bug with the documentation than the plugin. I'm looking to do a
POST
including some data from a stateless switch. The doc says,But then nothing is included. Can you provide an example of a POST command?