Can't get "Growatt Solar" sensor working

Hi, I have the same problem. Did you find out what was wrong?

I tried to use the software serial on the ESP8266 itself, could not get it to work.

Orderd a RS485 TTL converter an now it works

Hi All,

I having trouble to compile (validate) the Growatt implementation. I get the following error:

INFO Reading configuration /config/esphome/growatt.yaml...
Failed config

sensor.growatt_solar: [source /config/esphome/growatt.yaml:52]
  platform: growatt_solar
  update_interval: 5s
  
  [protocol_version] is an invalid option for [sensor.growatt_solar]. Please check the indentation.
  protocol_version: RTU2 [source /config/esphome/growatt.yaml:54]

My relevant config looks like this:

.......
uart:
  - id: uart1
    baud_rate: 9600 #9600 8N1
    tx_pin: D6 #software Serial
    rx_pin: D7 #software Serial

modbus:
  uart_id: uart1

sensor:

  - platform: growatt_solar
    update_interval: 5s
    protocol_version: RTU2

    inverter_status:
      name: "Growatt Status Code"

.......

To me the indentation looks OK.

Can anyone please help me to find out what the problem is?

Thanks a lot in advance

Bart

are you by any chance using a bit old esphome version that does not yet have protocol version as an attribute? If so, try updating the esphome addon to the latest version, that might just solve the problem.

Hi Pieter,

Thanks for your reply. In the mean time I went for another route which works fine for me at the moment.

Thanks again

Trying to get data from my Growatt and have problem with no values.

I use Growatt 12KTL3-XL 3-phase Inverter (https://www.martom.no/wp-content/uploads/2020/09/Growatt-MID-6_12KTL3-XL-User-Manual-002-7920599-1.pdf)

FireBeetle ESP32-Wroom-32D (https://www.dfrobot.com/product-1590.html):

And this TTL (https://www.aliexpress.com/item/1005004447451769.html?spm=a2g0o.order_list.order_list_main.17.71ba18027LIKyD):

[20:55:09][C][logger:301]: Logger:
[20:55:09][C][logger:302]:   Level: DEBUG
[20:55:09][C][logger:303]:   Log Baud Rate: 115200
[20:55:09][C][logger:305]:   Hardware UART: UART0
[20:55:09][C][uart.arduino_esp32:124]: UART Bus 1:
[20:55:09][C][uart.arduino_esp32:125]:   TX Pin: GPIO17
[20:55:09][C][uart.arduino_esp32:126]:   RX Pin: GPIO16
[20:55:09][C][uart.arduino_esp32:128]:   RX Buffer Size: 256
[20:55:09][C][uart.arduino_esp32:130]:   Baud Rate: 9600 baud
[20:55:09][C][uart.arduino_esp32:131]:   Data Bits: 8
[20:55:09][C][uart.arduino_esp32:132]:   Parity: NONE
[20:55:09][C][uart.arduino_esp32:133]:   Stop bits: 1
[20:55:09][C][modbus:143]: Modbus:
[20:55:09][C][modbus:145]:   Send Wait Time: 250 ms
[20:55:09][C][modbus:146]:   CRC Disabled: NO
[20:55:09][C][homeassistant.time:010]: Home Assistant Time:
[20:55:09][C][homeassistant.time:011]:   Timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
[20:55:09][C][growatt_solar:136]: GROWATT Solar:
[20:55:09][C][growatt_solar:137]:   Address: 0x01

This is my code:

captive_portal:

time:
  - platform: homeassistant
    id: homeassistant_time

# Example configuration entry
uart:
  - id: gw_uart
    baud_rate: 9600
    tx_pin: GPIO17
    rx_pin: GPIO16

modbus:
  uart_id: gw_uart
#  flow_control_pin: GPIO4

sensor:
  - platform: growatt_solar
    update_interval: 5s
    protocol_version: RTU2

    inverter_status:
      name: "Growatt Status Code"

    phase_a:
      voltage:
          name: "Growatt Voltage Phase A"
      current:
          name: "Growatt Current Phase A"
      active_power:
          name: "Growatt Power Phase A"
    phase_b:
      voltage:
          name: "Growatt Voltage Phase B"
      current:
          name: "Growatt Current Phase B"
      active_power:
          name: "Growatt Power Phase B"
    phase_c:
      voltage:
          name: "Growatt Voltage Phase C"
      current:
          name: "Growatt Current Phase C"
      active_power:
          name: "Growatt Power Phase C"

    pv1:
      voltage:
          name: "Growatt PV1 Voltage"
      current:
          name: "Growatt PV1 Current"
      active_power:
          name: "Growatt PV1 Active Power"

    pv2:
      voltage:
          name: "Growatt PV2 Voltage"
      current:
          name: "Growatt PV2 Current"
      active_power:
          name: "Growatt PV2 Active Power"

    active_power:
      name: "Growatt Grid Active Power"

    pv_active_power:
      name: "Growatt PV Active Power"

    frequency:
      name: "Growatt Frequency"

    energy_production_day:
      name: "Growatt Today's Generation"

    total_energy_production:
      name: "Growatt Total Energy Production"

    inverter_module_temp:
      name: "Growatt Inverter Module Temp"

# Device Internal Temperature
  - platform: internal_temperature
    name: "Growatt Solar Internal Temperature"

# WiFi RSSI
  - platform: wifi_signal
    name: "Growatt Solar RSSI"
    update_interval: 60s

Any one can help?

I figured out the issue.

There is a but inside ESPHome and you need to use older Arduino frame version. Version 2.0.6

esp32:
  board:  esp32dev
  framework:
    type: arduino
    version: 2.0.6

Now everything works perfectly:

Can I ask you, if your have logger enabled, and what logs are you getting?
I am struggling to get MOD6000TL3-X inverter over RS485, with ESP32.
I tried Arduino 2.0.6 framework, switching RX/TX, using other RX/TX (1&3) pins, using software serial, tried ESP8266, another modbus module, double checked wiring. Modbus address is as per default 1.

esphome:
  name: garage-tavle
  friendly_name: garage_tavle

esp32:
  board:  esp32dev
  framework:
    type: arduino
    version: 2.0.6

# Enable logging
logger:
 baud_rate: 0
 level: VERBOSE
  
switch:
  - platform: gpio
    name: "Relæ 1"
    pin: 32
    inverted: true

  - platform: gpio
    name: "Relæ 2"
    pin: 33
    inverted: true

uart:
  - id: gw_uart
    baud_rate: 9600
    tx_pin: GPIO17
    rx_pin: GPIO16

modbus:
  uart_id: gw_uart
#  flow_control_pin: GPIO4

sensor:
  - platform: growatt_solar
    update_interval: 5s
    protocol_version: RTU2

    inverter_status:
      name: "Growatt Status Code"

    phase_a:
      voltage:
          name: "Growatt Voltage Phase A"
      current:
          name: "Growatt Current Phase A"
      active_power:
          name: "Growatt Power Phase A"
    phase_b:
      voltage:
          name: "Growatt Voltage Phase B"
      current:
          name: "Growatt Current Phase B"
      active_power:
          name: "Growatt Power Phase B"
    phase_c:
      voltage:
          name: "Growatt Voltage Phase C"
      current:
          name: "Growatt Current Phase C"
      active_power:
          name: "Growatt Power Phase C"

    pv1:
      voltage:
          name: "Growatt PV1 Voltage"
      current:
          name: "Growatt PV1 Current"
      active_power:
          name: "Growatt PV1 Active Power"

    pv2:
      voltage:
          name: "Growatt PV2 Voltage"
      current:
          name: "Growatt PV2 Current"
      active_power:
          name: "Growatt PV2 Active Power"

    active_power:
      name: "Growatt Grid Active Power"

    pv_active_power:
      name: "Growatt PV Active Power"

    frequency:
      name: "Growatt Frequency"

    energy_production_day:
      name: "Growatt Today's Generation"

    total_energy_production:
      name: "Growatt Total Energy Production"

    inverter_module_temp:
      name: "Growatt Inverter Module Temp"

# Device Internal Temperature
  - platform: internal_temperature
    name: "Growatt Solar Internal Temperature"

Using unshielded cat5e 2 meters cable. Ground not connected. Yet to try shielded one…
However I am suspecting software issue, as nothing, like nothing like CRC errors or similar are coming through in logs. LED’s on TTL converter light up briefly on update interval, else not. Only this:

[22:36:55][V][modbus:199]: Modbus write: 01.04.00.00.00.5F.B0.32 (8)
[22:37:00][V][modbus:199]: Modbus write: 01.04.00.00.00.5F.B0.32 (8)
[22:37:05][V][modbus:199]: Modbus write: 01.04.00.00.00.5F.B0.32 (8)
[22:37:10][V][modbus:199]: Modbus write: 01.04.00.00.00.5F.B0.32 (8)
[22:37:15][V][modbus:199]: Modbus write: 01.04.00.00.00.5F.B0.32 (8)
[22:37:20][V][modbus:199]: Modbus write: 01.04.00.00.00.5F.B0.32 (8)

I’m curious, for people using a Growatt MODxxxxTL3-X, do you get any data at night?
I’m currently using grott integration, but when the inverter goes offline at night, I’m not getting anything on the Shinewifi-X and I want to know if the 485 route is better.

My only problem is that everything that I import from grid during the night gets posted all at once in the morning: