Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamps Fiat 500e which format ? #42

Closed
heidasch opened this issue Mar 10, 2023 · 7 comments
Closed

Timestamps Fiat 500e which format ? #42

heidasch opened this issue Mar 10, 2023 · 7 comments

Comments

@heidasch
Copy link

Hi,

I get timestamps from my Fiat 500e such as car_evInfo_timestamp = 1678431056968.
Could anyone advise me what format that is and how I could show it in HA in a way, a human could understand ?

Thanks

Wolfgang

@wubbl0rz
Copy link
Owner

looks like unix time in milliseconds. so its milliseconds elapsed since 1.1.1970 UTC. in home assistant it should be convertible with a template sensor or template card in the frontend. i don't know off the top of my head how exactly.

but does this timestamp mean anything important ? looks like a generic timestamp thats internally used by the fiat app to show last refresh time or something like that.

@heidasch
Copy link
Author

Thanks for the info wubbl0rz. I'll try and let you know.
As far as I wasn't able to decode the values in the past I have no clue what they could mean.
In fact there are three (different) timestamps:
car_evInfo_timestamp=1678431056968
car_timestamp=1678431056968
car_vehicleInfo_timestamp=1678430828730

Regards

Wolfgang

@heidasch
Copy link
Author

You're right wubbl0rz. It's UTC+1 plus the value, which is in milliseconds.
The two different timestamps have a delta of around 3 minutes, no clue why and what that represents. Both values are around the time when the car was last connected via mobile.

@heidasch
Copy link
Author

Here's my HA-Code that works for me:

#Car timestamp

  • platform: template
    sensors:
    wh_car_timestamp:
    value_template: >-
    {{ as_timestamp(as_datetime("1970-01-01 00:00:00.000000+01:00")+timedelta( milliseconds = states('sensor.car_timestamp')|int))|timestamp_custom('%d.%m.%Y %H:%M') }}

Offers me the timestamp on the surface like this: 13.03.23 09:15

Regards and thanks

Wolfgang

@wubbl0rz
Copy link
Owner

nice good to know 😄 what is your use case with the timestamp or why do you want to see it ? does it give any meaningful information ?

@heidasch
Copy link
Author

Well, this timestamp seem to be the timestamp when all the data has been updated the last time. That's important for me, as my car is normally placed in my basement garage. The car uses mobile radio to communicate its data to the server. The car has a wifi module built in, though it doesn't use it to send its data. So, in my garage I have simply no connection. With the timestamp I see when the data has been fetched and so I have an idea, how good that (old) data is. I have extended my wifi to the garage but I have no mobile coverage. So, my pretty modern, new car is simply disconnected when I am at home and e.g. want to know how much energy is left before I start the charging process (because I like to charge not more than 80 %).

@wubbl0rz
Copy link
Owner

ah nice good to know 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants