Thanx, I really like the idea of a webhook.
I completed the HA side of this webhook, which was actually very simple. The webhook has been tested with sw following cURL string and then works properly.
curl -X POST -H 'Content-Type: application/json' http://homeassistant:8123/api/webhook/<webhook_ID>
Unfortunately from the Fibaro side it is quite a challenge for me.
I was able to create a Lua scene within Fibaro that reacts to the button. The Declarations part responds nicely to impressions of The Button. That looks like this:
{
conditions = { {
id = 150,
isTrigger = true,
operator="==",
property = "centralSceneEvent",
type = "device",
value = {
keyAttribute = "Pressed",
keyId = 1
}
} },
operator = "all"
}
If I test that with the action send e-mail, it works perfectly:
hub.alert('email', {[1] = 29, }, 'The Button has been pushed', false, '')
This code was provided by the editor of HCL3.
I did find something that can do an HTTP POST:
api.post(http://homeassistant:8123/api/webhook/<webhook_ID>, ??????)`
And then I got stuck. And so far searching in forums etc. has yielded little to fill in the missing question marks.
Do you have any suggestions on how I can proceed with this?