HTTP Api for integrations

Are there any plans, or thinking around having an HTTP API to the Hubitat hub for control of Hubitat devices and vice versa providing an HTTP GET/POST capability to either Rule Machine as an action or in some other manner?

Here’s my thinking around this. Hubitat is a good hub, but it doesn’t fill all of the gaps as of yet, and possibly never will (TBD). With that having an HTTP interface (or mqtt) that is native. To interface with other systems would be great.

Example: TP-Link plugs or other Wifi plug/device/etc

Yes there’s work on integrating with them. I worked a little on it myself. However there are already systems that interface. There’s python packages, there’s node.js there’s Node-Red there’s Home Assistant etc etc that already have support for these devices and all of those systems have MQTT and HTTP interfaces in and out to interact with the devices and with other control points.

I’ve learned that there is no ONE great software/hub to rule everything. Sometimes it takes multiples to utilize their strengths and overcome their weaknesses.

Back to topic. Any thoughts on an HTTP API for remote device interaction and HTTP GET/POST capability in Rule Machine?

I've requested that enhancment

Any updates? I think I've requested before as well, but no updates (that I remember).

Other than what is shown in the post, I haven’t heard anything new.

Instead of waiting I’ve installed webCoRE and started using the webcall feature in there.

I was thinking of that. But the whole point of things is to have as much local and stable. Currently WebCore is more hybrid of needing the web interface which last I checked was still cloud and then pistons ran locally, Do the pistons actually run locally all the time?

What I'm trying to do is rather simple and I can do it with everything else except SmartThings and Hubitat... I know Hubitat kinda models itself after SmartThings, but this is an area where Hubitat could be smarter.

The pistons do run locally and there has been changes to the code to allow you to run the webserver from a local device. I am running it on a raspberry pi 3.

Thanks for all of the info. I do appreciate it.

However it doesn't address the limitation of Hubitat. I don't want to setup yet another rPi to do something that should be native. If I wanted another Pi I would just run everything off of my Home Assistant Pi and be done with it. I'm trying to cut down on hubs/software running not increase things. This is also part of my evaluation, of hubs/software and what not. So there is a point to all of my asking for things, getting feedback, getting answers.

There's always a work around.

Not to split hairs, but isn't developing a custom app a work around for missing features within any hub?
I am not being argumentative, just trying to give a different perspective. I completely understand that your requirements aren't exactly like mine. I had a similar discussion about needing to create virtual switches as a way to track state for something that isn't actually a switch.

If you happen to find a hub that does everything, please let me know. I would love to have one hub as well. :slight_smile:

Yes, apps/plugins are great ways to extend features of a hub. Having some basic things for interaction/integration is want I'm really wanting to make it easier to extend with plugins and to interface with external systems. I don't find it argumentative. I think Webcore being added to Hubitat is awesome I loved it with SmartThings. I just want to see Hubitat become better than SmartThings.

I don't think I'll ever find ONE hub that does everything. The problem is with way too many devices and different interfaces....z-wave,zigbee,UPB,insteon,x10,wifi,bluetooth,etc,etc again one hub/software can't do everything. However Home Assistant is getting close to being a master of controller system very much like Homeseer.

What makes a great system is the plugins. Having plugin capability and easy access to control hubs and reach out and control other things.

1 Like

See Local API

Basically, there isn’t a local REST api yet (at least not an official one), but you can unofficially do quite a bit with the hub’s web server. I have a utility script here that uses it for command line event logging and limited device control.

I’ll take a look at that.

I’m mostly interested in Hubitat being able to SEND from actions either rule machine or otherwise. I have some zigbee sensors that work well with Hubitat and I was thinking of using hubitat as the controller for those devices and send their information to my “master” controller.

I’m currently doing this with my Vera Plus. The vera controls my zigbee devices and then with a scene sends the state to my master system to act upon. Latency is basically nothing as they’re on the same network.

Basically I’m trying to determine which system I want to use as my zigbee controller for my setup. Honestly it’s a lot of work for 5 devices 2 of which don’t work well with either system so now paired down to really 3 devices one a power plug I could just sell or something and replace the other 2 are motion sensors that I really really like and want to keep using.

I just looked at the repo. Does you hubitat script actually push code into the hubitat hub? Is this kind of like a github integration?

I does push to the hub, yes. It’s not exactly github integration, but I do use it to keep what’s in my GH repo up to date with what’s on the hub. I edit things on my laptop, save, and do a ./hubitat push. If the script detects that something on the hub has been edited since I last pulled, it’ll fail. Then I can do a ./hubitat pull to pull in the latest versions from the hub, merge in whatever I was doing, and push that back to the hub. Then I can commit the current code to the git repo on my laptop and push to github.

This is sooooo awesome! Thanks for sharing!

Ah. Hubitat can already send via HTTP, but I don’t believe there’s a generic “send an arbitrary value to an arbitrary address” RM command. You’d need to add a command to a custom device or app to do the send. Then you could call that command from RM.

@jeubanks - If this is something you want to do, you can take a look at these apps I've modified.

They are meant to be used with an external app called HAMBridge, but I think they can work with any url.