a529987659852 / openwbmqtt

Custom component for home assistant supporting openWB wallbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can you expose 1,3, or auto mode for all phase switching settings as HA entities?

maltesen opened this issue · comments

commented

Could you add the option to switch OpenWBs Settings for
"Automatische Phasenumschaltung
-> Sofort Laden
-> Standby
-> Nachtladen
-> Min + PV Laden
-> Nur PV Laden"
if thats exposed by MQTT?

Id like to switch that manually (from home assistant) as currently the whole controll system of "PV" and "Min+PV" modes in OpenWB itself are bugged. I.e. "automatic" phase switching setting for both PV and Min+PV while defining Energy_min=1300W and I_min=6A results in both PV and Min+PV Modes to charge my car at night (when PV Energy is 0) with 3 phases at 6A each. I already wrote the developers of OpenWB, but no answer at all so i have to programm the whole controller (the main argument for buying that box btw.) myself i guess.

I have auto phase switching enabled and using PV a lot i do not have this behaviour. I have set PV Energgy_min=1320 and I_min=6A and i do not see this, maybe you got something like "zielladen" or a SoC Module noct working?

Nevertheless, i think this would be a nice addition, i can see following at least for "get" values: openWB/config/get/u1p3p

Bildschirm­foto 2023-01-10 um 08 51 29

I'm not sure if I really understand the reqest from Malte, but I guess my idea is similar: I'd like to change the ChargeMode (Sofortladen, PV-Laden, ...) from the HomeAssistent UI.

I used "MQTT Explorer" for testing, and found this can be achieved with publishing a message: openWB/set/ChargeMode 0..4 (0 = Sofort Laden (Direct), 1 = Min und PV, 2 = Nur PV, 3 = Stop, 4 = Standby)
Furthermore you can set the SubModes for "Sofortladen" (for the Ladepunkt 1):
openWB/config/set/sofort/lp/1/chargeLimitation 0...2 (0 = Aus, 1 = kWh Laden, 2 = SoC Laden)

@a529987659852 does this help?

Thanks a lot!
Michael

commented

Quickly looking over the MQTT content in MQTT explorer i couldnt find an option to switch the number of phases (1, 3, or auto) - i guess OpenWB doesnt expose this for now, so we cant forward that to HA.

Thanks Michael for the suggestion. Afaik this doesnt solve my problem. I can switch the "charging modes" as you described (i.e. switch from "sofort laden" to "Min + PV"), but that doesnt solve it.

My problem lies inside the "Min + PV" Mode and the "PV" Mode itself. The Problem behaves like this.:

If i set "Min + PV" mode (which i can do via MQTT) and the corresponding phase switching mode to "auto" (which i can not do over MQTT and which i have to do with the OpenWB http GUI) and define the minimum watt to charge as say 1W and the current PV production is 0W i would exspect, that my car is charged with only 1 phase (and the minimum possible current which is 6A iirc). What happens however, is that my car is charged with 3 phases at 6A which obviously is not the minimum possible, as 1 phase at 6A is less and possible if i manually force phase switching mode to 1 instead of "auto".

In prionciple the same thing for the "PV" (only) mode. OpenWB doesnt correctly consider that not only adjusting the current is an option to adjust the energy flow, but also switching between 1 and 3 phases is.

I alreeady wrote to the developers in detail and got one of those automatic replies in the form of "can we scare you off so you dont bug aus anymore by telling you that we will not even look at your stuff before you send it in in exactly the right form to the right adress with full logs and a cherry on top?"

Hi Malte,
I now get what you want. Can you try the following:
openWB/config/set/u1p3p/nurpvPhases or openWB/config/set/u1p3p/minundpvPhases (1 = 1 phase, 3 =3 phases, 4 =Auto)

If that doesnt help, search in the forum or create a new thread: https://openwb.de/forum/ - the people there are usually really friendly and helpful!

Michael

commented

Thanks Michael.

I believe you are right. Havent tested it yet. Those topics should be made available as sensors in HA by default.

Adding the sensors should not be too hard I think.
I would create a PR and add them - but keep them disabled / hidden by default, since switching the phases is an optional feature and would not work if you have not purchased this option.

In this case - it could be enabled by the user, IF you are using that option ... for everyone else, it would remain as it is.

I'm not sure if I really understand the reqest from Malte, but I guess my idea is similar: I'd like to change the ChargeMode (Sofortladen, PV-Laden, ...) from the HomeAssistent UI.

I used "MQTT Explorer" for testing, and found this can be achieved with publishing a message: openWB/set/ChargeMode 0..4 (0 = Sofort Laden (Direct), 1 = Min und PV, 2 = Nur PV, 3 = Stop, 4 = Standby) Furthermore you can set the SubModes for "Sofortladen" (for the Ladepunkt 1): openWB/config/set/sofort/lp/1/chargeLimitation 0...2 (0 = Aus, 1 = kWh Laden, 2 = SoC Laden)

@a529987659852 does this help?

Thanks a lot! Michael

this is already possible :)
image
image

the same applies for the Charge-Limitation:
image

Those entities are already available as selects / controlls
image

Hi Malte, I now get what you want. Can you try the following: openWB/config/set/u1p3p/nurpvPhases or openWB/config/set/u1p3p/minundpvPhases (1 = 1 phase, 3 =3 phases, 4 =Auto)

If that doesnt help, search in the forum or create a new thread: https://openwb.de/forum/ - the people there are usually really friendly and helpful!

Michael

Hi, can you please check if the following topics are available?
Right now, I do not have access to my Wallbox to test it by myself:

config/get/u1p3p/minundpvPhases
and
config/get/u1p3p/nurpvPhases

can someone maybe try this file?
const.zip

replace the const.py in that zip file with the one in custom_components/openwb.../const.py
Since I do not have the option to switch between the phases, I cannot test the implementation by myself :-(

image

commented

openWB/config/get/u1p3p/sofortPhases = allgemeine einstellungen->automatische phasenumschaltung->sofortladen
openWB/config/get/u1p3p/standbyPhases = allgemeine einstellungen->automatische phasenumschaltung->standby
openWB/config/get/u1p3p/nachtPhases = allgemeine einstellungen->automatische phasenumschaltung->nachtladen
openWB/config/get/u1p3p/minundpvPhases = allgemeine einstellungen->automatische phasenumschaltung->mini + pv laden
openWB/config/get/u1p3p/nurpvPhases = allgemeine einstellungen->automatische phasenumschaltung->nur pv laden

values are 1,3,4 for 1 phase, 3 phases, automatic mode

i tested writing to the 5 corresponding /set/ topics and that resultts in the /get/ topics beeing updated - so that seems to work.

Untitled-5

oh, thanks :)
I'll add the options for "nachtPhases" and "standbyPhases", too... :)

commented

thanks!