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

I have now purchased a Homey Pro 2023. But the http request flow cards app no ​​longer works. How can I send a request to my homey and convert the json objects to a tag?

You can use the build in Logic: “Webhook event received” card

1 Like

and you can process the JSON with one of these ‘advanced flow’ cards

There’s also 2 webhook apps you could check out

Thanks for your quick response. The second app ‘Webhooks’ worked for me. In combination with logic cards I can convert the json object to a text tag.

1 Like