Giter Site home page Giter Site logo

domoticz-hyundai-kia's Introduction

Domoticz Hyundai-Kia plugin

Author: Creasol https://www.creasol.it/domotics

For any support request, please write to linux at creasol dot it or enter the Telegram DomBus group https://t.me/DomBus

Kia floorplan in Domoticz, simple example made in 10 minutes

Kia car panel, in Domoticz, with some controls to charge the EV car by Creasol DomBusEVSE

Introduction

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:

Features

  • 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.

Charging the electric car in a smart way

Creasol is developing a cheap and smart DIY EVSE module that can work stand-alone or connected to Domoticz.

Video showing electric vehicle charging by Domoticz and Creasol DomBusEVSE module 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:

    1. use the maximum power allowed by electricity meter, preventing overloads and disconnections, without exceeding the power supported by the charging cable
    2. use only renewable energy (keep import power around 0W)
  • operates in a controlled mode, with Domoticz home automation system: in this case it's possible to

    1. easily set the minimum and maximum battery level
    2. easily set the maximum charging current
    3. when battery level is below minimum, charge at the max power permitted by the electricity meter (in Italy, alternates 90 minutes at maximum power + 27% and 90 minutes at maximum power + 10%, it's not possible to charge faster! The electrical system must be checked carefully when using maximum power, to avoid overheating and fires!!)
    4. when battery level is between minimum and maximum, charge using only power from renewable energy (from photovoltaic) keeping 0W imported from the grid.

More info at https://www.creasol.it/EVSE

Video about Creasol DomBus modules for Domoticz Video about DomBus modules

Installation

#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
#instead of the original version, install the version enhanced by jwefers
cd  /usr/local/src
git clone https://github.com/jwefers/hyundai_kia_connect_api
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/hyundai_kia_connect_api

#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

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

Credits

Many thanks for the following language translations:

  • Dutch translation by Branko
  • Swedish translation by Joakim W.
  • Hungarian translation by Upo
  • Polish translation by z1mEk
  • French translation by Neutrino
  • German translation by Gerhard M.

domoticz-hyundai-kia's People

Contributors

creasoltech avatar z1mek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.