Using a webhook to trigger automation via Maker API?

I'm considering getting into the Hubitat world but want to double check something first. Would really appreciate if someone could tell me if my understanding of the Maker API is correct or not.

My idea is to have an ESP scanning for a known iBeacon. Then when the ESP sees the target beacon come into range, the ESP will fire a specific URL that the Hubitat Maker API will receive and then trigger the automation I want. I am not sure if this is possible with Hubitat though.

According to the instructions on this link, it seems like this should be possible: Maker API - Hubitat Documentation

From what I understand, after I set up the Maker app in the hub according to the instructions on the previous link, I would then authorize one of my connected devices as they describe. Then I would follow the pattern (http:// [hub ip address] /apps/api/[app id]/devices/[device id]/[command]/?access_token=[access_token]) to create a device command URL.

So, if the ESP sent this command URL (http get), would that trigger the automation that is embedded in the command URL?

Note: I don't want to use IFTTT if I can avoid it. Also don't want to use rPi or HomeAssistant. :smile:

Thanks in advance for your help!

You should be able to do that, but if your automation is more complicated than just sending a specific, predetermined command to a specific device, you have other options. One is a Rule Machine rule with an "HTTP Endpoint" trigger. You can then just do a GET on that URL from your device, and the rule can do the work of performing your actual automation. If you get really into it, a custom app can also do this.

But yes, this built-in option also seems like it should be fine as long as that's what you want to do. :smiley: If not, definitely RM could--or anything someone builds.

2 Likes

Yes it is. I run some VB code on a PC which invokes a http request to HE using maker API to turn on or off a virtual switch (which can then be used to trigger automations).

1 Like

Perfect! Thanks for the super fast response.

At this time, all I want are simple on/off automations, but thanks for bringing up the Rule Machine thing, which I have not read about yet. Consider it a seed planted in my head for future reference.