-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve PV surplus charging examples #101
Comments
Do I understand the feature correctly, when fup is set to true via API, then the go-E Charger is handling surplus charging on its own, as long via ids the available power is feeded? Reason for the question is, I can not find ids in API keys document from the manufacturer. So is the api documentation just outdated? |
Correct! You can find some details about the new feature at the issues section. |
Found it goecharger/go-eCharger-API-v2#110 |
I've been trying to set it up on my sisters Go-E and the HA in her home. According to the integration she has Firmware "055.0" and I cannot seem to set the ids. Payload on MQTT seems correct but the charger seems to answer: "unknown api key: ids" on the Last Set Config Key Result (sensor.go_echarger_XXXXXX_result in HA). Could it be Firmware is too old? Cannot seem to upgrade from the Go-E app though: Upgrade is greyed out and there is a "Change to 054.11" Button and below a Release Note is shown noting "055.6" - which is strange App behaviour/UI issue? I don't want to accidentally downgrade ;) |
Thanks, I had success updating it to 055.6 and now ids setting is working. |
@syssi Line 291 in Readme says: "This feature requires firmware 0.55 or newer." So it actually requires 055.6? Other updates: I've got my blueprint to work now, with the automation. Here's the MQTT call that seems to work for me: - service: mqtt.publish
data:
qos: "0"
retain: false
topic: "go-eCharger/{{ entGoeID }}/ids/set"
payload: '{{''{"pGrid": ''}}{{states(entMeanPowerAvailableForCharging)}}{{'', "pPv": ''}}{{states(entSolarPower)}}{{'',"pAkku":0}''}}'
So far I've also had to do a switch in my automation to switch between So I had to add this switch in the automation: # Turn charger on or off based on available power
- if:
- condition: template
value_template: "{{ states(entMeanPowerAvailableForCharging) | int(0) < 10 }}"
then:
- service: select.select_option
target:
entity_id: select.go_echarger_222819_frc
data:
option: "Neutral"
else:
- service: select.select_option
target:
entity_id: select.go_echarger_222819_frc
data:
option: "Don't charge" |
I would expect only positive pGrid values stop the charging as 0 would be the ideal condition of using all surplus power for the charging. Amount how much of positive power will stop is likely influenced on the fine tuning setting on PV Surplus app (prefer from net, standard, surplus). |
I've tried sending positive values also, though I fixed it at 1000W. Did not seem to stop the charger, but will try to investigate more. |
That probably depends on how you have configured your charger. It has three levels of PV charging, "Prefer power from grid", "Standard" and "Prefer power to grid". The default setting is "Standard". |
Should Let's say you are using sensor You'll then send the value Should the sensor take that into account, so |
No, you should just send what your meter, the one that monitors your grid connection, reports as passing through the grid connection as You can then, based on the PV surplus setting in the charger control how it will behave when available PV power decreases. See my comment above. |
So what you are saying is, that the charger will try, as much as possible to keep I have a Huawei Solar system and my Power Meter is attached to my household's incoming power cords. The Power Meter reports the sensor Seems that should be the sensor to use then, but since exported power is a possible value in the sensor of |
Exactly. The charger has all the logic needed. We just need to supply it with the data it needs. Ofc, if you want to keep a buffer of excess PV power, you could have a sensor that modifies the value you send. E.g. if you want to always export 123 W, or something like that. I have a Fronius inverter and I get the correct value to send to the charger. Positive when I import, and negative when I export. I am also sending both pGrid and pPv to the charger. |
Something is wrong, yes. If everything is correct, the charger will start charging slowly, making sure it does not exceed the PV surplus, and then it starts ramping up until there is no excess anymore. Depending on the setting in the charger, as I described above, it may use a small amount of power from the grid, or a lot, or try to always export. I don't know if this setting is exposed in the API, but it exists in the charger. In your case, looking at that picture, the charger is using 7.2kW. But your system, that is providing They are still not describing how the charger actually works in detail when it comes to PV surplus, and the potential for battery. There are some bits and pieces published in the github issue linked above. And reading that issue it looks like there might be some flaw in the startup logic if the charger is set to automatic phase shift. I have it set to either 1-phase or 3-phase because my car sometimes trips the RCD, or leaks DC current, when 3-phase charging ends (a fault in the car, but the reseller refuses to believe it). So you might have everything ok...and it is the charger that is not yet working as it should. v055.6 is, after all, still marked as beta |
Does anyone know how and if the go-eCharger is dealing with the battery metrics? |
only |
That would render that function completely useless to me (and probably to anyone with a local PV battery). |
Not yet. Only the issue linked in this topic is what there is of "public" information about this topic. You can "alter" you pGrid sensor to take your battery into account. I have something like this sensor currently, that takes charging my battery into account: - platform: template
sensors:
solar_power_available_for_charging:
friendly_name: "Solar Power Available For Charging"
unique_id: "solar_power_available_for_charging"
unit_of_measurement: "W"
device_class: power
value_template: >-
{%- set carCharger = states('sensor.go_echarger_222819_nrg_12') | int(0) %}
{%- set carCharger = 0 %}
{%- set powerMeter = states('sensor.power_meter_active_power') | int(0) %}
{%- set batteryCharger = states('sensor.battery_charge_discharge_power') | int(0) %}
{%- set batterySoC = states('sensor.battery_state_of_capacity') | int(5) %}
{%- set batteryTargetSoC = states('number.battery_end_of_charge_soc') | int(100) %}
{%- set powerAvailable = ( carCharger + powerMeter ) if (batterySoC < batteryTargetSoC) else ( carCharger + powerMeter + batteryCharger ) %}
{{ ( powerAvailable * -1 ) | int(0) }} |
Thx, will give it a try! |
If you look at the specs for the go-e Controller you can get hints on what this charger will support. We are basically replacing their Controller with HA, since the have a local API that supports feeding the same thing that the Controller would do. There they mention that battery storage can be taken into account. I have been waiting for what we have now to come to the go-eCharger for over a year now, and finally we have this. If Fronius had been able to ship their Wattpilot a year ago I would have bought that charger instead, since it promised seamless integration with Fronius inverters. The Wattpilot is a rebranded go-eCharger...so I took a bet on this one instead, and now it has payed off :) |
I can confirm some odd startup behavior with automatic phase switching on. I switched to single phase mode to not exceed pGrid and that worked as expected, go-e was charging with max. 3kW on one phase and tried hold pGrid at 0. Any hints on how to enhance the starting phase with automatic phase switching? |
We cannot really control much, except continuously sending the available power since the logic is implemented in the charger itself. That said, what are your settings in the go-eCharger app for the PV surplus limits for when to start 1-phase charging, and when to switch to 3-phase charging? I don't remember what the defaults were, but they looked low to me so I have increased them. Other than playing with those settings, I don't think there is anything else we can do, except report the behavior to go-e support and see if they come back with some useful response, or firmware update. |
Most smartmeters and/or setups use dedicate separate values for Smartmeters provide payload: {{'{"pGrid":'}}"{{ (states('sensor.echelon_power')| float) if is_state('sensor.echelon_power_returned', '0') else (states('sensor.echelon_power_returned')| float *-1) }}"{{',"pPv":'}}"{{ (states('sensor.hoy_power')| float )}}"{{',"paAku":"0"}'}} |
@nean-and-i My smartmeter indicates export to grid by negative values. IMO it's pretty common. |
@syssi , interesting, the MEP implementations I know (at least Austria, Denmark, Norwegian regions) all work with forward and reverse registers. |
This is my smartmeter: https://www.easymeter.com/products/zaehler/q3a The device supports SML transmitted using infrared. |
I really don't know how to take discussion with ChatGPT ;) |
google it regarding ChatGPT... very easy.... and yes - you need to include in the configuration.yaml the following: I am not sure if you then need to copy any sensors you have in configuration.yaml to sensor.yaml |
Hoooo F_CK !!!! I have just ask help to ChatGPT !!! IT's work |
Here below in file attached my discussion with TchatGPT for helping me (in french sorry) to include your sensor in my configuration.yaml !!! FireShot Capture 103 - Bonjour, aide demandée - chat.openai.com.pdf |
Great to read - I am already testing my extended second logic and it looks fine. If the additional sensors will be added the PV Surplus sensor calculation need to include also the sensor.battery_soc_status. In this case the gGrid value will be influenced in a way to either allow to take some energy from to battery in case the SOC is higher than expected during the specific time of the day or it will be lowered to ensure that the battery will be charged to achieve a specific battery SOC depending on the time of the day... the logic can be adapted in the sensors as needed... |
I will test the GO-e charging this afternoon with my neighbor's MG4 car... |
Personally, I really don't prefer to use my Pylontech batteries (11kWh) to recharge a car battery... I want to charge an electric vehicle only and 100% solar (I have 10 kWp of photovoltaic panels for that)... |
As you can see above, it oscillates too much around the PV Power available setpoint... |
Yesterday I asked ChatGPT to make me a slider from 0 to 1500W in steps of 100W to make a power reservation output for my ESS Pylontech Battery because, indeed, it was still drawing a few hundred watts which is unacceptable ;) |
Without having a detailed look into it I may expect that the oscillation is resulting due to an inappropriate update interval of the entities. Basically the go-e charger is receiving the surplus value every few seconds and tries to adapt based on this numbers. But the entities used to calculate the surplus might not change every few seconds... so the go-e charger is finally not able to adjust the power used to the power available... |
It's time to come back to this topic. Using PV Surplus charging is great, but the real-world life scenarios differ a bit, and I think it's essential to take some use cases as an example: When you set your car to stop charging at 100%, it will draw power from the charger if the SoC is below that. Most cars cannot put the target SoC through the API, so you often have to start and stop the power on the charger side, not the car side. The car says, "Oh, hey, there is power in the cable. Give it to me." So, on a perfect day with an ideal setup, you have a household with a battery and an EV. Considering PV Surplus charging, I foresee the following use cases that should be solved. In all cases, the car's SoC must be less than the target SoC, or we will not be able to deliver the power in general.
The problem is that you cannot put the force state into Neutral because it will start charging!?
Now, how do you combine the use cases? You want to charge with Excess PV power during the day, but maybe the car only receives 60% SoC, and the target SoC is 100%. You'd like to finalize the charging during the night because it's the cheapest hour to do so. The way to control this is to switch in the Logic Mode. If exported power to the grid is > 0, set logic to Eco. Else, set it to Default. Anyhow I will dig a bit more deeper into this and figure how to do this. My current setup is: Huawei 12kW solar panels |
Agree - each individual case will have individual issues. But you are using Home Assistant and the first step is for sure identifying the issues you are facing…. then try to find a suitable approach… Home Assistant is just used to send the PV Surplus value to the go-e charger. For all of my personal items to be controlled I am using the PV Surplus value. But I do not send the real PV surplus value - I have included several logics in HA which will trigger the PV Surplus. E.g. the PV Surplus will be calculated in normal mode to ensure that my house battery will receive the required power to ensure it is fully charged 90min before sunset. There would be endless possibilities available for this logic… e.g. defining max charging EV SoC and when reaching it PV Surplus could be set to 0 etc… And with this method the go-e Charger can remain in PV surplus logic ;-) |
@MB1983k That is a very interesting approach! So you leave your go-e in Eco mode and keep the force state Neutral. Then, you manipulate the PV surplus value based on what you want to do:
Does that mean you only send the pGrid value and keep away from pPv and pAkku ? I understand that pGrid must always be negative, and the go-e charger will try to consume the same power as what you send into the pGrid value. In my setup, the clamps are on my main power line, so when my charger begins, the household consumption increases. I believe you need to consider that, or pGrid will always go towards 0, then the charger will stop, and pGrid will be negative again. Is that correctly understood? So if I have 3kW of excess power from PV, pGrid would then be -3000 all the time, including when the charger is on. |
@MB1983k Thanks for the tip about playing with "truth" about how much PV power is available to control if the charger will allow the car to charge or not. I haven't had time to think about how to be able to control the charger without any hands-on changes (basically using charging timer and ECO mode or not) due to "life". But this is a great tip. I like that you are thinking outside of the box :) |
@woopstar - I try to catch the main items from your message: The 3 examples are possible approaches, but my logics are more complex (you can constantly learn and improve it) - just start with simple options and then slowly improve based on your needs. You can forward pPv and pAkku - but it does not influence the go-e Charger from my point of view. It is also fine to forward 0. PV Surplus - the go-e charger need to know the real time PV Surplus… e.g if the PV Surplus before starting the go-e charger is 1500W and then the go-e charger starts charging with 1500W the PV surplus value will be 0 when perfectly balanced. If you would keep 1500W the go-e Charger constantly has the impression to be able to increase (and this will be done until reaching the maximum power allowed by the go-e charger). In case you are measuring the PV Surplus and you do not have restrictions to consider (e.g. charging the house battery) you can simply forward this PV Surplus value. And then you could e.g. create manual switches and in case they are on there might be a manual value forwarded to the go-e charger (which anyway must have calculated values). In case you need some inputs use ChatGPT to find ideas how to implement it (but do it with small steps and test these small steps) And yes - my go-e Charger is in the Eco Mode with PV surplus charging all the time. No need to change this… |
Basically you could fully automate it (e.g. by telling HA how many KM/miles you plan to drive within the next days)… you could even plan by using PV forecast inputs… So I would also have several ideas for the future to implement ;-) |
Seems right! So, I'll try this out next week to manipulate the pGrid value. I like the idea! Do you have any issues with automatically switching between 1 or 3 phases? I heard some had. So, I'm considering if I need automation rather than having Phase Selection set to Automatic. |
Update from here. Based on @MB1983k's suggestion to manipulate the PV Surplus value, I came up with the following two required elements in Home Assistant to make it work: an automation to send the pGrid value to the charger and a sensor with the available amount of power the charger can take. Sensor:
Notes for the above sensor: I have put the sensor in my templates to utilize the trigger functionality so it updates when any used entities update. I also prefer to charge my home battery to the target battery SoC before it starts charging my car. This logic lies in Automation:
Notes for the above automation: I'm also sending the pPv value with the sensor Settings in the App: Automatic phase shifting: |
Update. I talked with the team on support. In firmware 56.2 (beta) the house battery (pAkku) is now considered in the algorithm. They introduced pGridTarget (pgt) also.
pAkku related answer:
|
Thank you a lot for your great work. I am a beginner with homeassistant and I need your help.
My goal is to use an automation for writing awp (Awattar maximum price threshold) in go-e-controller with minimumprice I get from the Tibber integration. Is there any example for the line payload:...... for that case? |
So I've been testing the PV charging today. Here are my findings for "logical" issues:
For MQTT to correctly work, it is important that you remove the / in front of /go-eCharger/222819/ in the Prefix in the app. It is prefixed with / first but works incorrectly when I checked with MQTT Explorer on.
For MQTT to work correctly, you also need to remove / in the base topic name when adding the go-E integration in HA.
As per the screenshot from MQTT Explorer, MQTT topics now look correct:
The text was updated successfully, but these errors were encountered: