esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

pipsolar QPIGS not decoded correctly #5193

Open ligius- opened 11 months ago

ligius- commented 11 months ago

The problem

I am trying to decode the messages from an MPP Solar PIP6048MT inverter and currently the QPIGS messages fail the CRC while the QPIRI ones pass. I did not check the other commands yet.

I have modified the check_incomingcrc to always return 1, in order to see how the decoded values look like, but they are all zeroes.

[12:51:50][D][pipsolar:837]: Sending polling command : QPIRI with length 5
[12:51:50][D][uart_debug:114]: >>> 51:50:49:52:49:F8:54:0D
[12:51:50][D][pipsolar:773]: checking crc on incoming message
[12:51:50][D][pipsolar:776]: CRC OK
[12:51:50][D][pipsolar:430]: Decode QPIRI
[12:51:50][V][sensor:043]: 'inverter0_grid_rating_current': Received new state 26.000000
[12:51:50][D][sensor:093]: 'inverter0_grid_rating_current': Sending state 26.00000 A with 1 decimals of accuracy
[12:51:50][D][uart_debug:114]: <<< 28:32:33:30:2E:30:20:32:36:2E:30:20:32:33:30:2E:30:20:35:30:2E:30:20:32:36:2E:30:20:36:30:30:30:20:36:30:30:30:20:34:38:2E:30:20:34:36:2E:30:20:34:32:2E:30:20:35:36:2E:34:20:35:34:2E:30:20:32:20:30:30:32:20:31:32:30:20:31:20:32:20:31:20:31:20:30:31:20:30:20:30:20:35:34:2E:30:20:30:20:31:6D:51:0D
[12:51:50][D][pipsolar:837]: Sending polling command : QPIGS with length 5
[12:51:50][W][component:214]: Component esphome.coroutine took a long time for an operation (0.08 s).
[12:51:50][W][component:215]: Components should block for at most 20-30ms.
[12:51:50][D][uart_debug:114]: >>> 51:50:49:47:53:B7:A9:0D
[12:51:50][D][pipsolar:773]: checking crc on incoming message
[12:51:50][D][pipsolar:782]: CRC NOK expected: A4 3F but got: 29 10
[12:51:50][D][pipsolar:449]: Decode QPIGS
[12:51:50][V][sensor:043]: 'inverter0_grid_voltage': Received new state 0.000000
[12:51:50][D][sensor:093]: 'inverter0_grid_voltage': Sending state 0.00000 V with 1 decimals of accuracy
[12:51:50][V][sensor:043]: 'inverter0_ac_output_voltage': Received new state 0.000000
[12:51:50][D][sensor:093]: 'inverter0_ac_output_voltage': Sending state 0.00000 V with 1 decimals of accuracy
[12:51:50][V][sensor:043]: 'inverter0_output_load_percent': Received new state 0.000000
[12:51:50][D][sensor:093]: 'inverter0_output_load_percent': Sending state 0.00000 % with 1 decimals of accuracy
[12:51:50][V][sensor:043]: 'inverter0_battery_voltage': Received new state 0.000000
[12:51:50][D][sensor:093]: 'inverter0_battery_voltage': Sending state 0.00000 V with 1 decimals of accuracy
[12:51:50][D][uart_debug:114]: <<< 28:30:30:30:2E:30:20:30:30:2E:30:20:32:32:39:2E:39:20:35:30:2E:30:20:30:30:30:30:20:30:30:30:30:20:30:30:30:20:33:36:33:20:35:32:2E:34:30:20:30:30:30:20:31:30:30:20:30:30:33:36:20:30:30:2E:30:20:30:30:30:2E:30:20:30:30:2E:30:30:20:30:30:30:30:30:20:30:30:30:31:30:30:30:30:20:30:30:20:30:30:20:30:30:30:30:30:20:30:31:31:20:30:20:30:30:20:30:30:30:30:29:10:0D

Running into a HEX->ASCII converter the output from above yields: (000.0 00.0 229.9 50.0 0000 0000 000 363 52.40 000 100 0036 00.0 000.0 00.00 00000 00010000 00 00 00000 011 0 00 0000)

As you can see, the values are there, at least ac_output_voltage=229.9 and battery_voltage=52.40

I did not go deep into the code to see exacly why it fails. On the inverter I have main cpu firmware version 00060.06 and secondary cpu fw version 00025.08.

Which version of ESPHome has the issue?

2023.11.6

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP8266

Board

nodemcu

Component causing the issue

pipsolar

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

ligius- commented 11 months ago

The fix is relatively easy, the input buffer is too small. PIPSOLAR_READ_BUFFER_LENGTH is 110 but it needs 120 for my inverter. No idea what the new values mean (0 00 0000).

github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ligius- commented 7 months ago

still active, unless there was a compatible change done in some other place