Hubitat Devices not updating in home assistant via maker API integration

TLDR: 3 (of 11) inovelli zwave devices paired with hubitat arent sending state changes to HA, or responding to commands from HA but work fine when controlled from Hubitat.

Im having a weird issue i cant get to the bottom of. long post incoming.

All of my zwave devices are paired with my hubitat C7 hub. Hubitat is integrated via the Maker API to home assistant. HA is then the brains of my smart home.

Zigbee motion sensors manage most of my lighting automations, which are paired to HA via z2m or zha.

All worked well for a LONG time. Then all of the sudden, 3 or 4 days ago, i had three switches (so far that ive identified) that arent working right. They are all the same model switch, Inovelli LZW30. I have 8 others of the same model paired with HE that still work fine.

I can still control everything in hubitat. Lights turn on and off just fine when using the hubitat web interface. When i make changes there, though, it does not update in home assistant. This means that when my lights are turned off (manually or via hubitat), HA doesnt see the change so my lights wont turn on with motion if HA thinks they are on, and wont turn off if HA thinks they are off.

I can go into the device in HA and turn it off and the light turns off, but it doesnt show the state change in HA. then i can turn it back on, but still no entries of changes in HA (kitchen light was on for over 12 hours according to HA, which was not accurate).

It MIGHT have started after i updated HA Core but i cant remember, it seems like that was a day or two before the problems started. Looking at the logs, it must have started Fed 27th, maybe in the morning, the next state change was probably when i turned the switch on then rebooted HA, so it got the correct state from HE but wouldnt update again until another reboot or reload of the integration. My last Core Backup was on the 28th, then 2 weeks before that

Heres what ive tried:

updated Hubitat twice. Updated the associated apps in HE.

Removed the devices from the integration on the Hubitat side, reloaded the integration in HA but nothing changed other than devices going unavailable. Restarted HA, still no change.

Authorized the devices in HE again so HE can see then, reloaded the integration in HA, restarted HA just in case, but still no change. Then i restored my HA Core backup from a couple of days ago, rebooted everything, but still no change.

Im not sure if its bad hardware, but it would be weird if 3 switches started to fail within hours of each other, so i think its gotta be related to the integration. I havent removed and re-added the integration yet in HA, but i guess thats in the works for tomorrow if i cant get it worked out.

Anything else i can try? Anyone expereincing anything like this, or has seen this before?

Home Assistant:

  • Core 2024.2.2 (was on 2024.2.5 before Core restore)

  • Supervisor 2024.02.1

  • Operating System 12.0

  • Frontend 20240207.1

Hubitat:

Platform version 2.3.8.122

It's super easy to narrow down where the problem is. Go to the Maker API app from Apps page, then get the link under " Send Device Command (replace [Device ID] with actual subscribed device id and [Command] with a supported command. Supports optional [Secondary value])" put that link in a browser (with correct device ID and command) and see if the command reaches your hub. If the device works as expected, then the problem is on the Home Assistant side.

1 Like

maybe i have the syntax wrong, but im getting an error. HA is at 10.0.1.45, hubitat is 10.0.1.22

http://10.0.1.22/apps/api/232/devices/45/On/access_token=[myTOKEN]

the DNI is the ID we want? The command failed with On and Off, as well as testing with the DNI of a device that HA can control, a different brand zwave switch that is paired with hubitat.

error im getting:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<error_description>null</error_description>
invalid_token

The character after command is a "?" not "/". Also the command is "on" (O with lower case) .

1 Like

Thanks! I tried again, but now im getting this error witha device that i can control via HA and HE.

http://10.0.1.22/apps/api/232/devices/46/off?access_token=[myToken]

Device not found or not authorized.

I get the same error when i try to control one of the switches that isnt working correctly. Am i using the wrong number for the ID? im using the DNI that is listed on the device page.

Likely, go to Devices page, click the gear icon to display Settings, then check the "Show device IDs" box. A new column will be added with device IDs as in picture below - use that id for your device:

1 Like

Thanks! That seems like progress. This is the output i get now for one of the devices im having issues with. Seems to be the same for both on and off commands, but i can see the device changing state in hubitat

{"id":"647","name":"Inovelli Switch LZW30","label":"Kitchen can lights","type":"Inovelli Switch LZW30","room":"HA Integration","attributes":[{"name":"lastActivity","currentValue":"2024 Mar 01 Fri 4:11:27 PM","dataType":"STRING"},{"name":"switch","currentValue":"on","dataType":"ENUM","values":["on","off"]},{"name":"firmware","currentValue":"1.11","dataType":"STRING"},{"name":"groups","currentValue":2,"dataType":"NUMBER"},{"name":"lastEvent","currentValue":null,"dataType":"STRING"}],"capabilities":["Configuration","Actuator","Refresh","Switch",{"attributes":[{"name":"switch","dataType":null}]},"Sensor"],"commands":["childOff","childOn","childRefresh","componentOff","componentOn","componentRefresh","componentSetColor","componentSetColorTemperature","componentSetLevel","configure","off","on","refresh","setAssociationGroup","setConfigParameter"]}

trying with a device that is still working right, i get a similar output, so im assuming the command is being sent properly?

Here is something else to check on your Hubitat Hub. Open up one of the problematic Z-Wave devices. Click the ON and OFF command buttons on the page. While doing so, monitor the "Switch" attribute under Current States. Does the value of "switch" change each time you press ON and OFF?

image

If not, that is the problem. Until Hubitat receives the status updates reliably from your Z-Wave switches, it will never be able to update Home Assistant correctly.

Try simply clicking CONFIGURE on the Device Details page for each of your problematic Z-Wave devices. Does that resolve the issue? Do the status updates now properly get reflected in the 'switch' attribute shown above?

2 Likes

When i send the on or off command from the device page, it almost instantly updates the current state. It behaved the same when i tested it yesterday. Im not home right now, but im probably driving my wife crazy with flashing lights. I can confirm they are physically turning on and off still, but that test worked fine last night.

1 Like

Okay, that's good. Wish it was something obvious like that... :thinking:

I have a contact sensor in Hubitat that I expose to Home Assistant using the same custom integration that you're using. It is still working reliably for me. I am fully up to date on both HE and HA sides in terms of firmware. It is at least another data point...

4 Likes

Yeah its been rock solid forever. Its so weird that its only a few devices.

1 Like