Graywind Shades - Yoolax Driver Error

Hi,

I just installed GrayWind Shangri-La shades with Zigbee motor. On another thread, I saw that MWerline's Yoolax Driver is supposed to work well with this device.

I have no problem connecting the shade device to Hubitat, and it picks it up as a generic shade.

If I change the driver to 'Yoolax Window Blinds' to use the increased functionality and then try to configure the blinds per the instructions in the code, nothing happens and I get the following error in my log:

2022-04-13 02:06:59.946 pm errorjava.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 300 (method configure)

The code on line 300 is this:

def cmds = zigbee.configureReporting(CLUSTER_WINDOW_COVERING, ATTRIBUTE_POSITION_LIFT, DataType.UINT8, 0, maxReportingLift.toInteger(), 0x01) + zigbee.configureReporting(CLUSTER_BATTERY_LEVEL, 0x0021, DataType.UINT8, 600, maxReportingBattery.toInteger(), 0x01)
** return refresh() + cmds**
}

I'm not sure how to proceed. The driver has all the functionality I want, but I'm not a coder and kind of stuck here. Would much appreciate any help or insight.

In the preferences what do you have set for the ‘Zigbee Level Max Report Time (Seconds)’ and ‘Zigbee Battery Max Report Time (Seconds)?’

They both need to have valid numbers set. Try using the defaults of 600 and 21600 respectively. Hit save preferences, then configure. You can then adjust the values afterwards if desired repeating the steps of saving then configure.

The only toInteger function on that line is related to those values, so it seems like for some reason they are not set somehow. They are required values and should have defaulted, but my best guess is that for some reason they are blank/null on your device, setting them to a reasonable value should hopefully fix the issue.

1 Like

I just went in and looked and both are already defaulted to the 600 and 21600 values you mentioned.

Just now double checked the log when I hit 'configure' to test and get the same error.

Very weird, I'm not sure why it's failing then.. You can try replacing line 300 with this..

def cmds = zigbee.configureReporting(CLUSTER_WINDOW_COVERING, ATTRIBUTE_POSITION_LIFT, DataType.UINT8, 0, 600, 0x01) + zigbee.configureReporting(CLUSTER_BATTERY_LEVEL, 0x0021, DataType.UINT8, 600, 21600, 0x01)

That hard codes the values instead of pulling them from the preferences. See if that fixes the problem.

If that works and you want to change the values later below are the bolded values that would have been pulled from the device preferences. The first value is the Max Level reporting, and the second is the Max Battery Reporting time.

def cmds = zigbee.configureReporting(CLUSTER_WINDOW_COVERING, ATTRIBUTE_POSITION_LIFT, DataType.UINT8, 0, 600, 0x01) + zigbee.configureReporting(CLUSTER_BATTERY_LEVEL, 0x0021, DataType.UINT8, 600, 21600, 0x01)

Hopefully that fixes things, as I am quickly running out of ideas. :worried:

2 Likes

That seems to have done the trick, it stopped that error. Here are the logs now with me hitting up and down a few times:

Thank you very much! Now I get the chance to mess with the settings the way they were intended.

Really appreciate it.

First, thanks for the work you've done @AutomateAllTheThings !! I just got my 4 shades (same style) in today and have one paired and installed.

Are you able to have your shangri-la style be partially rolled up but the vanes open? I'm super curious how to have them open/closed but then also adjust the vanes from open/close at different levels... fingers crossed!

Also, it seems 'open' rolls the shades down to close and vice versa. Not sure how to reverse that with your driver or I should switch to the generic one and make an adjustment, etc.

Sorry it took me a few days to circle back to your question @ryanfoster34.

No-- you can't have Shangri-la shades be partially rolled up but the vanes open because of the way they roll up. You can have them partially rolled up.

Correct-- as far as the Hubitat programming goes, open means that the shades are rolled down (humans would call that closed) and closed means that the shades are rolled up (we would call this open). It's weird and I haven't worked on a work around at all.

I've basically spent the last few days simply getting these to work right with the remote since when I made my whole home order, I made some mistakes that needed to be fixed before everything was loaded into Hubitat and working.

Sorry, Who's driver is this? I was having trouble getting HE to control my new Yoolax shades. The shades work perfectly and I think we will like them. They are quieter than I expected (pleasant surprise). I came across this driver and seems to work perfectly. Thank you so much !