Git Product home page Git Product logo

home-assistant-hypervolt-charger's Introduction

home-assistant-hypervolt-charger

A Home Assistant Custom Component integration for the Hypervolt electric vehicle (EV) charger. This integration replicates functionality of the Hypervolt mobile app and allows actions to be automated and data to be logged within Home Assistant.

  • Start or stop charging based on the cheapest half hour slots available within your agile electricity tariff
  • Automatically manage charging when excess solar is available and your home storage battery is full (Super Eco mode alone may not work as you'd like when a home battery is installed)
  • Ensure that your charger is configured for the night's charge, every night, no matter what settings were changed during the day e.g. Scheduled Charge mode on, max current set, Boost mode set, ready to charge
  • Stop charging when a specific amount of energy has been supplied, or specific state of charge is reached (assuming the EV's state of charge is available via some other integration)
  • ...

Is this official?

This integration is not officially supported by Hypervolt and has been independently developed. Hypervolt are however aware of the integration and appear happy for it to exist.

Installation

The easy way to set up is to install through HACS. After installation via HACS and reboot of Home-Assistant, this integration can be added through the integration setup UI, like any other integration: Settings / Integrations / Add New Integration.

Use

Once installed within Home Assistant, and having restarted Home Assistant, you should be able to add the Hypervolt Charger integration. You'll be asked for your Hypervolt account credentials then the integration should find your charger and create a Device with the name of your charger's serial number. The various entities can then be added to dashboards, automations etc. as you wish.

Synchronisation model

The integration uses the hypervolt.co.uk APIs so is dependent on the cloud. Most of the settings are updated via websocket pushes so changes are reflected to/from the integration near immediately. An exception is the Activation Mode. For this, and as a fallback in case a push message is missed, the integration also polls the Hypervolt APIs every 5 minutes to refresh the state.

Entities

The integration is intended to match the features of the iOS and Android apps.

Name Description Notes
Hypervolt Charging Shows the current charging state. Used to matches the big Charging switch in the app when this existed. ⚠️ The entity will be turned into a read-only sensor in a future release, as the HV app no longer supports the stopping of charging via a switch (instead change the Activation Mode)
Hypervolt Charging Readiness One of: Charging, Ready, Not Ready - Force Stopped. ⚠️ Deprecated. Was added when the HV app had a charging switch that allowed charging to be stopped by toggling the switch. But then lead to a gotcha where charging would not resume. This entity will be removed in a future release.
Hypervolt Car Plugged Indicates whether the car is currently plugged into the charger. ⚠️ V3 chargers only.
Hypervolt Lock State Matches the lock feature in the app and allows locking of the charger. The Lock Pending state is mapped to On.
Hypervolt Activation Mode Switches between Plug and Charge and Schedule Charge modes. Use to start/stop charging. ⚠️Changes to this setting are not always reflected in realtime within the integration or Hypervolt app. If changed externally to the integration its state should update to the correct state within 5 minutes.
Hypervolt Charge Mode Switches between Boost, Eco, and Super Eco modes.
Hypervolt Max Current Reads and sets the maximum charging current, in Amps.
Hypervolt LED Brightness Reads and sets the LED brightness, in percent, as available via Settings within the app. The LED Mode isn't currently supported by the integration.
Hypervolt Schedule Session (n) Start/End Time Represents the schedule start/end time for the given session number. The values are populated from the Hypervolt servers and then can be modified within Home Assistant. Session times are not changed until the Apply Schedule button is pressed. This allows start and end times to be modified individually and all changes applied at once, to avoid invalid or undesirable schedules being applied while interim changes are being made. To delete a session, set the start and the end time to be the same value. Once applied, the session will be removed.
Hypervolt Schedule Session (n) Charg Mode The charging mode for the session slot ⚠️V3 chargers only. Sessions not changed until the Apply Schedule button is pressed.
Hypervolt Apply Schedule button Press this button to apply the schedule session start and end times. Once successfully applied, the session times are read back from the API. This may cause the session time values to update, for example, any gaps in the sessions will be removed i.e. if session 1 and session 3 were populated only, once applied, session 1 and session 2 would be populated. Also any sessions where the start time equals the end time will be removed. Applying the session times does not automatically switch the Hypervolt into Schedule mode. For that, use the Activation Mode select.
EV Power, House Power, Grid Power, Generation Power Power usage derived from the CT clamp(s), as reported by the Hypervolt app. For V3 devices, these values are reported even when there is no charging session. For V2 devices, these are only reported during a charging session. This integration just reports the values from the Hypervolt APIs. No assurance of accuracy of the values is given!
Hypervolt Voltage, Hypervolt Charger Current Only available during a charging session, these represent the voltage and current from the Hypervolt charger. This integration just reports the values from the Hypervolt APIs. No assurance of accuracy of the values is given!
Hypervolt CT Current, Hypervolt CT Power Only available during a charging session, these represent the current and power seen by the external CT clamp so will typically measure the household, or at least, whole circuit load, not just the Hypervolt. ⚠️ Use EV Power now, rather than CT Power. This integration just reports the values from the Hypervolt APIs. No assurance of accuracy of the values is given!
Hypervolt Session Carbon Saved, Hypervolt Session ID, Hypervolt Session Energy Are fields related to the current, or most recent charging session. Hypervolt Session Energy just reports the session energy exactly from the Hypervolt APIs and resets for each new session. The value may be noisy i.e. decrease slightly during the charging session and will reset each charging session. For this reason, it is not a good choice to use for energy measurement within Home Assistant. For that, use Hypervolt Session Energy Total Increasing instead.
Hypervolt Session Energy Total Increasing This is a sensor of state class total_increasing which means that it is suitable for energy measurement within Home Assistant. Unlike Hypervolt Session Energy, the value is not taken directly from the Hypervolt APIs, cannot decrease during a session and will only reset on a new charging session, for which the total_increasing logic will handle. For a discussion of why this sensor was created, see Sensor provides negative value when reset (HA Energy Dashboard) #5

Services

Set Schedule

The Set Schedule service is intended to be used by 🐙 Octopus Agile users with the Octopus Energy integration, specifically the Target Rates sensors which allow you to find the cheapest periods between two times. This allows an Agile user to set the schedule on the Hypervolt rather than switching the Hypervolt on or off based on the binary_sensor. This hopefully avoids failed charges due to cloud or connectivity outages that may occur overnight, and allows the user to check the schedule before settling down for bed 😴. A pseudo-intelligent automation could trigger when the car is plugged in (e.g. from a car integration), set a dynamic target rate between the current time until the morning, schedule the Hypervolt for those periods, and send a notification to the phone with the intended charging periods.

It has one target and 4 parameters:

  • Target Device - Your Hypervolt ID
  • Tracker Rate - The binary_sensor target created by the Octopus Energy integration
  • Backup Start - A backup start period if no times are found in the target sensor, consider setting this to give you enough charge to get to work and back...
  • Backup End - Backup end period
  • Append Backup - If checked this will always append the backup schedule period to the schedule. For example, we could set 06:00-07:00 to allow morning pre-heat climate control to draw from the grid rather than battery

The following sample yaml can be used to configure the service in an automation:

service: hypervolt_charger.set_schedule
data:
  backup_schedule_start: "04:30:00"
  backup_schedule_end: "06:00:00"
  tracker_rate: binary_sensor.octopus_energy_target_test
  append_backup: true
target:
  device_id: HYPERVOLT_DEVICE_ID

It also has code to support an intelligent_dispatching sensor to schedule the Hypervolt to match the planned_dispatches time periods. This has not been tested yet, but could be useful for owners with two cars and two chargers that want to set the second car to match the first car that is on the Intelligent Octopus Go tariff, or potentially Intelligent Octopus Flux or any other Intelligent stuff Octopus comes out with.

Known limitations

  • Log in has to be via via email address and password. Google or Apple login not supported
  • The charger name is not supported. The Device name in Home Assistant will be your charger's serial
  • English language only
  • LED modes are not supported

home-assistant-hypervolt-charger's People

Contributors

benjumanji avatar gndean avatar graham-dean-rm avatar meatballs1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

home-assistant-hypervolt-charger's Issues

Feature Request: kW when charging

Hey GD

Not sure if the API will allow this, but when charging is there anyway to grab the kW being sent to the car?

Use case is when using excess solar, would be useful to see how much kW is being sent to the car real-time.

Thanks again for all your work on this!

Authentication error when trying to log in, status code: 400

I've had a replacement Hypervolt charger (v2 > v3), therefore needed to update this integration. Also took the opportunity to strengthen my password. Removed the v2 charger from the Integration and put in my updated credentials > authentication error. Decided to completely remove the Hypervolt integration > reboot HA > re-downloaded & installed integration > re-booted HA. Still got authentication error when submitting my email and password (which work just fine on the Hypervolt web dashboard & smartphone app). What am I missing?

Log info:
This error originated from a custom integration.

Logger: custom_components.hypervolt_charger.hypervolt_api_client
Source: custom_components/hypervolt_charger/hypervolt_api_client.py:111
integration: Hypervolt Charger (documentation, issues)
First occurred: 22:56:32 (1 occurrences)
Last logged: 22:56:32

Authentication error when trying to log in, status code: 400

Many thanks, :)

Hypervolt new update - Schedules not syncing now

Hi,

Looks like Hypervolt have pushed a new update recently (ios in my case). It's changed the way the scheduling is done; with each session now able to specify the days it's workable on. This update hasnow broken the syncing of the scheduling between the the app and Home Assistant.

4 Max Schedule Slots?

I'm looking to do some ghetto IO style on my Agile tariff.

At 10pm, check charge level of car, take number of half hour slots required to charge to full, use the BottleCapDave Octopus integration to find the cheapest half hour slots between 11pm-6am, and then set the Hypervolt schedule to match.

I'm currently achieving this by changing between plug and charge/schedule for each half hour period, but this could be prone to failure with internet outages, API outages etc. Setting a schedule before bedtime will allow me to receive a notification, and check its been applied so I can sleep soundly.

I think I could use the current integration to set 4 time periods and then activate the apply schedule button, but if the 30 min sessions aren't continuous there could be a few more sessions than just 4.

It would be awesome if there was a service call that just took an array of times/time tuples? Probably just exposing the API call more directly really. Or to really go to town take a BottleCapDave target rate entity as an input ;)

I may try to attempt this myself if/when I can find the time

Error In Logs

Hello,

I am seeing a repeating error in my logs related to the Hypervolt plugin. Seems to occur every 5 minutes.

2024-01-27 13:31:19.233 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 243, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 399, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 479, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 945, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1066, in _async_write_ha_state
    state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1003, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/time/__init__.py", line 101, in state
    if self.native_value is None:
       ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hypervolt_charger/time.py", line 63, in native_value
    if len(intervals) > self.interval_index and intervals[self.interval_index]:
       ^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()
2024-01-27 13:31:19.243 WARNING (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] On_sync_websocket_message_callback error $object of type 'NoneType' has no len()
2024-01-27 13:31:19.251 ERROR (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] on_session_in_progress_websocket_message_callback message: {"charging":false,"session":214,"milli_amps":32000,"true_milli_amps":0,"watt_hours":0,"ccy_spent":0,"carbon_saved_grams":0,"ct_current":0,"ct_power":0,"voltage":0}, error: object of type 'NoneType' has no len()

Hypervolt v3.0 CT sensors unavailable

I read in a previous issue thread that the CT clamp sensors on the v3 version of the Hypervolt don't work, and indeed this is reflected in my HA instance. Do you have any documentation on the Hypervolt API and/or a Postaman environment that I can use to explore if the CT data is available? Thanks.

CT power entity no longer reports data in v2.0.2

After updating from v1.3.1 to v2.0.2 the CT clamp power entity - sensor.hypervolt_ct_power - is no longer receiving any data, and has an "unknown" state. Confirmed by downgrading to v1.3.1, which again started populating the live data.

Hypervolt 3.0

Schedule Charging Not Working

Integration works well apart from Schedule Charging. If I try to set up a schedule I get the error "Failed to call service/select_option. 'NoneType' object is not iterable".

Sensor provides negative value when reset (HA Energy Dashboard)

Firstly thank you so much for this integration.

The "Hypervolt Session Energy" sensor resets to zero when the charger starts a new session, this results in home assistant measuring a negative energy consumption in the energy dashboard (last session value is carried forward until the next session starts when its zerod again)

image

Potential fix i think would be amending the session sensor.hypervolt_ct_power to a cumulative statistic allowing home assistant to pick it up as an energy reading. Ill give it a shot tomorrow and see if i get time.

HA 2024.1.2 ELECTRIC_CURRENT_AMPERE ➜ UnitOfElectricCurrent.AMPERE

Got the following in my logs after updating to 2024.1.0 (from 2023.12.4).

Log details:

Logger: homeassistant.const
Source: helpers/deprecation.py:205
First occurred: 16:23:54 (2 occurrences)
Last logged: 16:23:54

ELECTRIC_CURRENT_AMPERE was used from hypervolt_charger, 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/gndean/home-assistant-hypervolt-charger/issues
ELECTRIC_POTENTIAL_VOLT was used from hypervolt_charger, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricPotential.VOLT instead, please create a bug report at https://github.com/gndean/home-assistant-hypervolt-charger/issues

Activation Mode not setting

When Changing activation mode between 'Plug and Charge' and 'Schedule', my Hypervolt is not updating. When I debug, I can see the following requests being sent:

For Plug and Charge
2023-09-12 15:53:51.408 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] Hypervolt charger schedule: {"type":"restricted","tz":"Europe/London","intervals":[[{"hours":0,"minutes":31,"seconds":0},{"hours":4,"minutes":29,"seconds":0}]],"enabled":false}

For Schedule
2023-09-12 15:54:02.930 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] Hypervolt charger schedule: {"type":"restricted","tz":"Europe/London","intervals":[[{"hours":0,"minutes":31,"seconds":0},{"hours":4,"minutes":29,"seconds":0}]],"enabled":true}

If I log on to my web dashboard, and look at the network request, I see the following:

For Plug and Charge:
{"intervals":[],"tz":"Europe/London","enabled":false,"type":"open"}

For Schedule:
{"intervals":[[{"hours":0,"minutes":31,"seconds":0},{"hours":4,"minutes":29,"seconds":0}]],"tz":"Europe/London","enabled":true,"type":"restricted"}

The difference I see is that in the web interface, 'type' changes from 'restricted' to 'open' as well as 'enabled' changing from true to false. I'm not sure if it's something fishy in my setup, but I think restricted isn't changing as it should.

Thanks!

Charger readiness monitoring

Hello, Thank you for a great integration!
Is it possible to make the readiness state a condition for monitoring in automations?.
It would also be good if it is possible to toggle the "switch" to change the state to "Ready" if the state is not ready.

Incorrect CT Clamp Power Reading

As of 25th September my Hypervolt 3 has started providing continuous readings from the CT Clamp, irrespective of whether I'm charging (before that the power was always zero, and the current only showed during charging). This is potentially very useful. Unfortunately it looks like the power is out by a factor of 100 though - I'm getting readings like 13.93A, 32.81W. Is there a way I can easily capture what's coming back from the API for you?

Question about CT monitoring

When our Hypervolt 3.0 was installed the electrician didn't run the CT cable in at all (long story, it would have been a very complicated route). However I do have a third party CT clamp that reports back into Home Assistant.

We're getting a solar + Powerwall system installed in a few weeks, and I'm just wondering if I can essentially replicate the functionality of the Hypervolt "solar" modes using this add-on - presumably I can use the powerwall and existing CT data entities to toggle the Hypervolt to 'charge' within this add-on? Or would I be gaining additional functionality if I bit the bullet and got the electrician back to do a long and fiddly cable run back to the consumer unit from the Hypervolt.

Kind of a shame Hypervolt don't support a wireless CT clamp system like the myenergi harvii...

Error: 'NoneType' object has no attribute 'age_ms'

This error popped up in my HASS logs today.
Hypervolt Home Charger 3.0 + Firmware 2627.0

Integration: v1.3.1

Home Assistant:

  • Core: 2024.3.0
  • Supervisor: 2024.02.1
  • Operating System: 12.0
  • Frontend: 20240306.0
Logger: custom_components.hypervolt_charger.hypervolt_api_client
Source: custom_components/hypervolt_charger/hypervolt_api_client.py:537
integration: Hypervolt Charger (documentation, issues)
First occurred: 10 March 2024 at 13:24:35 (34 occurrences)
Last logged: 02:00:07

on_session_in_progress_websocket_message_callback message: {"charging":true,"session":0,"milli_amps":0,"true_milli_amps":0,"watt_hours":0,"ccy_spent":0,"carbon_saved_grams":0,"ct_current":6000,"ct_power":490,"voltage":237}, error: 'NoneType' object has no attribute 'age_ms'

won't accept my login details

Hi,
Ive installed this via HACS and done a reboot.
When I go to login is says failed to connect even thou the details are correct.
Any ideas?

Failed To Connect

Issues appeared in my log today regarding configuration
2023-01-07 14_32_35-Settings – Home Assistant

I couldn't figure out what I needed to change, so went for the old "delete and start again", however on removal and re-install, my connection is not getting auth'd.

2023-01-07 14_32_01-Settings – Home Assistant

Same credentials are logging into the site @ www.hypervolt.co.uk without any hassle.

Any ideas? Are we blocked again?

Schedule helper

If HV3.0 handles per day schedules maybe it would work well as a schedule helper:

https://www.home-assistant.io/integrations/schedule/

Don't know why there isn't a 24 hour schedule (HA so close yet so far) that could be used for HV2.0. I guess it could be shoehorned into one day a week or duplicate it for all 7 days, but it may cause confusion if not documented well that its still 24 hours

Unable to change CHARGE_MODE. Just stopped working this week. Related to beta-programme? Now GA!

My integration has been working for months but suddenly (this week) I've noticed that the charge_mode (Boost, Eco, Super Eco) has stopped working. I can change it in HA but that change is not changed in the Hypervolt app (and vica versa). I don't think I get any error in the log files.
I have a suspicion it's related to the fact that I signed up to the Hypervolt beta test program. I believe there is a change they are/have implemented to change the way that the charge mode works? I believe they are enabling each schedule slot to specify its own charge mode and perhaps this changes/impacts the integration?

Activation Mode doesn't update

Changing the activation mode in the app, the new value isn't reflected in home assistant. Everything else seems to update instantly.

Hypervolt 3.0 CT clamp reports wrong data after session end

First of all, thank you for this integration. It was one of the reasons why I got a Hypervolt.

My device is a "Hypervolt Home Charger 3.0" with firmware 2627.0

On several occasions I have noticed that the reported CT clamp power value drops, as expected, at the end of a charging session, only to go back up - as if the car was still charging - a second later. The value is then misreported for almost the exact same duration as the original charging session.

In the attached screenshot you can observe what this looks like.
The actual session starts at 2am and ends at 6:30am, charging a 6.6kW
The reported value drops to 580W (base load) at 6:30:01am and goes back up to base load + 6.6kW a second later and continues like this until shortly after 11am.

As I'm not sure what could be the source of this issue, I have reported this to Hypervolt support as well, but might be worth investigating if this could be related to the integration.

Screenshot 2024-03-11 at 23 25 19

Authentication failure

Hi,

Ive just installed and rebooted, when trying to logic I get Authentication Failure.

I have logged out and logged in the app with the username and password. (Copy & Pasted)
I have also logged in with the same username and password at https://hypervolt.co.uk/dashboard
image

My email doesn't have any special characters other than @. My password is 50 characters long, so thinking that might be the issue?

Inability to set integration up

I am unable to set the integration up from scratch, even after reinstalling it multiple times. On a previous Home Assistant installation (2023.10.x), the integration worked flawlessly, aside from #29 which seemed to have resolved itself.

This issue is present on 2023.12.0 and 2023.11.3. I am running Home Assistant Supervised, integration version 1.3.0 installed through HACS. The HASS installation is fairly fresh with only a few additional integrations installed.

Surrounding logs prior to the below error (final 10 digits of ID hidden):

2023-12-06 22:36:25.829 INFO (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] Login loading URL: https://auth.hypervolt.co.uk/authorize
2023-12-06 22:36:26.963 INFO (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] HypervoltApiClient logged in!
2023-12-06 22:36:27.085 INFO (MainThread) [custom_components.hypervolt_charger.config_flow] Found chargers: [{'charger_id': 21645485##########, 'created': '2023-02-04T15:16:51.120127Z'}, {'charger_id': 7233931##########, 'created': '2023-05-12T19:10:20.457540Z'}, {'charger_id': 20248##########, 'created': '2023-05-13T11:20:14.603372Z'}]
2023-12-06 22:36:27.088 ERROR (MainThread) [aiohttp.server] Error handling request

Error:

Logger: aiohttp.server
Source: /usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py:421
First occurred: 10:36:27 PM (1 occurrences)
Last logged: 10:36:27 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 233, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 149, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 63, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 177, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 293, in async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 417, in _async_handle_step
    self._raise_if_step_does_not_exist(flow, result["step_id"])
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 440, in _raise_if_step_does_not_exist
    raise UnknownStep(
homeassistant.data_entry_flow.UnknownStep: Handler ConfigEntriesFlowManager doesn't support step select_charger

There are no subsequent logs.

Feature Request: Plugged in status

Hi Gndean,

Thanks for making an maintaining such a useful intergration.

Was just wondering if it was possible to add a sensor with plugged in status to show whether or not a car was connected to the charger.

Thanks again

[Request] Expose set_schedule as a service

Would it be possible to expose the set_schedule function from the API Client as a direct use service? I'm not overly concerned with tracking and managing the schedule itself within HA directly, as highlighted by your DateTime limitation, but in the meantime being able to make use of this to directly set the schedule by supplying a list of start/stop times would be immensely helpful.

My use case where this would be great:

  • I have the Octopus integration giving me the data on the 30 minute price slots for the current, and at 4pm the upcoming, day.
  • I have a template sensor which tracks this state and gives me a list of all the negative, free and sub-12p slots.
  • I have an automation which sends me a notification everytime this data changes, to give me a summary of the upcoming energy price slots.
  • What I would like to do, is have that notification have an action which allows me to "send to charger", which would automatically set the schedule based on these time slots.

I would attempt to do this myself and PR for you, but honestly I'm out of my depth with your python code (I'm a JS guy). That being said I am always keen to learn and give things a try, so if you want to contact me and watch me struggle while I ask you silly questions, my Discord is on my profile.

Can't add integration to HA addon's.

Just posting here to keep it all in one place, Facebook can be messy for tracking issues. Just in case it's not me doing something wrong. :)

I added the integration to HACS yesterday. Rebooted HA, attempted to add the integration but it doesn't show in the list.

image

I've tried:

  1. Logging out
  2. Browser cache delete
  3. New browser that I haven't used to login to HA before
  4. Several reboots of HA
  5. Tried the HA app on my iPhone

Nothing seems to work.

I'm running HA 2022.9.4, not sure if that makes a difference. I don't like upgrading HA that often as it can cause more issues than it solves.

Plugged v Unplugged

It would be really great if the integration told you if the charger was plugged into the car at any point in time. The mobile app shows a status of Unplugged. Any chance you could implement this as a binary switch please?
The reason for this request is to do with Session Energy (and your Total Session Energy extension). Neither seem to work as I hoped. Having spoken to Hypervolt Support, my understanding is that the Session Energy value should be treated as a ever increasing value and should only be 'reset' once the vehicle has been unplugged/re-plugged. Hence I should/could ignore any spurious resets until I see its been unplugged....if I knew when that was!

Voltage Sensor Always Zero

Hey,

I'm testing this out on a Hypervolt 3.0 charger and it looks like the current_voltage_session is always zero, even during a charging session.

Compatability

I am looking to get a EV Charger which integrates into HA, will this integration work with the Home 3 Pro?

Sensor value sensor.hypervolt_ct_power reads high

I have a live readout of our smart meter, the ct_power reading appears about 20% higher than the meter. Taking the sensor.hypervolt_ct_current and the sensor.hypervolt_voltage values and multiplying does give an accurate power reading for the ct clamp location. My guess is there could be a factor at safety included in the ct_power value?image

Session money spent appears wrong

The value in session money spent seems to be calculated at 14p per kWh rather than what is set in my Hypervolt tariff settings. The value on the Hypervolt website is also incorrect(same as this integration) but the app is showing the correct value. I think is issue is at Hypervolts end but wondered if this could grab the data the app is seeing?

Activation Mode not

Hypervolt Activation Mode isn't synchronising at all, even after hours.

It's strange how some things are instant but this isn't, im guessing it's on Hypervolts end and not something that can be overcome.

Thank you for your hard work.

Log Error in 2023.2

You have probably seen this but thought I would highlight just in case:

Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:503
Integration: Sensor (documentation, issues)
First occurred: 05:41:44 (1 occurrences)
Last logged: 05:41:44

Entity sensor.hypervolt_session_carbon_saved (<class 'custom_components.hypervolt_charger.sensor.HypervoltSensor'>) is using state class 'measurement' which is impossible considering device class ('weight') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

No device or entities

No device or entities loaded, when set up yesterday I assumed it might just take a while to load or need a charge sync on the car that I did last night.

hyper

The serial number for the device has been loaded and matches my charger in the app.

Screenshot_20221216-100038

I only have 1 charger.

Reloaded Hypervolt this morning following password change to see if it would load

Logs
error_log-2.txt

Any idea or suggestions for me to try?

Feature Request: Sensor detecting if the charger is plugged into a car

I suspect this isn't available from the Hypervolt, but just incase....

Is there anyway to have a sensor that detects if the cable is plugged into a car (for instance if the charging has manually been stopped, or if its only using solar excess and there isn't enough sun)

Thanks!

Feature Request: Get / Set schedule

It would be super useful if we could get and set the schedule. I don't understand the limitation that prevents this right now, as I have various other integrations that allow me to get and set dates and times. As an example, I change the scheduled charging of my house battery through a service, passing a JSON payload:

service: givenergy_local.enable_timed_charge
data: >
  {% set startTime = now() %}
  {% set endTime = as_datetime(states('sensor.octopus_intelligent_offpeak_end')).astimezone() %}
  {
    "start_time": "{{ '%02d' % startTime.hour }}:00:00",
    "end_time": "{{ '%02d' % endTime.hour }}:{{ '%02d' % endTime.minute }}:00",
    "device_id": "xxxx"
  }

This would be useful for charging one of our cars that doesn't support Intelligent Octopus or specifying a target battery SoC, as we could automate scheduling to always charge to 80%

Setup failed for HA v2023.4.2 (was working up to 2023.4.1)

Hi,

I got the following in my logs after upgrading to 2023.4.2

Logger: homeassistant.setup
Source: setup.py:205 
First occurred: 09:48:33 (1 occurrences) 
Last logged: 09:48:33

Setup failed for custom integration hypervolt_charger: Requirements for hypervolt_charger not found: ['websockets==10.4'].

Updating state for select.hypervolt_charge_mode took 0.942 seconds.

Hi,

I had this in my logs this morning:

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:742 
First occurred: 01:32:05 (1 occurrences) 
Last logged: 01:32:05

Updating state for select.hypervolt_charge_mode (<class 'custom_components.hypervolt_charger.select.ChargeModeSelect'>) took 0.942 seconds. Please report it to the custom integration author.

Hypervolt warnings happen relatively often, but this one asked me to report it.

I also had these in the logs:

2023-07-29 20:35:01.406 WARNING (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-11263, iterator exited. Socket closed, code: 1000, reason: Bye
2023-07-29 20:35:01.415 WARNING (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket session/in-progress, Task-11264, iterator exited. Socket closed, code: 1000, reason: Bye
2023-07-29 20:35:06.639 WARNING (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket session/in-progress, Task-11264, iterator exited. Socket closed, code: 1000, reason: Bye
2023-07-29 20:35:07.625 WARNING (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-11263, iterator exited. Socket closed, code: 1000, reason: Bye
2023-07-29 20:35:14.853 WARNING (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket session/in-progress, Task-11264, iterator exited. Socket closed, code: 1000, reason: Bye
2023-07-29 20:35:17.835 WARNING (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-11263, iterator exited. Socket closed, code: 1000, reason: Bye
2023-07-29 20:35:28.064 WARNING (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket session/in-progress, Task-11264, iterator exited. Socket closed, code: 1000, reason: Bye

Can CT power entity always be available

Is there any way to always have the CT power entity always producing data as opposed to only when the charging session is ongoing? Other than that thanks for all your work on this.

Session Energy Total Increasing is 'unknown' unless charging

Hi there, I'm trying to include my Hypervolt usage in the HA Energy Dashboard and I see you've included a Total Increasing type sensor which should work well.

However in my case this sensor has an "unknown" value unless the Hypervolt is actually charging or connected to the vehicle. I can see useful historical data in the logbook even when not connected but the graph line just disappears whenever the charger is disconnected.

Is there a way to make the previous total a persistent value?

Hypervolt going Unavailable daily, app is still connected and HA has no connection issues

Hi,

Since 2023.8.3, I have had an unstable connection with my Hypervolt charger. It seems to go offline daily and only a restart of HA fixes it. HA is not having connection issues and my Hypervolt app is also OK.

the specific logs entires are:

2023-08-29 09:57:21.318 ERROR (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] Authentication error when trying to log in, status code: 400
2023-08-29 09:57:21.332 ERROR (MainThread) [custom_components.hypervolt_charger.hypervolt_update_coordinator] Authentication failed while fetching hypervolt_charger data:
2023-08-29 09:57:21.397 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved

Any ideas?

Unauthorised errors

Was working fine, appear to get an unauthorised error since this morning


Logger: custom_components.hypervolt_charger.hypervolt_api_client
Source: custom_components/hypervolt_charger/hypervolt_api_client.py:164
Integration: Hypervolt Charger (documentation, issues)
First occurred: 06:43:29 (1 occurrences)
Last logged: 06:43:29

Update_state_from_schedule, unauthorised

I've not reset my creds and my app is working fine. Received the same after a Ha restart.

Wonder if HV have changed something (maybe intentionally blocked if it was churning through a lot of data), or something related to tariffs update or recent downtime of the energy usage.

Setting Lock state results in a 503 error

Build v1.0.6-beta

Changing the lock state results in HA prompting "Failed to call service switch/turn_on(off)".

The HA logs give the following:

Logger: custom_components.hypervolt_charger.hypervolt_api_client
Source: custom_components/hypervolt_charger/hypervolt_api_client.py:530 
Integration: Hypervolt Charger ([documentation](https://github.com/gndean/home-assistant-hypervolt-charger), [issues](https://github.com/gndean/home-assistant-hypervolt-charger/issues)) 
First occurred: 10:41:28 (6 occurrences) 
Last logged: 11:00:45

Set lock status, error from API, status: 503

and

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/hypervolt_charger/hypervolt_api_client.py:534 
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22)) 
First occurred: 10:41:28 (6 occurrences) 
Last logged: 11:00:45

[140374751470320]
[140373852643648]
[140373518298336]
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1755, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 958, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
    await result
  File "/config/custom_components/hypervolt_charger/switch.py", line 62, in async_turn_on
    await self._hypervolt_coordinator.api.set_lock_state(
  File "/config/custom_components/hypervolt_charger/hypervolt_api_client.py", line 534, in set_lock_state
    raise CannotConnect
custom_components.hypervolt_charger.hypervolt_api_client.CannotConnect

All other functions are working as expected.

Changing the lock status in the app results in the switch state changing as expected.

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.