zachowj / hass-node-red

Companion Component for node-red-contrib-home-assistant-websocket to help integrate Node-RED with Home Assistant Core
MIT License
460 stars 182 forks source link

Migrate Home Assistant webhook to NodeRed #83

Closed selmaohneh closed 2 years ago

selmaohneh commented 2 years ago

Version of the custom_component

v0.5.2

More of a question, but here we go:

I have an existing webhook that is used as a trigger for a native Home Assistant automation. It was automatically created when I created that automation via the Home Assistant automation UI.

Now, finally having the fancy NodeRed Companion installed, I want to migrate that webhook to NodeRed. But this is where I fail.

What do I need to enter inside ID of the webhook node? I tried the following:

image

and this one (complete URL and only the trailing ID):

image

The still existing automations shows me that the webhook is triggered every 60s, but a debug node after the webhook node stays empty. :-(

What am I doing wrong?

Thanks in advance!

zachowj commented 2 years ago

Remove the HA automation webhook and restart HA. Then the webhook in NR should start working. Webhooks have to have unique ids in both HA and NR.

selmaohneh commented 2 years ago

So if I recreate the webhook via the NodeRed node with the same name, the webhook URL will be the same again?

This is important since I do not have access to the client calling the webhook very often and I am not able to modify the URL on client side soon...

zachowj commented 2 years ago

Yes, if the webhook Id is the same in NR as it was in HA it will work.

selmaohneh commented 2 years ago

Mhm - I tried. Although I gave the webhook the same ID, the provided invocation URL differs from the previous one. 👎 So now I'm sitting here with a broken sensor until I am able to modify the URL on the remote client. :-/

Thanks anyway!