Giter Club home page Giter Club logo

ha-smartevsev3's Introduction

ha-SmartEVSEv3

hacs_badge

SmartEVSEv3 connection for Home Assistant

Installation using HACS (recommended)

  1. Install HACS if you have that not already running; you'd want it installed anyways to have access to all those wonderful custom_components....

  2. From the main menu, select HACS, select Integrations, select Explore & Download repositories; enter "smartevse" in the search box, follow instructions to download.

  3. Restart Home Assistant, and, very important and often forgotten, RESTART YOUR BROWSER! Really close your browser window and reopen it. F5 is not enough!

  4. After restart, from the main menu, select Settings, select Devices & Services (or wherever "Integrations" are mentioned); you will probably see your SmartEVSE installed.

    If not (because you don't have mDNS configured on your HomeAssistant Server, you have your SmartEVSE on a different vlan/network segment than your HomeAssistant Server, or other network mis/nonstandard configurations):

  5. Select "add integration", enter "smartevse", and from then on follow instructions.

  6. Restart Home Assistant, and, very important and often forgotten, RESTART YOUR BROWSER!

The main advantage of this installation method is that HomeAssistant will inform you of updates.

Alternative install

  1. Copy the folder custom_components/smartevse/ to your homeassistant config directory.
  2. From here on follow goto 3. of the above HACS Installation method.

Configuration

After installation and restart your SmartEVSE device should be discovered. If not:

  1. Go to Settings
  2. Go to Integrations
  3. At the bottom right, click Add Integration
  4. Search for "smartevse-3"
  5. Fill in your 4 digit serial number (if the integration didn't find your SmartEVSE-v3 already!)
  6. Save

Known issues

  1. For automatic discovery, your SmartEVSE device needs to be pingable by mDNS: ping SmartEVSE-xxxx.local where xxxx is the serial number of your device.

  2. This will only work if your SmartEVSE device is

    • a version 3 device,
    • running version 1.5.2 or higher from the serkri firmware (https://github.com/serkri/SmartEVSE-3/releases), The original firmware has no rest-API implemented, and does not announce itself on the mDNS network, so that will not work.

ha-smartevsev3's People

Contributors

altrnate32 avatar dingo35 avatar hmmbob avatar pieter-ha avatar sonar98 avatar stevoh6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ha-smartevsev3's Issues

Improvement: Better naming policy when using multiple smartevse's

When adding multiple smartevse's to home assistant:
CleanShot 2023-11-30 at 16 00 14

CleanShot 2023-11-30 at 16 00 53

They get entities like:

CleanShot 2023-11-30 at 16 01 43

This is quit confusing. It would be better if they would be added like:

sensor.smartevse_6845_access
sensor.smartevse_6847_access
sensor.smartevse_6848_access
sensor.smartevse_6849_access
etc...

Renaming 204 entities + future changes is undoable and renaming the devices, does not (bulk) change the entities.

HA core 2024.5.1 causing problem with mode selector

Firmware SERKRI-1.8.0
After upgrade to HA core 2024.5.1 or 5.2 the command
device_id: 13ebfd4ceffe4c4eb97c42732d788850
domain: select
entity_id: select.smartevse_mode_selector
type: select_option
option: "OFF"

fails. Mode selector remains on solar or smart.

Restoring to HA core 2024.4.4 fixes the problem

HACS integration won't update automatically?

I discovered (in manifest.json) that i still use version 1.0.10. HACS never mentions updates on the smartevse-3 integration. It does on other custom integrations. I thought that "the main advantage of this installation method (HACS) is that HomeAssistant will inform you of updates". What am i doing wrong here? Can i just overwrite the files of the newer version?

Unable to prepare setup for platform smartevse.switch

I'm using SERKRI-1.5.3 and ha-SmartEVSEv3 v 1.0.1.

When Home Assistant is starting the following error is written to the HA log file:

Unable to prepare setup for platform smartevse.switch: Platform not found (No module named 'custom_components.smartevse.switch').

This error appeared after updating ha-SmartEVSEv3 to version 1.0.1. I think I upgraded from version 0.9.2 which did not have this issue.

Bug/Feature: Show plug icon dependent on state

The entity smartevse_car_connected has the default "eye" symbol within HA. Imho it rather should have the mdi:power-plug symbol and should be based on the BinarySensorDeviceClass.PLUG. This way it would be possible to show the correct icon (plugged or unplugged) depending on actual state.

deprecated constants

Logger: homeassistant.const
Source: helpers/deprecation.py:205
First occurred: 00:37:50 (9 occurrences)
Last logged: 00:38:03

POWER_KILO_WATT was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.KILO_WATT instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
TIME_MINUTES was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTime.MINUTES instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
PRESSURE_BAR was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPressure.BAR instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
TEMP_CELSIUS was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
VOLUME_CUBIC_METERS was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfVolume.CUBIC_METERS instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues

More controls, particularly smartevse_override_current

Would it be possible to add more Home Assistant controls? According to the Serkri documentation, 11 POST attributes are available in the REST API.
Particularly override_current, the maximum available current, would be useful to control from Home Assistant , for instance based on the available solar power, or the power used by other devices connected to the mains.

Empty screen shown when adding integration

Hi,

When adding the integration to HA, I enter the serial number, click the confirmation button and then the following screen is shown:
image

After clicking close I don't have the integration listed and cannot use it. Nothing related is shown in the HA logs.

I'm using the 1.0.5 version of this project and SERKRI-1.5.5 on the SmartEVSE. However previous versions of the SmartEVSE SW caused the same issue.

If I enter a different (incorrect) serial number, the system does allow me to add it by IP, which does work. However, due to unrelated issues with the SmartEVSE FW, I have difficulty getting the static IP to stick (lost after power loss).

Best,
Ives

Energy vs Power

Wondering whether the sensor.smartevse_ev_import_active_energy (kWh) should actually have been named sensor.smartevse_ev_import_active_power (kW). That makes it consistent with the value on the EV meter.
I understand the implication of such a change, as it needs updating the json response from SmartEVSE-3 as well.
So maybe just change the unit of measurement for this sensor in const.py? The unit of measurement is correct in the SmartEVSE's web interface.

Feature Request: Switch to toggle between OFF and last used mode

A switch to toggle between OFF and last used Mode would be a great addition. That is so the SmartEvse can easily be controlled by another integration, like find the cheapest hours to charge etc.

This can be done with an physical switch connected to the SmartEVSE unit or through some Automatations that do the same, but it would be a neat feature to have built into the integration.

Thank you :)

Lots of depercation warnings on HA 2024.1.0b0

Looks like some constants have been changed.

It doesn't break the integration - it's just noisy in the logs.

2023-12-28 12:28:32.807 WARNING (MainThread) [homeassistant.const] TEMP_CELSIUS was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
2023-12-28 12:28:32.817 WARNING (MainThread) [homeassistant.const] ELECTRIC_CURRENT_AMPERE was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricCurrent.AMPERE instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
2023-12-28 12:28:32.836 WARNING (MainThread) [homeassistant.const] ENERGY_KILO_WATT_HOUR was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfEnergy.KILO_WATT_HOUR instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
2023-12-28 12:28:32.842 WARNING (MainThread) [homeassistant.const] POWER_KILO_WATT was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.KILO_WATT instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
2023-12-28 12:28:32.848 WARNING (MainThread) [homeassistant.const] TIME_MINUTES was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTime.MINUTES instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
2023-12-28 12:28:32.853 WARNING (MainThread) [homeassistant.components.sensor] STATE_CLASS_MEASUREMENT was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
2023-12-28 12:28:32.858 WARNING (MainThread) [homeassistant.components.sensor] STATE_CLASS_TOTAL_INCREASING was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL_INCREASING instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
2023-12-28 12:28:32.866 WARNING (MainThread) [homeassistant.components.sensor] STATE_CLASS_MEASUREMENT was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
2023-12-28 12:28:32.870 WARNING (MainThread) [homeassistant.components.sensor] STATE_CLASS_TOTAL_INCREASING was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL_INCREASING instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
2023-12-28 12:28:32.875 WARNING (MainThread) [homeassistant.const] PRESSURE_BAR was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPressure.BAR instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
2023-12-28 12:28:32.882 WARNING (MainThread) [homeassistant.const] TEMP_CELSIUS was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues
2023-12-28 12:28:32.895 WARNING (MainThread) [homeassistant.const] VOLUME_CUBIC_METERS was used from smartevse, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfVolume.CUBIC_METERS instead, please create a bug report at https://github.com/dingo35/ha-SmartEVSEv3/issues

Feature request: Adding other attributes

Is it possible for you to add the other attributes that are available from the SmartEVSE? When I want to use this fine integration I also have to maintain certain sensors (eg. C2, firmware version) in an other location because I am using them in my dashboard and Node-Red charging automation. Thanks!

Screenshot 2023-02-02 at 11 34 42

Detected that custom integration 'smartevse' calls async_write_ha_state from a thread at custom_components/smartevse/number.py, line 87: self.async_write_ha_state().

Hi all,

First, loving this integration and using it every day to control my EV charger. It was flawless till the last HA update.

Old HA core: 2024.4 -> Working perfect
New HA core 2024.5.0 ->
Detected that custom integration 'smartevse' calls async_write_ha_state from a thread at custom_components/smartevse/number.py, line 87: self.async_write_ha_state(). Please report it to the author of the 'smartevse' custom integration.

Seems like it has something to do with the transition to thread safe requirements and Python 3.12 in the new HA core release. More people having this error on the latest HA core?

The probleem seems to be related to this same error:
https://community.home-assistant.io/t/how-to-fix-custom-integration-brematic-calls-async-write-ha-state/722238

Where this is found to be the solution:
updating the async_write_ha_state() to schedule_update_ha_state()

The API call does seem to be handled successfully, so it is just the error it throws.

Hope @dingo35 has time to look in to this? Thanks in advance!

NORMAL mode abnormally changed to SMART after Power Control switch off / swith on

If Mode is set to NORMAL and you use 'SmartEVSE Power Control' switch to allow or deny charging, when you switch to 'Power off' works fine, Mode goes to OFF and charging is denied. But after that, if you switch to 'Power On' to start charging, Mode does not return to NORMAL. It is is changed to SMART (and 'no comms error' appears as no Sensorbox installed).

Seems to be some kind of error in template that doesn's store right mode retrieved from SmartEVSE and when sets whole template with new 'power control' state, also overwrites 'Normal' mode with 'Smart' value or something like that

(Firm SERKRI-1.5.3)

Acces through IP

Please make it possible to acces through IP instead of mDNS. mDNS is no working in my setup.

Start time is not correct

If the starting time is set at 3 o'clock in the morning. The time is in the SMART Evse is correct. But in Home Assistant it is 01:00 o'clock, which isn't correct.

It looks like it doesn't take local time in account (or does not contain localization).

starttime raw in smart evse: 1714698000
starttime time stamp in home assistant: 1714698000

But Smart Evse is showing 3 o'clock, home assistant 1 o'clock
Same goes for the latest update time. It is also 2 hours later than now.

But when i print now() in home assistant, it gives the correct time.

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.