Goodwe smart meter replacment from HA

Hi,
does anyone have a solution how to simulate the GoodWe smart meter GM1000D with RS485 communication (not modbus) with esphome (RS485 to TTL), so that the data it sends to the inverter would be entered from HA? I have an energy meter already connected to HA via modbus and I would like to use the measured power data to control the GoodWe inverter.

How you know that?

I have an older Goodwe GW5000S-BP inverter and it didn’t have Modbus.
But maybe I’m wrong.

So your inverter use proprietary protocol and GM uses modbus. If they are compatible (work together) one of them has to have capability to do both.
Since RS485 is bus, you could connect esp32 with converter in the middle and listen the traffic with uart debug.

This is what I use:

modbus_controller:
  - id: modbus_server_1
    modbus_id: modbus2
    address: 0x3
    server_registers:
      - address: 0x47
        value_type: FP32
        read_lambda: return id(pm_absorb).raw_state;
      - address: 0x49
        value_type: FP32
        read_lambda: return id(pm_release).raw_state;
      - address: 0x4B
        value_type: FP32
        read_lambda: return id(pm_reactive).raw_state;
      - address: 0x4D
        value_type: FP32
        read_lambda: return id(pm_capacitive).raw_state;

      - address: 0x61
        value_type: U_WORD
        read_lambda: return id(pm_volts).raw_state;
      - address: 0x62
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x63
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x64
        value_type: U_WORD
        read_lambda: return id(pm_current).raw_state;
      - address: 0x65
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x66
        value_type: U_WORD
        read_lambda: return id(pm_unknown1).raw_state;
      - address: 0x67
        value_type: S_WORD
        read_lambda: return id(pm_power).raw_state + id(inverter_1_power_offset);
      - address: 0x68
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x69
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x6A
        value_type: U_WORD
        read_lambda: return id(pm_power_2).raw_state + id(inverter_1_power_offset);

      - address: 0x6B
        value_type: S_WORD
        read_lambda: return id(q_value).raw_state;
      - address: 0x6C
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x6D
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x6E
        value_type: U_WORD
        read_lambda: return id(pm_unknown3).raw_state;
      - address: 0x6F
        value_type: U_WORD
        read_lambda: return id(s_value).raw_state;
      - address: 0x70
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x71
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x72
        value_type: U_WORD
        read_lambda: return id(pm_unknown4).raw_state;
      - address: 0x73
        value_type: U_WORD
        read_lambda: return id(pm_pf).raw_state;
      - address: 0x74
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x75
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x76
        value_type: U_WORD
        read_lambda: return id(pm_unknown5).raw_state;
      - address: 0x77
        value_type: U_WORD
        read_lambda: return id(f_value).raw_state;
      - address: 0x78
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x79
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x7A
        value_type: U_WORD
        read_lambda: return 0;
      - address: 0x7B
        value_type: U_WORD
        read_lambda: return 0;
# serial number: 1400G0SM02049015
      - address: 0x203
        value_type: U_QWORD
        read_lambda: return 0x313430304730534DULL;
      - address: 0x207
        value_type: U_QWORD
        read_lambda: return 0x3032303439303135ULL;
      - address: 0x401
        value_type: U_QWORD
        read_lambda: return 0;
      - address: 0x405
        value_type: U_QWORD
        read_lambda: return 0;
      - address: 0x409
        value_type: U_QWORD
        read_lambda: return 0;
      - address: 0x40D
        value_type: U_QWORD
        read_lambda: return 0;
      - address: 0x411
        value_type: U_QWORD
        read_lambda: return 0;
      - address: 0x415
        value_type: U_QWORD
        read_lambda: return 0;
      - address: 0x419
        value_type: U_QWORD
        read_lambda: return 0;
      - address: 0x41D
        value_type: U_QWORD
        read_lambda: return 0;

Thanks for the answer. Sorry, I’m not an experienced programmer, this code doesn’t tell me much. How does it work? What does the serial number mean? Is it the serial number of the energy meter? Are all the “return” items values ​​that I can enter for the inverter? Are the addresses valid for the GM1000?

  1. Read the docs on the modbus component.
  2. The serial number is for the power meter - I doubt the actual contents are important, but the format may be.
  3. The addresses are valid for the GM1000 which is a clone of the Acrel AC10R
  4. The value in each lambda needs to refer to a suitable sensor that you define that has the data for that parameter. Check the units.

Thanks clydebarrow, it works great! At address 0x6A there is an item “On-grid export power” and with that I can regulate the inverter power. Thanks again!

The communication between the inverter and the smart meter is really Modbus, I was wrong.