

Any tips on getting started with a Python project like this for the Niro EV charging port?
As an owner of a Kia Niro EV, I'm interested in using Python to build an app that can monitor the status of the charging port and charging level. Does anyone have experience using Python to tap into the Niro's charging APIs and data? I'm wondering what libraries would be best to use for connecting to the port and extracting real-time charging data. Any tips on getting started with a Python project like this for the Niro EV charging port?
Python


One option is to use an OBD-II adapter to connect directly to the charging port and vehicle CAN bus. For this, you'll need an adapter like the ELM327 OBD reader that can interface with Python code over Bluetooth or USB. There are Python libraries like PYOBD and OBDS that make it straightforward to connect to the OBD adapter and monitor real-time data from the vehicle. The specific data available will depend on what PID (parameter ID) codes are supported by the Niro EV. But commonly accessible information includes:
- Battery state of charge
- Charging voltage/amperage
- Estimated time remaining during charging session
- Charging status (charging, completed, error codes)
- Get the battery charge level percentage
- Get estimated EV driving range/distance
- Get status of charging (in progress, interrupted, complete)
- Initialize connection/credentials to access the data source
- Define functions for extracting the desired charging parameters
- Set up a loop to poll the latest data at regular intervals
- Process and visualize the data as needed, like graphing the charge level over time
- Trigger any alerts or notifications based on value thresholds
- Safely close connections and store data when finished
Login to add comment