SmartThingsCommunity / SmartThingsPublic

SmartThings open-source DeviceType Handlers and SmartApps code
https://developer-preview.smartthings.com/docs/devices/hub-connected/get-started
2.56k stars 90.09k forks source link

Springs Window Fashions Shade Failures #66245

Open pennstump opened 3 years ago

pennstump commented 3 years ago

I have 20 Springs Window Fashions blinds. I have tried multiple device handlers and even attempted to add some error handling to them on my own, but I have a failure roughly every other day on average. All blinds are scheduled to rise in the morning and set in the evening via Alexa's integration to my SmartThings hub. That's 40 movements per day with a failure rate of 1/80 and the failures occur on all devices equally.

When the device fails the red light shines and the blind will move exactly 9%. If it was open and was attempting to close, it will fail at 91% and if it was closed and attempting to open it will fail and stop at 9%. To correct the failure I have to press the button on the device 3x (once to reverse the direction, another to pause it, and a third to complete the original instruction).

I have been able to identify the failure in the device handler, but I cannot seem to replicate these button pushes. I set a new state variable 'state.target' to the intended shade level at the end of setShadeLevel(). I can then detect the failure in parse() when the shade reports it is not moving and the current level does not match state.target. I tried implementing delays, pauses, polls, and other actions to simulate reversing the shade and then correcting it in Groovy code without success.

An interesting observation is that I can correct the failure by issuing the opposite command. What I mean is that if I instruct my blinds group to close and one fails, I can instruct the blinds group to open and all will open, correcting the previously-failed blind. This makes me think what I'm trying to do is possible with the correct set of Zwave instructions.

Has anyone seen this or can anyone help implement error handling in springs-window-fashions-shade.groovy?

pennstump commented 3 years ago

I seem to have found a solution with "sendHubCommand(zwave.basicV1.basicSet(value: 0 or 99).format())" followed by a delay and then "sendHubCommand(zwave.basicV1.basicSet(value: state.target).format())". The sendHubCommand() seems to have made the difference, but in general the current driver does not accommodate the blinds' random failures and error handling would be an opportune addition.