Make BaseModule ignore erroneous sensor values?

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
wavedoff
Posts: 16
Joined: 07 Aug 2017 13:40

Make BaseModule ignore erroneous sensor values?

Post by wavedoff » 17 May 2018 16:51

So I occasionally get absolutely crazy outputs from the sensors in my Z-wave network. For example, My bedroom has never reached 410 degrees :lol:
zsensorerror.PNG
zsensorerror.PNG (116.66 KiB) Viewed 210 times
This does not just happen with my Aeotec Multisensors, this also happens with the voltage readings from my Zooz power switches, and a couple of plug in power switches from monoprice. So this does not appear to be a device specific problem. These sorts of readings wind up triggering rules based on these sensors, which is less than ideal. It also completely screws up the auto scaling of my monitoring graphs.

I went digging around, and found that the BaseModule module does have some code that seems related to dealing with these errors, but it is only supposed to print a message in the logs, with dropping the bad value being on the "to-do" list.

Code: Select all

 
// Warn on big level changes - TODO maybe deny too big changes
    if (deviceType === 'sensorMultilevel') {
        var diff = Math.abs(lastLevel-newLevel);
        var probeType = vDev.get('metrics:probeType');
        // Ignore diff for changes of more than 4 hours
        if (modificationTime-lastUpdate > (4*60*60)) {
            diff = 0;
        }
        if (
                (probeType == 'luminosity' && (diff > 250 || newLevel > 1000 || newLevel < 0)) ||
                (probeType == 'temperature' && (diff > 10 || newLevel > 50 || newLevel < -30)) ||
                (probeType == 'humidity' && (diff > 20 || newLevel > 100 || newLevel < 5)) ||
                (probeType == 'ultraviolet' && (diff > 4 || newLevel > 15 || newLevel < -1))
            ) {
            self.error('Unlikely '+probeType+' level change from '+lastLevel+' to '+newLevel+' for '+vDev.id);
        }
    }
Is there any word on when this TODO will be done? I know it's a minor thing, but it drives me nuts, and BaseModule does not seem to have gotten any love in over a year.

piet66
Posts: 32
Joined: 04 Feb 2017 17:00

Re: Make BaseModule ignore erroneous sensor values?

Post by piet66 » 21 May 2018 11:01

Maybe the reason for such wrong values is sensor polling.
I made this experience with temperature measurement of a qubino device. When periodical polling was switched on I got from time to time huge wrong values. I switched off polling for all multilevel sensors and parametrized all devices to send their values by their own and since that time I've never got such values.
I also suspect other devices (Fibaro, Aeotec), but I haven't prooved that.

I believe that this devices do not always work properly when addressed at an inappropriate moment. But usually you will not notice that.
-
Raspberry Pi 3 Model B Rev 1.2
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
Raspbian GNU/Linux 8
Z-Way version v2.3.7 from 2018-03-23 09:28:53 +0300 (build b1902d4433d1337bd488834db3347fa7ef8f8a33)

wavedoff
Posts: 16
Joined: 07 Aug 2017 13:40

Re: Make BaseModule ignore erroneous sensor values?

Post by wavedoff » 22 May 2018 00:38

Thank you for the response!

I am using periodic sensor polling, so you may have encountered the same thing as me. Sometimes it will be fine for days, and other times it will bug out half a dozen times. I will play around with longer polling intervals and disabling it entirely, and see if the issue improves.

wavedoff
Posts: 16
Joined: 07 Aug 2017 13:40

Re: Make BaseModule ignore erroneous sensor values?

Post by wavedoff » 22 May 2018 19:42

Removed periodic sensor polling entirely, and setup everything to send reports automatically.

Got a report that it was 4.8 million degrees in my bathroom. :shock: I've also gotten a read of 0 volts out of one of my Zooz wall plugs as well.

It seems that z-way needs some sort of sanity check for this. The devices themselves just seem to send bad data sometimes. :(

enbemokel
Posts: 170
Joined: 08 Aug 2016 17:36

Re: Make BaseModule ignore erroneous sensor values?

Post by enbemokel » 23 May 2018 13:11

Hi, these findings may be also a explanation for many false alarm of Fibaro Smoke Sensor. Would be good to know
if this:
>Is there any word on when this TODO will be done? I know it's a minor thing, but it drives me nuts, and BaseModule does not seem to have gotten any >love in over a year.
will be checked.
Thanks

Post Reply