Homey SHS - Trigger WebHooks locally?

Did anybody already figure out how to trigger WebHooks locally (not using the cloud) when self-hosting Homey? I have Homey up and running in Podman and I pretty much fully migrated all my 60 devices and 50 Flows, that is the one and only issue I have left.

I tried what worked before:

http://IP/webhook?event=TAG

I also checked the support article:

https://support.homey.app/hc/en-us/articles/18292876827548-Using-Webhooks-with-Homey

Any hints would really welcome!

Use the correct port, as mentioned in the fine documentation.

3 Likes

Thank you so much, that was exactly the hint I needed :heart_eyes: . Since I have everything on the default ports, this works:

http://IP:4859/webhook?event=TAG
1 Like

Thanks @robertklep
@chixxi1 Me too… I got stuck reading:

Using Webhooks with Homey – Homey Support

Homey Pro (Early 2023) & Homey Pro mini

http://ip-of-homey/webhook?event=my_event&tag=my_tag  

Homey Pro (2016 — 2019)

http://ip-of-homey/api/manager/logic/webhook/<my_event>?tag=my_tag
1 Like

Just note that the GET webhook cannot pass #, end of lines and icons like :fire: in the text.

MQTT would do it, but I do not have the memory to install it :slight_smile:

Solved with a Gemini HomeyScript encodeURL as per below (there is no need to decode on the receiving side).

// EncodeURL
// Script Version: 2.0
// Purpose: URL Encode text and return as a LOCAL tag

// 1. Get the argument (safely handle empty input)
let inputString = args[0];
if (inputString == null) {
    inputString = "";
}

// 2. Encode the string (newlines -> %0A, spaces -> %20)
let encodedString = encodeURIComponent(inputString);

// 3. RETURN the string
// This places the value into the local "Result" tag of the flow card.
// We explicitly wrap it in String() to ensure the type is correct.
return String(encodedString);