Can't find the history data

Hi everyone, I am doing my uni project by using raspberry Pi 3 and python with blynk app to get data from the car (obd port) . Currently, I got a problem with getting history data from the server. when i use this link "http://blynk-cloud.com/BLYNK_AUTH/data/V5 " the result is "no data "

i need to get history data for V1,V2,V3,V4 and V5, but that link is only for v5
so it would be great if anybody knows a link that shows all those pins together

the last question, can i use a blynk button to take me to that link ?

Thanks in ADVANCE :smile:

import BlynkLib
import time

from mytoken import *
from blynkapi import Blynk
from urllib2 import Request, urlopen

BLYNK_AUTH = 'd2c97bf25d5.....655b5f89'

# initialize Blynk
blynk = BlynkLib.Blynk(BLYNK_AUTH)

respon=100 #value to change with obd value 
 
print('gauge act')
blynk.virtual_write(5,respon)

    #fuel pressure 
print('fuel Action1')
blynk.virtual_write(1,respon)

    #accelaration
print('acceleration Action')
blynk.virtual_write(4,respon)

    #temperature
print('temperature Action')
blynk.virtual_write(2,respon)

    #MIL ON 
print('MIL ON  Action1')
blynk.virtual_write(3,respon)   
"""
    #button history first try
BLYNK_WRITE(V21) 
{
    request=Request('http://blynk-cloud.com/BLYNK_AUTH/data/V5')

    response_body = urlopen(request).read()
    print response_body
   
    sw1.when_pressed = sw1Pressed

}


#button history second try

@blynk.VIRTUAL_WRITE(21)
def v21_write_handler(value):
    if value[0]:
        hist=Blynk(BLYNK_AUTH, pin = "V5")
        hist.history()
        print (hist) 
"""



while True:
    blynk.run()



I’m guessing that pins V1-V5 aren’t used in a SuperChart widget?

I think Blynk only stores pin history if it’s written into a SuperChart widget.
Even then, you’ll only get one reading for each minute, which is the average of the values sent during that minute.
See the last section of this documentation for info on granularity:
https://docs.blynk.cc/#widgets-displays-superchart

When you call the API (and there’s some data to report) it gives you a csv file compressed as a .gz
Date and Time is in UNIX format, so you’ll need a formula to convert it into a time that Excel understands.

Something like this:

= B1 / 1000 / 60 / 60 / 24 + DATE(1970,1,1)

where cell B2 holds the UNIX date/time

The better way to report the data is using the Reports widget.

Pete.

thanks @PeteKnight i ve used SuperChart widget and it’s working great :smile:
but i have an other problem now :slightly_frowning_face: i need to find the car position using gps module and write the coordinates in a Value Display widget
could a gps widget do the job ?

The GPS widget is used to send the coordinates of the phone to the device, but from what you’ve said you want to do it the other way around.
Depending on what GPS device you have attached to your RPi, it should be fairly straightforward to take a regular reading from the GPS and send it to Blynk.
There’s a map widget in Blynk, so if you send your data in the correct format you’ll be able to see the location on a map.

Pete.