marstek-venus-rs485-node-red icon indicating copy to clipboard operation
marstek-venus-rs485-node-red copied to clipboard

Mode switching not working with Venus V3

Open bertsmelik opened this issue 10 months ago • 4 comments

Good day and thanks again for this application.

I run into a problem with HBC, so I need some help.

Playing with HBC I discovered that activation of the Self-consumption sub strategy does not work with my 2 Venus batteries.

Environment:

  • 2 x Venus V3 at firmware V146
  • connected to via WiFi When HBC switches to Self-consumption strategy and I check via the App the batteries have not gone into Self consumption ("Zelf geïnitieerd"). As a result the batteries just sit for hours doing nothing, while they should be discharging. And often times this happens while we sleep. Switching to other sub strategies seems to work well.

When I drive the batteries with my own scripts, I can get it to work. That took some experimenting, but finally the following approach works: I created a script that loops until the Self consumption is established. The loop is repeated (up to 5 times, but I never saw more than 2 iterations) Sequence is as follows:

  • set "Marstek m1 RS485 Control Mode" to "Enable"
  • set "Marstek m1Forcible Charge/Discharge" to "stop" (not sure if this is needed, but it cleans up the environment)
  • set "Marstek m1 RS485 Control Mode" to "Enable" (yes, once more)
  • set "Marstek m1 User Work Mode" to "anti-feed"
  • wait some time (currently 5 seconds)
  • if "Marstek m1 User Work Mode number" = 1 => exit loop repeat the above

When the above has finished some clean-up:

  • set "Marstek m1Forcible Charge Power" to 0
  • set "Marstek m1Forcible Discharge Power" to 0

Would it be possible to change the Node Red flow, so it persistently makes the switch to Self-consumption?

In the meantime, I want to work with a automation, that checks if HBC switches to Self-consumption and then fires my scripts. That works well if I manually fire the scripts. Would "input_text.house_battery_strategy_active_sub_strategy" changing to "Self-consumption" or "Charge PV" be a good trigger for that?

Thanks, Bert

PS: I have made this automation for each of my batteries and first impression is that it works.

bertsmelik avatar Jan 23 '26 20:01 bertsmelik

After making a helper automation with scripts I did more testing. Turns out that the main problem is that the "User Work Mode" switch only arrives in the Venus V3 when preceded by a set "Marstek m1 RS485 Control Mode" to "Enable".

I have now changed the helper automation such that with every change of the Sub Strategy the helper sets the required mode after setting "Marstek m1 RS485 Control Mode" to "Enable" and tests (in a loop) if this was successful.

Will keep you posted about the results.

bertsmelik avatar Jan 24 '26 11:01 bertsmelik

First of all, really nice work! I have the same issue here, if you have the solution, please I hope you will share this with us (me) ;-)

DirkvD avatar Jan 24 '26 11:01 DirkvD

The helper has survived the last 24 hours.

This are automation and scripts for battery M1. For more batteries make a clone automation and scripts and then change M1 to M2, M3 etc.

Change 26/1/26: added extra Enable RS485 Control Mode Enable at the end of the anti-feed script to allow HBC to control the battery.

HBC M1 helper.zip 26JAN25 version

Have fun

bertsmelik avatar Jan 24 '26 12:01 bertsmelik

I'm not sure if the above is the right way to go. But I might be misunderstanding the situation.

HBC does not require the work mode of the Marstek to be set. It uses forcible charge and discharge parameters. The work mode is used by the Marstek App.

Let me illustrate using some code

// mode select
switch (msg.marstek_master_battery_mode) {
    case "Manual control":
        workMode = "manual";
        rs485 = "disable";
        break;
    case "Marstek control":
        // the user should select a work mode via the Marstek App or via select.marstek_mX_user_work_mode
        rs485 = "disable";
        break;
    case "Full control":
        rs485 = "enable";
        break;

My current guess on what is happening:

  1. It could be that HBC Self-consumption is miss-configured and you don't see it working,
  2. then you try to get self-consumption to work by enabling anti-feed which is actually the Marstek's own algorithm doing the work.

but I'm making big assumptions here based on remarks like 'Switching to other sub strategies seems to work well' and the fact you should not be seeing 'zelf geïnitieerd zelfconsumptie model' in the app when HBC is at work.

gitcodebob avatar Jan 27 '26 22:01 gitcodebob