jason0x43 / hacs-hubitat

A Hubitat integration for Home Assistant
MIT License
189 stars 46 forks source link

Devices Updating in HA #260

Open AFN40 opened 4 months ago

AFN40 commented 4 months ago

What should I look to first if some devices update in HA and others don't? Dealing with all Inovelli Red and Blue 2-1s.

Specifically want to use a HA dashboard (mushroom card) for a light entity. The communication works to Hubitat all the time. But only some devices can communicate back to HA.

Network is Unifi UDM Pro SE.

jason0x43 commented 4 months ago

Device updates with Hubitat are generally all-or-nothing -- Hubitat is either able to send events to Home Assistant or it's not. There's nothing device-specific about how events are sent to HA.

The first thing to check is that any events are being received from Hubitat. The best way to verify that is to enable debug logging for the integration and then do something that should generate a device event from Hubitat, like toggling a light in the Hubitat UI. If no event message shows up in the Home Assistant log, then Hubitat isn't able to send messages to Home Assistant.

AFN40 commented 4 months ago

Unfortunately, it does seem to be certain devices can communicate with HA and others cant. For example, I have a dining room dimmer and kitchen dimmer. Both Inovelli Blue 2-1s.

In their respective mushroom cards, the dining room dimmer has full control and status updates from the dimmer. The Kitchen dimmer responds to brightness level changes only. Turning on/off and updating the device status in the mushroom card does not work.

The weird thing is the dining room dimmer has all of its comms visible in the log. Even though the kitchen dimmer brightness change commands work, they dont show up in the log.

jason0x43 commented 4 months ago

Did you enable debug logging, and if so, are you seeing events come across for some devices but not others? Could you post some of the event messages from working devices?

AFN40 commented 4 months ago

So i fixed the issue, but of course the fix does not reveal what the exact problem was. I had my old hubitat hub laying around. So i figured why not fire that up, set up the non-working devices with that and their own maker api... and voila. Complete functionality.

Maybe it's just a matter of quality of connection to those switches to the hub? Not sure. either way. I appreciate your help.

jason0x43 commented 4 months ago

Were your old Hubitat and the current one using the same version of the Hubitat software, and/or the same version of the Inovelli driver? Maybe a newer version of something, or a different device setting in Hubitat, stopped sending events for some Inovelli devices.

jason0x43 commented 4 months ago

Connection quality shouldn't really come into it. The integration doesn't talk directly to devices, it only talks to Hubitat. If devices are working properly with Hubitat, then their connections are fine. If Hubitat is sending any device updates to Home Assistant, then that connection is fine, too.

If particular devices aren't getting updates, then the most likely problems are 1) Hubitat isn't sending updates for some devices, or 2) the integration isn't able to parse some of the events coming from Hubitat. Both of these issues would be easy to see in the debug log.

markus99 commented 4 months ago

@AFN40 I had a similar issue (https://github.com/jason0x43/hacs-hubitat/issues/261) and found a quick fix. Are by chance the devices you're seeing issue(s) with being flagged in config as 'Lights that should be switches'??

AFN40 commented 4 months ago

Hey. Just one but that switch communicated just fine. What worked for you?

jason0x43 commented 4 months ago

If your issue was happening to devices that you changed from lights -> switches or switches -> lights using the integration's config flow, that should be fixed in v0.9.24.