Lutron Serena Shades Error

Just installed my new Lutron Shades and I’m having trouble getting them to work with hubitat. they work fine from the lutron app and from homekit. all my other lutron devices (switches, dimmers, picos, fan controllers) work fine. I get the following error when I try to open, turn on, set level, or set position:

[dev:267](http://192.168.20.22/logs#dev267)2019-04-16 20:03:20.975 [error](http://192.168.20.22/device/edit/267)groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#minus. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.Character] [class java.lang.Number] (open)

[dev:267](http://192.168.20.22/logs#dev267)2019-04-16 20:03:20.896 [info](http://192.168.20.22/device/edit/267)Master Bedroom East Window Shade (Lutron S) is opening

[dev:267](http://192.168.20.22/logs#dev267)2019-04-16 20:03:19.539 [error](http://192.168.20.22/device/edit/267)groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#minus. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.Character] [class java.lang.Number] (on)

[dev:267](http://192.168.20.22/logs#dev267)2019-04-16 20:03:19.439 [info](http://192.168.20.22/device/edit/267)Master Bedroom East Window Shade (Lutron S) is opening

[dev:267](http://192.168.20.22/logs#dev267)2019-04-16 20:03:07.581 [error](http://192.168.20.22/device/edit/267)groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#minus. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.Character] [class java.lang.Number] (setPosition)

[dev:267](http://192.168.20.22/logs#dev267)2019-04-16 20:03:07.540 [info](http://192.168.20.22/device/edit/267)Master Bedroom East Window Shade (Lutron S) is opening

@bravenel any thoughts?

thanks

Tagging @mike.maxwell

What app are you using to control these?
Also, do they work correctly from the driver details?

false alarm. weird. It didn’t work initially, but now seems to be working appropriately. I’m not getting those errors any longer. I was just pressing buttons on the device page. perhaps I just wasn’t patient enough (got excited about my new gizmo!).

sorry for the false alarm

Spoke too soon. I can now control them from the device page, but when I use Rule machine to control them (under the shades category) I get this error:

[app:113](http://192.168.20.20/logs#app113)2019-04-16 21:44:31.075 [error](http://192.168.20.20/installedapp/configure/113)java.lang.IllegalArgumentException: Command 'up' is not supported by device. (updated)

[app:113](http://192.168.20.20/logs#app113)2019-04-16 21:43:42.830 [error](http://192.168.20.20/installedapp/configure/113)java.lang.IllegalArgumentException: Command 'up' is not supported by device. (updated)

I can set them as a dimmer in RM (and that works), but if I try to control them as a shade it results in the above error and nothing happens.

The mechanism in RM is for a different type of shade, one controlled by a motor controller. This dates back some time, long before the new Lutron Shade driver.

We will sort out a reconciliation of this for the next release.

@mike.maxwell I installed some new shades and I'm getting the following error on several (but not all) of my shades when I open or close them from the device details page.

this doesn't occur with every shade, but it does occur with quite a few of them. If I switch to a dimmer driver, it seems to work ok, but the lutron shades driver doesn't.

Can you run the calibration on this, then try again.
If the error still persists please post a screen shot of device current states as well as the state variables.

calibration didn't seem to do much. here is everything on the device page:

and the log:

Interesting, I'm unable to duplicate this.
Can you cycle them using the lutron app, then post another capture of current states?
Also what platform version are you running?

It’s not all my shades, just some of them.
I’m running version 2.1.3.128

the state variables updated to this (I’m not sure when, but it was prior to me hitting the button in the lutron app):
image

when I hit the button in the lutron app, this pops up in the logs:

also, I have 3 hubitat hubs and I have the lutron app installed on all three of them. I get this same groovy error on all three hubs.

@bravenel you're a lutron guy, do you have any thoughts on this? They function ok and don't throw any errors if I set the driver to "lutron dimmer"

It would be useful to me if you show both State Variables as you did above, and the device State from the right side of the device page. The value for sp in what you showed seems to be the problem. Please do a calibrate, and then show both. Then cause the error to happen and show both again.

I would love to show you more, but nothing appears most of the time. I’m not sure what I did to cause those state variables to even show up (possibly showed up after I changed the driver to “lutron dimmer”?). here is what the page looks like most of the time:

that is after pressing the calibrate button.

here are the logs:

of note, when I open or close the shade from the Lutron app, it causes these same errors on hubitat. the two most recent errors on that last screenshot were generated after opening the shade from the lutron app.

Did you do Calibrate? Also, do a Set Position.

It doesn't matter where you operate the shade from, the same messages are coming in from telnet either way, and that's hitting the driver, and the driver is throwing the error.

yes, i hit calibrate, nothing happens... and then it throws an error 4 sec later:

when i try to set level it throws an error immediately:

The point was to show the device page after Calibrate, and after Set Position. The error is going to continue to be thrown until we solve this, so showing it any more isn't giving new information.

gotcha

it didn’t show anything other than:

image

until I reloaded the page, and then this popped up:

image

Yes, you do have to refresh the page for the State Variables. Was this after Calibrate? Did you try Set Position?

yes, those are after pressing calibrate. I just hit calibrate and refreshed the page again and the ct number changed, but that is all.

image

i’m not sure if that is meaningful or not.