syssi / esphome-pipsolar

ESPHome component to monitor and control a pipsolar inverter via RS232
Apache License 2.0
99 stars 41 forks source link

2 PV monitoring #149

Closed fastvd closed 1 month ago

fastvd commented 1 month ago

Greetings. I have an inverter, which I finally control (switch operating modes) and read data, but I don't read everything I need... yesterday i connected an extra string to my inverter and now i have 2 inputs from my solar panels...

only in this firmware modification did I find any mention of PV1 and PV2: https://github.com/syssi/esphome-pipsolar/blob/pi18/esp32-example.yaml

but if we UNcomment out everything related to PV2, then these data still do not reach us...

P.S.: if you connect a wifi dongle and monitor the data in smartESS, my 2nd string PV2 shows the correct data, the ones that I physically see on the inverter display....that means the data can EXACTLY be obtained, you just need to understand how!

syssi commented 1 month ago

Do you know the PIP protocol version of your inverter? Have you tried the pip8048 branch already?

https://github.com/syssi/esphome-pipsolar/blob/pip8048/esp32-example.yaml

fastvd commented 1 month ago

image PI30

fastvd commented 1 month ago

Do you know the PIP protocol version of your inverter? Have you tried the pip8048 branch already?

https://github.com/syssi/esphome-pipsolar/blob/pip8048/esp32-example.yaml

yes, I tried this version...unfortunately we don't get information from PV2...but we can see separate PV1 and total PV

image

syssi commented 1 month ago

Are you able to identify the commands to retrieve the PV2 measurements?

fastvd commented 1 month ago

no, I did not find the command yet, but I checked all the firmwares that are here and realized that they all show ONLY PV1

image from mqtt зображення_viber_2024-09-11_13-03-15-314 my pv2 in live зображення_viber_2024-09-11_13-03-15-352 my pv1 in live

syssi commented 1 month ago

If you use this configuration: https://github.com/syssi/esphome-pipsolar/blob/pip8048/esp32-example.yaml

What does the pv2_input_current and pv2_input_voltage sensor show?

fastvd commented 1 month ago

If you use this configuration: https://github.com/syssi/esphome-pipsolar/blob/pip8048/esp32-example.yaml

What does the pv2_input_current and pv2_input_voltage sensor show?

does not show anything... there is simply no such sensor, or it is not transmitted to mqtt.. as an option with this firmware, enable advanced logging and catch pieces of code during this request

syssi commented 1 month ago

I would be happy about a ESPHome log. :-)

fastvd commented 1 month ago

INFO ESPHome 2024.8.3 INFO Reading configuration /config/esphome/inverter-modbus.yaml... INFO Updating https://github.com/syssi/esphome-pipsolar.git@pip8048 INFO Starting log output from pipsolar/debug INFO Connected to MQTT broker! [13:34:35][D][pipsolar:863]: CRC OK

[13:34:35][D][pipsolar:926]: Sending polling command : QMOD with length 4

[13:34:36][D][pipsolar:860]: checking crc on incoming message [13:34:36][D][pipsolar:863]: CRC OK [13:34:36][D][pipsolar:536]: Decode QMOD [13:34:36][D][text_sensor:064]: 'pipsolar device_mode': Sending state 'B'

[13:34:36][D][pipsolar:926]: Sending polling command : QFLAG with length 5

[13:34:37][D][pipsolar:860]: checking crc on incoming message [13:34:37][D][pipsolar:863]: CRC OK [13:34:37][D][pipsolar:544]: Decode QFLAG

[13:34:37][D][pipsolar:926]: Sending polling command : QPIRI with length 5

[13:34:38][D][pipsolar:860]: checking crc on incoming message [13:34:38][D][pipsolar:863]: CRC OK [13:34:38][D][pipsolar:479]: Decode QPIRI [13:34:38][D][pipsolar.select:031]: got value: 120 [13:34:38][D][pipsolar.select:033]: found mapped option 120A for option 120 [13:34:38][D][select:015]: 'pipsolar current_max_ac_charging_current_select': Sending state 120A (index 12) [13:34:38][D][pipsolar.select:031]: got value: 140 [13:34:38][D][pipsolar.select:036]: could not find option 140 in mapping [13:34:38][D][pipsolar.select:031]: got value: 2 [13:34:38][D][pipsolar.select:033]: found mapped option Solar Battery Utility for option 2 [13:34:38][D][select:015]: 'inverter0_output_source_priority_select': Sending state Solar Battery Utility (index 2) [13:34:38][D][pipsolar.select:031]: got value: 1 [13:34:38][D][pipsolar.select:033]: found mapped option Solar first for option 1 [13:34:38][D][select:015]: 'pipsolar charger_source_priority_select': Sending state Solar first (index 0)

[13:34:39][D][pipsolar:926]: Sending polling command : QBATCD with length 6

[13:34:39][D][pipsolar:860]: checking crc on incoming message [13:34:39][D][pipsolar:863]: CRC OK

[13:34:39][D][pipsolar:926]: Sending polling command : QPIGS with length 5

[13:34:40][D][pipsolar:860]: checking crc on incoming message [13:34:40][D][pipsolar:863]: CRC OK [13:34:40][D][pipsolar:502]: Decode QPIGS [13:34:40][D][sensor:094]: 'pipsolar grid_voltage': Sending state 246.30000 V with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar grid_frequency': Sending state 49.90000 Hz with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar ac_output_voltage': Sending state 219.30000 V with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar ac_output_frequency': Sending state 49.90000 Hz with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar ac_output_apparent_power': Sending state 2324.00000 VA with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar ac_output_active_power': Sending state 2268.00000 W with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar output_load_percent': Sending state 25.00000 % with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar bus_voltage': Sending state 436.00000 V with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar battery_voltage': Sending state 53.90000 V with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar battery_charging_current': Sending state 51.00000 A with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar battery_capacity_percent': Sending state 57.00000 % with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar inverter_heat_sink_temperature': Sending state 47.00000 °C with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar pv1_input_current': Sending state 9.10000 A with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar pv1_input_voltage': Sending state 368.70001 V with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar battery_voltage_scc': Sending state 0.00000 V with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar battery_discharge_current': Sending state 0.00000 A with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar battery_voltage_offset_for_fans_on': Sending state 0.00000 V with 1 decimals of accuracy [13:34:40][D][sensor:094]: 'pipsolar pv1_charging_power': Sending state 3312.00000 W with 1 decimals of accuracy [13:34:40][W][component:237]: Component esphome.coroutine took a long time for an operation (154 ms). [13:34:40][W][component:238]: Components should block for at most 30 ms.

[13:34:40][D][pipsolar:926]: Sending polling command : QPIGS2 with length 6

[13:34:41][D][pipsolar:860]: checking crc on incoming message [13:34:41][D][pipsolar:863]: CRC OK

[13:34:41][D][pipsolar:926]: Sending polling command : QMOD with length 4

[13:34:42][D][pipsolar:860]: checking crc on incoming message [13:34:42][D][pipsolar:863]: CRC OK [13:34:42][D][pipsolar:536]: Decode QMOD [13:34:42][D][text_sensor:064]: 'pipsolar device_mode': Sending state 'B'

[13:34:43][D][pipsolar:926]: Sending polling command : QFLAG with length 5

[13:34:43][D][pipsolar:860]: checking crc on incoming message [13:34:43][D][pipsolar:863]: CRC OK [13:34:43][D][pipsolar:544]: Decode QFLAG

[13:34:44][D][pipsolar:926]: Sending polling command : QPIRI with length 5

[13:34:44][D][pipsolar:860]: checking crc on incoming message [13:34:44][D][pipsolar:863]: CRC OK [13:34:44][D][pipsolar:479]: Decode QPIRI [13:34:44][D][pipsolar.select:031]: got value: 120 [13:34:44][D][pipsolar.select:033]: found mapped option 120A for option 120 [13:34:44][D][select:015]: 'pipsolar current_max_ac_charging_current_select': Sending state 120A (index 12) [13:34:44][D][pipsolar.select:031]: got value: 140 [13:34:44][D][pipsolar.select:036]: could not find option 140 in mapping [13:34:44][D][pipsolar.select:031]: got value: 2 [13:34:44][D][pipsolar.select:033]: found mapped option Solar Battery Utility for option 2 [13:34:44][D][select:015]: 'inverter0_output_source_priority_select': Sending state Solar Battery Utility (index 2) [13:34:44][D][pipsolar.select:031]: got value: 1 [13:34:44][D][pipsolar.select:033]: found mapped option Solar first for option 1 [13:34:44][D][select:015]: 'pipsolar charger_source_priority_select': Sending state Solar first (index 0) [13:34:44][W][component:237]: Component esphome.coroutine took a long time for an operation (52 ms). [13:34:44][W][component:238]: Components should block for at most 30 ms.

[13:34:45][D][pipsolar:926]: Sending polling command : QBATCD with length 6

[13:34:45][D][pipsolar:860]: checking crc on incoming message [13:34:45][D][pipsolar:863]: CRC OK

[13:34:46][D][pipsolar:926]: Sending polling command : QPIGS with length 5

[13:34:46][D][pipsolar:860]: checking crc on incoming message [13:34:46][D][pipsolar:863]: CRC OK [13:34:46][D][pipsolar:502]: Decode QPIGS [13:34:46][D][sensor:094]: 'pipsolar grid_voltage': Sending state 246.10001 V with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar grid_frequency': Sending state 49.90000 Hz with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar ac_output_voltage': Sending state 220.50000 V with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar ac_output_frequency': Sending state 49.90000 Hz with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar ac_output_apparent_power': Sending state 2315.00000 VA with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar ac_output_active_power': Sending state 2284.00000 W with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar output_load_percent': Sending state 25.00000 % with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar bus_voltage': Sending state 436.00000 V with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar battery_voltage': Sending state 54.00000 V with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar battery_charging_current': Sending state 53.00000 A with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar battery_capacity_percent': Sending state 58.00000 % with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar inverter_heat_sink_temperature': Sending state 47.00000 °C with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar pv1_input_current': Sending state 9.00000 A with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar pv1_input_voltage': Sending state 373.79999 V with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar battery_voltage_scc': Sending state 0.00000 V with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar battery_discharge_current': Sending state 0.00000 A with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar battery_voltage_offset_for_fans_on': Sending state 0.00000 V with 1 decimals of accuracy [13:34:46][D][sensor:094]: 'pipsolar pv1_charging_power': Sending state 3313.00000 W with 1 decimals of accuracy [13:34:46][W][component:237]: Component esphome.coroutine took a long time for an operation (146 ms). [13:34:46][W][component:238]: Components should block for at most 30 ms.

[13:34:47][D][pipsolar:926]: Sending polling command : QPIGS2 with length 6

[13:34:47][D][pipsolar:860]: checking crc on incoming message [13:34:47][D][pipsolar:863]: CRC OK

[13:34:48][D][pipsolar:926]: Sending polling command : QMOD with length 4

[13:34:48][D][pipsolar:860]: checking crc on incoming message [13:34:48][D][pipsolar:863]: CRC OK [13:34:48][D][pipsolar:536]: Decode QMOD [13:34:48][D][text_sensor:064]: 'pipsolar device_mode': Sending state 'B'

[13:34:49][D][pipsolar:926]: Sending polling command : QFLAG with length 5

[13:34:49][D][pipsolar:860]: checking crc on incoming message [13:34:49][D][pipsolar:863]: CRC OK [13:34:49][D][pipsolar:544]: Decode QFLAG

[13:34:50][D][pipsolar:926]: Sending polling command : QPIRI with length 5

[13:34:50][D][pipsolar:860]: checking crc on incoming message [13:34:51][D][pipsolar:863]: CRC OK [13:34:51][D][pipsolar:479]: Decode QPIRI [13:34:51][D][pipsolar.select:031]: got value: 120 [13:34:51][D][pipsolar.select:033]: found mapped option 120A for option 120 [13:34:51][D][select:015]: 'pipsolar current_max_ac_charging_current_select': Sending state 120A (index 12) [13:34:51][D][pipsolar.select:031]: got value: 140 [13:34:51][D][pipsolar.select:036]: could not find option 140 in mapping [13:34:51][D][pipsolar.select:031]: got value: 2 [13:34:51][D][pipsolar.select:033]: found mapped option Solar Battery Utility for option 2 [13:34:51][D][select:015]: 'inverter0_output_source_priority_select': Sending state Solar Battery Utility (index 2) [13:34:51][D][pipsolar.select:031]: got value: 1 [13:34:51][D][pipsolar.select:033]: found mapped option Solar first for option 1 [13:34:51][D][select:015]: 'pipsolar charger_source_priority_select': Sending state Solar first (index 0)

[13:34:51][D][pipsolar:926]: Sending polling command : QBATCD with length 6

[13:34:51][D][pipsolar:860]: checking crc on incoming message [13:34:51][D][pipsolar:863]: CRC OK

[13:34:52][D][pipsolar:926]: Sending polling command : QPIGS with length 5

[13:34:52][D][pipsolar:860]: checking crc on incoming message [13:34:52][D][pipsolar:863]: CRC OK [13:34:52][D][pipsolar:502]: Decode QPIGS [13:34:52][D][sensor:094]: 'pipsolar grid_voltage': Sending state 245.10001 V with 1 decimals of accuracy [13:34:52][D][sensor:094]: 'pipsolar grid_frequency': Sending state 49.90000 Hz with 1 decimals of accuracy [13:34:52][D][sensor:094]: 'pipsolar ac_output_voltage': Sending state 220.80000 V with 1 decimals of accuracy [13:34:52][D][sensor:094]: 'pipsolar ac_output_frequency': Sending state 49.90000 Hz with 1 decimals of accuracy [13:34:52][D][sensor:094]: 'pipsolar ac_output_apparent_power': Sending state 2340.00000 VA with 1 decimals of accuracy [13:34:52][D][sensor:094]: 'pipsolar ac_output_active_power': Sending state 2302.00000 W with 1 decimals of accuracy [13:34:52][D][sensor:094]: 'pipsolar output_load_percent': Sending state 25.00000 % with 1 decimals of accuracy [13:34:52][D][sensor:094]: 'pipsolar bus_voltage': Sending state 436.00000 V with 1 decimals of accuracy [13:34:52][D][sensor:094]: 'pipsolar battery_voltage': Sending state 54.00000 V with 1 decimals of accuracy [13:34:52][D][sensor:094]: 'pipsolar battery_charging_current': Sending state 53.00000 A with 1 decimals of accuracy [13:34:52][D][sensor:094]: 'pipsolar battery_capacity_percent': Sending state 58.00000 % with 1 decimals of accuracy [13:34:52][D][sensor:094]: 'pipsolar inverter_heat_sink_temperature': Sending state 47.00000 °C with 1 decimals of accuracy [13:34:53][D][sensor:094]: 'pipsolar pv1_input_current': Sending state 9.10000 A with 1 decimals of accuracy [13:34:53][D][sensor:094]: 'pipsolar pv1_input_voltage': Sending state 370.70001 V with 1 decimals of accuracy [13:34:53][D][sensor:094]: 'pipsolar battery_voltage_scc': Sending state 0.00000 V with 1 decimals of accuracy [13:34:53][D][sensor:094]: 'pipsolar battery_discharge_current': Sending state 0.00000 A with 1 decimals of accuracy [13:34:53][D][sensor:094]: 'pipsolar battery_voltage_offset_for_fans_on': Sending state 0.00000 V with 1 decimals of accuracy [13:34:53][D][sensor:094]: 'pipsolar pv1_charging_power': Sending state 3312.00000 W with 1 decimals of accuracy [13:34:53][W][component:237]: Component esphome.coroutine took a long time for an operation (184 ms). [13:34:53][W][component:238]: Components should block for at most 30 ms.

[13:34:53][D][pipsolar:926]: Sending polling command : QPIGS2 with length 6

[13:34:53][D][pipsolar:860]: checking crc on incoming message [13:34:53][D][pipsolar:863]: CRC OK

[13:34:54][D][pipsolar:926]: Sending polling command : QMOD with length 4

[13:34:54][D][pipsolar:860]: checking crc on incoming message [13:34:54][D][pipsolar:863]: CRC OK [13:34:54][D][pipsolar:536]: Decode QMOD [13:34:54][D][text_sensor:064]: 'pipsolar device_mode': Sending state 'B'

[13:34:55][D][pipsolar:926]: Sending polling command : QFLAG with length 5

[13:34:55][D][pipsolar:860]: checking crc on incoming message [13:34:55][D][pipsolar:863]: CRC OK [13:34:55][D][pipsolar:544]: Decode QFLAG

[13:34:56][D][pipsolar:926]: Sending polling command : QPIRI with length 5

[13:34:57][D][pipsolar:860]: checking crc on incoming message [13:34:57][D][pipsolar:863]: CRC OK

fastvd commented 1 month ago

image I am now physically near the inverter and I can clearly see the data from PV1 and PV2 on the display...and what is in the logs...my number from PV2 is not in the answer from the inverter...it is logical to assume that the request is not correct.. .

fastvd commented 1 month ago

image if I even comment on everything related to PV1 and leave only PV2..then everything physically corresponds to PV1

fastvd commented 1 month ago

more precisely, not so... if I leave only PV2, then there are no data on PV channels at all

binarybase commented 1 month ago

Hello, I have simillar issue with EASUN inverter, it has too 2 PVs, but the command QPIGS2 goes into the timeout

[12:45:01][D][pipsolar:924]: Sending polling command : QPIGS2 with length 6 [12:45:01][W][component:237]: Component esphome.coroutine took a long time for an operation (51 ms). [12:45:01][W][component:238]: Components should block for at most 30 ms.

[12:45:01][D][pipsolar:860]: checking crc on incoming message [12:45:01][D][pipsolar:863]: CRC OK

I was facing this issue on Axpert 8kW inverter, I was unable to get this command working when the inverter was connected via USB interface, but via RS232 I was able to get QPIGS2 response.

I don't know how to solve it, but this command is longer than the others (QPIRI, QMOD, QPIGS - all of them has 4 or 5 characters + 2 chars CRC and carriage return? It is 8 characters. But QPIGS2 including CRC is 9 characters. Maybe something in a protocol is stripping string to 8 characters? It's just an idea.

Thank you

fastvd commented 1 month ago

image image yes, I also found the answer as it should be, but unfortunately it is not there...in response we get - NAK ...but it can definitely be monitored somehow, as I remind you that the wifi dongle in the solar2mqtt application receives this data correctly.. .who has any ideas?

fastvd commented 1 month ago

image well...I found my old RPi3...I installed solar assistant there...I connected an adapter via usb-rs232, and what do you think...solar assistant also reads ONLY PV1!!! although I remind you that the wifi dongle reads correctly 2 channels! I don't know where to dig anymore...

binarybase commented 1 month ago

I think it might be a protocol issue, maybe they have changed some commands. I also asked the seller for communication protocol for the inverter. My inverter has 2 MPPTs, but acts like version with one MPPT.

Have you tried to identify your protocol using QPI command? My inverter looks simillar to yours and responds me with PI30 protocol, but it should be PI30MAX, shouldn't be? That is really weird.

syssi commented 1 month ago

@fastvd Could you provide a link to the WiFi dongle or some photos? How is the dongle attached to the inverter?

fastvd commented 1 month ago

@fastvd Could you provide a link to the WiFi dongle or some photos? How is the dongle attached to the inverter?

изображение_viber_2024-09-11_13-03-15-742 изображение_viber_2024-09-16_13-34-00-121 изображение_viber_2024-09-16_13-34-00-222 connects to RJ45 port, standard according to all instructions... 1,2-RX,TX 4-12v 8-GND

fastvd commented 1 month ago

I think it might be a protocol issue, maybe they have changed some commands. I also asked the seller for communication protocol for the inverter. My inverter has 2 MPPTs, but acts like version with one MPPT.

Have you tried to identify your protocol using QPI command? My inverter looks simillar to yours and responds me with PI30 protocol, but it should be PI30MAX, shouldn't be? That is really weird.

image

syssi commented 1 month ago

@fastvd: Do you see the pin header (RX, TX, GND) on the WiFi dongle board? Could you measure the voltages here (RX<->GND, TX<->GND). Is the logic level 3.3V here? If yes, we could attach a ESP to sniff the traffic here. I can provide a YAML which prints the data of both lines (RX, TX) to the log.

If you don't want to measure the voltage you could also measure the continuity / resistance of 0 ohm between the pin header pins and the RX/TX pins of the MAX3232 chip.

binarybase commented 1 month ago

Yes, you are having PI30 protocol likely as me, this protocol does not support the QPIGS2 command, so you are unable to get any information about the second PV input. I have also tried QPGS0 command - it also responds with NAK.

Maybe this dongle is using different protocol for readings? (maybe MODBUS?)

syssi commented 1 month ago

Just a guess: The checksum of the QPIGS2 request isn't fine from the inverters perspective. In this case the inverter responds also with a NAK.

binarybase commented 1 month ago

Just a guess: The checksum of the QPIGS2 request isn't fine from the inverters perspective. In this case the inverter responds also with a NAK.

I thought that so, so I have tried also QPGS0 which has the same length as QPIGS, the CRC should be fine, but it responded with NAK also. I have to notice that this inverter has no parallel connection support.

fastvd commented 1 month ago

@fastvd: Do you see the pin header (RX, TX, GND) on the WiFi dongle board? Could you measure the voltages here (RX<->GND, TX<->GND). Is the logic level 3.3V here? If yes, we could attach a ESP to sniff the traffic here. I can provide a YAML which prints the data of both lines (RX, TX) to the log.

If you don't want to measure the voltage you could also measure the continuity / resistance of 0 ohm between the pin header pins and the RX/TX pins of the MAX3232 chip.

image

fastvd commented 1 month ago

image

syssi commented 1 month ago

3.17V looks good. I've pushed a UART sniffer example to the project: https://github.com/syssi/esphome-pipsolar/blob/main/tests/esp8266-uart-sniffer.yaml

Please flash this YAML to an ESP8266 and attach GPIO4, GPIO5 and GND to the dongle. Plug the dongle back to the inverter and take a look at the log of the ESPHome node. You should see the RAW traffic here (in hex).

fastvd commented 1 month ago

if I measure on the pins of the wifi dongle, then 3.17V... if on the esp board where solar2mqtt is filled, then the RS232 input is 12V, and on the esp board itself it is the same 3.3V, as on the native wifi dongle

syssi commented 1 month ago

My question was only about the OEM WiFi dongle. My goal was to make sure we don't destroy the GPIOs of an ESP if we attach an 3.3V tolerant ESP here to sniff the traffic of the OEM dongle.

fastvd commented 1 month ago

INFO ESPHome 2024.8.3 INFO Reading configuration /config/esphome/sniffer.yaml... INFO Generating C++ source... INFO Compiling app... Processing uart-sniffer (board: d1_mini; framework: arduino; platform: platformio/espressif8266@4.2.1)

HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash Dependency Graph |-- ESP8266WiFi @ 1.0 |-- ESP8266mDNS @ 1.2 Compiling .pioenvs/uart-sniffer/src/main.cpp.o Linking .pioenvs/uart-sniffer/firmware.elf RAM: [==== ] 37.9% (used 31076 bytes from 81920 bytes) Flash: [=== ] 34.7% (used 362111 bytes from 1044464 bytes) Building .pioenvs/uart-sniffer/firmware.bin esp8266_copy_factory_bin([".pioenvs/uart-sniffer/firmware.bin"], [".pioenvs/uart-sniffer/firmware.elf"]) esp8266_copy_ota_bin([".pioenvs/uart-sniffer/firmware.bin"], [".pioenvs/uart-sniffer/firmware.elf"]) ========================= [SUCCESS] Took 13.97 seconds ========================= INFO Successfully compiled program. INFO Connecting to 10.12.17.184 INFO Uploading /data/build/uart-sniffer/.pioenvs/uart-sniffer/firmware.bin (366256 bytes) INFO Compressed to 259943 bytes Uploading: [============================================================] 100% Done...

INFO Upload took 7.89 seconds, waiting for result... INFO OTA successful INFO Successfully uploaded program. INFO Starting log output from 10.12.17.184 using esphome API INFO Successfully connected to uart-sniffer @ 10.12.17.184 in 11.205s INFO Successful handshake with uart-sniffer @ 10.12.17.184 in 0.023s [16:25:49][I][app:100]: ESPHome version 2024.8.3 compiled on Sep 16 2024, 16:25:17

[16:25:49][C][wifi:428]: Local MAC: 80:7D:3A:4E:8D:CC [16:25:49][C][wifi:433]: SSID: [redacted] [16:25:49][C][wifi:436]: IP Address: 10.12.17.184 [16:25:49][C][wifi:439]: BSSID: [redacted]

[16:25:49][C][wifi:443]: Signal strength: -63 dB ▂▄▆█ [16:25:49][C][wifi:447]: Channel: 7 [16:25:49][C][wifi:448]: Subnet: 255.255.255.0 [16:25:49][C][wifi:449]: Gateway: 10.12.17.1 [16:25:49][C][wifi:450]: DNS1: 8.8.8.8 [16:25:49][C][wifi:451]: DNS2: 0.0.0.0

[16:25:49][C][logger:186]: Level: DEBUG [16:25:49][C][logger:188]: Log Baud Rate: 115200 [16:25:49][C][logger:189]: Hardware UART: UART0 [16:25:49][C][uart.arduino_esp8266:118]: UART Bus: [16:25:50][C][uart.arduino_esp8266:120]: RX Pin: GPIO13 [16:25:50][C][uart.arduino_esp8266:122]: RX Buffer Size: 256 [16:25:50][C][uart.arduino_esp8266:124]: Baud Rate: 2400 baud [16:25:50][C][uart.arduino_esp8266:125]: Data Bits: 8 [16:25:50][C][uart.arduino_esp8266:126]: Parity: NONE [16:25:50][C][uart.arduino_esp8266:127]: Stop bits: 1 [16:25:50][C][uart.arduino_esp8266:131]: Using software serial [16:25:50][C][uart.arduino_esp8266:118]: UART Bus: [16:25:50][C][uart.arduino_esp8266:120]: RX Pin: GPIO12 [16:25:50][C][uart.arduino_esp8266:122]: RX Buffer Size: 256 [16:25:50][C][uart.arduino_esp8266:124]: Baud Rate: 2400 baud [16:25:50][C][uart.arduino_esp8266:125]: Data Bits: 8 [16:25:50][C][uart.arduino_esp8266:126]: Parity: NONE [16:25:50][C][uart.arduino_esp8266:127]: Stop bits: 1 [16:25:50][C][uart.arduino_esp8266:131]: Using software serial

[16:25:50][C][mdns:117]: Hostname: uart-sniffer [16:25:50][C][esphome.ota:073]: Over-The-Air updates: [16:25:50][C][esphome.ota:074]: Address: uart-sniffer.local:8266 [16:25:50][C][esphome.ota:075]: Version: 2 [16:25:50][C][esphome.ota:078]: Password configured [16:25:50][C][safe_mode:018]: Safe Mode: [16:25:50][C][safe_mode:019]: Boot considered successful after 60 seconds [16:25:50][C][safe_mode:021]: Invoke after 10 boot attempts [16:25:50][C][safe_mode:022]: Remain in safe mode for 300 seconds [16:25:50][C][api:139]: API Server: [16:25:50][C][api:140]: Address: uart-sniffer.local:6053 [16:25:50][C][api:144]: Using noise encryption: NO [16:25:51][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:25:51][W][component:237]: Component uart took a long time for an operation (51 ms). [16:25:51][W][component:238]: Components should block for at most 30 ms. [16:25:52][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:25:52][W][component:237]: Component uart took a long time for an operation (51 ms). [16:25:52][W][component:238]: Components should block for at most 30 ms. [16:25:54][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:25:54][W][component:237]: Component uart took a long time for an operation (51 ms). [16:25:54][W][component:238]: Components should block for at most 30 ms. [16:25:55][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:25:55][W][component:237]: Component uart took a long time for an operation (51 ms). [16:25:55][W][component:238]: Components should block for at most 30 ms. [16:25:57][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:25:57][W][component:237]: Component uart took a long time for an operation (51 ms). [16:25:57][W][component:238]: Components should block for at most 30 ms. [16:25:59][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:25:59][W][component:237]: Component uart took a long time for an operation (51 ms). [16:25:59][W][component:238]: Components should block for at most 30 ms. [16:26:00][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:00][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:00][W][component:238]: Components should block for at most 30 ms. [16:26:02][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:02][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:02][W][component:238]: Components should block for at most 30 ms. [16:26:03][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:03][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:03][W][component:238]: Components should block for at most 30 ms. [16:26:05][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:05][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:05][W][component:238]: Components should block for at most 30 ms. [16:26:06][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:06][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:06][W][component:238]: Components should block for at most 30 ms. [16:26:08][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:08][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:08][W][component:238]: Components should block for at most 30 ms. [16:26:10][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:10][W][component:237]: Component uart took a long time for an operation (52 ms). [16:26:10][W][component:238]: Components should block for at most 30 ms. [16:26:11][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:11][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:11][W][component:238]: Components should block for at most 30 ms. [16:26:13][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:13][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:13][W][component:238]: Components should block for at most 30 ms. [16:26:15][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:15][W][component:237]: Component uart took a long time for an operation (52 ms). [16:26:15][W][component:238]: Components should block for at most 30 ms. [16:26:16][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:16][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:16][W][component:238]: Components should block for at most 30 ms. [16:26:18][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:18][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:18][W][component:238]: Components should block for at most 30 ms. [16:26:19][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:19][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:19][W][component:238]: Components should block for at most 30 ms. [16:26:21][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:21][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:21][W][component:238]: Components should block for at most 30 ms. [16:26:22][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:22][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:22][W][component:238]: Components should block for at most 30 ms. [16:26:24][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:24][W][component:237]: Component uart took a long time for an operation (52 ms). [16:26:24][W][component:238]: Components should block for at most 30 ms. [16:26:26][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:26][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:26][W][component:238]: Components should block for at most 30 ms. [16:26:27][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:27][W][component:237]: Component uart took a long time for an operation (51 ms). [16:26:27][W][component:238]: Components should block for at most 30 ms. [16:26:29][D][uart_debug:114]: <<< 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 [16:26:29][W][component:237]: Component uart took a long time for an operation (52 ms). [16:26:29][W][component:238]: Components should block for at most 30 ms.

fastvd commented 1 month ago

substitutions: name: uart-sniffer rx_pin: GPIO13 rx_pin2: GPIO12

esphome: name: ${name} min_version: 2024.6.0

esp8266: board: d1_mini

wifi: ssid: !secret wifi_ssid password: !secret wifi_password

ota: platform: esphome password: "59e4413735b419182834a912a57fef57"

logger: level: DEBUG

api: reboot_timeout: 0s

uart:

fastvd commented 1 month ago

rx_pin: GPIO13 rx_pin2: GPIO12

correctly configured? they are physically soldered to D6 and D7

syssi commented 1 month ago

Could you provide a photo?

fastvd commented 1 month ago

I took the d1 mini board from the solar2mqtt project and put the firmware under the sniffer so as not to overwrite my working esp32...but I have never used it here before, because of esphome...that's why I asked about GPIO...but I see that something not so, so I will pour the sniffer firmware into a 100% working esp32

fastvd commented 1 month ago

image

I put it on my 100% working board...but I don't see any log in the terminal...that's how it should be and will it be physically saved somewhere?

syssi commented 1 month ago

You are too fast. A ESP8266 is fine, the assigned GPIOs looks good too. Just the captured data doesn't look good. A photo could help to identify issues like a missing GND line or additional attached components etc.

fastvd commented 1 month ago

and why are there no logs on esp32

fastvd commented 1 month ago

image something is wrong...this config does not work either on d1 mini or esp32...both the boards and the cable themselves are 100% working here and there...esp32 I have your config running under pipsolar and solar2mqtt works on d1 mini ...I just change the firmware..but I don't have a log either there or there...

syssi commented 1 month ago

Could you provide a photo of your setup/wiring and the used YAML configuration? I want to make sure everything is connected/wired/configured properly.

fastvd commented 1 month ago

well...i put the old config back and now it's a 100% working esp32 board + github://syssi/esphome-pipsolar@pip8048

image image

I don't take a screenshot of the end of the code, because everything is standard there... now I take and leave the cap unchanged (except for replacing the API with mqtt) and only change the UART parameters image image

and this is already a screenshot of my new configs based on 100% verified Rx and TX parameters

fastvd commented 1 month ago

image code verification is successful... I'm uploading the config via Wi-Fi image

fastvd commented 1 month ago

image

fastvd commented 1 month ago

image

fastvd commented 1 month ago

image here is step by step what I did! and I get 0 at the output

syssi commented 1 month ago

Could you make a photo of the ESP connected to the WiFi dongle and plug the dongle into the Inverter? Are you able to receive data using the OEM app? Do you see the raw traffic at the ESPHome log too?

fastvd commented 1 month ago

Not sure what you want? 1) take a photo of the esp32 board that is connected to the inverter with this code? 2) should I take a picture of the native wifi dongle???

I don't understand something about the idea...

fastvd commented 1 month ago

I probably did not understand you correctly in the physical implementation of the sniffer itself... if I understood everything correctly, then I need to connect my esp32 RX to the RX of the native wifi dongle and TX to TX? and as if to parallelize 2 boards.. so that the native dongle does its work, and our sniffer is in parallel listening?

syssi commented 1 month ago

Correct. First of all you have to make sure your OEM WiFi dongle is working general. If I remember correctly the dongle is able to retrieve measurements of PV2 and able to show the values somethere, correct?

  1. Plug the WiFi dongle to the inverter
  2. Start the App of the manufacturer and make sure you are able to see PV2 measurements here
  3. Use a plain ESP32 (without attached anything else!!) and attach 3 wires to GPIO16, GPIO17 and GND
  4. Connect these three wires to the pin header of the OEM dongle (TX to GPIO16, RX to GPIO17 and GND to GND)
  5. Are you still able to receive data using the OEM App (as in step 2)?
  6. Power the ESP and take a look at the ESPHome log. Do you see valid traffic this time?

Please don't post screenshots! The logs in plaintext are sufficient.

syssi commented 1 month ago

dongle

fastvd commented 1 month ago

зображення_viber_2024-09-17_23-06-17-518 зображення_viber_2024-09-17_23-06-17-621

fastvd commented 1 month ago

зображення_viber_2024-09-17_23-09-07-874 but now I have 23.09... so the data from PV1 and PV2 is 0