@Gunner don’t like when ppl are bumping old threads so I’m feeling obligated to create a new.
Problem:
I’ve have bad sensor data in my db.
So?
That screws up my otherwise very beautiful SuperChart on my Android phone.
Interesting! But is this really a Blynk issue?
You could argue that it is a PostgreSQL-thing. Or perhaps app related if the data is cached/saved on/to the phone for some reason. I don’t know, that’s why I’m asking
Have you tried to find a solution yourself? Like… tried the search function?
Yes, but I couldn’t find any applicable information. All my bad data is from when I first set up my local server and was messing around with the sketch. A smart move would have been to delete all data [from the app] once everything was running smooth, but I didn’t So, with my limited knowledge in PSQL I tried something a bit more drastic he he:
I deleted all data from the tables starting with reporting_
older than 2017-11-18:
postgres=# DELETE from reporting_XXX WHERE ts < '2017-11-18';
and then:
postgres=# REINDEX DATABASE blynk;
Which I thought would do the trick, but data pre 2017-11-18 still shows up in my chart!
Part of my server.properties
:
#enable DB
enable.db=true
#enable raw data storage to DB
enable.raw.db.data.store=true
The db gets updated, but the data is also written to the files in /[install dir]/data/[username]
Info about my server:
Linux ubuntu 4.4.0-103-generic #126-Ubuntu SMP Mon Dec 4 16:23:28 UTC 2017 x86_64 GNU/Linux
psql (PostgreSQL) 9.5.10
java 9.0.1
Java™ SE Runtime Environment (build 9.0.1+11)
What am I missing? Am I getting values from the files and not the db?