[APP][Pro] SolarEdge + Growatt TCP modbus

it is there , it is a homey bug and is probably called power usage. somehow the label I set is being ignored.

You should remove the address bar part of your screenshot, it shows your Homey Cloud ID.

Hi Edwin,

Indeed, nothing changed much so far. Thanks!

One thing, I noticed that the battery capacity, according to your app, changed from 13,8 kWh to 14,6kWh. That is odd. I did some research and I wonder if your app reads the correct modbus register for the capacity. According to ChatGPT, my SolarEdge Home Hub inverters has possibly an addition modbus register for the capacity (no 2):

  1. Usable capacity (should be 13,8kWh)
  2. Nominal capacity (=total chemical energy content à 14,6 kWh ??)

Could it be no 2 which is being read in the modbus registers instead of usable capacity?

Thanks,

Norbert

will check it , this is my old 5 year old LG and 2 year old solaredge

I think it calculates it and I think it need to be empty and fully charged again.

but indeed the labels can be better.

    maximum_energy:   [0xe17e, 2, 'SEFLOAT', 'Maximum Energy'],
    available_energy: [0xe180, 2, 'SEFLOAT', 'Available Energy'],


      if (this.validResultRecord(result['batt1-maximum_energy'])) {
        var maxenergy = Number(result['batt1-maximum_energy'].value);
        if (this.hasCapability('batterymaxcap') === false) {
          await this.addCapability('batterymaxcap');
        }  
        this.setCapabilityValue('batterymaxcap', maxenergy / 1000);
      }

      if (this.validResultRecord(result['batt1-available_energy'])) {
        var availenergy = Number(result['batt1-available_energy'].value);
        if (this.hasCapability('batterycap') === false) {
          await this.addCapability('batterycap');
        }  
        this.setCapabilityValue('batterycap', availenergy / 1000);
      }


{
  "type": "number",
  "title": {
    "en": "Battery Capacity",
    "de": "Batteriekapazität"
  },



Hi Edwin,

Which inverter do you have for 2 years now, the SolarEdge Home Hub or StorEdge?

The variables you mentioned, just to check, I see two types of capacity in your app:

  1. Battery Capacity (result of degradation, in your first image 8,4kWh, 90,5% battery health)
  2. Max Battery Capacity (9,8kWh)

It seems that there is another register, stating the Nominal Capacity, which is larger than the capacity according to the supplier (on data sheets)

Sounds odd right? Perhaps the second image you sent is showing that? Perhaps it is being calculated as you mentioned.

Can you check your code & Modbus registers that the variables ‘Battery Capacity’ show the actual available energy (kWh) due to battery degradation and ‘Battery Max Capacity’ shows the capacity what indicated by Solaredge when then batteries are brand new.

Thanks!

Norbert

got 2 x 1 phase SE4000 and one is with storedge and LG battery (resu). other is with solaredge 10kwh 400v battery. they are in master / follower configuration and 1 has the meter. this way I can 2 different batteries, give more back to the grid and not limited to max 4000w.

this data is coming from the BMS of the batteries so LG and solaredge have different impl.

maybe. I can use E142 (F542) 2 R Battery 1 Rated Energy

let me test it out

so for me rated or max is the same on both. and available is what is max possible now. and probably need to discharge and charge it fully to get an accurate value.


solaredge:  batt1-rated_energy 9700 xxx Rated Energy
solaredge:  batt1-maximum_energy 9700 xxx Maximum Energy
solaredge:  batt1-available_energy 10104 xxx Available Energy


solaredge:  batt1-rated_energy 9800 xxx Rated Energy
solaredge:  batt1-maximum_energy 9800 xxx Maximum Energy
solaredge:  batt1-available_energy 8425 xxx Available Energy


Nice configuration, clever.

Ok, yeah, so basically there’s three variables telling something about the Battery Capacity.

When I check online, the Rated Energy is probably ‘Nominal Energy’.

Max Battery is the amount being sold (like mine 3 x 4,6kWh =13,8kWh)

Available Battery is what is left after a certain time (degradation).

I guess for most users the last two are the ones to be displayed in your app.

Thanks for checking & testing,

Norbert

Hi all,

I’m looking for advice. I currently have a GoodWe GW6000-DT (Gen 1) which can only be connected to through the GoodWe cloud environment as it’s to old to get a firmware that supports Modbus access, and it’s most likely also not possible to regulate it for zero-export.

I’ve looked into getting a new inverter, and since I also already have 2 Growatts I figured I’d research that route first. The model that fits my needs is the Growatt MOD 6000TL3-XH BP and I’d like to know if there’s anybody here with experience with this model.

Thanks!

Hi,

I have 1 Growatt SPH series (5 years) and 1 Growatt MIN-3600-TL-XH (2 years), both with batteries, backup groups etc etc. The last one is similar to your reference, the MOD is 3-phase.

I spent some time with Edwin to get this MIN-3600-TL-XH in the app, all good!

With advanced flows I regulate everything, including batt charge capacity from the grid as this takes capacity from the backup groups. You need to remember this when setting up.

The most tricky part was to have the backup functionality right with the modbus daisy chain;
Smart meter, rs-tcp, backup unit, shinelink.

I figured that out and live ever since.

Hi @Edwin_Biemond is it possible to add the read value of discharge power rate for the Growatt MIN TL XH with battery to the app? I would like to be able to check this value and use it in my flows.

Edwin,

Can you add this to the test version for the growatt inverters?

Right now I can niet write to the growat to set the export limit and the export enable/disable

this.registerCapabilityListener(‘exportlimitenabled’, async (value) => {
// schrijf naar Modbus register
});
this.registerCapabilityListener(‘exportlimitpowerrate’, async (value) => {
// schrijf naar Modbus register
});

@Edwin_Biemond do you think you can find the time to add for me to test?:

this.registerCapabilityListener(‘exportlimitenabled’, async (value) => {
await this.updateControl(‘exportlimitenabled’, Number(value));
});

this.registerCapabilityListener(‘exportlimitpowerrate’, async (value) => {
await this.updateControl(‘exportlimitpowerrate’, value);
});

hey,

just added this from @DaneedeKruyff

The target_power capability isn’t implemented for that device. I’ve just sent in a PR to add it to the Growatt TLS device, I don’t know if Edwin has plans to include it for the Solar Edge though.

can you give me some context , what is the current device you selected (growatt). and what do you like to do. is something not working
I think growatt with meters or battery should already have it.

Hi Edwin,

I have 2x Growatt MIC 2500 and one MIN 2500

I currently have the 2 MIC connected via modbus and I’m trying to control them via my Ultimate EMS app but I can not write to enable export limit and to set the actual export limit value. Via a flow it works but writing to it directly via device capabilities can not be done as there is no capability. Perhaps I can try to add them as a MIN device?

Hi @Menno_De_Braak,

exportlimitenabled and exportlimitpowerrate are not the capabilities you’re looking for. These two are to enable the inverter to manage the output itself using a modbus connected meter.

If you want to manage the output from your app writing to a capability you should write to target_power but for now this is only available on the Growatt TLS.

You can have a look at the Growatt TLS device how it’s implemented. If you get it working for your Growatts, I think Edwin will be happy to accept a Pull Request.

on the device do you get a nice working attribute which you can set and does homey provide some flow actions out of the box for this.

also do we know what happens when you set target_power_mode to homey?

Hi Edwin and Danee,

Thanks for the clarification about target_power — that makes sense for the TLS.

I’m building an energy management app that needs to control PV curtailment on regular Growatt inverters (MIC/MIN) by writing exportlimitenabled and exportlimitpowerrate from an external app using setCapabilityValue.

Currently this fails with “Capability Not Setable” because there’s no registerCapabilityListener registered for those two capabilities in the regular Growatt driver — only Flow Action Cards are wired up.

The fix would be two lines in onInit() of the Growatt device.ts, similar to how the TLS handles target_power:

typescript

this.registerCapabilityListener('exportlimitenabled', async (value) => {
  await this.updateControl('exportlimitenabled', Number(value));
});
this.registerCapabilityListener('exportlimitpowerrate', async (value) => {
  await this.updateControl('exportlimitpowerrate', value);
});

Would you be open to accepting a PR for this? Or is there a reason these capabilities are intentionally kept write-only via flows?

mostly these you can only set when you add a modbus meter to the inverter, like on solaredge .

so the inverter will continious check all grid phases plus check PV , houseload , charging battery.

Solaredge is doing that by active power changes from 0 to 100% based on the export value you set and what is generated and your houseload.

Does growatt allows an external source for meter values like homey / p1 ?

Hi Edwin,

Actually, I was hoping you might know! :grinning_face_with_smiling_eyes:

To be honest, I don’t know if Growatt supports a virtual/external meter mode where you can write P1 values to Modbus registers. I couldn’t find it in the Growatt Modbus documentation for the SPH series.

That’s exactly why I ended up building the closed-loop control from Homey’s side — writing exportlimitpowerrate directly every ~10s based on P1 readings, because I couldn’t find a “feed external meter data” register.

If you happen to know of such registers in the Growatt protocol, that would be great. Otherwise, the external closed-loop via exportlimitpowerrate + registerCapabilityListener seems like the practical solution.

While this may seem the most practical solution, this is the wrong approach. Growatt has separate holding registers for curtailment without a modbus meter available, the correct way to implement this it to add target_power and have that write to the correct holding register.

(It wouldn’t surprise me the holding register is the same as for the Growatt TLS, but that’s just a guess, would have to look into that.)