Can't get "Growatt Solar" sensor working

I’ve got a D1 mini flashed with ESPHome with a TTL to RS485 module attached.

On the RS485 module I’ve connected DE & RE together and also to the GPIO defined as the modbus flow_control_pin (D2/GPIO4). DI goes to RX, RO goes to TX. A & B go to the correct pins on the COM port of my Growatt MIC 750 TL-X.

Relevant parts of my yaml:

logger:
  level: DEBUG
  baud_rate: 0 # Disable log output on the UART as it conflicts with use by modbus

uart:
  - id: uart1
    baud_rate: 9600
    tx_pin: GPIO1 # TX pin
    rx_pin: GPIO3 # RX pin

modbus:
  uart_id: uart1
  flow_control_pin: D2 # GPIO4


# My model: Growatt MIC 750 TL-X single phase inverter
sensor:
  - platform: growatt_solar
    update_interval: 10s
    protocol_version: RTU # RTU2

    inverter_status:
      name: "Growatt Status Code"

    phase_a:
      voltage:
          name: "Growatt AC Voltage Phase"
      current:
          name: "Growatt AC Current Phase"
      active_power:
          name: "Growatt AC Power Phase"
          
    pv1:
      voltage:
          name: "Growatt PV Voltage"
      current:
          name: "Growatt PV Current"
      active_power:
          name: "Growatt PV 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"

It doesn’t work however. All the inverter statistics just show as “nan” on the front end. No sign of them in the log output either:

[10:44:24][C][logger:275]: Logger:
[10:44:24][C][logger:276]:   Level: DEBUG
[10:44:24][C][logger:277]:   Log Baud Rate: 0
[10:44:24][C][logger:278]:   Hardware UART: UART0
[10:44:24][C][uart.arduino_esp8266:102]: UART Bus:
[10:44:24][C][uart.arduino_esp8266:103]:   TX Pin: GPIO1
[10:44:24][C][uart.arduino_esp8266:104]:   RX Pin: GPIO3
[10:44:24][C][uart.arduino_esp8266:106]:   RX Buffer Size: 256
[10:44:24][C][uart.arduino_esp8266:108]:   Baud Rate: 9600 baud
[10:44:24][C][uart.arduino_esp8266:109]:   Data Bits: 8
[10:44:24][C][uart.arduino_esp8266:110]:   Parity: NONE
[10:44:24][C][uart.arduino_esp8266:111]:   Stop bits: 1
[10:44:24][C][uart.arduino_esp8266:113]:   Using hardware serial interface.
[10:44:24][C][modbus:150]: Modbus:
[10:44:24][C][modbus:151]:   Flow Control Pin: GPIO4
[10:44:24][C][modbus:152]:   Send Wait Time: 250 ms
[10:44:24][C][homeassistant.time:010]: Home Assistant Time:
[10:44:24][C][homeassistant.time:011]:   Timezone: 'GMT0BST,M3.5.0/1,M10.5.0'
[10:44:24][C][growatt_solar:105]: GROWATT Solar:
[10:44:24][C][growatt_solar:106]:   Address: 0x01

Anyone know how I can troubleshoot this further?

Just a and b to the inverter? Or gnd as well?

Just A and B to the inverter.
D1 mini is powered off the inverters USB port if that matters. Only 5v and gnd wires connected tho.

TTL to RS485 module has one red Led on it. It’s permanently lit when the D1 mini is on. I assume it’s a power led not a communication led?
Have a multimeter but no oscilloscope for troubleshooting.

I haven’t used a max 485 before so not sure, but I do plan on doing exactly what you are doing to my inverter when I get home next week

I did read about needing a 120ohm resistor if the wires are short with some devices. Alpine Boiler with ESPHome Modbus Sucess

Bought a different TTL to modbus converter to try (this one just has TX and RX, no DE & RE pins). Works perfectly and I have all the figures I could possibly need :slight_smile:

Hi Ralph, I am also having some difficulty with a very similar setup. I have a TL-X1500 which is working well. I have used a D1 Mini with almost identical code to yours and this RS485 <> TTL Modult.

I see the TX led flash at my update interval, but there is never any data from the inverter. I am using pins 3 & 4 on the inverters com port. I am also using the 2nd RS485 channel for the Eastron meter for export limitatio. The latter works perfectly.

I have just tried a 120R termination resistor accross A & B with same result.

Not to worry now I have it working. Even though I had disabled serial logging with baud rate set to zero I retried using software serial on other pins

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"

    phase_a:
      voltage:
          name: "Growatt AC Voltage"
      current:
          name: "Growatt AC Current"
      
    pv1:
      voltage:
          name: "Growatt PV1 Voltage"
      current:
          name: "Growatt PV1 Current"
    
    active_power:
      name: "Growatt AC Output Power"
      id: ac_output

    pv_active_power:
      name: "Growatt PV Active Power"

    energy_production_day:
      name: "Growatt Today's Generation"
      id: output_today

    total_energy_production:
      name: "Growatt Total Energy Production"

    inverter_module_temp:
      name: "Growatt Inverter Module Temp"

This now works a treat and I now have updates every 5 seconds rather than the 5 minutes with the HA Growatt integration.

Success!

1 Like

Hi, I’m trying to use this integration, and I’m not sure which pins need to be connected from the inverter side, I’m using pin 3(A) and pin 4(B). my inverter is a growatt mic 2000tl-x

Pins 3 & 4 are correct

1 Like

@wayne_weedon did you also buy an rs485-TTL without the flow control pins?
I have the same issue as topic starter but somehow this need to work…

Working great with a MOD 8000 TL3-X

Used a nodemcu esp8266 board and a rs485-TTL.
This one:

I want to get the same but i have usb shinewifi-x, anybody know the way? My inverter is growatt min-6000tl-xh.

Let me know please…

Thanks very much!

Anyone can help me?

Maybe (like for me) the message is not clear. This post deals with a DIY solution and you are asking from a ready-made shinewify usb dongle. …which is not (!) the same. So, are you trying to build a DIY or are you having an issue connecting your shinewifi ?

Sorry i understand now this option is from rs485 so you have both working rs485 modbus and shinelan x with growatt server, i was wrong…i will try connect by rs485 i want to get information in real time and integration with HA

1 Like

Hi! Does this connected to the COM work also if I will keep the shineWIFI-X connected to the USB? I would like to keep the shineWIFI because the service people monitors via the shine website.

Question to you all, where did you find the 8pin connector of the inverter? I cant seem to find it anywhere online.

1 Like

Yes. I also have the shinelink connected at the same time. I’m using a usb split cable to power the nodemcu board and connect the shinelink stick at the same time.

Hi,

I am trying to use the modbus growatt in ESP home. The device is connected but i got no values.

[15:05:21][C][logger:275]: Logger:
[15:05:21][C][logger:276]:   Level: DEBUG
[15:05:21][C][logger:277]:   Log Baud Rate: 0
[15:05:21][C][logger:278]:   Hardware UART: UART0
[15:05:21][C][uart.arduino_esp8266:102]: UART Bus:
[15:05:21][C][uart.arduino_esp8266:103]:   TX Pin: GPIO1
[15:05:21][C][uart.arduino_esp8266:104]:   RX Pin: GPIO3
[15:05:21][C][uart.arduino_esp8266:106]:   RX Buffer Size: 256
[15:05:21][C][uart.arduino_esp8266:108]:   Baud Rate: 9600 baud
[15:05:21][C][uart.arduino_esp8266:109]:   Data Bits: 8
[15:05:21][C][uart.arduino_esp8266:110]:   Parity: NONE
[15:05:21][C][uart.arduino_esp8266:111]:   Stop bits: 1
[15:05:21][C][uart.arduino_esp8266:113]:   Using hardware serial interface.
[15:05:21][C][modbus:139]: Modbus:
[15:05:21][C][modbus:141]:   Send Wait Time: 250 ms
[15:05:21][C][growatt_solar:105]: GROWATT Solar:
[15:05:21][C][growatt_solar:106]:   Address: 0x01

and my config:

uart:
  - id: uart1
    baud_rate: 9600
    tx_pin: GPIO1
    rx_pin: GPIO3

modbus:
  uart_id: uart1

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"

Can anyone help me?

For me the problem was 3 things:

  • RX/TX from ESP32 to the RS-485-toTTL converter
  • A- B+ from the RS-485-to-TTL converter to the Growatt Monitor port (pins 3 and 4)
  • Pointing to the wrong ports in the config in ESPHOME

After fixing all that it worked for me
What helped me:
https://www.mischianti.org/2020/05/11/interface-arduino-esp8266-esp32-rs-485/