sveinse / zaptec

zaptec charger custom component for home assistant
MIT License
10 stars 2 forks source link

DEVELOPMENT Zaptec EV charger component for Home Assistant

hacs GitHub Release License Downloads

Project Maintenance BuyMeCoffee

Project Maintenance BuyMeCoffee

:bangbang: NEWS

:warning: This fork has now been integrated into Official Zaptec release 0.7.0, see Zaptec v0.7.0 release. Please install this version. Any issues should also be filed in Zaptec issues

Development version

:information_source: IMPORTANT! This is https://github.com/sveinse/zaptec which is @sveinse fork of upstream/official zaptec integration at https://github.com/custom-components/zaptec. This is under active development, and any feedback on your experience using it is very appreciated.

Features

To use this component, a user with access to Zaptec Portal is needed.

Compatibility

Confirmed to work with

:information_source: Please reach out if you have been able to make this component work with other Zaptec chargers.

:bangbang: Breaking change

:warning: This release will BREAK your current automations

The Zaptec integration has been completely refactored. The way to interact with you Zaptec charger from Home Assistant has been changed. The Zaptec data is now represented as proper entities (like sensors, numbers, buttons, etc). This makes logging and interactions much simpler and it needs no additional templates.

The integration is set up as one devices for each of the detected Zaptec devices. Most users will have three devices: An installation device, a circuit and a charger and each provide different functionality.

The previous zaptec entities were named zaptec_charger_<uuid>, zaptec_installation_<uuid> and zaptec_circute_<uuid>. The full data were available as attributes in these objects, and they could be retried with the aid of manual templates. The same objects exists, but under the names <name> Installer, <name> Charger and <name> Circuit.

Beta testing

The component is currently under beta testing. Any feedback on problems, improvements or joy can be given at: https://github.com/sveinse/zaptec/issues

In particular the following items is of particular interest:

In some cases it would help debugging to have access to the diagnostics info. Please see the "Diagnostics" section below in how to generate if it is requested.

Installation

This repo can be installed manually into Home Assistant by manually adding the URL in HACS.

:information_source: NOTE! Existing zaptec installations MUST be uninstalled first. Installing this repo will clash with existing integration already installed.

Step 1

Setup1

Step 2

Setup2

Step 3

Setup3

Usage

Zaptec device concept

The Zaptec cloud API use three levels of abstractions in their EVCP setup. These are represented as three devices in HA

Start & stop charging

Starting and stopping charging can be done by several methods. If the charger is configured to no require authentication, connecting the charger to the EV will by default start charging.

To start the charging from HA, this can be done in several ways:

Similarly, pausing the charging can be done by:

:information_source: NOTE: Zaptec will unlocks the cable when charging is paused unless it is permanently locked.

Prevent charging auto start

Zaptec will by default start charging as soon as everything is ready under the following conditions; (1) Cable connected to car, (2) Car is ready to charge, (3) authentication is given (optional).

If auto start is not wanted, e.g. for delayed start or energy control, one of the following will prevent auto start:

:information_source: NOTE! The "Available current" is the official way to control the charge current. However, it will affect all chargers connected to the installation.

Setting charging current

The "Available current" number entity in the installation device will set the maximum current the EV can use. This slider will set all 3 phases at the same time.

:information_source: NOTE! This entity is adjusting the available current for the entire installation. If the installation has several chargers installed, changing this value will affect all.

:information_source: NOTE! Many EVs doesn't like getting too frequent changes to the available charge current. Zaptec recommends not changing the values more often than 15 minutes.

3 phase current adjustment

The service call limit_current can be used with the arguments available_current_phase1, available_current_phase2 and available_current_phase3 to set the available current on individual phases.

Require charging authorization

Many users wants to setup their charger to require authorization before giving power to charge any EV. This integration does not offer any options to configure authorization. Please use the official Zaptec portal or app.

If the charger has been setup with authorization required, the car will go into Waiting mode when the cable is inserted. Authentication must be presented before being able to charge. This can be RFID tags, the Zaptec app and more.

If the installation is configured for native authentication it is possible to authorize charging from Home Assistant using the "Authorize charging" button. It stays authorized until either the cable is removed or the button "Deauthorize charging" is pressed.

:information_source: INFO: Please note that Zaptec unlocks the cable when charging is paused unless it is permanently locked.

Templates

The special diagnostics entities named "x Installation", "x Circuit" and "x Charger" contains all attributes from the Zaptec API for each of these devices. This corresponds to the old zaptec_installation_*, zaptec_circuit_* and zaptec_charger_* objects. These attributes can be used with template sensors to retrieve additional or missing information.

Example: Add the following to your configuration.yaml

template:
  - sensor:
     - name: Charger Humidity
       unique_id: charger_humidity
       unit_of_measurement: '%Humidity'
       state: >
        {{ state_attr('binary_sensor.X_charger', 'humidity') | round(0) }}
       # Replace "X_charger" with actual entity name

The list of attributes can be found by looking at the attributes for the entities. Note that the names cannot contain spaces. Replace captal letters with small case and spaces with underscore (). E.g. The attribute "Charger max current"_ is charger_max_current in the template.

Diagnostics

The integration supports downloading of diagnostics data. This can be reached by Settings -> Devices & Services -> <one of your zaptec devices> and then press the "Download diagnostics". The file downloaded is anonymized and should not contain any personal information. Please double check that the file doesn't contain any personal information before sharing.