Authors:
This plugin is designed for Domoticz home automation system and provide a way to get status from Hyunday and Kia cars.
It's based on the hyundai-kia-connect-api python library, written by Fuat Akgun.
Using this plugin is possible to monitor the battery state of charge (for electric cars), that lead to the ability to enable / disable charging based on the power availability from photovoltaic, for example, improving the own-consumption.
Also it works with non-EV cars from Hyundai and Kia, monitoring the fuel level and range, climate, location, vehicle sensors, ...
It's also possible to control the car, activating for example the climate from the Domoticz panel.
Actually 30 devices will be created, using your language: English, Italian, Dutch, Swedish, Hungarian, Polish and French are supported, now, but if you want to contribute, just fetch the translation.txt file, add for each line the translation in your language, and send by email to linux AT creasol dot it.
This plugin can be installed typing the following commands from a shell: instead of installing the plugin, (penultimate command), it's possible to use Python Plugin Manager or Python Plugins Manager which also permit to update plugin easily or even automatically.
It's possible to configure 2 polling intervals, to limit accesses to the cloud (Kia Europe limit is 200 accesses/day): a standard interval, a shorter interval when driving (to track battery and position/speed), and a longer interval during the night computed as 4x polling interval, max 120 minutes). The polling interval while charging is computed as interval_driving * 2.
Permits to monitor all variables provided by the API
Also, permits to monitor the distance from home and have a map and address of the car location.
It's possible to set the climate temperature and activate climate from Domoticz. In this way it's easy, for example, to create a scene that enable EVSE (charging station) and vehicle climate for 15 minutes, for example, to pre-heat the vehicle in the winter morning before going to work.
#become root user
sudo su -
#install git, if not already installed
which git
if [ $? -ne 0 ]; then sudo apt install git; fi
#change to the domoticz directory / plugins
cd /home/pi/domoticz/plugins
#fetch the Python Plugin Manager (that can be used to install/upgrade other plugins, including domoticz-hyundai-kia)
git clone https://github.com/ycahome/pp-manager
#install python3-dateutil
sudo apt install python3-dateutil
#install original hyundai-kia-connect-api lib
# pip3 install hyundai-kia-connect-api
pip3 install pytz bs4
cd /usr/local/src
#git clone https://github.com/jwefers/hyundai_kia_connect_api.git #lib modified by jWefers
git clone https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api.git
mv /usr/local/lib/python3.9/hyundai_kia_connect_api /var/tmp 2>/dev/null
ln -s /usr/local/src/hyundai_kia_connect_api/hyundai_kia_connect_api /usr/local/lib/python3.9/dist-packages
#return on previous directory
cd -
#remove __pycache__ dir from the lib (it contains the __pycache__ with sources compiled by a different python version or different CPU)
for d in /usr/local/lib/python3*; do find $d -name __pycache__ -exec rm -r {} \; ; done
#fetch Creasol Plugin
git clone https://github.com/CreasolTech/domoticz-hyundai-kia
#restart Domoticz daemon
service domoticz restart
Before activating this plugin, assure that you've set the right name to your car (through the Hyundai/Kia connect app) short and simple: that name is used to identify devices in Domoticz. Also, use a very short name for the hardware plugin.
When plugin is activated, more than 30 devices will be automatically added to domoticz, named as {PLUGIN_NAME} - {VEHICLE_NAME} {device name}
If you want to rename a device, change only the {device name} part, do not change the {PLUGIN_NAME} - {VEHICLE_NAME} part of device name because it's used by the plugin to associate device name to a vehicle_name and vehicle_id provided by the cloud. Also, do not change the name of the ODOMETER device: leave this device name as original!
Make sure that the plugin is also run shortly before midnight (in addition to the polling intervals configured) by adding a timer setting to the switch device that can be use to force a data update. For example add a timer that sets the switch to status "On" every weekday at 23:57.
Then, enter Domoticz panel, go to Setup -> Hardware and enable the Hyundai Kia connect plugin specifying the Hyundai or Kia account credential: up to 4 vehicles associated to this account can be shown automatically on Domoticz.
Please note that there are some restrictions on the number of daily access to the cloud... for example EU customers cannot connect more than 200 times/day Also, the vehicle consumes energy for every access, so do not poll the car too often when it is not moving nor charging.
Sometimes a new version of this plugin also requires an update of the hyundai_kia_connect_api module.
Assuming you followed the installation instructions as described above, the hyundai_kia_connect_api can be updated to the latest version with the following commands:
cd /usr/local/src/hyundai_kia_connect_api/hyundai_kia_connect_api
sudo git pull
To update the plugin itself:
cd /home/pi/domoticz/plugins/HyundaiKiaConnect
sudo git pull
sudo service domoticz restart
In case the plugin has been updated by the Domoticz plugin manager already, the git pull command will complain that the plugin already has been updated. This can be corrected with the following command:
sudo git checkout ./plugin.py
After this the plugin can be updated with:
sudo git pull
sudo service domoticz restart
Version 2.0 (2024-07-03) has been rewritten to use the DomoticzEx framework: DeviceID for each device is kept as the Rev.1, but the name of each device must be renamed manually:
Rev.1 naming: PLUGIN_NAME - CAR_NAME DEVICE_NAME (for example Kia - eNiro odometer)
Rev.2 naming: CAR_NAME: DEVICE_NAME (for example eNiro: odometer)
After the plugin has been updated, please remember to manually rename all devices following the new naming convention!
Many thanks to:
Many thanks for the following language translations:
Creasol has developed a cheap and smart DIY EVSE module that can work stand-alone or connected to Domoticz.
Video showing electric car charging by Domoticz and DomBusEVSE module
Features:
detects plug connection and disconnection
detects when the electric vehicle starts and stops charging
detects alarms from vehicle
interfaces a bidirectional energy meter to know the real time import or export power from grid
operates as stand-alone (no need for a domotic controller) with the possibility to select two charging mode:
operates in a controlled mode, with Domoticz home automation system: in this case it's possible to
More info at https://www.creasol.it/EVSE
Below a list of modules, produced in Europe by Creasol, designed for Domoticz to be reliable and optimized for very very low power consumption.
Our industrial and home automation modules are designed to be
Modules are available in two version:
Store website - Information website
Complete solution to make a Smart EVSE, charging the electric vehicle using only energy from renewable source (photovoltaic, wind, ...), or adding 25-50-75-100% of available power from the grid.
Compact board, 32x17mm, to be installed on blank cover with a 4mm hole in the middle, to exchange air for the relative humidity sensor. It can be installed in every room to monitor temperature and humidity, check alarm sensors, control blind motor UP/DOWN, send notifications (using red and green leds) and activate white led in case of power outage.
Includes:
Very compact, versatile and cost-effective module with 9 ports. Each port can be configured by software as:
Versatile module designed to control gate or garage door.
DIN rail low profile module, with 8 relays and very low power consumption:
Versatile module with 230V inputs and outputs, and 5 low voltage I/Os.
Module designed to control 3 lights already existing and actually controlled by 230V pushbuttons and step-by-step relays. In this way each light can be activated by existing pushbuttons, and by the domotic controller.
Each relay can toggle the existing step-relay, switching the light On/Off. The optoisolator monitors the light status. The 5 I/Os can be connected to pushbuttons to activate or deactivate one or all lights.
DIN rail module, low profile, with 12 relays outputs and very low power consumption.
Module designed to be connected to alarm sensors (magnetc contact sensors, PIRs, tampers): it's able to monitor mains power supply (power outage / blackout) and also have 3 relays outputs.
Simple module with 2 relays, to be used with DomBus modules or other electronic boards with open-collector or open-drain outputs
IoT board designed for NodeMCU v3 board using ESP8266 WiFi microcontroller