Replies: 1 comment 1 reply
-
I have the same question and had create Man-in-the-middle UART approach substitutions:
name: esphome-web-9bb9fc
friendly_name: ESPHome UART test
# Wi-Fi
tx_pin0: GPIO1
rx_pin0: GPIO3
# Inverter
tx_pin1: GPIO17
rx_pin1: GPIO16
esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: false
project:
name: esphome.uart
version: dev
esp32:
board: nodemcu-32s
ota:
- platform: esphome
api:
# Enable logging
logger:
baud_rate: 0
wifi:
# Set up a wifi access point
networks:
- ssid: !secret wifi_ssid_asd
password: !secret wifi_password_asd
- ssid: !secret wifi_ssid_main
password: !secret wifi_password_main
- ssid: !secret wifi_ssid_reserved
password: !secret wifi_password_reserved
- ssid: !secret wifi_ssid
password: !secret wifi_password
#####################################################
uart:
- id: uart_2
tx_pin: ${tx_pin0}
rx_pin: ${rx_pin0}
# most devices use 2400 as baud_rate. (110,300,600,1200,2400,4800,9600,14400,19200,38400)
baud_rate: 2400
debug:
direction: RX
dummy_receiver: true
after:
delimiter: "\r"
sequence:
- uart.write: #Write rx to tx.
id: uart_1
data: !lambda return bytes;
- lambda: |-
ESP_LOGD("custom", "WI-FI Logger:");
UARTDebug::log_string(UART_DIRECTION_TX, bytes);
UARTDebug::log_hex(UART_DIRECTION_TX, bytes, ', ');
- id: uart_1
tx_pin: ${tx_pin1}
rx_pin: ${rx_pin1}
# most devices use 2400 as baud_rate. (110,300,600,1200,2400,4800,9600,14400,19200,38400)
baud_rate: 2400
debug:
direction: RX
dummy_receiver: true
after:
delimiter: "\r"
sequence:
- uart.write: #Write rx to tx.
id: uart_2
data: !lambda return bytes;
- lambda: |-
ESP_LOGD("custom", "INVERTER");
UARTDebug::log_string(UART_DIRECTION_RX, bytes);
UARTDebug::log_hex(UART_DIRECTION_RX, bytes, ', ');
But I got unexpected response like this one [21:35:32][C][logger:185]: Logger:
[21:35:32][C][logger:186]: Level: DEBUG
[21:35:32][C][uart.arduino_esp32:151]: UART Bus 0:
[21:35:32][C][uart.arduino_esp32:152]: TX Pin: GPIO1
[21:35:32][C][uart.arduino_esp32:153]: RX Pin: GPIO3
[21:35:32][C][uart.arduino_esp32:155]: RX Buffer Size: 256
[21:35:32][C][uart.arduino_esp32:157]: Baud Rate: 2400 baud
[21:35:32][C][uart.arduino_esp32:158]: Data Bits: 8
[21:35:32][C][uart.arduino_esp32:159]: Parity: NONE
[21:35:32][C][uart.arduino_esp32:160]: Stop bits: 1
[21:35:32][C][uart.arduino_esp32:151]: UART Bus 1:
[21:35:32][C][uart.arduino_esp32:152]: TX Pin: GPIO17
[21:35:32][C][uart.arduino_esp32:153]: RX Pin: GPIO16
[21:35:32][C][uart.arduino_esp32:155]: RX Buffer Size: 256
[21:35:32][C][uart.arduino_esp32:157]: Baud Rate: 2400 baud
[21:35:32][C][uart.arduino_esp32:158]: Data Bits: 8
[21:35:32][C][uart.arduino_esp32:159]: Parity: NONE
.......
[21:47:10][D][custom:076]: WI-FI Logger:
[21:47:10][D][uart_debug:158]: >>> "\x05\x03\x11\x95\x00-\x91C"
[21:47:10][D][uart_debug:114]: >>> 05 03 11 95 00 2D 91 43
[21:47:10][D][custom:095]: INVERTER
[21:47:10][D][uart_debug:158]: <<< "\x05\x03Z\x04\x00\t\t\xF3\x01h\x01\x01\x00\x13\x02S\x00\x00\x00\x00\x00\t\t\xF3\x01B\x02\xCD\x01\x05\x00\x05\x00\x01\x00\xB8\x01\x1A\x1E\x00\x00\x02\x00\xD8\'\xD8\'\xE6\x00,\x00\xE0\x01\xE6\x00\xF4\x01,\x00\x00\x00\x00\x00\x9F\x15\x9F\x15\x9F\x157\x00\f\x01\x02\x00\x01\x00\x01\x00\x02\x00\x00\x002\x00\xE6\x00\x14\x00\xFE\x01\x1C\x02\eD"
[21:47:10][D][uart_debug:114]: <<< 05 03 5A 04 00 09 09 F3 01 68 01 01 00 13 02 53 00 00 00 00 00 09 09 F3 01 42 02 CD 01 05 00 05 00 01 00 B8 01 1A 1E 00 00 02 00 D8 27 D8 27 E6 00 2C 00 E0 01 E6 00 F4 01 2C 00 00 00 00 00 9F 15 9F 15 9F 15 37 00 0C 01 02 00 01 00 01 00 02 00 00 00 32 00 E6 00 14 00 FE 01 1C 02 1B 44
[21:47:11][D][custom:076]: WI-FI Logger:
[21:47:11][D][uart_debug:158]: >>> "\x05\x03\x11\xC2\x00\x10\xE1B"
[21:47:11][D][uart_debug:114]: >>> 05 03 11 C2 00 10 E1 42
[21:47:12][D][custom:095]: INVERTER
[21:47:12][D][uart_debug:158]: <<< "\x05\x03 ?\x02?\x02\xBE\x01H\x02<\x00x\x00\x1E\x00a\x05\x00\x00\n\x00\x00\x00\'\x00\x00\x00\x00\x00\x05\x00\x01\x00\x1A\xB1"
[21:47:12][D][uart_debug:114]: <<< 05 03 20 3F 02 3F 02 BE 01 48 02 3C 00 78 00 1E 00 61 05 00 00 0A 00 00 00 27 00 00 00 00 00 05 00 01 00 1A B1
[21:47:12][D][custom:076]: WI-FI Logger:
[21:47:12][D][uart_debug:158]: >>> "\x05\x03\x11\xD3\x00\x021J"
[21:47:12][D][uart_debug:114]: >>> 05 03 11 D3 00 02 31 4A
[21:47:13][D][custom:095]: INVERTER
[21:47:13][D][uart_debug:158]: <<< "\x05\x03\x04\x00\x00\x01\x00\xBEc"
[21:47:13][D][uart_debug:114]: <<< 05 03 04 00 00 01 00 BE 63 this is not looks like QPIGS (or similar) command >>> "QPI\xBE\xAC\r"
<<< "(PI30\x9A\v\r"
>>> "QMN\xBBd\r"
<<< "(VMII-NXPW5KW9\xB3\r" I need this because I have 2MPPT inverter and QuestionHow to decode this |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm use Anern EX Pro 10.2 Kw
https://www.anerngroup.com/products/high-frequency-on-off-grid-hybrid-solar-inverter/
I use RJ45 Splitter 1 for pipesolar and another one for original Logger
Is it possible to use piepsolar and original logger at the same time?
I use esp8266-example.yaml.
Thx
Beta Was this translation helpful? Give feedback.
All reactions