Closed kabili207 closed 5 years ago
Is that always a single value? Or is it more like „20 minutes working, 10 minutes wrong“?
I‘m asking because a single wrong value could be ignored, if it‘s for a longer period of time the value should be set to UNDEF.
I've seen it go on for hours with slightly different values, all over 10.
I'm not sure if UNDEF is a good choice because it behaves more like the sensor is underflowing. It will slowly drop down to zero, then wraps around to something around 10.23, continue slightly down, and then go back up eventually wrapping around to zero.
I should add that I've never seen it drop below 10 when it does this, so I don't think that will be a concern.
Expected Behavior
iButtonLink's MS-TL and MS-TV devices have a tendency to report VAD values that are over 10 when they should be reporting as 0 instead. These values should be translated to 0 so that accurate light, humidity, etc are reported correctly.
Current Behavior
The Onewire binding is using these incorrect values, which is causing their associated values to be wildly inaccurate. My MS-TL devices, for example, will report a light level of well over 500,000 lux in a pitch black room.
Possible Solution
When pulling the VAD values from either an MS-TL or MS-TV device, values that are clearly out of spec should be changed to 0 before using them to calculate other values. This discussion on the owfs mailing list suggests changing anything over 10 for both devices (which is what I did with the onewire 1.x binding), however I think limiting it to 5 instead of 10 for the MS-TL would make more sense since the iButtonLink's manual for the multisensor devices says 5V is the max value it will report.
Steps to Reproduce (for Bugs)
Context
This has forced me to disable to or rewrite several rules that use the light or voltage levels I'm monitoring, such as turning off devices or dimming devices when it's dark in a room.
Your Environment