Datastream error after upgrading local server

Right… I don’t know how to start, but let’s try it that way:
Something happened after my server automatically upgraded from 0.39.1 to 0.39.2. It is supposed to check for upgrade every day at 3:00AM CET, and so it did. But right after the new server started, one of the datastreams has been somehow corrupted ?? The data is received from device, correct and current value is displayed, but NOT on superChart widget. I thought: “OK, I will check the stored value, running a report”. But hey! WAIT! All streams from this device disappeared!! There are 3 vPins assigned and none is visible in report widget!
So we have 2 issues:

  1. Missing value on chart (error in .bin file?)
  2. missing datastreams in report widget…

And here is the picture:

Just for the record, the procedure which sends the data to BlynkServer:

void sendSensor()
{
  digitalWrite(LED_INDICATOR, LOW);
  float h = dht.readHumidity();
  h = ah * h + bh;
  float t = dht.readTemperature();

  if (isnan(h) || isnan(t)) {
    Serial.println("Failed to read from DHT sensor!");
    for (byte i = 0; i < 6; i++) {
      digitalWrite (LED_INDICATOR, i % 2);
      delay(50);
    }
    Blynk.virtualWrite(V3, 255);
  }
  else {
    Blynk.virtualWrite(V1, h);
    Blynk.virtualWrite(V2, t);
    Blynk.virtualWrite(V3, 0);
  }

  char t_string[6];
  char rssi_string[5];
  dtostrf(t, 5, 1, t_string);
  dtostrf(WiFi.RSSI(), 4, 0, rssi_string);
  client.publish("domek/temperatura", t_string);
  client.publish("domek/RSSI", rssi_string);

  digitalWrite(LED_INDICATOR, HIGH);
}

Are you sure this happened after update to 0.39.2? Because this release had no changes for report/superchart widgets work (except small fix for the superchart on device selector).

Yes, because datastream is “cut” at 3:00AM, today

Can you look at those last bytes of subjected file?? Can I recover it somehow? Also, can someone point me the reason, why this device is visible in Reports widget, but not its vPins (NONE!)

??

40 36 80 00 00 00 00 00 00 00 01 64 CE CD A1 20 40 36 80 00 00 00 00 00 00 00 01 64 CE CE 8B 80 40 36 80 00 00 00 00 00 00 00 01 64 CE CF 75 E0 40 36 80 00 00 00 00 00 00 00 01 64 CE D0 60 40 40 36 80 00 00 00 00 00 00 00 01 64 CE D1 4A A0 40 36 80 00 00 00 00 00 00 00 01 64 CE D2 35 00 40 36 77 77 77 77 77 78 00 00 01 64 CE D3 1F 60 40 36 73 33 33 33 33 33 00 00 01 64 CE D4 09 C0 40 36 77 77 77 77 77 78 00 00 01 64 CE D4 F4 20 40 36 66 66 66 66 66 65 00 00 01 64 CE D5 DE 80 40 36 77 77 77 77 77 78 00 00 01 64 CE D6 C8 E0 40 36 80 00 00 00 00 00 00 00 01 64 CE D7 B3 40 40 36 77 77 77 77 77 78 00 00 01 64 CE D8 9D A0 40 36 80 00 00 00 00 00 00 00 01 64 CE D9 88 00 40 36 77 77 77 77 77 78 00 00 01 64 CE DA 72 60 40 36 6E EE EE EE EE EF 00 00 01 64 CE DB 5C C0 40 36 80 00 00 00 00 00 00 00 01 64 CE DC 47 20 40 36 77 77 77 77 77 78 00 00 01 64 CE DD 31 80 40 36 66 66 66 66 66 65 00 00 01 64 CE DE 1B E0 40 36 73 33 33 33 33 33 00 00 01 64 CE DF 06 40 40 36 66 66 66 66 66 65 00 00 01 64 CE DF F0 A0 40 36 66 66 66 66 66 65 00 00 01 64 CE E0 DB 00 40 36 66 66 66 66 66 65 00 00 01 64 CE E1 C5 60 40 36 66 66 66 66 66 65 00 00 01 64 CE E2 AF C0 40 36 66 66 66 66 66 65 00 00 01 64 CE E3 9A 20 40 36 66 66 66 66 66 65 00 00 01 64 CE E4 84 80 40 36 66 66 66 66 66 65 00 00 01 64 CE E5 6E E0 40 36 66 66 66 66 66 65 00 00 01 64 CE E6 59 40 40 36 66 66 66 66 66 65 00 00 01 64 CE E7 43 A0 40 36 66 66 66 66 66 65 00 00 01 64 CE E8 2E 00 40 36 66 66 66 66 66 65 00 00 01 64 CE E9 18 60 40 36 66 66 66 66 66 65 00 00 01 64 CE EA 02 C0 40 36 66 66 66 66 66 65 00 00 01 64 CE EA ED 20 40 36 66 66 66 66 66 65 00 00 01 64 CE EB D7 80 40 36 66 66 66 66 66 65 00 00 01 64 CE EC C1 E0 40 36 66 66 66 66 66 65 00 00 01 64 CE ED AC 40 40 36 66 66 66 66 66 65 00 00 01 64 CE EE 96 A0 40 36 66 66 66 66 66 65 00 00 01 64 CE EF 81 00 40 36 66 66 66 66 66 65 00 00 01 64 CE F0 6B 60 40 36 66 66 66 66 66 65 00 00 01 64 CE F1 55 C0 40 36 66 66 66 66 66 65 00 00 01 64 CE F2 40 20 40 36 66 66 66 66 66 66 00 00 01 64 CE F3 2A 80

OK, I answered myself (I think so): The datastream history*minute.bin file seems to be OK. Last entry corresponds to received csv history received from exported data from superchart option (still available)

Schowek-7

So what now??
(…)
@Dmitriy, I “fixed” the issue by downgrading to 0.39.1 Immediately after restart data started to appear… Please look at “this” (I don’t really know at WHAT exactly.) For some time i need to disable auto upgrade.

I’m also experiencing this - it’s very weird.

Have a look at the image below - the device “study” is a DHT11 connected to a ESP01 and the temperature graph stopped plotting when I upgraded the local server from 0.39.1 to 0.39.2 (both java 8 on a rpi 3).

I’m going to roll back the server to 0.39.1-java8 to see if that fixes it.

For me rollback “fixed” it… Although I can hardly call it “a fix”
I have no idea WHY server refuses to write affected datastream. it seems at this stage neither developers knows that :wink:
BTW, the red square surrounds the rest of the 64bit number. Gonna correct it later

@ThatGuy_ZA @marvin7 what is the target of your “bad” superchart stream? Do you have DeviceTiles in the project?

Do you see any errors in the log files?

Do you have DeviceTiles in the project?

@Dmitriy, I do - the Study ESP01 has a relay and a DHT11 connected to it. Device tiles control the relay and the DHT11 report to the superchart so this may have something to do with it. “Outside” and “lounge” are on another ESP01 which doesn’t touch device tiles - it reports to a superchart and a gauge.

Do you see any errors in the log files?

I had a very quick look through the log files and didn’t see anything that looked too out of place.

Does downgrade fixes the issue? This is really strange as latest server update doesn’t have only fix for DeviceSelector that doesn’t have any affect on graph plotting.

Yeah, we’re back to normal but it seems to have lost the data for the period I was running the newer server version.

You can see the points at which I upgraded as well as downgraded the server.
Are you sure this ticket couldn’t have caused any problems?

@ThatGuy_ZA I’m sure. What target does “STUDY” stream have? I see from your screen this is not DeviceTiles.

@Dmitriy - this is very strange.

Still not clear. You have Superchart outside of the DeviceTiles and have directly assigned ESP to STUDY stream? What pin is used?

@ThatGuy_ZA I think I found the problem. Do you use DeviceSelector in any of stream?

Still not clear. You have Superchart outside of the DeviceTiles and have directly assigned ESP to STUDY stream? What pin is used?

ESP01
Pin D0 connects to a DHT11
Pin D2 connects to a relay

D0 → V20 (temp) → Superchart (top of screenshot)
→ V21 (humidity) Superchart (bottom of screenshot)

D2 → V0 (Device Tiles - Button Tile (I think that’s the name))

I hope that makes sense :confused:

Do you use DeviceSelector in any of stream?

No DeviceSelector unfortunately.

@Dmitriy, I’m not using Device Tiles (nor Device selector), the affected stream is just one of many. On my chart you can see three streams, Two from one device, one from another. This affected stream is using the float, while the another two - probably integers (I’m away at the moment and don’t remember to be honest). But there are other with floats on another charts, and they were fine.

@marvin7 @ThatGuy_ZA made a release with fix - please check https://github.com/blynkkk/blynk-server/releases/tag/v0.39.3

1 Like

Thank you very much, @Dmitriy.

I’ve just downloaded 0.39.3-java8 and upgraded. Will report back in a few hours.