Custom Component: Hubitat

…[REMOVED]…

Welcome @cschwer and thanks for your work!

[edit] I was PMed, not by cschwer, with a request to remove my comment.

1 Like

Good catch! I’ve updated it.

If anything in the issues list piques your fancy, I’m always open to PRs. :smile: I’ve been working on other things lately, and I need to get back to those…

3 Likes

Hi,

This error log has started to appear

Logger: hubitatmaker.hub
Source: /usr/local/lib/python3.8/site-packages/hubitatmaker/hub.py:201
First occurred: 20 september 2020 01:41:33 (7 occurrences)
Last logged: 06:31:59

Tried to update unknown device None

Can I ignore this or should I do something :)?

You can ignore this. It’s happening because Hubitat is sending SSDP (device discovery) events over the Maker API, and those events aren’t associated with a device. (I’m not sure when that started happening, but I also just recently noticed it.)

I’ve opened an issue to fix that.

1 Like

Hmmm…Google has finally opened up their new Nest developer API. That’s the only non-zigbee/zwave thing I’m using Hubitat for (I setup the Nest integration on Hubitat while you could still do that, and it’s still working), and I’d love to have HA manage the thermostat directly. Unfortunately, to be able to do anything with the new API I have to migrate my Nest account to a Google account, at which point my existing control over the Nest will go away. Tricky.

1 Like

I’ve been using bad nest and it seems to work ok:

image

I switched my Nest account to a Google account awhile ago and then realized that my Nest developer api didn’t work anymore :frowning:

1 Like

Same here. Don’t use the repo from the OP, it hasn’t been maintained in a while. Use the one by mattsch, it’s current.

1 Like

Unless you’re on the old nest account like me because you found your old secrets in the .storage files of an old HA backup and everything is humming along… so far… tomorrow they’ll say ok api is open. Works with nest is axed today. Thanks bye.

I set up my Hubitat with all generic drivers, cause I wasn’t thinking clearly, and integrated with Home Assistant. Things worked great thanks to jason0x43. However, I had massive z-wave issues in Hubitat, so I re-attached each device with custom drivers. Now in Home Assistant, I have many duplicates. I was able to remove a bunch in the core.device_registry and core.entity_registry but I still have more rooting around to do. One thing very odd is that some of the light switches originally came over as light.some_name. After the custom driver, they are switch.some_name. In the entities I will have two items, as shown below.

Any idea how to clean this up?

Looking for disconnected devices through the UI is the best way I know of at the moment (entities in the UI entity list will be flagged if they’re disconnected / inactive). The registry is also good (and faster) if you know beforehand what to remove.

As for the light vs switch classification, that depends on the capabilities reported by the driver and the label of the device. If a device reports that it supports the Light capability, it will be classified as a light. If it just reports itself as a switch, the integration will check if the label looks like the name of a lighting device (lamp, light, candle, chandelier, etc.); if so, it’s a light. Otherwise it’s a switch. I’d guess that the generic drivers were reporting a Light capability and the custom ones are not.

The integration should ideally be checking for existing entities with a given device ID and updating them rather than creating new entities. I’ll open an issue for that…

Cool, as it’s hard to complete automations right now as I don’t know which event is which.

Do you know where I look into parsing out the bad ones?

If you look in the entities list (Configuration → Entities), the invalid entities will have a red exclamation point icon (!) at the right side of the entity indicating that they’re unused.

I only have 2 that look like that. Mine look like this:

It’s odd that some switches are OK others have that circle/exclamation point.

I’d expect to see the exclamation point for entities that used to register as switches and are now registering as lights. The light entity is fine, but the switch entity is unavailable.

I may have messed things up trying to scrub the configuration files for devices and entities. Some have both light/switch, some are just light and some just switch. It’s very odd, but I’m a bit nervous to delete anything out of the files again.

Is there a clean way to scrub it and let your integration re-fill HA?

The safest thing is to go through the entity list in the UI and delete any unavailable entities. Any missing entities will be recreated when you restart HA.

Are the arrow circles with exclamation points mean unavailable? The only exclamation point I have right now is my phone’s alarm, probably because I have no alarm set or defined.

If you suspect you may have messed things up trying to scrub the config files, I’d do exactly what you’re looking to do. And it’s pretty easy.

Uninstall the Hubitat integration.
Go to your entities list (Configuration → Entities) and search Hubitat.
This should give you a complete list of any entities that may be left over. Delete them all.
Reinstall the Hubitat integration

1 Like

I removed all the ones with the circle/exclamation point. So far so good, except now some light switches are reported as switch and some as light. Seems jumbled right now, I probably removed a wrong entity at some point, but everything seems to be working.

switch vs light is based on what the hubitat driver exposes. Not much you can do there. I just took a look and all of mine are coming through as light, I’m using inovelli and ge switches. Just look at it this way… it technically is a light SWITCH right? :wink: