Thanks for this post @Ravenholm - I was trying to do the same thing, and was completely confused until I saw this post. Massive help! (@wlcrs) I think there would be value in adding this to the Wiki, as it is essential for enabling dynamic charging/discharging logic and I didn’t see it listed anywhere in the Git Wiki.
With that said, I am struggling a bit to find the best way to program the system, owing to the limitations of the Huawei modes. I use Intelligent Octopus tariff, which gives cheap rates at random periods of the day for EV charging. If my car charges when the battery is discharging, then it defeats the object of having a dynamic cheap tariff, because it pulls all the charge out of the house battery, into the car battery, rather than taking from the grid. I have tried the “forcible charge to SOC” option, when when it reaches the target SOC, it immediately starts to discharge, rather than holding at that percentage until I tell it to “maximise self consumption” when the cheap tariff ends.
I have ended up implementing the following “logic”, which I think might be the best (only?) solution:
-
TOU Config: Set the Time of use to “charge” between 00:00 and 23:59 (so that the TOU option is my method of switching to charging from the grid (and holding at that end state SOC until commanded to do something else)
-
Off Peak Charging: Whenever I want to charge, I set the “Grid Charge Cutoff SoC” to 100% and change the Working Mode to “time_of_use_luna2000”. This is triggered by the Octopus Energy charging signal “Octopus Energy [account number] Intelligent Dispatching” parameter.
-
Use The Battery: If I want to use the battery (i.e. when the tariff is expensive and the EV is not charging), I set the Working Mode to “maximise_self_consumption”
-
Pausing The Battery: If I want to pause the use of the battery (e.g. whilst I wait for an Octopus Energy Saving Session), I set the “Grid Charge Cutoff SoC” to the current Luna SOC, and change the Working Mode to “time_of_use_luna2000” (so it charges to target the SOC that the battery already has and does nothing until a mode change) -
Pausing The Battery: My first attempt at this didn’t work. Pausing the Luna battery, depends on the battery SOC. Basically, you can’t set the “Grid Charge Cutoff SoC” to lower than 20%, and you can’t set the “Battery End of Discharge SOC” to higher than 20%. This means you need to create an If/else conditional as follows (in both of these cases, the battery will try to charge or discharge, to the current battery state, and therefore stop charging or discharging until you change the Working Mode again later):
If battery SOC > 20%, then set the Working Mode to "time_of_use_luna2000" and the "Grid Charge Cutoff SoC" to the current Luna SOC If battery SOC <20%, then set the Working Mode to "maximise_self_consumption" and the "Battery End of Discharge SOC" to the current Luna SOC -
Feed to grid: If I want to feed the battery to the grid, I select the Working Mode to “fully_fed_to_grid”
Does this seem like a sensible approach? Has anyone solved the problem by using the different operating modes in a different way to this?
Thanks
P.S. This is an epic integration, and works really well, so thanks for all the work that has gone into it.
EDIT 1: the above didn’t work - I will edit this post tomorrow to correct it, and explain what I have done.
EDIT 2: I have now corrected the above logic, since it didn’t work correctly for pausing the battery. I am pretty sure this all works as I need it to now, and hopefully it is helpful to someone else.