(Answered) Webhook - was: RESTful API call - is this possible (and is it the correct name)?

I have an IP CCTV camera system that has a website on port 1605. I have designed and built some PIR & microwave triggers for it. These are based on NodeMCUs and use WiFi to send a HTTP request when motion is detected. This request is something like:

This command then triggers the recording on the camera at the front door.

This works well, is quick and entirely contained within the network (OK, I know that it sends the password in clear text but this is a low-risk residential network and I’m prepared to accept the risk of the password being sniffed).

Is something similar possible with Home Assistant? Could I use a similar string to have Home Assistant recognise the movement and turn a light on?

And lastly, is this approach called a RESTful call? I’ve been searching for help but don’t really know if I’m using the correct term so am struggling to find anything helpful.



NOTE: I don’t have the answer for you, just buzzwords to research.

I only just got back into HA after a few years, but the logic of what you’re explaining is more of a webhook than an API. Essentially when ‘something happens {here}’, you want anyone subscribed (HA) to be alerted.

I would likely look into MQTT if I was personally implementing your solution, but if you already have the above URL that I -assume- basically triggers ‘something’ when motion is detected, a webhook might do you well. I do believe HA has webhook capability, or perhaps IFTTT can be the bridge.

Thank you dnorthrupva

Yes, you are correct, that URL request to the CCTV server causes it to start recording that camera for a pre-set time.

What I’m hoping for is to do the same on HA, using a webhook (thanks for that, I’ll research it further) because I cane easily add that as a second call to the motion detection NodeMCus so it calls first the one and then the other.

Off to do some reading - thanks again!


Fantastic - Webhook was the key - I used this page https://www.home-assistant.io/docs/automation/trigger/#webhook-trigger to get a test working and it works perfectly.

For anyone else wanting to do this, please be aware that it requires a POST request, not a GET request.

dnorthrupva, thanks again!