Closed mbierman closed 1 year ago
o.k. I figured out the issue. The documentation should be enhanced with better examples IMHO since I am not the only one who has had issues with this. For the sake of others in the future (including myself if I forget) here's a proper example:
{
"accessory": "HTTP-SWITCH",
"name": "NAS temp warning",
"switchType": "stateless",
"serialNumber": "SW002",
"timeout": 1000,
"debug": true,
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"onUrl": {
"url": "https://maker.ifttt.com/trigger/homealert/with/key/***",
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"body": {
"value1": "🔥 NAS is running hot 🔥",
"value2": "temperature is over 95",
"value3": "https://sflanders.net/wp-content/uploads/2015/11/synology-150x150.png"
}
}
},
I added your example to https://github.com/Supereg/homebridge-http-switch/wiki/Community-supplied-examples
Is your feature request related to a problem? Please describe. I'm trying to post a JSON payload and it isn't working. This might not be a bug,just a documentation issue (no example provided).
What am I doing wrong?
I'm also confused by this:
Is it meant to say?
Describe the solution you'd like
Additional context Add any other context about the feature request here.