Domoticz-hyundai-kia - Domoticz Hyundai-Kia plugin for Domoticz home automation system

Overview

Domoticz Hyundai-Kia plugin

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

For any support request, please write email to [email protected] or enter the Telegram DomBus group https://t.me/DomBus

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.

In this folder you can find the python plugin for Domoticz: you can install the hardware plugin by using Python Plugin Manager, or typing the following commands from the linux shell:

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

#fetch Creasol Plugin
git clone https://github.com/CreasolTech/domoticz-hyundai-kia

#install hyundai-kia-connect-api lib
pip3 install hyundai-kia-connect-api

#restart Domoticz daemon
service domoticz restart

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 at https://www.youtube.com/watch?v=fyDtGO6S1UI

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

More info at https://www.creasol.it/en/support/domotics-home-automation-and-diy/155-smart-electric-vehicle-charging

You might also like...
Solcast Integration for Home Assistant
Solcast Integration for Home Assistant

Solcast Solar Home Assistant(https://www.home-assistant.io/) Component This custom component integrates the Solcast API into Home Assistant. Modified

An application for automation of the mining function in the game Alienworlds.IO

alienautomation A Python script made to automate the tidious job of mining on AlienWorlds This script: Automatically opens the browser Automatically l

Impf Bot.py 🐍⚡ automation for the German

Impf Bot.py 🐍⚡ automation for the German "ImpfterminService - 116117"

Automation of VASP DFT workflows with ASE - application scripts

This repo contains a library that aims at automatizing some Density Functional Theory (DFT) workflows in VASP by using the ASE toolkit.

This project recreates the R-based RCy3 Cytoscape Automation library as a Python package.

Python library for calling Cytoscape Automation via CyREST

External Network Pentest Automation using Shodan API and other tools.

Chopin External Network Pentest Automation using Shodan API and other tools. Workflow Input a file containing CIDR ranges. Converts CIDR ranges to ind

A collection of daily usage utility scripts in python. Helps in automation of day to day repetitive tasks.
A collection of daily usage utility scripts in python. Helps in automation of day to day repetitive tasks.

Kush's Utils Tool is my personal collection of scripts which is used to automated daily tasks. It is a evergrowing collection of scripts and will continue to evolve till the day I program. This is also my first python project.

Demo content - Automate your automation!

Automate-AAP2 Demo Content - Automate your automation! A fully automated Ansible Automation Platform. Context Installing and configuring Ansible Autom

Stori QA Automation Challenge

Stori-QA-Automation-Challenge This is the repository is created for the Stori QA Intern Automation Engineer Challenge! In this you can find the Requir

Comments
  • No devices are created logs shows connectivity

    No devices are created logs shows connectivity

    I'm trying to get the plugin up and running and have updated python, installed several modules, but now i'm facing the following error in domoticz while the logs show connectivity and getting the correct information:

    2022-12-28 15:28:30.624 Error: EV6: Call to function 'onHeartbeat' failed, exception details: 2022-12-28 15:28:30.637 Error: EV6: Traceback (most recent call last): 2022-12-28 15:28:30.637 Error: EV6: File "/config/plugins/domoticz-hyundai-kia/plugin.py", line 680, in onHeartbeat 2022-12-28 15:28:30.638 Error: EV6: _plugin.onHeartbeat() 2022-12-28 15:28:30.638 Error: EV6: File "/config/plugins/domoticz-hyundai-kia/plugin.py", line 233, in onHeartbeat 2022-12-28 15:28:30.638 Error: EV6: self.vm.force_refresh_all_vehicles_states() # suggested by P.Levres: fetch data from vehicle to the cloud 2022-12-28 15:28:30.638 Error: EV6: File "/usr/local/lib/python3.9/dist-packages/hyundai_kia_connect_api/VehicleManager.py", line 80, in force_refresh_all_vehicles_states 2022-12-28 15:28:30.638 Error: EV6: self.force_refresh_vehicle_state(self.get_vehicle(vehicle_id)) 2022-12-28 15:28:30.638 Error: EV6: File "/usr/local/lib/python3.9/dist-packages/hyundai_kia_connect_api/VehicleManager.py", line 83, in force_refresh_vehicle_state 2022-12-28 15:28:30.638 Error: EV6: self.api.force_refresh_vehicle_state(self.token, vehicle) 2022-12-28 15:28:30.638 Error: EV6: File "/usr/local/lib/python3.9/dist-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 185, in force_refresh_vehicle_state 2022-12-28 15:28:30.638 Error: EV6: state = self._get_forced_vehicle_state(token, vehicle) 2022-12-28 15:28:30.638 Error: EV6: File "/usr/local/lib/python3.9/dist-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 398, in _get_forced_vehicle_state 2022-12-28 15:28:30.638 Error: EV6: return response["resMsg"]["vehicleStatusInfo"] 2022-12-28 15:28:30.638 Error: EV6: KeyError: 'vehicleStatusInfo'

    Log:

    DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080 DEBUG:urllib3.connectionpool:https://prd.eu-ccapi.kia.com:8080 "POST /api/v1/user/oauth2/token HTTP/1.1" 200 668 DEBUG:hyundai_kia_connect_api.KiaUvoApiEU:hyundai_kia_connect_api - Get Refresh Token Response {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5*********************************zA0MTk0MzZlYzQiLCJ1aWQiOiI0OGE3ZTc0Zi0wYTlkLTQyYTgtYTg2Yi00ZGRhYmFjMDU0OGEiLCJzaWQiOiJmZGM4NWMwMC0wYTJmLT******************************************jQwOTQsImlhdCI6MTY3MjIzNzY5NCwiaXNz********************************************pay19r1juy1TgVyvS6LoRual5RhFkMw_Ty7tsW_-Oqz0Mt8sld7qLqIs8ZZT1X4M8CKz40bFph54SPAxtmEwsr3VC78ZcP2p_aZ7aTskBUtrktN1T69jXJhVgG1zZMT6qeilbuozyqnMsEYDnXkcn0A9Hy2h0K6agryuDynpU************************************8yji13QZmmyTu9DiQnhrUdnw94h4gnnWuaA', 'token_type': 'Bearer', 'expires_in': 86400} DEBUG:hyundai_kia_connect_api.KiaUvoApiEU:hyundai_kia_connect_api - get_stamp 2022-12-28 13:04:10.396000+00:00 120000 42 998 42.032297191666665 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080 DEBUG:urllib3.connectionpool:https://prd.eu-ccapi.kia.com:8080 "GET /api/v1/spa/vehicles HTTP/1.1" 200 399 DEBUG:hyundai_kia_connect_api.KiaUvoApiEU:hyundai_kia_connect_api - Get Vehicles Response {'retCode': 'S', 'resCode': '0000', 'resMsg': {'vehicles': [{'vin': 'KNACAFN****6', 'vehicleId': 'fb0f-1**-*d-bf-c43e*****e7b', 'vehicleName': 'EV6', 'type': 'EV', 'nickname': 'EV6', 'master': True, 'carShare': 0, 'regDate': '2022-09-30 22:28:04.311', 'detailInfo': {'inColor': 'WK', 'outColor': 'B4U', 'saleCarmdlCd': 'AS', 'bodyType': '2', 'saleCarmdlEnNm': 'EV6'}}]}, 'msgId': '2d4bec0f-1371-4609-b125-9179fc83404f'} DEBUG:hyundai_kia_connect_api.KiaUvoApiEU:hyundai_kia_connect_api - get_stamp 2022-12-28 13:04:10.396000+00:00 120000 42 998 42.033621883333325

    opened by JochemLangerak 4
  • [Feature Question] : possibility to start and stop charging

    [Feature Question] : possibility to start and stop charging

    Hello, thank you for your plugin.

    I will have soon a Ioniq 5.

    Is your plugin allows to start and stop the charging while the supplied "domestic" cable is plugged? My purpose is to start the charging only when I have enough Solar panel Autocumsumption. I alredy do that successfully with my "water heater", using the Enphase plugin to detect auto consumption. (then I will have to set priorities between the 2 devices...)

    Is it dangerous to start and stop it often ?

    thanks and best regards

    opened by rezzalex 52
  • Plugin not loading

    Plugin not loading

    Hello,

    I have a Kia e-Niro, 2021 and at home I have Domoticz running on a Raspberry Pi.

    I am trying to install the domoticz-hyndai-kia plugin as described in the staps. I can find the plugin in the "hardware" tab, but for some reason it is not loaded and I cannot find any of the devices.

    Raspberry: Pi B+ OS: Version 11, Bullseye Domoticz: 2022.1

    This I have found in the Domoticz log:

    DomoticzErrorLog

    I have found several forum posts about such kind of error, but I can not solve it. Is there someone who can help me? Sorry if it is because of my lack of knowledge!

    opened by TheBrankman 21
Owner
Creasol
Electronic products for home automation systems
Creasol
Open source home automation that puts local control and privacy first

Home Assistant Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiast

Home Assistant 57k Jan 2, 2023
Integration of CCURE access control system with automation HVAC of a commercial building

API-CCURE-Automation-Quantity-Floor Integration of CCURE access control system with automation HVAC of a commercial building CCURE is an access contro

Alexandre Edson Silva Pereira 1 Nov 24, 2021
A simple but flexible plugin system for Python.

PluginBase PluginBase is a module for Python that enables the development of flexible plugin systems in Python. Step 1: from pluginbase import PluginB

Armin Ronacher 1k Dec 16, 2022
A minimalist production ready plugin system

pluggy - A minimalist production ready plugin system This is the core framework used by the pytest, tox, and devpi projects. Please read the docs to l

pytest-dev 876 Jan 5, 2023
A simple but flexible plugin system for Python.

PluginBase PluginBase is a module for Python that enables the development of flexible plugin systems in Python. Step 1: from pluginbase import PluginB

Armin Ronacher 935 Feb 20, 2021
A free and powerful system for awareness and research of the American judicial system.

CourtListener Started in 2009, CourtListener.com is the main initiative of Free Law Project. The goal of CourtListener.com is to provide high quality

Free Law Project 332 Dec 25, 2022
Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu.

Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu.

WayDroid 4.7k Jan 8, 2023
System Design Assignments as part of Arpit's System Design Masterclass

System Design Assignments The repository contains a set of problem statements around Software Architecture and System Design as conducted by Arpit's S

Relog 1.1k Jan 9, 2023
Home Assistant integration for spanish electrical data providers (e.g., datadis)

homeassistant-edata Esta integración para Home Assistant te permite seguir de un vistazo tus consumos y máximas potencias alcanzadas. Para ello, se ap

VMG 163 Jan 5, 2023
take home quiz

guess the correlation data inspection a pretty normal distribution train/val/test split splitting amount .dataset: 150000 instances ├─8

HR Wu 1 Nov 4, 2021