Publishing to EmonPi: Missing Values

I don't know how to phrase this but let's give it a go...

I now have a small sketch that is publishing values via RFM69 to the emonPi.

I have the following definition...

[[27]]
    nodename = AKO-15722
    firmware = modbus1
    hardware = ako-15722
    [[[rx]]]
       names = t1,t2,t3,t4,t5,t6,t7,t8,t9,t10
       datacode = h
       scales = 0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,
       units = C,C,C,C,C,C,C,C,C,C

and on the client side I am populating...

typedef struct {                                                      // RFM12B RF payload datastructure
  int temp[10];
} Payload;

So far so good.  I can send temperature values back, sending actual measurement * 10 which is perfect as that's what I receive from the datalogger.

However, Currently I have only 2 out of the 10 probes configured and hence I have good measurements for temp[0] and temp[1] but the others have bogus values.

Is it possible to indicate somehow that a value is missing on the client?  I guess I need a magic number?

At the moment I send a non-sense value 1200C but really I want a way of indicating if a value is present rather than a silly value.  Zero definitely isn't a good value since that might be an actual good value.

Is there a way of indicating nulls?

Thanks in advance

Nivag

 

pb66's picture

Re: Publishing to EmonPi: Missing Values

using an out of scope value is the bast way to do what you ask. If the value isn't numeric it causes other issues and as you say zero is not a solution. we use 300 as an out of scope value but 1200 is fine 

In emoncms if you do something like minus 1200 => allow negative => add 1200 => log to feed, it will prevent any out of scope values being recorded so in a fixed interval feed you will get "null" datapoints between valid values.

Paul

NivagSwerdna's picture

Re: Publishing to EmonPi: Missing Values

Hi Paul

That sounds very promising.

>>> In emoncms if you do something like minus 1200 => allow negative => add 1200 => log to feed, it will prevent any out of scope values being recorded so in a fixed interval feed you will get "null" datapoints between valid values.

I'm sorry I'm a newbie.  Where in EmonCMS do you put rules like that?

Thanks

Nivag

pb66's picture

Re: Publishing to EmonPi: Missing Values

Input processing.

Any data coming into emoncms via the input or node modules (pages) needs saving to feeds. the "edit" icon on the far right of each input opens a processing list. That list could be a simple single "log to feed" to save the data. But you can also perform various other processing functions depending on version. 

Paul

NivagSwerdna's picture

Re: Publishing to EmonPi: Missing Values

Perfect.  

I wasn't aware of that.

Thanks

Comment viewing options

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