LZW60 | 4-1 Multi-Sensor | Negative Lux

I have a sensor that is primarily used for Lux in one of the front windows of my house and lately in the afternoons it looks like it is so bright I am getting an "int rollover"
image

This has happen with the inovelli driver and the hubitat built in driver and I wanted to reach out for help.

So @ericm, @Eric_Inovelli, @bcopeland and @mike.maxwell any of you guys up for a challenge?

Any help would be appreciated because my house is going into Dark mode when it bright outside!

2 Likes

I’ll update the internal driver.. Thanks for pointing this out.

1 Like

I am guessing this didn’t make 2.2.4..or at least I didn’t see it in the Release notes.

Which is fine...there was too much in 2.2.4. Just checking in as I haven’t updated yet

Does anyone know if this was resolved? I have the same issue and I tried both the built-in and Innovelli drivers and get also negative values in direct sunlight.

I haven’t seen it fixed so I am going to tag the group of people who might be able to help again @bcopeland @Eric_Inovelli @Nathan_Inovelli @ericm

I can't get this to happen on my sensor. I released a driver update that converts the negative to a positive value.

I don’t have an example in my logs but I bet I can get one in the next few weeks. The sensor sits in my west facing window and when the sun hits it just right it goes from a very high Lux to a negative. I am assuming it’s a variable rollover. (I am in the southern US) and I guess the direct sunlight just gets brighter here!

I put the sensor out on my deck to collect some logs.

dev:12502021-06-30 09:19:32.327 am infoLux Sensor: Illuminance report received: -28712
dev:12502021-06-30 09:19:32.323 am debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[143, 216], size:2, scaledSensorValue:-28712)
dev:12502021-06-30 09:14:32.347 am infoLux Sensor: Illuminance report received: -10715
dev:12502021-06-30 09:14:32.337 am debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[214, 37], size:2, scaledSensorValue:-10715)
dev:12502021-06-30 09:09:32.291 am infoLux Sensor: Illuminance report received: 32445
dev:12502021-06-30 09:09:32.287 am debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[126, 189], size:2, scaledSensorValue:32445)
dev:12502021-06-30 09:04:32.300 am infoLux Sensor: Illuminance report received: 31843
dev:12502021-06-30 09:04:32.295 am debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[124, 99], size:2, scaledSensorValue:31843)
dev:12502021-06-30 08:59:32.372 am infoLux Sensor: Illuminance report received: -4059
dev:12502021-06-30 08:59:32.361 am debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[240, 37], size:2, scaledSensorValue:-4059)
dev:12502021-06-30 08:54:32.309 am infoLux Sensor: Illuminance report received: -6478
dev:12502021-06-30 08:54:32.305 am debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[230, 178], size:2, scaledSensorValue:-6478)
dev:12502021-06-30 08:49:32.375 am infoLux Sensor: Illuminance report received: -32739
dev:12502021-06-30 08:49:32.366 am debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[128, 29], size:2, scaledSensorValue:-32739)
dev:12502021-06-30 08:44:32.266 am infoLux Sensor: Illuminance report received: -7725
dev:12502021-06-30 08:44:32.262 am debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[225, 211], size:2, scaledSensorValue:-7725)
dev:12502021-06-30 08:39:32.224 am infoLux Sensor: Illuminance report received: -9324
dev:12502021-06-30 08:39:32.221 am debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[219, 148], size:2, scaledSensorValue:-9324)
dev:12502021-06-30 08:38:07.510 am infoLux Sensor: If this sensor is battery powered, the configuration options (aside from temp, hum, & lum offsets) will not be updated until the sensor wakes up. To manually wake up the sensor, press the button on the back 3 times quickly.
dev:12502021-06-30 08:38:07.509 am infoLux Sensor: updated()

Yup. needs conversion back to unsigned (in the driver). I believe the hub backend assumes signed for all values (2's complement) so values >50% of the bit length go negative when scaled by default.

2 Likes

I updated to the new driver. I am seeing negative values in the logs, but the dashboard reports positive values. Do automations read the dashboard or the log values?

The data points are very non-linear. Should I be cross posting this info on the Inovelli Community as well?

Is a firmware update possible to correct this properly or is this a limitation of the hardware?

dev:12502021-07-01 02:45:10.162 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[119, 11], size:2, scaledSensorValue:30475)

dev:12502021-07-01 02:40:10.191 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[26, 138], size:2, scaledSensorValue:6794)

dev:12502021-07-01 02:35:10.237 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[21, 193], size:2, scaledSensorValue:5569)

dev:12502021-07-01 02:30:10.238 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[140, 196], size:2, scaledSensorValue:-29500)

dev:12502021-07-01 02:25:10.238 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[135, 98], size:2, scaledSensorValue:-30878)

dev:12502021-07-01 02:20:10.133 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[91, 150], size:2, scaledSensorValue:23446)

dev:12502021-07-01 02:15:10.223 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[143, 227], size:2, scaledSensorValue:-28701)

dev:12502021-07-01 02:10:10.171 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[106, 132], size:2, scaledSensorValue:27268)

dev:12502021-07-01 02:05:10.215 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[152, 146], size:2, scaledSensorValue:-26478)

dev:12502021-07-01 02:00:10.202 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[164, 193], size:2, scaledSensorValue:-23359)

dev:12502021-07-01 01:55:10.164 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[16, 252], size:2, scaledSensorValue:4348)

dev:12502021-07-01 01:50:10.205 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[64, 112], size:2, scaledSensorValue:16496)

dev:12502021-07-01 01:45:10.122 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[102, 181], size:2, scaledSensorValue:26293)

dev:12502021-07-01 01:40:10.235 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[26, 116], size:2, scaledSensorValue:6772)

dev:12502021-07-01 01:35:10.098 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[53, 180], size:2, scaledSensorValue:13748)

dev:12502021-07-01 01:30:10.127 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[124, 198], size:2, scaledSensorValue:31942)

dev:12502021-07-01 01:25:10.182 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[130, 184], size:2, scaledSensorValue:-32072)

dev:12502021-07-01 01:20:10.089 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[19, 48], size:2, scaledSensorValue:4912)

dev:12502021-07-01 01:15:10.941 pm debugLux Sensor: BatteryReport(batteryLevel:100)

dev:12502021-07-01 01:15:10.669 pm debugLux Sensor: WakeUpIntervalReport(nodeid:1, seconds:43200)

dev:12502021-07-01 01:15:10.171 pm debugLux Sensor: WakeUpNotification()

dev:12502021-07-01 01:15:10.164 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[145, 10], size:2, scaledSensorValue:-28406)

dev:12502021-07-01 01:15:10.131 pm debugLux Sensor: BatteryReport(batteryLevel:100)

dev:12502021-07-01 01:10:10.085 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[142, 188], size:2, scaledSensorValue:-28996)

dev:12502021-07-01 01:05:10.200 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[13, 198], size:2, scaledSensorValue:3526)

dev:12502021-07-01 01:00:10.089 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[11, 65], size:2, scaledSensorValue:2881)

dev:12502021-07-01 12:55:10.072 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[16, 70], size:2, scaledSensorValue:4166)

dev:12502021-07-01 12:50:10.181 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[17, 144], size:2, scaledSensorValue:4496)

dev:12502021-07-01 12:45:10.065 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[32, 241], size:2, scaledSensorValue:8433)

dev:12502021-07-01 12:40:10.063 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[61, 49], size:2, scaledSensorValue:15665)

dev:12502021-07-01 12:35:10.181 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[16, 1], size:2, scaledSensorValue:4097)

dev:12502021-07-01 12:30:10.133 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[41, 155], size:2, scaledSensorValue:10651)

dev:12502021-07-01 12:25:10.054 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[33, 72], size:2, scaledSensorValue:8520)

dev:12502021-07-01 12:20:10.179 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[28, 49], size:2, scaledSensorValue:7217)

dev:12502021-07-01 12:15:10.042 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[23, 82], size:2, scaledSensorValue:5970)

dev:12502021-07-01 12:10:10.118 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[18, 69], size:2, scaledSensorValue:4677)

dev:12502021-07-01 12:05:10.038 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[18, 21], size:2, scaledSensorValue:4629)

dev:12502021-07-01 12:00:10.118 pm debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[15, 167], size:2, scaledSensorValue:4007)

dev:12502021-07-01 11:55:10.027 am debugLux Sensor: SensorMultilevelReport(precision:0, scale:1, sensorType:3, sensorValue:[13, 203], size:2, scaledSensorValue:3531)

Nothing "reads" the log values at all.

Look at the device detail page (not dashboards). If the value is correct in there and in the device events page, you are fine.

In the device detail all the numbers are positive, but again very non-linear. I have numbers that are as low as 2881 and then 28996 six minutes later. We are not having that kind of day here today.


sensorValue:[142, 188] = 0x8EBC = -28996

The value reported by the driver is correct according to Z-Wave spec, the device is sending an incorrect value. I can correct the incorrect value sent by the device in the driver though, assuming there is not going to be a fix in the device firmware that would cause the corrected value to be incorrect.

2 Likes

Well...... No argument, really. I'll just point out that quite a number of devices send unsigned values in 1 or 2 byte parameters to send smaller payloads (which also improves battery life) instead of doubling the payload size.

I could name probably 5 devices I've made drivers for, or currently use, that chose to put a 0-255 value in a 1 byte payload or 0-65535 in a 2 byte.

Not saying it is right or wrong, but I am saying it isn't that uncommon. For those devices it has to be fixed in the driver - like you indicated.

1 Like

I'll say it :stuck_out_tongue_winking_eye: :rofl:

1 Like

The Inovelli driver has been updated to convert the signed value to an unsigned value.

Thank you for the fix. It's working as expected now.

1 Like