Sveasolar powershifter PV inverter Huawei

Hi all

I have a Sveasolar powershifter, that is a Huawei inverter with software V100R001C00SPC168. I have successfull modbus tcp coonnection working but can not figure out how to set forced charge or forced discharge power for charging battery via AC or PV. I’ve tried different registrers and this registrer seems to be the one that changes when I change settings in fusionsolar app. However now I can start or stop forces charging via modbus TCP but I cannot change power settings. I’ve been allover the internet for information without success. Do anyone have some suggestions?

things for forced charging mode, stop, charge or discharge

 Bridge poller slave112holding [ start=47100, length=3, refresh=30000, type="holding", maxTries=5 ]{
    
        Thing data PvBmsForceCharging [ readStart="47100", readValueType="uint16",updateUnchangedValuesEveryMillis="5000000",writeStart="47100",writeType="holding",writeValueType="int16" ]     
        Thing data PvBmsTargetSoc [ readStart="47101", readValueType="uint16",readTransform="JS(divide10.js)",updateUnchangedValuesEveryMillis="5000000" ]
        Thing data PvBmsBackupSoc [ readStart="47102", readValueType="uint16",readTransform="JS(divide10.js)",updateUnchangedValuesEveryMillis="5000000",writeStart="47101",writeType="holding",writeValueType="int16" ]
        
    }

things for forced charging power

 Bridge poller slave113holding [ start=47247, length=4, refresh=30000, type="holding", maxTries=5 ]{
    
        Thing data PvBmsForceChargingPower [ readStart="47247", readValueType="int32",updateUnchangedValuesEveryMillis="5000000",writeStart="47247",writeType="holding",writeValueType="int32" ]     
        Thing data PvBmsForceDissChargingPower [ readStart="47249", readValueType="int32",updateUnchangedValuesEveryMillis="5000000",writeStart="47249",writeType="holding",writeValueType="int32" ]     
        
        
    }

Hi Marcus,

there are a few Modbus registers to be set to force charge the Luna battery:

  • 47242 → power of charge from grid (e.g. 5000 for 5kW)
  • 47244 → max power of charge from grid (e.g. 8800 for 8.8kW)
  • 47246 → forcible charge/discharge setting mode (e.g. 0 for “Duration”)
  • 47247 → forcible charge power (e.g. 5000 for 5kW)
  • 47083 → forcible charging/discharging period (e.g. 60 for 60min)
  • 47100 → forcible charge/discharge (e.g. 1 to start force charge)

Set all those registers and once 47100 is set to 1 it starts force charge for 60min with 5kW → 5kWh. After the 60min it will stop automatically. To prolong the charge time just update the duration register 47083.

Hope this helps & good luck!

Hi Thanks for your reply, I’ve tried to set all these values but without success, below is my configuration for things and items I’ve tried to set differnet powers to be sure that theres just an issue with one value or so. Is there any thoughts on what I’m doing wrong? Battery model shoudl be LUNA 2000.

things file

Bridge poller slave113holding [ start=47242, length=7, refresh=30000, type="holding", maxTries=5 ]{
        Thing data PvBmsPowerChargeFromGrid [ readStart="47242", readValueType="int32",updateUnchangedValuesEveryMillis="5000000",writeStart="47242",writeType="holding",writeValueType="int32" ]
        Thing data PvBmsMaxPowerChargeFromGrid [ readStart="47244", readValueType="int32",updateUnchangedValuesEveryMillis="5000000",writeStart="47244",writeType="holding",writeValueType="int32" ]     
        Thing data PvBmsForceChargeMode [ readStart="47246", readValueType="int32",updateUnchangedValuesEveryMillis="5000000",writeStart="47246",writeType="holding",writeValueType="int32" ]     
        Thing data PvBmsForceChargingPower [ readStart="47247", readValueType="int32",updateUnchangedValuesEveryMillis="5000000",writeStart="47247",writeType="holding",writeValueType="int32" ]     
        Thing data PvBmsForceDissChargingPower [ readStart="47249", readValueType="int32",updateUnchangedValuesEveryMillis="5000000",writeStart="47249",writeType="holding",writeValueType="int32" ]     
        
        
    }

BMS items

//BMS
Number  PvBmsChargeOrDischargePower "Effektflöde"                                                    { channel="modbus:data:localhostTCP:slave109holding:BmsCargeOrDischargePower:number" }
Number  PvBmsSoc "Soc solcellsbatteri"                                                               { channel="modbus:data:localhostTCP:slave109holding:BmsSoc:number" }
Number  PvBmsWorkingMode "Operating mode Solcellsbatteri"                                            { channel="modbus:data:localhostTCP:slave110holding:PvBmsWorkingModePoller:number" }
Number  PvBmsForceChargingMode "Forcerad laddning"                                                   { channel="modbus:data:localhostTCP:slave112holding:PvBmsForceCharging:number" }
Number  PvBmsTargetSoc "Mål SOC"                                                                     { channel="modbus:data:localhostTCP:slave112holding:PvBmsTargetSoc:number" }
Number  PvBmsBackupSoc "Reserverad SOC för backup"                                                   { channel="modbus:data:localhostTCP:slave112holding:PvBmsBackupSoc:number" }
String PvBmsForceChargingPower "Forcerad laddning effekt"                                            { channel="modbus:data:localhostTCP:slave113holding:PvBmsForceChargingPower:string" }
String PvBmsForceDissChargingPower "Forcerad urladdnings maxeffekt"                                  { channel="modbus:data:localhostTCP:slave113holding:PvBmsForceDissChargingPower:string" }
String PvBmsPowerChargeFromGrid "Effekt för laddning från nät"                                       { channel="modbus:data:localhostTCP:slave113holding:PvBmsPowerChargeFromGrid:string" }
String PvBmsMaxPowerChargeFromGrid "MAX Effekt för laddning från nät"                                { channel="modbus:data:localhostTCP:slave113holding:PvBmsMaxPowerChargeFromGrid:string" }
String PvBmsForceChargeMode "Charging from grid mode"                                                { channel="modbus:data:localhostTCP:slave113holding:PvBmsForceChargeMode:string" }
String PvBmsForceChargingDuration "Charging duration in minutes"                                     { channel="modbus:data:localhostTCP:slave114holding:PvBmsForceChargingDuration:string" }

sitemap

Selection item=PvBmsForceChargingMode mappings=[0="Stop",1="Charge",2="Discharge"]
								Selection item=PvBmsTargetSoc mappings=[10="10%",20="20%",50="50%",80="80%"]
								Selection item=PvBmsForceChargingPower mappings=[0000="0KW",0500="0,5KW",1000="1KW",1500="1,5KW",2000="2KW",2500="2,5KW",3000="3KW",3500="3,5KW",4000="4KW",4500="4,5KW",5000="5KW",5500="5,5KW",6000="6KW",6500="6,5KW"]
								Selection item=PvBmsForceDissChargingPower mappings=[0000="0KW",0500="0,5KW",1000="1KW",1500="1,5KW",2000="2KW",2500="2,5KW",3000="3KW",3500="3,5KW",4000="4KW",4500="4,5KW",5000="5KW",5500="5,5KW",6000="6KW",6500="6,5KW"]
								Selection item=PvBmsPowerChargeFromGrid mappings=[0000="0KW",0500="0,5KW",1000="1KW",1500="1,5KW",2000="2KW",2500="2,5KW",3000="3KW",3500="3,5KW",4000="4KW",4500="4,5KW",5000="5KW",5500="5,5KW",6000="6KW",6500="6,5KW"]

/Marcus

Hi Marcus,

one more register to set is to allow AC charge of the battery (47087=1). Once this switched from 0 to 1 it may take up to 30min before the forced charge starts when all the other registers are set and 47100 is set to 1.

Please double check the readValueType of all the registers. I don’t think all of them are “int32”. Take a look at the spec (https://photomate.zendesk.com/hc/en-gb/article_attachments/6535471431581)

Also, how are you going to enable the force charge? Do you plan to set all registers from the sitemap GUI?

Here a reference to EVCC about Luna force charge: Batteriesteuerung Huawei LUNA · Issue #12302 · evcc-io/evcc · GitHub

Thomas

Hi Thanks for all information, some of the registers was set via fusion solar app. I did get this to work now first step was manual control via sitemap and I used proxy items., meaning one item on sitemap and a set of rules for setting the real item with correct value, I think that could be unneccesary, but I made it that way.

Fusion solar is quite slow on updating values I think atleast 10 minutes before one can see that charging or discharing is going on, is there a way of reading the systems modbus for data thats shows in fusion solar.

  • PV production
  • Battery powerflow I have one value that is 0 if stop and -1,-2 for discharging and vice verca but I have not found any value for the power flowing in or out of battery.
  • Grid powerflow, bying or selling, this would be needed to balance the discharging and charging to battery.

Hi Marcus,

Luna dis/charge power you get from Modbus register 37765. Grid power you get from Modbus register 37113. Both show bidirectional values where negative is pull (discharge/from grid) and positive is push (charge/to grid). The values in Fusion solar have a refresh of 5min best case.

Here another reference for the Modbus registers: Sun2000 Modbus Register – Debacher-Wiki

Thanks once again, now i start to have all data configured. One thing I’m curious about is that I get error for fetching data quite often, is that to be expected?
I have a wired dongle so ethernet connection should be fine.

Try 1 out of 5 failed when executing request (ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_MULTIPLE_REGISTERS, start=32016, length=8, maxTries=5]). Will try again soon. Error was I/O error, so resetting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: SocketTimeoutException Read timed out [operation ID 72e4d673-8dc6-45e9-8eb7-08cb1cd3fbc7]

/Marcus

Hi Marcus,

yes, the SDongle is a pretty lame duck. Best case you can pull data in 30sec intervals. Also you may need to optimize the Modbus timings of the TCP thing - see e.g. here Reading data from Huawei inverter SUN 2000 (3KTL-10KTL) via modbus TCP and RTU - #257 by Matze0211

Most important is the wait time after connection to “warm up” the SDongle:
afterConnectionDelayMillis: 2000

Yes I have set the warmup paramtere, but performce really bad for beeing modbus, modbus units is usually perfoming good in my opinion, but maybe there’s many internal busses and a processor that’s not to great in the dongle.