Can I send commands to Hubitat from a custom web page?

I'm a software developer by profession. While I'm not a web designer, I do know how to build web pages and write code for them. This makes me wonder, is it possible to send commands to my Hubitat from a custom web page so I can access all my automations but fully customize my smart screen appearance?

Via the inbox Maker API you certainly can.

1 Like

I've not seen that mentioned before, I'm using node red as an endpoint right now so I'll have to read up on that.

Node-red uses maker API too though.... It just sends the HTTP command for you, instead if you having to craft it manually.

Besides the above, you might have an easier time just using Hubitat Dashboard and customizing the CSS to make it look however you want (see Smartly for an easy way, but you don't necessarily need that since advanced editing is exposed on any Dashboard)--or at least it sounds like that might be an option based on what you describe your needs to be.

Another alternative is writing an app, using OAuth to create a local and/or cloud endpoint, and having your app spit out whatever as HTML from that endpoint, while also providing a way for that page to "send" things back (first thing that comes it my mind is hitting another endpoint in Ajax-y fashion) ... or basically implementing your entirely own Dashboard-type app, as that is presumably more or less what it does. :slight_smile: (But MakerAPI as suggested above might be easier...or just Dashboard in the first place if that's more or less what you're going for.)

2 Likes

It's handy though if at some point I have to remove my pi and NR installation.

1 Like

You can use Rule Machine and set the trigger to be a cloud endpoint URL.

I'm not wanting to involve the cloud. This will be a locally hosted website. I've got several IIS servers available to me in my local network.

I see Maker API lets me access devices which is cool but can I also have it access rules? I don't see that ability anywhere.

Blockquote
you might have an easier time just using Hubitat Dashboard and customizing the CSS to make it look however you want

Yeah, I looked at that. The dashboard is fairly good and I can easily edit CSS. I've been doing that already. I just realized that even with CSS I am somewhat limited in what I can do. Still, with a bit more tweaking I might just get it to where I really want. I'll continue to play with that but I still want to explore this Maker API a bit.

Using Maker API and the eventsocket you can do absolutely anything you want with HE from a website/page running locally on your LAN. Here is an old post about my custom dashboard which I run on a Raspberry Pi (it's come on quite a long way since then, I have touch control over lights (color/temp/level), AC units, and dynamically display motion, temp/pressure/humidity, lux etc, can run rules directly from the UI, really the sky is the limit but it takes time to set it up for sure with html/CSS/javascript)...

This thread may also give you some ideas...

1 Like

if doesnt have to be local.. maker api also gives cloud links.. i use it from my garmin watch!

For sure. In my case it is local because I'm using the Pi to run an Apache webserver within my LAN. And I was also referring to the eventsocket.