a529987659852 / openwbmqtt

Custom component for home assistant supporting openWB wallbox
35 stars 16 forks source link

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

Closed maltesen closed 1 year ago

maltesen commented 1 year ago

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.

a529987659852 commented 1 year ago

Hi Malte,

Can you pls do me Tha favor and find out which set MQTT topic is involved? I can set create a respective select entity in HA.

Regards Andreas

Malte @.***> schrieb am Fr., 6. Jan. 2023, 19:07:

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.

— Reply to this email directly, view it on GitHub https://github.com/a529987659852/openwbmqtt/issues/41, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQTMJRHSRJQ6KYO33UQGJ3DWRBNO3ANCNFSM6AAAAAATTKIEKU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

northalpha commented 1 year ago

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
mivola commented 1 year ago

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

maltesen commented 1 year ago

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?"

mivola commented 1 year ago

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

maltesen commented 1 year ago

Thanks Michael.

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

ChristophCaina commented 1 year ago

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.

ChristophCaina commented 1 year ago

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

ChristophCaina commented 1 year ago

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

ChristophCaina commented 1 year ago

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

maltesen commented 1 year ago

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

ChristophCaina commented 1 year ago

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

maltesen commented 1 year ago

thanks!