gndean / home-assistant-hypervolt-charger

Home Assistant integration for Hypervolt EV charger
47 stars 3 forks source link

Octopus Intelligent GO integration #68

Open Quickstep3 opened 4 weeks ago

Quickstep3 commented 4 weeks ago

FYI as much as anything else as Hypervolt integration with Octopus Intelligent GO is now live in Beta (and working). The Activation Mode is blank / reported "unknown" in the HA history. Seems they have added an additional Activation Mode type of Octopus when looking at the Hypervolt app. Charge Rate limit and Charge Mode are still available to control, but all other charging and scheduling control is handed off to Octopus and the Hypervolt app prevents you changing anything other than Rate and Mode. Integration might need updating to prevent errors or invalid state being set by users. I'm still working through the changes and whether my automations to consume excess solar by controlling the Hypervolt charger are needed, will work or just accept I can charge at 7p/kWh (when Octopus control it) and export at 15p/kWh so consuming excess solar may not be necessary anymore. I'll try and get some debug logs that will help to see what value API is reporting for Activation Mode.

Debug Log below with some potential new web socket stuff highlighted that might related to the Octopus integration and be helpful.

2024-08-17 10:42:00.867 INFO (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] Attempting log in 2024-08-17 10:42:01.193 INFO (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] HypervoltApiClient logged in! 2024-08-17 10:42:01.194 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_update_coordinator] HypervoltCoordinator _update returning current state 2024-08-17 10:42:01.195 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_update_coordinator] Finished fetching hypervolt_charger data in 0.329 seconds (success: True) 2024-08-17 10:42:01.195 DEBUG (MainThread) [custom_components.hypervolt_charger] Async_setup_entry async_forward_entry_setups 2024-08-17 10:42:01.218 DEBUG (MainThread) [custom_components.hypervolt_charger.switch] Switch async_setup_entry enter 2024-08-17 10:42:01.229 DEBUG (MainThread) [custom_components.hypervolt_charger.time] Time async_setup_entry enter 2024-08-17 10:42:01.237 DEBUG (MainThread) [custom_components.hypervolt_charger.button] Button async_setup_entry enter 2024-08-17 10:42:01.243 DEBUG (MainThread) [custom_components.hypervolt_charger.text] Text async_setup_entry enter 2024-08-17 10:42:01.249 DEBUG (MainThread) [custom_components.hypervolt_charger.binary_sensor] Binary Sensor async_setup_entry enter 2024-08-17 10:42:01.251 DEBUG (MainThread) [custom_components.hypervolt_charger] Async_setup_entry async_forward_entry_setups done 2024-08-17 10:42:01.255 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, enter 2024-08-17 10:42:01.496 INFO (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, connected 2024-08-17 10:42:01.496 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] Send_message_to_sync: {"id": "1723887721496530", "method": "login", "params": {"token": "****", "version": 2}, "jsonrpc": "2.0"} 2024-08-17 10:42:01.535 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","id":"1723887721496530","result":{"authenticated":true}} 2024-08-17 10:42:01.536 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] Send_message_to_sync: {"id": "1723887721535993", "method": "sync.snapshot", "jsonrpc": "2.0"} 2024-08-17 10:42:01.539 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] Send_message_to_sync: {"id": "1723887721539313", "method": "schedules.get", "jsonrpc": "2.0"} 2024-08-17 10:42:01.542 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] Send_message_to_sync: {"id": "1723887721541889", "method": "plugncharge.get", "jsonrpc": "2.0"} 2024-08-17 10:42:01.545 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","method":"sync.apply","params":[{"brightness":1.0},{"lock_state":"unlocked"},{"release_state":"default"},{"max_current":29000},{"ct_flags":0},{"solar_mode":"boost"},{"features":["mms","home-battery-drain-prevention","enhanced-energy"]},{"random_start":false},{"effect_name":"none"}]} 2024-08-17 10:42:01.546 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_update_coordinator] Manually updated hypervolt_charger data 2024-08-17 10:42:01.555 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","method":"get.connection_state","params":{"connection_state":"online"}} 2024-08-17 10:42:01.555 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] On_sync_websocket_message_callback ignored message: {"jsonrpc":"2.0","method":"get.connection_state","params":{"connection_state":"online"}} 2024-08-17 10:42:01.555 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","method":"get.pilot_status","params":{"pilot_status":"B"}} 2024-08-17 10:42:01.555 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_update_coordinator] Manually updated hypervolt_charger data 2024-08-17 10:42:01.558 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","method":"get.composite_pilot_status","params":{"composite_pilot_status":"B1"}} 2024-08-17 10:42:01.559 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] On_sync_websocket_message_callback ignored message: {"jsonrpc":"2.0","method":"get.composite_pilot_status","params":{"composite_pilot_status":"B1"}} 2024-08-17 10:42:01.559 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","method":"get.solar_inhibit_charge","params":{"solar_inhibit_charge":false}} 2024-08-17 10:42:01.559 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] On_sync_websocket_message_callback ignored message: {"jsonrpc":"2.0","method":"get.solar_inhibit_charge","params":{"solar_inhibit_charge":false}} 2024-08-17 10:42:01.559 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","method":"get.schedule_inhibit","params":{"schedule_inhibit":true}} 2024-08-17 10:42:01.559 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] On_sync_websocket_message_callback ignored message: {"jsonrpc":"2.0","method":"get.schedule_inhibit","params":{"schedule_inhibit":true}} 2024-08-17 10:42:01.559 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","method":"get.thermal_ilimit","params":{"thermal_ilimit":31.5}} 2024-08-17 10:42:01.559 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] On_sync_websocket_message_callback ignored message: {"jsonrpc":"2.0","method":"get.thermal_ilimit","params":{"thermal_ilimit":31.5}} 2024-08-17 10:42:01.560 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","method":"get.AC_present","params":{"AC_present":true}} 2024-08-17 10:42:01.560 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] On_sync_websocket_message_callback ignored message: {"jsonrpc":"2.0","method":"get.AC_present","params":{"AC_present":true}} 2024-08-17 10:42:01.560 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","method":"get.session","params":{"charging":false,"true_milli_amps":0,"voltage":0,"watt_hours":0,"carbon_saved_grams":0,"ct_current":2600,"ev_power":0,"grid_power":27,"house_power":27,"generation_power":0}} 2024-08-17 10:42:01.560 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_update_coordinator] Manually updated hypervolt_charger data 2024-08-17 10:42:01.580 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","id":"1723887721535993","result":[{"brightness":1.0},{"lock_state":"unlocked"},{"release_state":"default"},{"max_current":29000},{"ct_flags":0},{"solar_mode":"boost"},{"features":["mms","home-battery-drain-prevention","enhanced-energy"]},{"random_start":false},{"effect_name":"none"}]} 2024-08-17 10:42:01.580 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_update_coordinator] Manually updated hypervolt_charger data 2024-08-17 10:42:01.584 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","id":"1723887721539313","result":{"applied":{},"pending":{}}} 2024-08-17 10:42:01.585 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_update_coordinator] Manually updated hypervolt_charger data 2024-08-17 10:42:01.587 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","id":"1723887721541889","result":{}} 2024-08-17 10:42:01.588 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] On_sync_websocket_message_callback ignored message: {"jsonrpc":"2.0","id":"1723887721541889","result":{}} 2024-08-17 10:42:03.375 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","method":"get.session","params":{"charging":false,"true_milli_amps":0,"voltage":0,"watt_hours":0,"carbon_saved_grams":0,"ct_current":2600,"ev_power":0,"grid_power":27,"house_power":27,"generation_power":0}} 2024-08-17 10:42:03.376 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_update_coordinator] Manually updated hypervolt_charger data 2024-08-17 10:42:03.411 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_websocket sync, Task-19064, recv: {"jsonrpc":"2.0","method":"get.session","params":{"charging":false,"true_milli_amps":0,"voltage":0,"watt_hours":0,"carbon_saved_grams":0,"ct_current":2600,"ev_power":0,"grid_power":19,"house_power":19,"generation_power":0}} 2024-08-17 10:42:03.412 DEBUG (MainThread) [custom_components.hypervolt_charger.hypervolt_update_coordinator] Manually updated hypervolt_charger data

GPDixon commented 2 weeks ago

Are you still able to turn charging on yourself, either through the app or through the HA integration? Presumably you can't rely entirely on Octopus? You might, for example, need to recharge during the day? How do you do that? I had assumed you could still manually control charging; you just have to give up the schedule setting?

Quickstep3 commented 2 weeks ago

You hand over all control to Octopus. From the last few test charges they set the schedule, including outside of off peak (which you still get at off peak rate and they manage the charge rate/current to balance the grid load). Good news is that the whole house usage is at off peak rate when the car is charging. Within the Octopus app there is the option to "bump charge" if you need an urgent charge. You can turn the Octopus smart scheduling off and use Hypervolt as you used to, but the T&Cs require you to complete a smart charge at least once a month. So far though there have been no issues with leaving it to Octopus to decide. I have simply set the charge level and ready time and it sorts itself out. Using HA to ensure the house and solar battery don't get drained overnight by the charging.

GPDixon commented 2 weeks ago

Thanks for the info. Begs the question, does Octopus have an API for the bump charge request that can be called from HA? They are usually pretty good with APIs but I've only ever used READ functions. Not sure I've ever seen an UPDATE one.

Quickstep3 commented 2 weeks ago

Yup - all available via @bottlecapdave Octopus Integration for HA https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy

Only thing I'm really using the Hypervolt integration for now is to actually detect when there is charging happening and track the charging power/current and energy used. If I switch any from Intelligent GO and back to something else then would use the Hypervolt integration to ensure excess solar is sent to the car according to my automation rules