Jump to content

Sensor jitter / too much data


Bottesford

Recommended Posts

I'm using a number of different sensors and am finding some of them are reporting a lot of value changes. This is especially true of my humidity, air pressure and ambient light (v1) sensors.

 

When combined with the MQTT proxy this is leading to a lot of data traffic - multiple times per second per sensor kind of thing.

 

For air pressure the changes are usually around 0.01 mbar which I don't care about. Is it possible to only fire the callback when a rounded 0.1 (or whatever I choose) difference is seen? I don't want it to only callback when a value change is > 0.1 but instead when the 1st number after the decimal point changes.

So if I see this:

1010.335  rounds to 1010.3 no callback

1010.348  rounds to 1010.3 no callback

1010.389  <-- rounds to 1010.4 to fire callback here.

 

The humidity sensor is worse as it varies over 1% very frequently (see attachment).

 

So far I've been moderating the data flow in my application but this doesn't solve the network traffic to the MQTT broker being very high.

 

I feel that I should plug this before it hits the mqtt broker service but am open to suggestions!

2017-11-15_13_25_55-Brick_Viewer_2.3_10.png.d732a511b696c4c5497c0556c12b2776.png

Link zu diesem Kommentar
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...