Polestar Forum banner

Car Stats Viewer - A Better Range Assistant

21076 Views 178 Replies 50 Participants Last post by  Ido
To demonstrate what two motivated developers free from corporational constraints can achieve with AAOS, let me introduce you to 'Car Stats Viewer', a development from two members of the german forum:
Vehicle Gadget Gas Audio equipment Machine

Development started 4 weeks ago with new releases every other day. The app is distributed through Googles beta program, which is unfortunately limited to 100 slots. We just opened the third beta channel after 2*100 slots filled up.

Source code is available on Github, so if anyone wants to fork, deploy and open up another beta channel, he is more than welcome. Participation through pull requests is also possible, of course. I18n comes to mind immediatly.
See less See more
  • Like
  • Love
  • Wow
Reactions: 5
161 - 179 of 179 Posts
Hello, i am on testtrack 4. Is there a plan to Update to Version 24?
I am the maintainer of test track #4, but I seem to have missed your question here - I assume that you did receive the update in the mean time?
Correct me if i'm wrong please.
To start a new test track, I need to :
  • Clone the project from github.
  • Change the package name to something other than com.ixam97.carStatsViewer (rename folders, change package names, imports, etc.)
  • Submit my own version to Play Store as a bundle.

Right ?
Change the package name to something other than com.ixam97.carStatsViewer (rename folders, change package names, imports, etc.)
I'm not 100% sure but it should be sufficient to change the applicationId in the build.gradle file 🤔
I'm not 100% sure but it should be sufficient to change the applicationId in the build.gradle file 🤔
Last time I managed an AAOS project on the Play Console, I had a really hard time dealing with all the mandatory various screenshots and graphic assets required.
Do you have any suggestions/ressources to speed up that process ?
Last time I managed an AAOS project on the Play Console, I had a really hard time dealing with all the mandatory various screenshots and graphic assets required.
Do you have any suggestions/ressources to speed up that process ?
Since CSV can only be distributed as a internal test (select Android Automotive for the test track in the top right) those can just be skipped. They seem to be only required for public releases.
  • Like
Reactions: 1
OH Great !!
Last time I had to deal with this, internal testing was NOT allowed for Android Automotive.
The best we could do was Closed Testing, with the app visible in the App Store for selected testers, and having to provide ALL the visual assets. Painful.
Fantastic !!
I'm not 100% sure but it should be sufficient to change the applicationId in the build.gradle file 🤔
Exactly: I only change that one string, and that's it! 😅
Correct me if i'm wrong please.
To start a new test track, I need to :
  • Clone the project from github.
  • Change the package name to something other than com.ixam97.carStatsViewer (rename folders, change package names, imports, etc.)
  • Submit my own version to Play Store as a bundle.

Right ?
In principle, even cloning is not really required: you can download the release zip, unzip it, change the applicationID and build the project as a bundle in Android Studio. Then submit the bundle to your Play Store test track and invite testers. [For the record: I think you already know by now, but in case anyone else is preparing to start a new test track, this is what is required...]
I did create a solution using the webhook function, but it requires a https connection to your HA system.
Once I got that solved, I was able to receive all sorts of data :) !

This is what CSV delivers:

alt: 4.31919691777604
ambientTemperature: 13
avgConsumption: 0.2448258
avgSpeed: 25.092108
batteryLevel: 57084
chargePortConnected: true
chargeStartDate: "Apr 8, 2023 12:07:31"
chargeTime: 11171
chargedEnergy: 28.379318
currentGear: 4
currentIgnitionState: 4
currentPower: 8.0544
currentSpeed: 0
driveState: 0
isCharging: true
isFastCharging: false
isParked: true
lat: 52.xxxxxx
lon: 6.xxxxxx
maxBatteryLevel: 80400
stateOfCharge: 71
timestamp: 1680948462670
travelTime: 41428610
traveledDistance: 1039515.8
tripStartDate: "Feb 17, 2023 08:09:32"
usedEnergy: 254500.28

Only issue is that the car has to be 'on', otherwise you don't get data anymore.
ahhh… I was hoping (like others no doubt) that this webhook could run in the foreground in a similar way to the current data capture approach. Is that possible @lxam97? Would make the integration with our home automation setups that little more interesting…
ahhh… I was hoping (like others no doubt) that this webhook could run in the foreground in a similar way to the current data capture approach. Is that possible @lxam97? Would make the integration with our home automation setups that little more interesting…
I don't really understand what you mean by "run in the foreground". The app sends data to the provided endpoint as long as it is running. No matter if the app is minimized or in the foreground. It won't send any data if the car is parked because the Android system is not running at that time. There might be a way arround this for a few minutes I have to investigate, but no permanent OTA connetion.
  • Like
Reactions: 1
I don't really understand what you mean by "run in the foreground". The app sends data to the provided endpoint as long as it is running. No matter if the app is minimized or in the foreground. It won't send any data if the car is parked because the Android system is not running at that time. There might be a way arround this for a few minutes I have to investigate, but no permanent OTA connetion.
Understood. I guess I was looking for away of determining when charging had finished.

Very impressed what you’ve built here…! Nice one. Have pulled the latest code and pushed to my car, so will be tinkering with it later when we head on out!
Is there a test track that is joinable? I could probably hack one together but would prefer to be lazy, very excited to see this. Of all the things I didn't like about the Tesla, the ability to see detailed data was one I enjoyed.
A new test track has been made available: https://forms.gle/L25ynxiepX156g9S7 8
  • Like
Reactions: 1
I noticed the latest version stopped resetting upon charge as selected in the preferences.
Could be car related since the scheduler has been acting up again after 2.7 OTA.

Is there a way to use this app to monitor the 12V system (battery voltage, charging cycles, primarily) ?
I noticed the latest version stopped resetting upon charge as selected in the preferences.
Do you confirm the app has registred plugging in and out of the charge cable? If the Center Display is inactive while you plug in or out the cable, the app cannot register any charging activities. Therefore no reset occures. If you open the car before unpluging und see the CSV charge screen on the display, then it should reset as expected.

Is there a way to use this app to monitor the 12V system (battery voltage, charging cycles, primarily) ?
I'm not aware of any API properties that would expose this to AAOS-Apps.
  • Like
Reactions: 2
Thank you very much. This likely explains it. I didn't know this and probably unwittingly unplugged before opening the door. Will make sure I do it right from here on out.
I very much enjoy the info provided by the app so far and had no issues with it otherwise.

I might just get a bluetooth battery monitor or something to keep an eye on the 12V system
Looks like P2.9 might have a better range assistant natively - however, not as impressive as Car Stats Viewer… ;)
[Image courtesy of @thepolestarvlog on Instagram]

Automotive design Vehicle Speedometer Personal luxury car Gadget
See less See more
  • Like
Reactions: 1
I didn't go that far, but I do have a PHP script that can receive and decode the JSON and write it into a MySQL-DB. PM me, if you are interested.
I'm also interested in the script. Do you know where I can find a solution for receiving the data in Node-red through WebHook.
I have a little web application in FastAPI/Python that loads the data into PostgreSQL and Home Assistant...
The same endpoint as I use for Home Assistant can be used for anything else like Node-RED...

Want to poll if people are interested to make that available to users... If so, I could spend some more time on it and put it online.
  • Like
Reactions: 1
161 - 179 of 179 Posts
Top