EDIT 2: Problem solved. Reason is timezone settings on the phone. It seems blynk app resolving time with time zones not current time. In my case Turkey is in gmt+3 but there is no tz for this on android 7.0 so i choosed gmt+2 and manual configuration for +1h. blynk app still select gmt+2 and thats why i have 1h difference. i changed to different country with gmt+3 zone and everything working fine.
I have a couple modules and one rpi2 local server on my local network. everythings working fine with lastest server build,lastest raspbian,lastest java,lastest blynk library on arduino esp8266 ide.
i am trying to use history graph but it seems i am missing time zone settings because history graph listing data but there is 1 hour difference.
how can i choose or set right time?
p.s. my rpi has already ds3231 for time backup and it has right time. both rpi2 and ds3231 has same time. date function on rpi2 says right time. i am at Turkey (its gmt +3)
EDIT 1:
Here is sketch
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
char auth[] = "xxx";
char host[] = "192.168.xx.xx";
char ssid[] = "xxx";
char pass[] = "xxx";
#define kapi 2
SimpleTimer timer;
void sendSensor()
{
Serial.println("test");
Blynk.virtualWrite(V5, "5");
}
void setup()
{
Serial.begin(115200);
Blynk.begin(auth, ssid, pass,host);
Blynk.syncVirtual(7);
pinMode(kapi, OUTPUT);
timer.setInterval(1000L, sendSensor);
}
BLYNK_WRITE(V7)
{
if (param.asInt() == 0)
{
digitalWrite(kapi, LOW);
}
else
{
digitalWrite(kapi, HIGH);
}
}
void loop()
{
Blynk.run();
timer.run(); // Initiates SimpleTimer
}
here is app screen. button is push button for turning led on off on v7
historygraph showing v5 pin logs. if i select 1h mode it says not enough data. if i select 6h i can show data. time difference is 1 hour
If your system is set up correctly all the frequencies are available. All I was trying to say is that it doesn’t involve a “clock” on your hardware. Data is stored on the server and the graphs created from that.
Thank you for answer. So which part i am missing? i configured tz on rpi2 with rasp-conf and it says right time. blynk server app related setting or totaly rpi based?
Glad to see your problem is SOLVED
All in all, i decided to modify my post, by removing not true infos, leaving only the “real part”
So, YES history graph includes timestamp, and now it is clear, it is time zone dependant -just learned something
AND (!) there is a UNIX timestamp included in EXPORTED (and sent to e-mail address) data. But on the other hand, you have not ANY TIME intervals in it, just TimeStamp AND associated value received…
I suspect at some point during the 6 hour period you actually sent a 5 to vpin rather that “5”. So 6h shows data but not 1h data as it doesn’t understand what you mean by quoting “5”. Ok?
firstly sending 5 and “5” are same result on server side. i dont know why. i changed to sending 5.
for example real time is 15:52,if i choose 1h period, history graph time starting 15:53, and if i choose 6h period graph starting time is 09:53 and propably hardware time is 14:52 on esp8266.so i cant see data if i choose 1h period. so as @marvin7 said requests has timestamp. seems maybe this is my problem. also i saw data on history graph last data sended on 14:52
@alonewolfx2 did the abandonment of GMT + 2 hrs during Winter for Turkey just affect my country (Cyprus) for the first time a few weeks ago or did the change affect Turkey too. Specifically what I mean by this was this the first year you didn’t move your clock backwards when European countries did?
In Cyprus, the divided north of the island (Turkish controlled) failed to return to GMT + 2 hours for the first time a few weeks ago. So our capital has 2 different timezones during the winter, bizarre but true.
Had some fatal consequences here, so much so the north have moved their day, but not clocks, along by at least 30 minutes.
Maybe your issue has nothing to do with this but there are ways to test it. Perhaps move to GMT (UK) on all your hardware (Pi and phone, ESP doesn’t need any time) and see what the graphs show. Also try GMT +2.