InovelliUSA / Hubitat

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

Amazon Echo says LZW31-SN switch "is not responding" for "on" or "percent" events (though events are successful) #18

Closed klohner closed 4 years ago

klohner commented 4 years ago

I'm using Hubitat version: 2.1.8.117 and have an Inovelli Dimmer Red Series LZW31-SN configured using the latest Inovelli Dimmer Red Series LZW31-SN driver (2020-01-28) and named "Dining Room Switch". I also have the Hubitat Amazon Echo Skill installed and configured and working fine with my Amazon Echo.

If I ask Alexa to "turn off Dining Room Switch", she does this reliably and knows it was completed successfully. But, if I ask her to "turn on Dining Room Switch" or "set Dining Room Switch 50%", she does this reliably as well, but then flashes her lights a few seconds afterwards and says "Sorry, Dining Room Switch is not responding."

Google Home (through the Hubitat Google Home skill) has no issue with the same commands and knows it completed successfully.

Is there something I need to configure to help Alexa understand that the Inovelli switch responded and executed the requested action successfully?

apwelsh commented 4 years ago

Make sure you are using the Amazon Echo Skill On HE, not the Alexa app, and the Hubitat Alexa Skill on the echo. If you are, the next thing is to check you network devices integrations on HE. HE can get bogged down with too many LAN requests. For instance, my old Roku driver would use the older http get synchronous methods and would allow refresh intervals of every 1 second. I updated my drive to use asynchronous mode instead and set the minimum refresh to every 3 seconds as the most aggressive. If you have Hue Hub integrations, and set the refresh to every 10 seconds or less, then the network will get congested. When the HE network interface gets too backed up Alexa will do this. The quick temporary fix it to reboot the HE hub, but the long term fix is to tune your hub to minimize network calls. One way to do this is with a second HE hub, and implementing the hub to hub integration app to make the Zigbee/z-wave hub less congested.

apwelsh commented 4 years ago

To be clear this is aHE/Alexa integration issue and the only fix is performance optimization.

klohner commented 4 years ago

Hmm, I think there may be more to this.

I am using the Amazon Echo Skill on HE, and the Hubitat Skill on the Echo. I do have several Hue bulbs and the Hue Hub integration refresh was the default "1 minute". I set it to Disabled and rebooted the HE. Besides the Hue Bridge, there are 4 TP-Link switches over IP. All other devices are Zigbee sensors and the Inovelli switch is the only Z-Wave device. The Inovelli switch is configured so that "turn on" goes to 90, minimum dimmer level is 21 and maximum dimmer level is 90.

Here's a long sample dialog. All devices (HE, Google Home Hub, Alexa, Inovelli switch) are in the same room. DRS is short for the name assigned to the Inovelli switch, "Dining Room Switch". From my view, the issue seems to be with the Inovelli switch driver almost always incorrectly reporting an unchanging level even though the switch level was changed, and how Alexa and Google respond to this level value not being what they expect after they request the change.

"Alexa, turn on DRS" [done immediately, Alexa beeps happily immediately] "Alexa, turn off DRS" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, turn on DRS" [done immediately, Alexa beeps happily immediately] "Alexa, turn off DRS" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 50%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 10%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, turn on DRS" [done immediately, Alexa beeps happily immediately] "Alexa, turn off DRS" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 50%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, turn on DRS" [done immediately, Alexa beeps happily immediately] "Alexa, turn [on|off] [any Hue light] [0-100]%" [done immediately & beeps happily] "Alexa, [turn on|off] [any Kasa switch]" [done immediately & beeps happily] "Alexa, DRS 70%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 20%" [done immediately, Alexa beeps happily immediately!"] "Alexa, turn off DRS" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."]

"Hey Google, turn on DRS" [done immediately, Google Hub beeps happily immediately, screen shows DRS at "20%" even though light is fully bright.] "Hey Google, DRS 50%" [done immediately, Google Hub beeps happily immediately, screen shows DRS at "50%" for 1 second, but jumps to show "20%" even though light is actually at 50%] "Hey Google, DRS 100%" [done immediately, Google Hub beeps happily immediately, screen shows DRS at "20%" even though light is actually at 100%] I use the touch-screen on Google Hub to dial brightness to 7%. Done immediately. "Hey Google, DRS 50%" [done immediately, Google Hub beeps happily immediately, screen shows DRS at "20%" even though light is actually at 50%]

"Alexa, DRS 80%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 70%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 20%" [done immediately, Alexa beeps happily."] "Alexa, DRS 80%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 20%" [done immediately, Alexa beeps happily."] "Alexa, DRS 50%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 20%" [done immediately, Alexa beeps happily."] "Alexa, DRS 10%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 20%" [done immediately, Alexa beeps happily."] "Alexa, DRS 70%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 20%" [done immediately, Alexa beeps happily."] "Alexa, DRS 50%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 80%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 20%" [done immediately, Alexa beeps happily."] "Alexa, DRS 20%" [done immediately, Alexa beeps happily."] "Alexa, DRS 20%" [done immediately, Alexa beeps happily."] "Alexa, DRS 21%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 20%" [done immediately, Alexa beeps happily."] "Alexa, DRS 20%" [done immediately, Alexa beeps happily."]

"Hey Google, DRS 50%" [done immediately and Google Hub shows 50%!]

"Alexa, DRS 20%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 50%" [done immediately, Alexa beeps happily."] "Alexa, DRS 80%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 20%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 50%" [done immediately, Alexa beeps happily."] "Alexa, DRS 50%" [done immediately, Alexa beeps happily."] "Alexa, DRS 50%" [done immediately, Alexa beeps happily."] "Alexa, DRS 20%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, turn on DRS" [done immediately, Alexa beeps happily."] "Alexa, DRS 20%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 50%" [done immediately, Alexa beeps happily."]

"Hey Google, DRS 30%" [done immediately and Google Hub shows 30%, but jumps to 50%"]

"Alexa, DRS 30%" [done immediately, Alexa beeps happily."] "Alexa, DRS 50%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."]

"Hey Google, DRS 30%" [done immediately and Google Hub shows 30% and stays there.] "Hey Google, DRS 50%" [done immediately and Google Hub shows 30%, then shows 50%]

"Alexa, turn on DRS" [done immediately, Alexa beeps happily."] "Alexa, DRS 10%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."]

"Hey Google, DRS 10%" [done immediately and Google Hub shows 10% and stays there.]

"Alexa, DRS 10%" [done immediately, Alexa beeps happily."] "Alexa, DRS 15%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."]

I go into Hubitat Devices, select switch, and set level to 5% though the SetLevel configuration option. Success.

"Alexa, DRS 10%" [done immediately, Alexa thinks 8 seconds "Sorry, DRS is not responding."] "Alexa, DRS 5%" [done immediately, Alexa beeps happily."]

"Hey Google, DRS 20%" [done immediately and Google Hub shows 5%.]

Perhaps there's some issue in the Driver not consistently reporting back its actual new percentage level after a requested change? Alexa deals with this discrepancy with the "not responding" message. Google Hub sees the discrepancy initially as success, but shows the discrepancy on its screen.

apwelsh commented 4 years ago

I am not with iNovelli, just a user of a bunch of their products. I am a developer and can look at the driver to see if there is a bug. I will be installing my first lzw31-sn in my master bedroom and tiring it into my Bond linked ceiling fan for fan speed and light dimmer control. So I will know if this happens a to me rather quickly. I will follow-up if the iNovelli devs do not. Also, if I see a bug I will subunit a pull request with a proposed fix. It will be up to them to merge and publish it though. In thought, what is in the load side of the dimmer? And are you controlling the load with the dimmer?

klohner commented 4 years ago

Further, in the HE's Device page for this device with this driver, I can use the "Set Level" command to set an arbitrary level and the switch and bulb respond appropriately and immediately. But the Current States "level" value usually doesn't update on this screen. For example, right now after more playing around, under Current State, level is listed as "80". I can use the Set Level command here to change to any arbitrary level and the switch responds appropriately, but the level value listed on this page still says "80". I can ask Google to change the level to any value and it does, but it reports back that the level is at 80%. I can ask Alexa to change the level to any value and it does, but unless I ask for 80%, it'll tell me that the switch is not responding.

klohner commented 4 years ago

Load on switch is just 2 x 17.5 watt LED dimmer bulbs, so 35W total load. Also, I'm using the switch with a neutral wire.

apwelsh commented 4 years ago

So, I tackled my switch tonight, and my driver works fine, which is essentially the same as their driver here, only I have a fix for the ability to set association groups directly in the device on my driver. https://raw.githubusercontent.com/apwelsh/Inovelli/master/Drivers/inovelli-dimmer-red-series-lzw31-sn.src/inovelli-dimmer-red-series-lzw31-sn.groovy

My dimmer reports the correct value every time. Make sure at the bottom of the HE screen, your device is not used in any rules other than just Alexa, or just Google (not both) to narrow the issue down. No rules, of any types. Just the alexa app entry. Then build up one device at a time.

klohner commented 4 years ago

Hmm, I'm going to call it as a Z-Wave signal strength issue and not related to this driver.

I reverted to the Hubitat Generic Z-Wave Dimmer driver and observed the same behavior -- I can set a level, switch responds, but does not update the Current State level value in the HE Device page for the switch.

I tried an exclusion, (HE exclusion mode, 3x on switch config button) but couldn't get it to exclude. Removed switch from wall (only about 15 feet from HE in the same room) and wired it up 2 feet away from HE and was able to exclude successfully. Ran an include and it found the device and set it up as new and unconnected to Google/Echo. All works fine when control from its Device page. Levels change fine and new levels are reported immediately in the Current State level.

However, as soon as I wired it up 15 feet away across the room, it's back to the same behavior. I can set the level fine from its Device page, but the new level value is not reported back to its HE Device page. If I simply rotate the HE 90 degrees and move it a foot closer to the switch, the level value starts getting reliably updated on the HE Device page for the switch.

There seems to be some anecdotal evidence that the Z-Wave function on the HE is weak and that a Aeotec Range Extender 6 will greatly improve Z-Wave performance. I guess I'll need to give that a try.

apwelsh commented 4 years ago

I concur. I have a LOT of z-wave devices. All zwave+ with the exception of one wall switch. While using this device, it stopped responding to zwave. It worked great then just stopped. Now I cannot include not exclude it anymore. It does appear to be some weird signaling issue. I am going to hook up my z-stick and see if I can getting mine working again. Maybe it needs a firmware update. At this point, mine worked great for a couple hours and now it is a paperweight. Definitely not my experience with any other Inovelli products I have.