dingo35 / ha-smartevsev3 Goto Github PK
View Code? Open in Web Editor NEWIntegrate SmartEVSEv3 with HomeAssistant through custom component
Integrate SmartEVSEv3 with HomeAssistant through custom component
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.
Hi,
When adding the integration to HA, I enter the serial number, click the confirmation button and then the following screen is shown:
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
There is no MaxSumMains visible in HA. Why don't we see this and have an option to change it from HA?
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.
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?
Right now the project main page / readme lists:
"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."
This is no longer true, the default firmware now has rest-API included (apparently serkri firmware was merged into the main firmware).
Please make it possible to acces through IP instead of mDNS. mDNS is no working in my setup.
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!
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.
Home Assistant version: 2024.7.0
Following error in the logs:
WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration smartevse with title: 6969 and entry_id: d1d9e0b23887f05657012098355f5b32, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
I am getting the following stack trace:
Stack (most recent call last):
File "/home/homeassistant/hass-venv312/bin/hass", line 8, in <module>
sys.exit(main())
File "/home/homeassistant/hass-venv312/lib/python3.12/site-packages/homeassistant/__main__.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/home/homeassistant/hass-venv312/lib/python3.12/site-packages/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/lib/python3.12/asyncio/base_events.py", line 1987, in _run_once
handle._run()
File "/usr/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/home/homeassistant/hass-venv312/lib/python3.12/site-packages/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/home/homeassistant/hass-venv312/lib/python3.12/site-packages/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
report(
File "/home/homeassistant/hass-venv312/lib/python3.12/site-packages/homeassistant/helpers/frame.py", line 151, in report
_LOGGER.warning(msg, stack_info=True)
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.
If you have a physical switch connected to the "SW" and "GND" on the low voltage connection of the SmatEvse unit to toggle between OFF and latest used Mode (SMART, SOLAR & NORMAL) the Mode in HA is not updated. On its web page http://smartevse-XXXXX.local/ the Mode is updated and 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.
When adding multiple smartevse's to home assistant:
They get entities like:
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.
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 :)
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)
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
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
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
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.