Custom Component: Hubitat

Hubitat Integration

What

This integration lets Home Assistant control devices, and use sensors, exposed through Hubitat’s Maker API.

Why

Over the holidays I got tired of Hubitat’s frequent slow response times (I had quite a few rules and apps running) and decided to move a bunch of functionality over to Home Assistant. However, I didn’t want to move everything – Hubitat is pretty great at managing Zigbee and Z-Wave devices – so I wrote a Home Assistant integration that uses Hubitat’s Maker API. (I know there’s ongoing work to use MQTT for a Hubitat integration, but I wanted something that didn’t need another external service.)

Getting Started

The easiest way to install the integration is via HACS – just add jason0x43/hacs-hubitat as a custom repository and install the Hubitat integration. It uses a config flow, so it can be setup through the Integrations UI.

For more information, see the README.

Problems

This integration has only been tested in my local environment, so don’t be too surprised if something doesn’t work. I’m happy to try to fix things if you let me know. Also, both the integration and associated API library are on GitHub, and I’m always open to PRs if anyone gets ambitious. :slight_smile:

31 Likes

Answer to my prayers friend…
Thank you so much I’ll be taking a look at this later.

1 Like

When I was on Hubitat, I made HEAVY use of the Maker API and websockets and I found that they were both also affected when the hub experienced slow-downs. Are you seeing that as well with this integration?

2 Likes

I stripped almost everything out of my Hubitat setup. It’s currently running one RM4 rule, the Sonos integration (for the rule), the Nest integration, and the Maker API. With just that, it’s been very snappy for the last few weeks. Before, when I had 30+ rules and a few more apps, it was becoming annoying slow every few days.

3 Likes

I’ll be removing everything except Maker API hopefully.
With what I’m currently running (which isn’t much at all) I have to reboot once every 4 days.

1 Like

I was in the same boat. It seemed like I’d have to reboot at least once a week, and rule responsiveness was often sluggish. Like, I had a rule to turn on the garage lights when I opened the door. Sometimes it would be immediate, but a significant fraction of the time there would be a multi-second delay. Since I moved most of my rule logic to HA running on a Mac mini, it’s almost always been immediate.

I’d be down to just devices, but I haven’t setup the text-to-speech voice yet in HA (my wife likes the default one Hubitat uses), and the Nest integration is how I’m remote controlling my Nest (I installed the integration while their Works With Nest API was still enabled).

1 Like

My experience exactly. It’ll be interesting to see if this goes away with your integration.

My HA TTS actually stopped working. Weird findings, I lost my HA VM but made a new one, TTS worked, restored my snapshot and TTS stopped working. Something’s obviously broken with my config/data.

Node-Red takes care of my TTS now…

When Homebridge switched from the App to Maker API my hub lost its’ slow downs.
Just one observation…

2 Likes

Yeah, I was rebooting every couple of days and finally said enough was enough. I went full in on HA and turned off my HE hub about 2 months ago. I still lurk on the forums, but for the most part, I’m done with HE until they fix the firmware issues. I love the Zigbee/ZWave radios in the HE, but not being able to control ALL of my devices from a single platform due to the firmware constantly getting bogged down is the main reason I won’t go back any time soon.

For my TTS, to simulate the voice response on Sonos, I’m using the Sonos Http API (https://github.com/jishi/node-sonos-http-api) and using the AWS Polly voices all through NodeRed. The voices are still free for the most part and that’s what HE is using on their back end. (Gotta keep the WAF HIGH!!! LOL)

That was through Dan’s integration, right?

I’ve really tried recently but can not get Z-Wave to work with HA for the life of me. I’ve tried multiple nights, multiple approaches.

Yes. Simple and awesome stuff.

What controller are you using on HA now? I have the Nortek stick and my Z-Wave devices perform fairly well. Granted, I only have 7 of them, but they work well. LOL

In case anyone is wondering, I was corerootedxb over there.

I bought the Aeotec Z-Stick.

Stephack is trying to help me and he’s using the Nortek stick as well. I wonder if that’s my issue…

1 Like

Most likely. I’ve heard both good and bad things about the Aeotek stick. Personally, I like the Nortek because it’s cheap (~$35 on Amazon) and supports both radios. I use it with a 10’ USB extension cable up in my attic attached to the rPi running HA. If I remember correctly, you can get one and use it as your main Z-Wave controller and then plug the Aeotek stick into something else to act as a secondary controller. However, I think that for that to work, HA needs to fully support the 1.6 OpenZwave stack (eventually?).

My Z-Wave skills pale compared to Zigbee skills, so research that first before taking it as 100% fact.

1 Like

I keep considering moving everything to HA, but I’ve read several posts suggesting that HA’s Z-Wave and Zigbee support is kind of flakey, and about how the Z-Wave network can become broken when you restart HA. Hubitat’s control of the Z-Wave and Zigbee devices, aside from being slow, has always been very solid. Now that I have HA doing all the heavy lifting, it’s been very fast, too. I do like the idea of having more insight into how the Zigbee and Z-Wave networks work, though, so I may make the jump some day.

Yeah, I found the default Hubitat voice on Polly, and the basic TTS works fine for me in HA (with its default voice) with my Sonos devices. I was planning to just adjust the standard HA setup to use Polly voices, but I haven’t really looked into that much yet.

1 Like

So I’ve been getting:
Could not parse hub details
I’ve tried http:// and just for the Hub Address.
I’ve copied my 4 digit API app ID after /apps/api/
and I’ve copied my Access Token after the ?access_token=

Any hints?

I’ve not experienced either of those things with the Nortek stick. My Zigbee network (aside from issues with my Sengleds recently due to a couple of flaky repeaters) is as good as it was on HE. My sensors respond faster on HA then they ever did on HE, but that could be due to the firmware and not the actual radio on HE. My Z-Wave stuff I’ve not had any issues either.

With that said, there are SO many factors involved in a working Zigbee/Z-Wave network, YMMV doesn’t even begin to apply. It really is one of those “you have to use what works best for you” situations.

We need @stephack in here. LOL

When I got Z-Wave working a while ago with HA and the Z-Stick, my devices would keep going to “dead” and would never heal.

I suppose it’s not surprising that something breaks for the first new user. :smiley:

Hmmm…so, one assumption I made is that the hub would be open-access (no users, no authentication, you can just browse to it). Is security enabled for your hub? The integration gets the hub details by scraping some content from the hub’s admin views; if it can’t load the admin view, it will have problems.

1 Like

Ok so after unlocking the castle, now I get:
Unexpected error
This is the log entry it seems: