ZSE11 - high lux values turn negative?

Hi Zooz!

Now that we’re coming out of winter here and days are getting much brighter, I’m noticing that my ZSE11 has started to reporting really high lux values as negative…

My ZSE11 is ver 800LR (and it’s paired LR) on f/w 2.00 - I’m on Hubitat using latest version of @jtp10181’s driver. Other than this negative-lux thing, the ZSE11 is working totally awesome.

Looking at logs for today and yesterday (both very bright mornings), the negative values seem to start at ~30000, and then persist for a while even when the lux drops back below 30K.

This morning so far (lux still high right now since sun is still right in front of the sensor):

Yesterday morning:

Thanks for any thoughts you may have!

This is partially a firmware issue but can be fixed in the driver pretty easily by converting the value back to unsigned. I have it on my list to fix, I think I have it fixed locally just did not post it yet.

Going from memory here but I believe per zwave spec the Multilevel Sensor Report values are to be signed integers, and the size used for the lux in this firmware is 2 hex bytes, which gives you a range of 0 - 65535. Because it is supposed to be signed, then 0-32767 is positive values and after that it wraps around to negative -32768. The Hubitat parsing code automatically converts the raw hex value into the signed integer which is why you see the negative values.

The proper fix on the firmware would be to bump that value up to a size of 4 bytes so that it would not overflow into the negative range.

3 Likes

Awesome - many thanks for the additional color on the issue, Jeff!