Weird history graph behaviour

Hi everyone,

I’m using Blynk to monitor the status of my home PC, and sending either a 1 or a 0 depending on whether the PC is turned on or not. Very simple. I want to use a History Graph so I can see the long term trend of when it is on and off.

Depending on the scale I view the graph at, it shows sloped lines at various gradients, despite the fact that the data only has two possible values. What’s going on here? Is it related to the way the widget stores and displays the data?

Thanks,
Stuart

Mine does that when it has missing values…

Yes. History graph shows average value for specific granularity. It has 3 different granularities.

  • Minute granularity - 1h, 6h;
  • Hour granularity - 1d, 1w;
  • Day granularity - 1m, 3m;

Minute granularity means that on 1h graph you’ll see 60 points. And every point is average value within minute. So if within 1 minute you sent 2 values 0 and 1 you’ll get average 0.5 value for that minute.

So in order to display what you need you have to do a simple trick:

When PC is turned ON - send 1.
When PC is turned OFF - do nothing.

But at the moment we are connecting edge points… So probably we need to enhance graph with addiotnal option. @Pavel what do you think?

@Dmitriy I was pointing out earlier, that when there is no data - we need to break the line

@Dmitriy
@Pavel
Thanks guys!

I adjusted my program, will wait a bit to gather some data and see what it looks like.

Also, ‘Erase data’ doesn’t seem to do anything (Android 1.11.2).

Will be fixed in next release. Sorry for inconveniences.