Custom Component: Hubitat

Holy sh!t. I swear i tried this and it wasnt there. Thanks so much. I got it working and see all my HE devices on HA.

1 Like

My Docker container was using 2021.9.7 :slight_smile:

Upgraded HA and the integration, and everything works fine now. Thanks for the help! And sorry for the late response (didn’t get a notification of your reply).

Is there a way to add the name “hubitat” to the prefix of all the entities by hubitat?

So… I’m back… I wanted to move everything to Unraid, which is in my basement…
No USB sticks talking to Z-Wave/Zigbee reaching my basement…
So a tiny little Hubitat in my basement cellar stairway might be the answer…
Call me crazy.

2 Likes

I wanted some advice on rebuilding my Hubitat environment and subsequently syncing up to the Hubitat Home Assistant integration.

I’m planning to have:

1 Hubitat c7 for my upstairs devices
1 Hubitat c7 for my downstairs devices
1 Hubitat c7 to run consolidate downstairs and upstairs devices through hub mesh and utilize apps including Maker API to send the selected devices to Home Assistant

Is the above the best approach to get devices into Home Assistant? Alternatively, would there be issues with sending the Upstairs and Downstairs devices from their respective hubs to Home Assistant (as opposed to the consolidating hub)?

1 Like

Why would you need upstairs/downstairs hubs? Zigbee/Zwave travel just fine between floors and even come out with a stronger mesh because of it. I cover 5,400ft2 on 2 floors plus 2 outbuildings just fine with a single mesh. Before investing in multiple C7 hubs, I’d buy a good zigbee stick and zwave stick , save a ton of money and just go 100% HA.

I use HA for Lovelace. I don’t feel comfortable going all in with HA as there are updates that will blindside me and completely mess up my setup. These are not even breaking changes. It happened to me just last week:

As for zigbee/zwave range I have a 4,600 ft home and it works 95% of the time on Hubitat. However, a few devices furthest from the hub drop off. I have 80 zigbee/zwave devices and I plan on adding several more so this is in anticipation of the growth of my network.

Lastly, I like the organization of the apps and their automation capabilities in Hubitat. It’s simple yet flexible and easy to set up.

At the moment there’s still a bug open regarding multiple hubs and unique IDs. I’ve only heard of a couple cases of the issue coming up, and I haven’t looked into it yet, but an integrating Hubitat may be helpful.

1 Like

I run a C5 and C7 with separate HA integrations no problem.

If memory serves, if you run everything through the consolidated hub all the device names get appended with the hub name. Kind of annoying when trying to write yaml and remember device names.

1 Like

I have now been running this with 4 Hubitat HE hubs, talking to 189 Zigbee bulbs (Sylvania Ledvance 5/6 rt). The bulbs are evenly distributed among the hubs, and everything has been smooth now for over 2 months. This is the best solution I have come across for my zigbee bulbs. And believe me I tried everything! I really like this integration to HA, works seamlessly. Thank you for making this integration. My lights work great now.

2 Likes

So I spent a good amount of time getting all the devices into an integrating hub so I think this is the route I’m going to go. I’d like to make this as seamless as possible although I know that I’ll have to redo several automations that included devices from the original hub. I had a couple questions before I dive into the change over.

  1. What is the best way to go about changing over the hubs? Should I just click Configure on the previous integration and change the IP address to the new hub? Or should I create a new configuration for the new hub and delete the old one?

  2. What happens to the devices on the old hub? Do they permanently reside in HA as disabled? If so, is there any way to clean that up?

Hi Everyone,

I have installed the Hubitat integration and have been able to see the Hubitat devices into HA and have been able to control them without an issue i.e. turn on / turn off etc. so far so good…
The problem l am having is that if l turn on a device from Hubitat the device state does not get reflected into HA e.g. it still shows the device as being switched off.

In the Hubitat Maker API, l have enabled ‘Post Location Events’ and ‘Allow control of HSM’

Can someone please advise what l am doing wrong?

Thanks in advance

Hi Jason, I have a problem with an Aqara push button. Works fine in Habitat, and shows up in the HA integration. But the device is not recognised as a push button in HA. When I try to create an automation, I see “No triggers” for the device. Any idea what the problem is?

These are the capabilities and attributes for the device according to Maker API:

"capabilities": [
    "RelativeHumidityMeasurement",
    "MotionSensor",
    "Refresh",
    "Battery",
    "PressureMeasurement",
    "IlluminanceMeasurement",
    "ContactSensor",
    "ReleasableButton",
    "PushableButton",
    "PresenceSensor",
    "Configuration",
    "VoltageMeasurement",
    "AccelerationSensor",
    "HoldableButton",
    "WaterSensor",
    "TemperatureMeasurement",
    "Sensor",
    "DoubleTapableButton"
  ],
  "attributes": {
    "shaken": null,
    "dataType": "NUMBER",
    "values": null,
    "pushed": "1",
    "presence": "present",
    "battery": "100",
    "temperature": null,
    "taps": null,
    "held": "1",
    "motion": null,
    "pressure": null,
    "voltage": "3.05",
    "frequency": null,
    "acceleration": null,
    "released": "1",
    "doubleTapped": "1",
    "tilt": null,
    "humidity": null,
    "numberOfButtons": null,
    "illuminance": null,
    "contact": null,
    "water": null
  }

Here are events that are emitted when pressing the button:

app:12022-04-23 10:48:37.644 debugdevice event: {"name":"pushed","value":"1","displayName":"Knop1 aqara","deviceId":"116","descriptionText":null,"unit":null,"type":null,"data":null}
app:12022-04-23 10:48:09.186 debugdevice event: {"name":"doubleTapped","value":"1","displayName":"Knop1 aqara","deviceId":"116","descriptionText":null,"unit":null,"type":null,"data":null}
app:12022-04-23 10:48:04.257 debugdevice event: {"name":"released","value":"1","displayName":"Knop1 aqara","deviceId":"116","descriptionText":null,"unit":null,"type":null,"data":null}
app:12022-04-23 10:48:02.729 debugdevice event: {"name":"held","value":"1","displayName":"Knop1 aqara","deviceId":"116","descriptionText":null,"unit":null,"type":null,"data":null}
app:12022-04-23 10:47:57.249 debugdevice event: {"name":"pushed","value":"1","displayName":"Knop1 aqara","deviceId":"116","descriptionText":null,"unit":null,"type":null,"data":null}

Event for a scene switch for which I see device triggers in HA:
app:12022-04-23 10:57:18.549 debugdevice event: {"name":"pushed","value":"1","displayName":"tuya scene switch (Aubess)","deviceId":"77","descriptionText":"button 1 was pushed","unit":null,"type":null,"data":"{\"buttonNumber\":1}"}

This happens when Hubitat can’t open connections to HA. Generally this is because HA is running on a different subnet, or in a non-bridged VM.

When the integration starts up, it pings the Hubitat hub and then configures the POST URL in Hubitat to use the address of whatever interface the ping returned on. So, if the address of HA’s network interface is 10.0.1.115, the integration will configure Hubitat to POST events to http://10.0.1.115:port.

This works fine as long as HA is directly connected to the network. However, if your HA instance is NATed, or is on a different network (i.e., if it’s somewhere that Hubitat can’t talk directly to), you’ll need to manually set the event server address in the integration config to an address that Hubitat can see.

Hmmm…the problem may be that numberOfButtons is null. The integration uses the number of buttons reported by the device when generating the list of available triggers. Is that a configurable option for the device in Hubitat?

Hi Jason,

Thanks for your repsonce however both Hubitat and HA are running on the same local subnet i.e. l am not doing anyhting fancy with IP addressing etc.

Could be any other reason as to why HA is not recognisiing device state of the Hubitat devices?

I was looking to create a nice HA Dasboard (instead of a Dashboard in Hubitate) however it pointless creating do this in HA if you can’t current device states.

I just turned a lamp on and off in hubitat and the state changes are reflected in HA so I can assure you this works.

Screen Shot 2022-04-24 at 10.30.39 PM

Are you sure you have your Maker API configured correctly?

Check the value of the POST URL in the Maker API in Hubitat — is it an address that Hubitat should be able to see?

1 Like

Thanks, you’re right, numberOfButtons was the problem. There is no option to set it with the driver I’m using. But I found a workaround in the Hubitat community: if you change the driver to “virtual button” you get the option for the number of buttons. After you set it and change back to the correct driver you can directly see the triggers in the Home Assistant automation UI.

Hi @jason0x43, two days ago everything was fine with the integration, then on Friday I added three new devices to Hubitat that did not pass over to HA. In a trial mistake I delete the integration and when I tried to add it back is staying on “failed to set up”. Here you have the error is showing on the log:

only planing the error screenshot since the forum is not allowing me to place mi pics.

Already deleted everything an re-adding it to HA from the integration to the hacs Hubitat repository