Skip to content

Revised Wallbox Handling (Iteration III)

Pre-release
Pre-release

Choose a tag to compare

@marq24 marq24 released this 26 Jan 13:15

Additional Wallbox Mode (FAST vs. FAST WITH BATTERY)

THIS IS A PRE-RELEASE

Please do not update - if you are not part of the discussions around the wallbox-implementation changes.

In #190 and #193 there are multiple issues discussed concerning the Wallbox control via the SENECApp and how the WebAPI.integration and LOCAL.integration behaves. Last weekend I spend quite an amount of time trying to find a good compromise between obvious changes in the SenecAPP user interface and the different implementations of the two integration variants.

What has changed in iteration III

The WebAPI Sensor's wallbox_[1-4]_state have now additional attributes. Yes this is the first time that this integration introduced attributes. Beside the state a sensor can provide an additional JSON object that can be used as source of template Sensors - or with any automation. This allow to add multiple fields/data without the need for additional sensors.

The attributes are named json and modes (but you can also verify this via http://[your-ha-ip]:8123/developer-tools/state

How to access attributes in HA templates?

Assuming all your WebAPI Sensors have the prefix senec_webapi, then you can use the state_attr method to access on of the attribues like this:

{% my_data=state_attr("sensor.senec_webapi_wallbox_1_state", "json") %}
{{ my_data }}

What has changed in iteration II

Senec WebAPI integration

  • Allow Intercharge Switch has been removed
  • BREAKING CHANGE: Wallbox Mode fastest has been renamed to fast_with_battery
  • Set Wallbox mode to 'fast_with_battery' will turn ON 'Allow Intercharge' in LOCAL integration
  • Set Wallbox mode to anything different then 'fast_with_battery', will check, if any other Wallbox mode is still 'fast_with_battery' and if this is not the case, 'Allow Intercharge' in LOCAL integration will be switched OFF

Senec LOCAL integration

  • Toggle 'Allow Intercharge' will check, if ANY of the WB's is in 'fast' or 'fast_with_battery' (if this is not the case the toggle will not be performed)
  • Turn 'Allow Intercharge' ON, will set WB mode to 'fast_with_battery' ONLY for Wallboxes that had previously the state 'fast'
  • Turn 'Allow Intercharge' OFF, will set WB mode to 'fast' ONLY for Wallboxes that had previously the state 'fast_with_battery'

Theorie of operation

First let me start, that I don't have a SENEC wallbox myself - so all this has been developed remotely. But here is what I have understood so far: As SENEC Wallbox owner the only option to control your Wallbox is via the SENECApp. There are no controls for Senec V2, V3 Owners at the main unit in your home.

When you adjusting any values in the SENECApp, then it takes at least one sync cycle (unknown update interval) that your local Senec system will adopt to your adjustments. Since you change something in the App, the App communicates with Senec backend systems somewhere in the Internet, then this backend must communicate with your local Senec device @ home.

What the integration has done (before the update)

  1. WebAPI.integration tried to replicate the functionality present in the SENEC.App and had provided similar controls - so making adjustments to the wallbox controls in the integration should had the same effect, then doing it via the SENEC.App
  2. Instead of waiting, till the backend systems will notify your local Senec system, the LOCAL.integration was notified, by the WebAPI.integration when you made certain adjustments and then the LOCAL.integration already made the required changes at your Senec device @ home. So that there was nothing left to do, when the default backend sync would kick in (after the unknown backend delay)

What has changed

First of all, the controls in the SENEC.App has changed (I must assume for quite a while) - and so the available controls in the Integration did not match the App any longer. Specially the global allow intercharge (Batterieunterstütztes Laden) switch does not seams to be correct any longer. While for single SENEC Wallbox Users it might have been still ok, it was never ok for owners of multiple SENEC Wallboxes.

While I did not remove this global switch from both (WebAPI and LOCAL) integrations, I can't recommend to use them. It's quite confusing, since the LOCAL device just have a single value to store this ON/OFF state, the Web offers one value per Wallbox. Anyway to solve this challenge, I have added an additional Wallbox Mode called FASTEST (supported by battery) [SCHNELL (mit Batterie-Unterstützung)].

Please consider supporting me

Thanks to those who have already supported me in the past weeks or month that is highly appreciated! To the other users: I am putting quite an amount of energy and passion into this integration. Perhaps you could give yourself a little push (if you can afford it) and become a sponsor.

GithubSponsor Revolut Wero PayPal BuyMeCoffee Github Stars
If you haven't starred this integration in Github yet - please do so - TIA