Speak EV - Electric Car Forums banner

1 - 20 of 73 Posts

·
Registered
Joined
·
38 Posts
Discussion Starter · #1 · (Edited)
Hi,

over the last few weeks I played around a bit with the WeConnect API and built the project IDDataLogger.
It consists of a php program that continuously fetches data from the WeConnect API about the ID.3 and stores it in a Database (PostgreSQL or MySQL).
I created an iOS Widget which displays the current status and a website with the current status and a history graph. The real current charging power is especially interesting, which is also sent relatively often during a charging session (about every 5 minutes).

Because pictures say thousand words:


Link to the project: robske110/IDDataLogger
Have fun and let me know what you think!

If your phone is set to English, the widget will also be English. The screenshots are from the German version.
 

·
Registered
ID3 1st & e-Golf
Joined
·
5,850 Posts
This looks really interesting. Firstly thanks for making it look so simple for those of us who have no idea on how to set such things up and including a guide in plain English. I look forward to seeing your guides on installing manually as I'd like to try that.

What data does it log, or should I ask what data is available via the API that it can be made to log?
I like that the VW app for the e-Golf logs the driving data, miles, distance, mi/kWh numbers for the car for each trip.
I assume this is available and much more?
 

·
Registered
Joined
·
38 Posts
Discussion Starter · #5 ·
The data available is currently relatively minimalist but includes:
  • SOC
  • remaining range
  • charge Power in km/h AND real kW (kilowatt)
  • target SOC
  • remaining Charging Time in minutes
  • plugged in / not plugged in
  • charging / not charging / holding charge
  • remainingClimatisationTime
  • HVAC target temp and state (heating, ventilation, off, maybe cooling)

Nice to hear you looking forward for the manual guide, maybe I'll get around to it tomorrow.
Per trip values are also not readily available for now unfortunately (one could attempt to calculate a rough driven distance and km/kWh using the range and soc changes, but that would be very inexact). This all can obviously change as soon as VW implements more features in their app.
What theoretically is possible is to plan climitisation times, but I have not implemented that yet.
 

·
Registered
ID3 1st & e-Golf
Joined
·
5,850 Posts
Thanks, but don't rush into it for me as I'm not about to jump in and do it now. I'm too busy at the moment to spend much time on it but I'm interested in finding out more about what's involved as well as getting the data from the car.
I guess as they improve the software we will be able to get more information from the car. Maybe they will be adding trip data to the app once the car is sending it.

Charging speed would be good to see, seeing it in miles per hour is pointless.
 

·
Registered
Joined
·
38 Posts
Discussion Starter · #8 ·
I have implemented a new feature I call "timetravel hover".
When you hover (or tap on mobile) over the graph on idView the values above will be shown for that time.
Here's a gif illustrating this:

I hope you have fun using that feature, I am looking forward to feedback.

I am also already working on a new feature.
A small sneak peak:
 

·
Registered
Joined
·
151 Posts
Oooh. This looks interesting...

If only I weren't so busy with work, I could use up a few hours playing with this.

Does the API allow us to monitor the 12V battery at all?
 

·
Registered
Joined
·
47 Posts
Hi,

over the last few weeks I played around a bit with the WeConnect API and built the project IDDataLogger.
It consists of a php program that continuously fetches data from the WeConnect API about the ID.3 and stores it in a Database (PostgreSQL or MySQL).
I created an iOS Widget which displays the current status and a website with the current status and a history graph. The real current charging power is especially interesting, which is also sent relatively often during a charging session (about every 5 minutes).

Because pictures say thousand words:


Link to the project: robske110/IDDataLogger
Have fun and let me know what you think!

If your phone is set to English, the widget will also be English. The screenshots are from the German version.
Thanks for that, got it working pretty easy. Just need somewhere to find host the Raspbian vm so I don't have to leave my pc switched on overnight whilst charging.
 

·
Registered
Joined
·
38 Posts
Discussion Starter · #12 ·
Glad you like it! How about a raspberry pi. Then you don't need a vm at all. If you end up running it somewhere else, I recommend a simple Debian vm instead of a raspbian one.
I am currently working on a new chargeSession feature.
Here is the current design (with real data):

If you have any suggestions regarding the design or data representation, let me know!
 

·
Registered
Joined
·
38 Posts
Discussion Starter · #13 ·
I have now created an easy way to set this up using Docker. If anyone is interested in trying that out, let me know how it goes!
 

·
Registered
Joined
·
494 Posts
I spun up a Debian VM to try this out this evening but am having some trouble with it. I followed the instructions & ran the install.sh. The install seemed to go ok but the service didn't start after the suggested reboot.

I get this in the log:

Code:
-- Logs begin at Wed 2021-03-10 22:59:36 GMT, end at Wed 2021-03-10 23:05:16 GMT. --
Mar 10 22:59:40 debianbox systemd[1]: Started ID DataLogger php backend.
Mar 10 22:59:40 debianbox systemd[346]: iddatalogger.service: Changing to the requested working directory failed: No such file or directory
Mar 10 22:59:40 debianbox systemd[346]: iddatalogger.service: Failed at step CHDIR spawning /home/root/IDDataLogger/start.sh: No such file or directory
Mar 10 22:59:40 debianbox systemd[1]: iddatalogger.service: Main process exited, code=exited, status=200/CHDIR
Mar 10 22:59:40 debianbox systemd[1]: iddatalogger.service: Failed with result 'exit-code'.
Mar 10 22:59:45 debianbox systemd[1]: iddatalogger.service: Service RestartSec=5s expired, scheduling restart.
Mar 10 22:59:45 debianbox systemd[1]: iddatalogger.service: Scheduled restart job, restart counter is at 1.
Mar 10 22:59:45 debianbox systemd[1]: Stopped ID DataLogger php backend.
Mar 10 22:59:45 debianbox systemd[1]: Started ID DataLogger php backend.
Mar 10 22:59:45 debianbox systemd[411]: iddatalogger.service: Changing to the requested working directory failed: No such file or directory
Mar 10 22:59:45 debianbox systemd[411]: iddatalogger.service: Failed at step CHDIR spawning /home/root/IDDataLogger/start.sh: No such file or directory
Mar 10 22:59:45 debianbox systemd[1]: iddatalogger.service: Main process exited, code=exited, status=200/CHDIR
Mar 10 22:59:45 debianbox systemd[1]: iddatalogger.service: Failed with result 'exit-code'.
Mar 10 22:59:50 debianbox systemd[1]: iddatalogger.service: Service RestartSec=5s expired, scheduling restart.
Mar 10 22:59:50 debianbox systemd[1]: iddatalogger.service: Scheduled restart job, restart counter is at 2.
Mar 10 22:59:50 debianbox systemd[1]: Stopped ID DataLogger php backend.
Mar 10 22:59:50 debianbox systemd[1]: Started ID DataLogger php backend.
If I try to run start.sh manually I get:

Code:
[email protected]:~/IDDataLogger# ./start.sh
Loading Logger...
23:01:53.933710 [INFO] Starting ID DataLogger Version v0.0.4-InDev (4a232aba6508f1f858df07f145e9d387539fdae1-dirty)...
Loading Main...
23:01:53.968322 [INFO] Reading config...
23:01:53.968456 [INFO] Connecting to db...
Loading DatabaseConnection...
Loading ErrorUtils...
23:01:53.984174 [CRITICAL] RuntimeException: "Failed to connect to db (check db connection params): SQLSTATE[08006] [7] FATAL: password authe                              ntication failed for user "iddatalogger" FATAL: password authentication failed for user "iddatalogger" [7]" (EXCEPTION) in "/root/IDDataLogge                              r/src/vwid/DatabaseConnection.php" at line 68
23:01:53.984231 [EMERGENCY] CRASHED WHILE STARTING; TRYING TO SHUTDOWN SAFELY
23:01:53.984246 [INFO] Shutting down...
23:01:53.984257 [CRITICAL] Forcibly shutting down while starting!
Any pointers?
 

·
Registered
Joined
·
494 Posts
Found the problem. I previously installed as root. Needed to install as a non-root user. Point of note if anyone else tries this on a fresh Debian VM - The base Debian install doesn't have sudo installed. You'll need to install that before starting the install process for this app.
 

·
Registered
Joined
·
38 Posts
Discussion Starter · #17 ·
For others looking to install this, I created a Docker environment as an alternate installation method. It would be great to get some feedback and testing on it done if someone wants to try it.
 

·
Registered
Joined
·
494 Posts
Seems to be working well for me so far, though I have only driven the car & not charged it since I set up the server.

Would it be possible to have a toggle to change the units to miles?

Does the API have any trip distance related data? Would be good to be able to overlay the actual distance driven vs the range estimate. WeConnect on the e-Golf used to have every trip and charge logged. I was hoping that data would be available for the ID.3 version too eventually.
 

·
Registered
Joined
·
38 Posts
Discussion Starter · #19 ·
Miles/Kilometer switch is on my list. The iOS widget already has the option to display in miles, if you‘re using that.
Unfortunately there is no trip data available from the API yet, and as you said using remainRange is incredibly inexact. I hope VW adds this in the future via OTA.
 

·
Registered
Joined
·
47 Posts
Miles/Kilometer switch is on my list. The iOS widget already has the option to display in miles, if you‘re using that.
Unfortunately there is no trip data available from the API yet, and as you said using remainRange is incredibly inexact. I hope VW adds this in the future via OTA.
I've run it during a charge now although only at home with 7kw so didn't see the charge rate change except when I manually changed the charge to reduce output, also I'm on 564 so it only shows changes every 5% or charge. There's a couple of things I thought may be useful, one is it possible to be able to download the raw data from the web site in csv or similar format? Second if the data collection recognises it's either plugged in or charging could it grab the data more frequently than every 10 mins (eg every 2 mins) then revert to 10 mins when it stops charging?
 
1 - 20 of 73 Posts
Top