InovelliUSA / Hubitat

Location for Inovelli Hubitat Drivers and Apps
Apache License 2.0
104 stars 50 forks source link

Homebridge/Hubitat Integration with LZW42 #11

Closed fistcrunch closed 4 years ago

fistcrunch commented 4 years ago

I'm having some issues getting the LZW42 to work correctly with combination of Hubitat <> Maker API <> Homebridge.

In Hubitat, all the functions work correctly sans the hue and saturation "buttons".

When using HomeKit/Homebridge the color temperature, dimming, and on/off work. However, when I try change the RGB settings the color does not change and the screen snaps back to the color temperature selection screen. If I try to adjust color temperature, it does change temperature but HomeKit UI doesn't retain the value.

I tried having a look at the driver code but I'm not too familiar with the ZWave specification or Groovy. I see a parse error for command 3304 when setting color in Hubitat but it does succeed. It looks like HomeKit is setting hue and saturation which in turn call setColor. While Hubitat is calling setColor directly with both hue and saturation. Not sure if that's the issue but it's only connection I could see.

Here's the debug log when trying to change RGB via HomeKit -> Homebridge -> Maker API -> Hubitat

app:422019-12-26 11:22:51.247 pm debugdeviceItem called
app:422019-12-26 11:22:51.242 pm debugdeviceItem called
app:422019-12-26 11:22:51.237 pm debugdeviceItem called
app:422019-12-26 11:22:51.232 pm debugdeviceItem called
app:422019-12-26 11:22:51.227 pm debugdeviceItem called
app:422019-12-26 11:22:51.222 pm debugdeviceItem called
app:422019-12-26 11:22:51.217 pm debugdeviceItem called
app:422019-12-26 11:22:51.212 pm debugdeviceItem called
app:422019-12-26 11:22:51.207 pm debugdeviceItem called
app:422019-12-26 11:22:51.202 pm debugdeviceItem called
app:422019-12-26 11:22:51.197 pm debuglistDevices called
dev:712019-12-26 11:22:50.137 pm debugsetColor([saturation:74])
dev:712019-12-26 11:22:50.134 pm debugsetColor([hue:59])
app:422019-12-26 11:22:50.131 pm debug[NUMBER]
app:422019-12-26 11:22:50.128 pm debug[NUMBER]
app:422019-12-26 11:22:50.125 pm debug[configure, off, on, ping, refresh, setColor, setColorTemperature, setHue, setLevel, setSaturation]
app:422019-12-26 11:22:50.122 pm debug[configure, off, on, ping, refresh, setColor, setColorTemperature, setHue, setLevel, setSaturation]
app:422019-12-26 11:22:50.118 pm debug[74]
app:422019-12-26 11:22:50.115 pm debugsetSaturation
app:422019-12-26 11:22:50.111 pm debug[59]
app:422019-12-26 11:22:50.108 pm debugsetHue
app:422019-12-26 11:22:50.105 pm debugfindDevice called
app:422019-12-26 11:22:50.101 pm debugsendDeviceCommandSecondary called
app:422019-12-26 11:22:50.098 pm debugfindDevice called
app:422019-12-26 11:22:50.095 pm debugsendDeviceCommandSecondary called
dev:712019-12-26 11:22:49.424 pm debugsetColor([saturation:74])
dev:712019-12-26 11:22:49.420 pm debugsetColor([hue:59])
app:422019-12-26 11:22:49.417 pm debug[NUMBER]
app:422019-12-26 11:22:49.414 pm debug[NUMBER]
app:422019-12-26 11:22:49.411 pm debug[configure, off, on, ping, refresh, setColor, setColorTemperature, setHue, setLevel, setSaturation]
app:422019-12-26 11:22:49.408 pm debug[configure, off, on, ping, refresh, setColor, setColorTemperature, setHue, setLevel, setSaturation]
app:422019-12-26 11:22:49.404 pm debug[74]
app:422019-12-26 11:22:49.401 pm debugsetSaturation
app:422019-12-26 11:22:49.398 pm debug[59]
app:422019-12-26 11:22:49.387 pm debugfindDevice called
app:422019-12-26 11:22:49.384 pm debugsetHue
app:422019-12-26 11:22:49.381 pm debugsendDeviceCommandSecondary called
app:422019-12-26 11:22:49.377 pm debugfindDevice called
app:422019-12-26 11:22:49.374 pm debugsendDeviceCommandSecondary called

Here is the logs when using the set color button in Hubitat:

dev:712019-12-26 11:34:20.993 pm debugCouldn't zwave.parse 'zw device: 03, command: 3304, payload: 04 FF , isMulticast: false'
dev:712019-12-26 11:34:20.918 pm debugCouldn't zwave.parse 'zw device: 03, command: 3304, payload: 03 B2 , isMulticast: false'
dev:712019-12-26 11:34:20.886 pm debugCouldn't zwave.parse 'zw device: 03, command: 3304, payload: 03 B2 , isMulticast: false'
dev:712019-12-26 11:34:20.810 pm debugCouldn't zwave.parse 'zw device: 03, command: 3304, payload: 02 00 , isMulticast: false'
dev:712019-12-26 11:34:20.746 pm debugCouldn't zwave.parse 'zw device: 03, command: 3304, payload: 01 00 , isMulticast: false'
dev:712019-12-26 11:34:20.693 pm debugCouldn't zwave.parse 'zw device: 03, command: 3304, payload: 00 00 , isMulticast: false'
dev:712019-12-26 11:34:20.515 pm debugsetColor([saturation:100, hue:55, level:100])

Any help with the driver would be greatly appreciated!

apwelsh commented 4 years ago

I am not related to Inovelli, but I had a similar issue with a hue hub integration and it had to do with color mode. I don’t see color mode being changed, and HomeKit needs this to know, as well as other integrations like sharptools. I would recommend looking to see if, when you change to a color temp, that color mode is being set to CT and when changing to a color, that color mode is being set to RGB in Hubitat. This may be a clue into the cause of the issue. Hubitat is very forgiving with this type of stuff. But, other systems need to know it.

djdizzyd commented 4 years ago

This might be fixed.. You should re-test with the updated driver

InovelliUSA commented 4 years ago

Going to close this. Let me know if the changes haven't fixed it and we can look into it further.