I have been trying since almost a year and tried everything and also checked the old posts but nothing has worked so far. Now I have finally asked for you people’s help.
I have installed Homeassistant and it is working fine. I wanted to integrate my Solar Inverter in it. So far, not much success. I have used ESP Expressif (Board: nodemcu-32s). I have installed MQTT (which was a new learning for me) and I think it is working fine.
> esphome:
> name: solar
>
> esp32:
> board: nodemcu-32s
>
> ota:
> password: "63fefd787b8be7dd03612a0abec2e5f9"
>
> # Enable logging
> logger:
> hardware_uart: UART2
> level: verbose
>
> # Enable Home Assistant API
> api:
>
> wifi:
> ssid: "dlink 2g"
> password: abc123
>
> manual_ip:
> static_ip: 198.42.12.119
> gateway: 198.42.12.1
> subnet: 255.255.255.0
> dns1: 198.42.12.1
>
> # Enable fallback hotspot (captive portal) in case wifi connection fails
> ap:
> ssid: "Solar Inverter"
> password: abc123
>
>
> mqtt:
> broker: 198.42.11.101
> username: mqtt-user
> password: abc123
> id: solar
>
>
>
> captive_portal:
>
> uart:
> id: uart2
> #tx_pin: TX
> tx_pin: GPIO17
> #rx_pin: RX
> rx_pin: GPIO16
> # most devices use 2400 as baud_rate. (110,300,600,1200,2400,4800,9600,14400,19200,38400)
> baud_rate: 2400
> debug:
> direction: BOTH
> dummy_receiver: false
> after:
> delimiter: "\r"
> sequence:
> - lambda: UARTDebug::log_string(direction, bytes);
>
> interval:
> - interval: 30s
> then:
> # PI16
> - uart.write: "QPI\r"
> - delay: 2s
>
> # PI17
> - uart.write: "^P003PI\r"
> - delay: 2s
>
> # PI18
> - uart.write: "^P005PIq\x8b\r"
> - delay: 2s
>
> # PI30/PI30MAX/PI30REVO
> - uart.write: "QPI\xbe\xac\r"
> - delay: 2s
>
> # PI41 `Preformatted text`
> - uart.write: "QDIq\x1b\r"
> - delay: 2s
> - uart.write: "QPIRI\xF8T\r"
> - delay: 2s
> - uart.write: "QPIGS\xB7\xA9\r"
> - delay: 2s
> - uart.write: "QMODI\xC1\r"
> - delay: 2s
> - uart.write: "QFLAG\x98t\r"
>
>
>
> pipsolar:
> uart_id: uart2
> id: inverter0
>
> sensor:
> - platform: pipsolar
> pipsolar_id: inverter0
> grid_rating_voltage:
> id: inverter0_grid_rating_voltage
> name: inverter0_grid_rating_voltage
> grid_rating_current:
> id: inverter0_grid_rating_current
> name: inverter0_grid_rating_current
> ac_output_active_power:
> id: inverter0_ac_output_active_power
> name: inverter0_ac_output_active_power
> ac_output_apparent_power:
> id: inverter0_ac_output_apparent_power
> name: inverter0_ac_output_apparent_power
> ac_output_voltage:
> id: inverter0_ac_output_voltage
> name: inverter0_ac_output_voltage
> ac_output_frequency:
> id: inverter0_ac_output_frequency
> name: inverter0_ac_output_frequency
> ac_output_rating_current:
> id: inverter0_ac_output_rating_current
> name: inverter0_ac_output_rating_current
> battery_capacity_percent:
> id: inverter0_battery_capacity_percent
> name: inverter0_battery_capacity_percent
> battery_charging_current:
> id: inverter0_battery_charging_current
> name: inverter0_battery_charging_current
> battery_discharge_current:
> id: inverter0_battery_discharge_current
> name: inverter0_battery_discharge_current
> battery_voltage:
> id: inverter0_battery_voltage
> name: inverter0_battery_voltage
> grid_voltage:
> id: inverter0_grid_voltage
> name: inverter0_grid_voltage
> grid_frequency:
> id: inverter0_grid_frequency
> name: inverter0_grid_frequency
> inverter_heat_sink_temperature:
> id: inverter0_inverter_heat_sink_temperature
> name: inverter0_inverter_heat_sink_temperature
> output_source_priority:
> id: inverter0_output_source_priority
> name: inverter0_output_source_priority
> output_load_percent:
> id: inverter0_output_load_percent
> name: inverter0_output_load_percent
> pv_charging_power:
> id: inverter0_pv_charging_power
> name: inverter0_pv_charging_power
> pv_input_voltage:
> id: inverter0_pv_input_voltage
> name: inverter0_pv_input_voltage
> pv_input_current_for_battery:
> id: inverter0_pv_input_current_for_battery
> name: inverter0_pv_input_current_for_battery
> pv_power_balance:
> id: inverter0_pv_power_balance
> name: inverter0_pv_power_balance
> charger_source_priority:
> id: inverter0_charger_source_priority
> name: inverter0_charger_source_priority
>
>
>
> text_sensor:
> - platform: pipsolar
> pipsolar_id: inverter0
> device_mode:
> id: inverter0_device_mode
> name: inverter0_device_mode
> last_qpigs:
> id: inverter0_last_qpigs
> name: inverter0_last_qpigs
> last_qpiri:
> id: inverter0_last_qpiri
> name: inverter0_last_qpiri
Following is the screenshot of the integration
I have used the PIN Outs from the following link and also using the same RS232 Converter
I am not able to receive any data. I get timeouts
After that I checked the following github link to know to which the invertor responds.
Following is the log of my integration
[23:53:59][C][logger:233]: Logger:
[23:53:59][C][logger:234]: Level: VERBOSE
[23:53:59][C][logger:235]: Log Baud Rate: 115200
[23:53:59][C][logger:236]: Hardware UART: UART2
[23:53:59][C][uart.arduino_esp32:107]: UART Bus:
[23:53:59][C][uart.arduino_esp32:108]: TX Pin: GPIO17
[23:53:59][C][uart.arduino_esp32:109]: RX Pin: GPIO16
[23:53:59][C][uart.arduino_esp32:111]: RX Buffer Size: 256
[23:53:59][C][uart.arduino_esp32:113]: Baud Rate: 2400 baud
[23:53:59][C][uart.arduino_esp32:114]: Data Bits: 8
[23:53:59][C][uart.arduino_esp32:115]: Parity: NONE
[23:53:59][C][uart.arduino_esp32:116]: Stop bits: 1
[23:53:59][C][pipsolar:860]: Pipsolar:
[23:53:59][C][pipsolar:861]: used commands:
[23:53:59][C][pipsolar:864]: QPIRI
[23:53:59][C][pipsolar:864]: QPIGS
[23:53:59][C][pipsolar:864]: QMOD
[23:53:59][C][captive_portal:088]: Captive Portal:
[23:53:59][C][mdns:084]: mDNS:
[23:53:59][C][mdns:085]: Hostname: solar
[23:53:59][V][mdns:086]: Services:
[23:53:59][V][mdns:088]: - _esphomelib, _tcp, 6053
[23:53:59][V][mdns:090]: TXT: version = 2022.3.0
[23:53:59][V][mdns:090]: TXT: mac = 0cdc7e5ead44
[23:53:59][V][mdns:090]: TXT: platform = ESP32
[23:53:59][V][mdns:090]: TXT: board = nodemcu-32s
[23:53:59][C][ota:085]: Over-The-Air Updates:
[23:53:59][C][ota:086]: Address: 198.42.12.119:3232
[23:53:59][C][ota:089]: Using Password.
[23:53:59][C][api:138]: API Server:
[23:53:59][C][api:139]: Address: 198.42.12.119:6053
[23:53:59][C][api:143]: Using noise encryption: NO
[23:53:59][C][mqtt:063]: MQTT:
[23:53:59][C][mqtt:065]: Server Address: 198.42.11.101:1883 (198.42.11.101)
[23:53:59][C][mqtt:066]: Username: 'mqtt-user'[redacted]
[23:53:59][C][mqtt:067]: Client ID: 'solar-0cdc7e5ead44'[redacted]
[23:53:59][C][mqtt:069]: Discovery prefix: 'homeassistant'
[23:53:59][C][mqtt:070]: Discovery retain: YES
[23:53:59][C][mqtt:072]: Topic Prefix: 'solar'
[23:53:59][C][mqtt:074]: Log Topic: 'solar/debug'
[23:53:59][C][mqtt:077]: Availability: 'solar/status'
[23:53:59][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_grid_rating_voltage':
[23:53:59][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_grid_rating_voltage/state'
[23:53:59][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_grid_rating_current':
[23:53:59][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_grid_rating_current/state'
[23:53:59][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_ac_output_rating_current':
[23:53:59][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_ac_output_rating_current/state'
[23:53:59][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_output_source_priority':
[23:53:59][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_output_source_priority/state'
[23:53:59][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_charger_source_priority':
[23:53:59][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_charger_source_priority/state'
[23:53:59][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_pv_power_balance':
[23:53:59][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_pv_power_balance/state'
[23:53:59][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_grid_voltage':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_grid_voltage/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_grid_frequency':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_grid_frequency/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_ac_output_voltage':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_ac_output_voltage/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_ac_output_frequency':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_ac_output_frequency/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_ac_output_apparent_power':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_ac_output_apparent_power/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_ac_output_active_power':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_ac_output_active_power/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_output_load_percent':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_output_load_percent/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_battery_voltage':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_battery_voltage/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_battery_charging_current':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_battery_charging_current/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_battery_capacity_percent':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_battery_capacity_percent/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_inverter_heat_sink_temperature':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_inverter_heat_sink_temperature/state'
[23:54:00][D][uart_debug:158]: >>> "^P003PI\r"
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_pv_input_current_for_battery':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_pv_input_current_for_battery/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_pv_input_voltage':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_pv_input_voltage/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_battery_discharge_current':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_battery_discharge_current/state'
[23:54:00][C][mqtt.sensor:027]: MQTT Sensor 'inverter0_pv_charging_power':
[23:54:00][C][mqtt.sensor:031]: State Topic: 'solar/sensor/inverter0_pv_charging_power/state'
[23:54:00][C][mqtt.text_sensor:023]: MQTT Text Sensor 'inverter0_device_mode':
[23:54:00][C][mqtt.text_sensor:024]: State Topic: 'solar/sensor/inverter0_device_mode/state'
[23:54:00][C][mqtt.text_sensor:023]: MQTT Text Sensor 'inverter0_last_qpigs':
[23:54:00][C][mqtt.text_sensor:024]: State Topic: 'solar/sensor/inverter0_last_qpigs/state'
[23:54:00][C][mqtt.text_sensor:023]: MQTT Text Sensor 'inverter0_last_qpiri':
[23:54:00][C][mqtt.text_sensor:024]: State Topic: 'solar/sensor/inverter0_last_qpiri/state'
[23:54:02][D][uart_debug:158]: >>> "^P005PIq\xC2\x8B\r"
[23:54:02][D][uart_debug:158]: <<< "\xFF"
[23:54:03][D][pipsolar:755]: timeout command to poll: QMOD
[23:54:03][D][uart_debug:158]: >>> "QPIRI\xF8T\r"
[23:54:03][D][pipsolar:838]: Sending polling command : QPIRI with length 5
[23:54:04][D][uart_debug:158]: >>> "QPI\xC2\xBE\xC2\xAC\r"
[23:54:06][D][uart_debug:158]: >>> "QDIq\e\r"
[23:54:08][D][uart_debug:158]: >>> "QPIRI\xC3\xB8T\r"
[23:54:08][D][pipsolar:755]: timeout command to poll: QPIRI
[23:54:08][D][uart_debug:158]: >>> "QPIGS\xB7\xA9\r"
[23:54:08][D][pipsolar:838]: Sending polling command : QPIGS with length 5
[23:54:10][D][uart_debug:158]: >>> "QPIGS\xC2\xB7\xC2\xA9\r"
[23:54:12][D][uart_debug:158]: >>> "QMODI\xC3\x81\r"
[23:54:12][D][uart_debug:158]: <<< "\xFF"
[23:54:13][D][pipsolar:755]: timeout command to poll: QPIGS
[23:54:13][D][uart_debug:158]: >>> "QMODI\xC1\r"
[23:54:13][D][pipsolar:838]: Sending polling command : QMOD with length 4
[23:54:14][D][uart_debug:158]: >>> "QFLAG\xC2\x98t\r"
[23:54:18][D][pipsolar:755]: timeout command to poll: QMOD
[23:54:18][D][uart_debug:158]: >>> "QPIRI\xF8T\r"
[23:54:18][D][pipsolar:838]: Sending polling command : QPIRI with length 5
[23:54:23][D][pipsolar:755]: timeout command to poll: QPIRI
[23:54:24][D][uart_debug:158]: >>> "QPIGS\xB7\xA9\r"
[23:54:24][D][pipsolar:838]: Sending polling command : QPIGS with length 5
[23:54:28][D][uart_debug:158]: >>> "QPI\r"
[23:54:29][D][pipsolar:755]: timeout command to poll: QPIGS
[23:54:29][D][uart_debug:158]: >>> "QMODI\xC1\r"
[23:54:29][D][pipsolar:838]: Sending polling command : QMOD with length 4
[23:54:30][D][uart_debug:158]: >>> "^P003PI\r"
[23:54:32][D][uart_debug:158]: >>> "^P005PIq\xC2\x8B\r"
[23:54:34][D][pipsolar:755]: timeout command to poll: QMOD
[23:54:34][D][uart_debug:158]: >>> "QPIRI\xF8T\r"
[23:54:34][D][pipsolar:838]: Sending polling command : QPIRI with length 5
[23:54:34][D][uart_debug:158]: >>> "QPI\xC2\xBE\xC2\xAC\r"
[23:54:36][D][uart_debug:158]: >>> "QDIq\e\r"
[23:54:38][D][uart_debug:158]: >>> "QPIRI\xC3\xB8T\r"
[23:54:39][D][pipsolar:755]: timeout command to poll: QPIRI
[23:54:39][D][uart_debug:158]: >>> "QPIGS\xB7\xA9\r"
[23:54:39][D][pipsolar:838]: Sending polling command : QPIGS with length 5
[23:54:40][D][uart_debug:158]: >>> "QPIGS\xC2\xB7\xC2\xA9\r"
[23:54:40][D][uart_debug:158]: <<< "\xFF"
[23:54:42][D][uart_debug:158]: >>> "QMODI\xC3\x81\r"
[23:54:42][D][uart_debug:158]: <<< "\xFF"
[23:54:44][D][pipsolar:755]: timeout command to poll: QPIGS
[23:54:44][D][uart_debug:158]: >>> "QMODI\xC1\r"
[23:54:44][D][pipsolar:838]: Sending polling command : QMOD with length 4
[23:54:44][D][uart_debug:158]: >>> "QFLAG\xC2\x98t\r"
It has responded
uart_debug:158]: >>> "QMODI\xC3\x81\r"
uart_debug:158]: <<< "\xFF"
I am not able to understand what the protocol is of my invertor.
And from the logs, i guess you people can also tell me that if my settings are correct or not.
And if I have knows what the protocol my inverter is, I also dont know where to put that information.
Please help.