noob question about gauges

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
PaulRowntree
 
Posts: 391
Joined: Sun Apr 03, 2016 12:41 am

noob question about gauges

Post by PaulRowntree »

I'm new to this MQTT world, but it has me stoked for monitoring our department for flooding, temperature issues, etc. The goal would be a system of ~50 feather stations broadcasting 1-10 feeds each into IO+. Nicely packaged Adafruit!
I have modified some ESP8266 codes to work with the ESP32, and the Huzzah32 feather is churning out information to the io.adafruit site. My dashboards work, and display the information fine, usually. The feed is a stream of random numbers from 75-125 every 3 seconds.

But.

If I leave the board going overnight, the dashboard display shows inconsistent information ... the fluctuations are still there, but much smaller. Refresh the dashboard display (not touching the ESP32) and it starts showing the expected data range. This is up to date Firefox browser.

Any suggestions would be most welcome!

EDIT : the data seems to be received by io.adafruit correctly ... a semicircular gauge on the same dashboard shows no issues in real time. mqtt.fx also reads the data back with no problems. But the cursor on the trend plot shows many fractional values (eg 97.5) even though I am sending over integers. Plus, replacing the random data with a sawtooth progression (increment by one each send, reset to lower bounds when it hits the max) gives correct values on the semi-circular gauge, but some 'glitches' on the trend plot.

EDIT2 : when the browser screen is refreshed, the historical data that is used to refresh the trend gauge does NOT include every point ... it seems to average over about 1 minute intervals to give one plotted point. THis gives the fractional values, as well as reduces the amplitudes of the artificial noise. But this is clearly a bug. There is no point in collecting data quickly if the display is going to average it to squash extremes, which in an alarm situation are probably the most important things to look for.
2018-01-21 12_20_16-IO - Zeus.png
2018-01-21 12_20_16-IO - Zeus.png (12.84 KiB) Viewed 470 times

User avatar
abachman
 
Posts: 352
Joined: Mon Feb 01, 2010 12:48 pm

Re: noob question about gauges

Post by abachman »

Hi Paul,


For feeds with a lot of data we aggregate and return the average for charts. Here's a post explaining it in more detail. If you search "aggregate" in the IO forums you can find more, too. While data is streaming live, however, it'll be added to the chart directly.


- adam

User avatar
PaulRowntree
 
Posts: 391
Joined: Sun Apr 03, 2016 12:41 am

Re: noob question about gauges

Post by PaulRowntree »

Thanks Adam
I understand the constraints, and I must say that Adafruit's graphs are far better (flexibility, appearance) than most dashboards I have seen.

I wonder if it might be interesting to offer the user an option ... average in a time window (as present) or present a sampled subset of the available data. Either way bandwidth is messing up our image of the data stream.

Cheers!

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”