Event module to supress/filter wrong values?

Hello!

When measuring temperatures by the DS18B20 sensor the EmonTX always sends -127°C when one sensor is disconnected or the value is not received. In the graph this doesn't look very pretty.

I tried to to configure an event to check values -50°C  and set the value to 0 in this case because it won't appear so often that the real values are exactly about 0°C inside or outside the house, so it will be easy to see that one sensor generates wrong values.

The problem is that it looks like the values reach the graph even if the event is active. It also looks like this is also the case when I select mute for some seconds.

Any ideas how to solve this problem?

I've added a screenshot that shows the configuration, I use this method for getting smoother graphs for DC measurements too when the solar or load current is about 0.

Jérôme's picture

Re: Event module to supress/filter wrong values?

Perhaps postprocessing functions could be modified to ignore -127 values. The range loss would be peanuts.

The 0 value is more of an issue, as in a lot of cases it is likely to be valid.

We could decide as a design choice that -127 means invalid, adapt postprocessing functions to that, and then in the emonTX, make sure that each error is caught and made -127, or even not sent at all (we may want to send anyway if the frame contains data from several sensors).

Basicallay, couldn't you add a test in the TX: if value is not -127, send().

mharizanov's picture

Re: Event module to supress/filter wrong values?

Overall not a bad idea to add in-built functionality for sanity check before an input is fed to a feed; the allowed values range could be defined as a property to the input. Such functionality exists in http://sen.se

 

jb79's picture

Re: Event module to supress/filter wrong values?

I think a range check would make sense for most of the measurements. Invalid values should be discarded, there is no need to fill the database with this values.

To know there is something wrong maybe a new feed can count the number of errors, so everytime a value is discarded the counter gets +1. A graph of this counter would show when a problem with the measurements began.

 

Robert Wall's picture

Re: Event module to supress/filter wrong values?

Sounds good! - and practical.

Marquis27's picture

Re: Event module to supress/filter wrong values?

Any progress on this? Preprocessing and discarding sounds like a great feature to me. As well, logging of errors would be excellent. 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.