Widget issues on local server setup

Hi.
I’m running my first project using Blynk on a local server.
Really nice system, however I’m experiencing some issues with some widgets on the Android App.
I suspect that at least a part of them may be due to some mistakes on my server configuration, but I can’t figure out what’s wrong. The reason I’m not suspecting the firmware on the device is that Value Display widgets work fine, so it looks like variables are correctly sent to the server.

My setup:
I’m using “device1” to monitor density of homebrew beer during fermentation (Plato degrees). This device sends sensors data (temperature, battery level, tilt angle) to Ubidots every 15 minutes. Ubidots calculates Plato value as a derived variable. Then I have “device2” (Wemos D1 mini+LCD display) that reads the four variables from Ubidots, shows them on a LCD display, then sends them to my local Blynk server by PUSH method (ok, I could have made everything in a simpler way, but the firmware on device1 currently only supports Ubidots, and I just wanted to experiment with Blynk…).
Then I have Blynk app on my smarphone, with some widgets to show how the process is going. I’m only using virtual pins at the moment.
The fermentation process began about ten days ago, with Plato values starting from 19 and now being at 2.6 (or so).
This setup has uninterruptedly worked quite well in these days, Ubidots and Blynk data look aligned, with only some occasional missing samples due to me tinkering with my new wifi repeater…

The only small issues I’m having, are with some widgets not showing what I expect.

1. History Graph

Auto-scaling of Y axys doesn’t seem to work properly for some time scales.
The graph obtained using the 1Week scale looks nice

However the graphs with 1 Month and 3 Months scales don’t look as nice…

Here I would expect an Y axys range of 2-20 (or so). The usage of 2 and 3 as lowest and highest values in Y axys looks wrong, not sure if it is someway related, but it is the same range (correctly) chosen for 6 Hours and 1 Day scales.

(Another possible issue, not relevant here, is that apparentely the app chooses integer numbers as minimum and maximum values for Y scale, so, for example, if the variable to be monitored had values going from 0.01 to 0.02, I guess Blynk would choose 0 and 1 as the min and max Y scale values, so you would always see a flat line, that is not what you want to see…).

2. RTC Widget
It is not working. You can see it at the bottom left of previous images. SInce it is supposed to show server time, may it be related to something that I need to configure on my local server ?

3. Graph/Gauge/Level widgets
Not working well/not working at all . A server side issue?

The graph is blank. I patiently waited the arrival of data from the server, but the graph still remained blank.

This is the way I configured it

The same V2 variable, referenced in a Gauge widget, sometimes seems to work fine…

… sometimes not ( reset to 0)

Didn’t dig much into it, but apparentely this behaviour seems to be someway related to android screen update.
Just after data update on Blynk server, the app displays the widget correctly, after some time the android screen blanks (as it is expected to do) then when I turn the screen on, I briefly see the green dots moving around (updating view, I believe), then the widget is shown as reset to 0. It stay this way until next variable update from the server). Level widget behaves the same way.

4. Variable selection
Well, this is not properly an issue, but I would be curious to know why it is not possible to reference the same variable in two or more widgets (used variables are shown as “BUSY” and I can’t select them). For example, I could want to report the value of a variable as a Value Display widget in one tab, and have the same variable seen as a gauge widget on another tab. Or I may want to see a Gauge AND a Graph.
However I see that there is an exception, in the History Graph you can select any variable regardeless if it was already used in another widget. So I wonder which is the purpose of this limitation on other widgets…

Sorry for the long post. Any hint?

Hello. Thanks for detailed report. Please provide also more info - what server version? What app version? What library version?

Hi Dmitriy,

Here is the info:

  • Server 0.21.7
  • App 2.8.0
  • Library 0.4.3

Server was updated yesterday, the app today.
However I had the same issues with the previous versions.

Well, now that I think about it, this is not true for the issue of the gauge reset to zero after turning the screen off/on, I found this issue yesterday or today (don’t remember exactly…)

@alcal ok

  1. Historical graph - need investigation; We will check;
  2. Please update to latest library (0.4.4). We made changes to it recently and code examples were updated; Should work fine;
  3. Hard to give you an answer. It could be your mistake as well. The best way to find out would be to enable server logs with log.level=trace. So you can see every command that comes to server and goes to app;
  4. Probably now is seems unnecessary, but at the start it was like a feature and right now a lot of logic based on that. So there is very small chance we will change this.

Thanks, Dmitriy.

For point 3, I killed the server process, made the suggested change to server.properties and restarted the server. Guess what? Both gauge and level widgets began to work properly…
So maybe something had screwed the server process session, and simply restarting it “cured” most issues.

Still the graph widget continues to behave unconsistently, so I’m going to delete all widgets from the project and start from scratch just with a single graph widget, with server trace turned on, just to keep everything as simple as possible, and see what happens.

1 Like

Hi.
here is the test I made (times may be a bit approximate):

  • h.17:12 Started server process
  • h 17:13 Login on app - creation of new graph widget for variable V1 on a blank dashboard. Screen is forced to stay on
  • h 17:15 Incoming data from device ( 4 variables) - a first bar appear in the graph
  • h 17:31 Incoming data from device . no new bar appears
  • h 17:45 Incoming data from device - a second bar appears (at about 17:47)
  • h 17:50 with side button of my smartphone I turn screen off then on again. Three dots appear moving for a second or so, then the graph displays just one bar (latest sample). Other bars disappear.

The blynk.log file (with trace turned on) is attached. Unfortunately I’m unable to decode the many messages to understand what happened (had to rename it as .csv, as it is the only non-graphic format allowed).

blynk2.csv (213.7 KB)

The second missing sample may just be a fault of my sketch (but if somebody is able to give me any useful hint by looking at the log, it would be nice).
I’m more interested in the issue of the disappearing bars in the graph widget. I see that this behaviour is consistent. If I leave the screen ON a new bar is added every 15 minutes. As soon as I cause a screen refresh, all bars disappear but one. Same issue on both my smartphone and my tablet.

Do anybody have similar issues?

Correct. Graph doesn’t support now history. This is not yet implemented. It is just for realtime monitoring. We will do big refactoring for graphs soon so this will be fixed.