Lilygo TTGO T-Watch software for reading OBDII data from Hyundai Ioniq EV 28 kWh with GPS location as well. Data can be published to any server via GSM. Simple tracking site attached in webapp directory.
NOTE: I am using OBDLink MX+
- PHP 5 or higher version
- MySQL 8
- Upload webapp directory to a web service.
- Create database from webapp/database/tables.sql file.
- Setup your database config in webapp/api/application/config/database.php
$db['default'] = array(
'dsn' => '',
'hostname' => '<MYSQL HOST>',
'username' => '<MYSQL USERNAME>',
'password' => '<MYSQL PASSWORD>',
'database' => '<MYSQL DATABASE>',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
- If you would like to change any part of the code, feel free to contribute on my github or do it localy.
NOTE: If you change it localy, you need to run npm run build
in webapp/src directory once you have done and upload again.
If you are new to Arduino and Platform.io, you should get some information about them here.
If you are already familiar with them, let's start.
- Open the carapp/src/settings.h file and set the followings:
// User settings
#define APN "<YOUR INTERNET APN>"
#define GPRS_USER "<YOUR INTERNET USER>"
#define GPRS_PASS "<YOUR INTERNET PASSWORD>"
#define SIM_PIN "<PIN CODE OF YOUR SIM CARD>"
// Server settings
#define SERVER "<SERVER URL WHERE WEB APP RUNNING>"
#define PATH "/api/pull/20"
#define PORT 80
// Bluetooth settings
uint8_t ELM_ADDRESS[6] = <YOUR ELM DEVICE ID AS A HEX ARRAY> // {0x00, 0x04, 0x3E, 0x5D, 0xE5, 0xC2};
#define CAR_ID = "<YOUR CAR ID>" // TODO: replace with VIN number
- Compile and upload to connected Lilygo TTGO T-Watch
NOTE: If you are on MacOS, you must install driver for lilygo chipset. You can find it in carapp directory.
One of the caveats of using the existing 12V plugs is that those are only powered when the car engine is on, meaning that it's not possible to monitor the status of the battery while the car is charging or at all as well.
To be able to monitor the battery while the car is charging and not drain the 12V battery I've added a new 12V plug that takes the power from the fuse box that it's ONLY active when the car engine is on or the car is charging.
You can use the following fuse (IG3 2) to achieve this:
To be able to monitor the battery while at all and not drain the 12V battery I've added a new 12V plug that takes the power from the fuse box.
You can use the following fuse (Trunk) to achieve this:
In order to make them easy to take the power from the fuse box I've used the following adaptor.
Thanks for inspiring me to:
- OBD-PIDs-for-HKMC-EVs
- OBDSOL
- Pioniq
- Goingelectric.de
- And Tibor Zsorda
Before you download and use this software consider this: Any car is a possibly lethal piece of machinery and you might hurt or kill yourself or others using it, or even paying attention to the displays instead of watching the road. Be extremely prudent!
By even downloading this software, or the source code provided on GitHub, you agree to have completely understood this.
IONIQ GO (“THE SOFTWARE”) IS PROVIDED AS IS. USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHOR MAKE NO WARRANTIES AS TO PERFORMANCE OR FITNESS FOR A PARTICULAR PURPOSE, OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. NO ORAL OR WRITTEN COMMUNICATION FROM OR INFORMATION PROVIDED BY THE AUTHORS SHALL CREATE A WARRANTY. UNDER NO CIRCUMSTANCES SHALL THE AUTHORS BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM THE USE, MISUSE, OR INABILITY TO USE THE SOFTWARE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THESE EXCLUSIONS AND LIMITATIONS MAY NOT APPLY IN ALL JURISDICTIONS. YOU MAY HAVE ADDITIONAL RIGHTS AND SOME OF THESE LIMITATIONS MAY NOT APPLY TO YOU. THIS SOFTWARE IS ONLY INTENDED FOR SCIENTIFIC USAGE.