Correct, in my case, the USB is just for power.
The green/white wires are cut and don’t connect into the USB-A connector.
Instead, they connect the RS485 converter to pin 3&4 of the COM port.
Red and black take 5v from the USB-A, over to the D1-mini and the RS485 converter.
This was the RS485 converter I used: Stable UART Serial Port to RS485 Converter Function Module RS485 to TTL Module k | eBay
And this is how its wired:
I had previously tried the ESPHOME ‘growatt_solar’ sensor platform with this hardware.
On my 1500TL-X, it read one or two values. But most were NaN.
However, with the code here, it populates all values perfectly.
substitutions:
device_name: growatt-mic-1500tl-x
device_description: "Growatt Solar Inverter Monitoring"
friendly_name: Growatt MIC 1500TL X
esphome:
name: '${device_name}'
comment: '${device_description}'
esp8266:
board: d1_mini
# Enable logging
logger:
baud_rate: 0
# Enable Home Assistant API
api:
ota:
safe_mode: true
reboot_timeout: 10min
num_attempts: 5
web_server:
port: 80
auth:
username: !secret esphome_web_username
password: !secret esphome_web_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Optional manual IP
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: '${device_name}'
password: !secret fallback_password
captive_portal:
time:
- platform: homeassistant
id: homeassistant_time
uart:
id: mod_bus
tx_pin: 1
rx_pin: 3
baud_rate: 9600
#baud_rate: 115200
modbus:
id: modbus1
uart_id: mod_bus
modbus_controller:
- id: growatt
# the Modbus device addr
address: 0x1
modbus_id: modbus1
setup_priority: -10
sensor:
- platform: modbus_controller
name: "${device_name} DcPower"
address: 5
register_type: "read"
unit_of_measurement: W
device_class: power
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} DcVoltage"
address: 3
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} DcInputCurrent"
address: 4
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} AcFrequency"
address: 37
register_type: "read"
unit_of_measurement: Hz
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.01
- platform: modbus_controller
name: "${device_name} AcVoltage"
address: 38
register_type: "read"
unit_of_measurement: V
device_class: voltage
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} AcOutputCurrent"
address: 39
register_type: "read"
unit_of_measurement: A
device_class: current
icon: mdi:flash
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} AcPower"
address: 40
register_type: "read"
unit_of_measurement: W
device_class: power
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} EnergyToday"
address: 53
register_type: "read"
unit_of_measurement: kWh
device_class: energy
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} EnergyTotal"
address: 55
register_type: "read"
unit_of_measurement: kWh
state_class: total_increasing
device_class: energy
icon: mdi:flash
value_type: U_DWORD
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
name: "${device_name} Temperature"
address: 3093
register_type: "read"
unit_of_measurement: C
device_class: temperature
icon: mdi:thermometer
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1