HA Webhook trigger into node red

I’m having trouble trying to figure out how to get an existing HA trigger into node red. I know there is a custom node available that creates a webhook in HA but thats not what I need.

I already have a webhook in HA that the Rachio integration adds. I want to see the json from that trigger in node red.

Can someone either point me to some docs or give me a pointer on how to achieve this?

You’ll want to make use of the events-all node and set it to listen to webhook events:

This does not grab webhook events. Any other ideas from anyone?

It’s not that I just tried this this late after the question its that I had another project that required this but still could not get it too work using events:all and webhook.

I assume that you can get the webhook to work in an HA automation? Can you grab and post the message from HA’s event bus in dev tools?

I leverage Node-red for automations.

What event are we looking for in dev tools? Webhook?

If so I wasn’t aware you could grab webhook in dev tools, I thought that was not possible.

The only event I know in dev tools would be the service-call the webhook makes.

Ok but the webhook is being processed by HA. To make sure that it’s coming into HA try setting up a simple automation.

This is a webhook that comes witht he Rachio integration. I know it’s working or else switches within HA would not get triggered. At this point I’m just going to create my own webhook and add to Rachio as I don’t think there is a way to intercept a webhook that is created by an integration into node-red. Unless an automation can do that.

Everything passes through the event bus. Go to dev tools, events tab. Where it says listen enter *. Start listening, trigger the hook, then stop listening. Depending on how busy your system is there maybe over a hundred messages in that second or two.

The message will be there, my guess is the event type is not webhook and that is why it’s not coming through.

Looking at the rachio intgration I don’t see anything about webhook events. It creates entities and registers services. What type of information are you trying to get that the integration doesn’t supply in the form of an entity or service?

It does create a webhook, Ican see the webhook within HA that it creates and also query Rachio’s API and see it.

I want the minutes that are set on a sprinklers runtime.

So bascially if a zone runs, the time that it will run is pushed out to the webhook. You can query the minutes it will run. So if a zone starts, start timer at the same time with the duration. This is mainly a zone that would not be started from within HA but a scheduled zone.

Use the webhook node

https://zachowj.github.io/node-red-contrib-home-assistant-websocket/node/webhook.html

I already leverage that node with no issues. I’m trying to capture webhook data into Node Red by a webhook that an integration creates.

From the integration it looks like these are the events that it creates, try one of those for the event type rather than webhook.

# Webhook callbacks
LISTEN_EVENT_TYPES = [
    "DEVICE_STATUS_EVENT",
    "ZONE_STATUS_EVENT",
    "RAIN_DELAY_EVENT",
    "RAIN_SENSOR_DETECTION_EVENT",
    "SCHEDULE_STATUS_EVENT",
]
WEBHOOK_CONST_ID = "homeassistant.rachio:"
WEBHOOK_PATH = URL_API + DOMAIN

I did try the * as event type and I see the state_changed event where the zone starts it just doesn’t contain any duration data.

I will look into the other event types and see what comes out.