Connect with webhook json format and use in flow

Goodmorning!

Maybe you can maken my morning better haha! I was try to use a text from a incoming webhook post in my homey. The text is every time something else.

This is what I get from the webhook:

{
“_data”: {
“actionData”: {
“Timestamp”: “2022-05-11T12:17:53.4670000”,
“ControlID”: “b”,
“MsgInID”: “-100480081”,
“MsgOutID”: “100480081”
},
“remote”: true,
“notificationId”: “1766FC90-B82E-42FE-97FD-960373499FE5”,
“priority”: “10”
},
“_remoteNotificationCompleteCallbackCalled”: false,
“_isRemote”: true,
“_notificationId”: “1766FC90-B82E-42FE-97FD-960373499FE5”,
“_alert”: “ **TEST BR P1 teststraat 1 ** ”,
“_sound”: “pager.caf”,
“_category”: “reply”,
“_contentAvailable”: 1
}

I want to put the text after alert in a variable and use them for let Sonos speak.

This is a video how they made it in home assistant. I hope someone can help me with the webhook and json.

Thanks! Greeetz Bono

Hi Bono,

This might get you started. Read the replies on this topic:

The issue here is that the data gets pushed to Homey in a webhook.

With http request app Homey can listen for a POST webhook


Hint:

.
Then one could extract a value from the JSON body and save it to a BetterLogic variable.


Hint:

This looks very similar to what I am doing here: [How To] Setup two-way communication between Homey and Android smartphone

A bit more detail:

With the Tasker plugin AutoNotification it is possible to intercept any notification on your Android phone. Then you just sent the data of that notification via Tasker as a webhook to Homey.

The webhook from PreCom in iOs is working for me. Also the text over the Sonos speakers. I hope this is also working for you. The webhook URL in the PreCom app for me is then https://xxxxAthomCloudIdxxxx.connect.athom.com/api/app/com.internet/pager


Grt, Daan

2 Likes

Zou je deze eens als configuratie willen tonen. Hoe heb je de kaarten precies ingesteld? Ik heb het idee dat mijn variabelen het niet doen.

If you could please keep the conversation in English as much as possible, then more people will be able to participate and help you. If you would rather not or can’t communicate in English then please check out Non-English boards/categories:

[Nederlands (Dutch)]
(🇳🇱 Nederlands (Dutch) - Homey Community Forum)