marq24 / ha-goecharger-api2

HA integration for go-eCharger series (V3 and higher) communicate via the HTTP API v2.0. [supporting 148 of 172 API-Keys]. Please note, that this integration is not official and not supported by the go-e developer team. This project is not affiliated with go-e.com in any way.
Apache License 2.0
22 stars 1 forks source link

Surplus data with multiple goechargers #13

Closed mr-gosh closed 1 month ago

mr-gosh commented 1 month ago

I created the automation for both of my goechargers but the data is only recieved by one of them (which one seems to change from reboot to reboot of the goechargers).

So the question is - how to configure that the pv surplus power usage is available to both chargers? The distribution if both have a car connected could be configured through the "Lastmanegement" probably - but that is another question.

your question is IMHO a bit "off topic" here... When you have two go-eChargers and have configured both in HA, and when you then use this integration to send your GRID-export data to both instances I would assume, that then both chargers will try to consume this available energy...

IMHO (but I could be totally wrong) you have to distribute the available power "manually" to Charger1 and Charger2 (e.g. by simply divide the sensor data by 2)... Obviously only if both chargers have cars connected. I would kindly ask you to start a new discussion for your "dual" use case. - TIA

Originally posted by @marq24 in https://github.com/marq24/ha-goecharger-api2/issues/11#issuecomment-2233684202

The automation looks like this at the moment:

service: goecharger_api2.set_pv_data
data:
  pgrid: "{{states('sensor.smart_meter_summe_der_aktiven_momentanleistung')}}"
  ppv: "{{states('sensor.amperestoragepro_total_pv_power')}}"
  pakku: "{{states('sensor.amperestoragepro_battery_power|float*-1')}}"

For the Smartmeter readings I use the EDL21 integration and for the AmpereStorage Battery an unofficial integration.

achmet9948 commented 1 month ago

I have the same error. When I add the second wallbox, the data is only sent to it and not to the first wallbox. If I delete the second wallbox, it works again with the first one.

mr-gosh commented 1 month ago

I have the same error. When I add the second wallbox, the data is only sent to it and not to the first wallbox. If I delete the second wallbox, it works again with the first one.

How do you check where the data is recieved?

marq24 commented 1 month ago

ok - the issue is, that even with multiple instances of the integration you just have a single service (right now) called

service: goecharger_api2.set_pv_data

To be able to support multiple chargers with different services I must adjust the integration - but in a way that the single go-eCharger users will not be affected... This will take me a while. I am planing, that you must use also the serial number of the charger as part of the service name - so something like this service: goecharger_api2.set_pv_data_XXXXXXX

Just in case - be aware, that you must take the responsibility of splitting the available PV power to the different instances of your chargers - if you will provide both with the plain "export to grid" value, that both chargers will try to consume this available power individually (which will result in twice as high power usage).

achmet9948 commented 1 month ago

How do you check where the data is recieved?

@mr-gosh GO-E have some entities like this: image

mr-gosh commented 1 month ago

Just in case - be aware, that you must take the responsibility of splitting the available PV power to the different instances of your chargers - if you will provide both with the plain "export to grid" value, that both chargers will try to consume this available power individually (which will result in twice as high power usage).

I think (if I don't get that wrong) the easiest would be to let the load balancing handle that.

So the same values should be available to both chargers and IF both are loading the load balancing should get the available power and split that to both or "n" devices...

marq24 commented 1 month ago

I think (if I don't get that wrong) the easiest would be to let the load balancing handle that.

would be a surprise for me - but you will see in a short while...

marq24 commented 1 month ago

check release 2024.7.1

mr-gosh commented 1 month ago

check release 2024.7.1

Just updated - seems we have to change the automation after the upgrade?

Die Automatisierung „go-e PV surplus charging brigde“ („automation.go_e_pv_surplus_charging_brigde“) hat eine unbekannte Aktion: „goecharger_api2.set_pv_data“.

Dieser Fehler verhindert, dass die Automatisierung korrekt ausgeführt wird. Möglicherweise ist diese Aktion nicht mehr verfügbar oder wurde durch einen Tippfehler verursacht.

Um diesen Fehler zu beheben, bearbeite die Automatisierung und entferne diese Aktion

marq24 commented 1 month ago

yes of course - check also the updated documentation...

mr-gosh commented 1 month ago

yes of course - check also the updated documentation...

Perfect - found the entry:

Having multiple go-eChargers in your HA installation? ....

action:
  - service: goecharger_api2.set_pv_data_012345
    ...

Testing now...

achmet9948 commented 1 month ago

Hi I tested it: One Wallbox is working and the second on is not working: Working Box: image

Not Working: image

marq24 commented 1 month ago

please be so kind and provide additional log output... - I can't guess from the screenshots what could be the possible root cause...

marq24 commented 1 month ago

and for the start - simply try to use/start the both services manually (via the HA-GUI) - in YAML mode...

Service A

service: goecharger_api2.set_pv_data_999999
data: {
  pgrid: 0
}

Service B

service: goecharger_api2.set_pv_data_888888
data: {
  pgrid: 0
}
marq24 commented 1 month ago

but update before to the 2024.7.2

achmet9948 commented 1 month ago

Okay, I configured again. It's working now 💯

mr-gosh commented 1 month ago

Thanks for completing this feature. Awesome work!

marq24 commented 1 month ago

@mr-gosh @achmet9948 please note, that with the next release there will be a breaking change concerning the support for multiple chargers - the serial will be removed from the service name (again) and you now must add an additional data attribute configid - details will follow in the main readme.

mr-gosh commented 4 weeks ago

the serial will be removed from the service name (again) and you now must add an additional data attribute configid - details will follow in the main readme.

I really don't get it how to find the service ID

The simples way to find the corresponding ConfigEntryId's of your multiple configured go-eCharger integrations is by using the GUI of the Service, activate the optional selection field, select the charger and then switch (from GUI) to YAML-Mode mode - this will show you the configid you must use.

The only optional selection field i found is in the "devices overview" but when i select a divice with the checkbox there is no possibility to switch to yaml view.... - i am lost - sorry! :(

marq24 commented 4 weeks ago

image

mr-gosh commented 2 weeks ago

Thanks for clarifying - probably this should be integrated into the documentation.

The surplus information is now getting into both chargers.

I wanted to drop a line that it now works and the surplus charging worked very well. It started to charge and stopped in the evening and started again the next morning when the sun was strong enough. Forgot to take screenshots.

Thanks for your work!

Will see how this works if really 2 cars are charging at the same time.