Show charge level and maximum battery capacity on your computer

BMW i3 Forum

Help Support BMW i3 Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

alohart

Well-known member
Joined
Nov 1, 2014
Messages
3,093
Location
Honolulu, HI
Paul Kim of Paul Kim Consulting wrote a PHP script that when executed, emails the current charge level and the maximum battery capacity (Batt. Kapa. max in the service menu) to the user. Paul's script logs into the user's BMW Connected Drive Website account, navigates to a page on this Website that has but doesn't display the current charge level and the maximum battery capacity that have been retrieved from the user's i3, grabs the information from the Website's HTML code, packages it into an email message, and sends it to the email address the user specifies. Cool!

However, one must have access to a Web server running a mail server to use the script.

I modified Paul's script to run under macOS on a computer. When my script is double-clicked or opened in Finder, the current charge level and maximum battery capacity is printed in a Terminal window after a short delay while the BMW Connected Drive Website responds. I have no doubt that my executable script could easily be modified to run under Windows, but I don't do Windows.

For those of you with more than one i3 registered on your BMW Connected Drive Website account, this script almost certainly reports information from only one of your i3's.

If you have a Mac and would be interested in trying my script (2 scripts, actually), a Zip archive is downloadable from my DropBox account. You don't need to log into DropBox; just dismiss the login panel. This Zip archive includes a README file, Paul's PHP script that I have modified to run in a desktop environment, and an executable script that can be double-clicked to run Paul's PHP script. Both scripts are human-readable and can be opened in TextEdit, so there's no security risk.

These scripts make it possible to monitor the maximum battery capacity from a computer. At this time, this information is available only in the service menu while sitting in an i3. By running this script frequently before and after charging and/or driving, it is possible to see just how much the maximum battery capacity estimate varies. This should result in i3 owners and lessees not overemphasizing the importance of the maximum battery capacity estimate, but maybe trends in this estimate would become obvious which might be significant.

Please post any problems that you might discover.
 
Hi Art,

thanks for sharing your apps. Worked great for this new owner of a used 2015 i3 Rex. I'm going to paste the reported info into a running text file to track this. Wondering if present mileage can be retrieved with your script, too?

Last login: Wed May 9 06:22:11 on ttys000
Charge level: 71 %
Maximum battery capacity: 17.8 kWh

Thanks,
Roger in Maine.
 
aapl said:
Wondering if present mileage can be retrieved with your script, too?
Not currently. BMW's servers extract information from the selected i3, some or all of which is included in the Web page response that the Web page developer can use when designing the Web page that is sent to a user's Web browser, connecteddrive.bmwusa.com/cdp/release/internet/servlet/eNavigation is available to be displayed by these scripts. Currently, this is what's available:

• market (e.g., "US")
• VIN
• dcOnly (true/false - not sure what this means, but "true" for our 2014 BEV with the DC fast charging option)
• latitude of car's location (degrees)
• longitude of car's location (degrees)
• charge level (percentage)
• charge level (kWh)
• maximum battery capacity (kWh)
• vehicle moving (true/false)
• range map (not sure what this means - "RANGE_POLYGON" for our i3)

When BMW changes this Web page, the information available and where it is located in the Web page source could change which would break the PHP script, so don't count on this script working in the long run. The current PHP script ignores everything but the charge level percentage and the maximum battery capacity.
 
Back
Top