Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: unpack requires a buffer of 10 bytes #555

Open
81ondo opened this issue Apr 11, 2024 · 1 comment
Open

error: unpack requires a buffer of 10 bytes #555

81ondo opened this issue Apr 11, 2024 · 1 comment

Comments

@81ondo
Copy link

81ondo commented Apr 11, 2024

I get random disconnections.
These are the error messages I get during disconnections (with DEBUG activated).

2024-04-11 12:20:17.850 DEBUG (Thread-10 (_data_receiver)) [custom_components.solarman.solarman] [2375966738] COUNTER: a5 01 00 10 47 a8 53 12 60 9e 8d 00 f0 15
2024-04-11 12:20:28.248 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] Starting to query for [6] ranges...
2024-04-11 12:20:28.248 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] Querying [0 - 7]...
2024-04-11 12:20:28.248 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] SENT: a5 17 00 10 45 a9 00 12 60 9e 8d 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 00 00 08 44 0c 10 15
2024-04-11 12:20:28.781 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] RECD: a5 23 00 10 15 a9 54 12 60 9e 8d 02 01 4d ce 29 00 88 03 00 00 1f eb ed 65 01 03 10 00 02 00 00 00 00 00 00 00 00 00 00 07 35 03 8d b7 b7 60 15
2024-04-11 12:20:28.781 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] Querying [0 - 7] succeeded
2024-04-11 12:20:28.781 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] Querying [10 - 10]...
2024-04-11 12:20:28.781 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] SENT: a5 17 00 10 45 aa 00 12 60 9e 8d 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 0a 00 01 a4 08 70 15
2024-04-11 12:20:29.860 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] RECD: a5 15 00 10 15 aa 55 12 60 9e 8d 02 01 4e ce 29 00 89 03 00 00 1f eb ed 65 01 03 02 00 a7 f9 fe aa 15
2024-04-11 12:20:29.860 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] Querying [10 - 10] succeeded
2024-04-11 12:20:29.861 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] Querying [12 - 16]...
2024-04-11 12:20:29.861 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] SENT: a5 17 00 10 45 ab 00 12 60 9e 8d 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 0c 00 05 45 ca da 15
2024-04-11 12:20:29.940 DEBUG (SyncWorker_2) [custom_components.solarman.solarman] RECD: a5 15 00 10 15 ab 56 12 60 9e 8d 02 01 4e ce 29 00 89 03 00 00 1f eb ed 65 01 03 02 00 a7 f9 fe ac 15
2024-04-11 12:20:29.940 WARNING (SyncWorker_2) [custom_components.solarman.solarman] Querying [12 - 16] failed with exception [error: unpack requires a buffer of 10 bytes]
2024-04-11 12:20:29.940 INFO (SyncWorker_2) [custom_components.solarman.solarman] Disconnecting from solarman data logger 192.168.0.196:8899
2024-04-11 12:20:30.441 WARNING (SyncWorker_2) [custom_components.solarman.solarman] Querying [12 - 16] failed, [1] retry attempts left

This instead is an example of a successfully completed capture:

2024-04-11 12:19:02.488 INFO (SyncWorker_8) [custom_components.solarman.solarman] Connecting to solarman data logger 192.168.0.196:8899
2024-04-11 12:19:02.491 DEBUG (SyncWorker_8) [custom_components.solarman.solarman] Socket setup completed... <socket.socket fd=11, family=2, type=1, proto=6, laddr=('192.168.0.183', 33294), raddr=('192.168.0.196', 8899)>
2024-04-11 12:19:02.491 DEBUG (SyncWorker_8) [custom_components.solarman.solarman] SENT: a5 17 00 10 45 a7 00 12 60 9e 8d 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 20 00 05 84 03 62 15
2024-04-11 12:19:03.147 DEBUG (SyncWorker_8) [custom_components.solarman.solarman] RECD: a5 1d 00 10 15 a7 51 12 60 9e 8d 02 01 f7 cd 29 00 32 03 00 00 1f eb ed 65 01 03 0a 01 2c 00 00 00 00 00 00 03 69 79 6c e4 15
2024-04-11 12:19:03.148 DEBUG (SyncWorker_8) [custom_components.solarman.solarman] Querying [32 - 36] succeeded
2024-04-11 12:19:03.148 DEBUG (SyncWorker_8) [custom_components.solarman.solarman] Querying [38 - 39]...
2024-04-11 12:19:03.148 DEBUG (SyncWorker_8) [custom_components.solarman.solarman] SENT: a5 17 00 10 45 a8 00 12 60 9e 8d 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 26 00 02 25 c0 c4 15
2024-04-11 12:19:04.237 DEBUG (SyncWorker_8) [custom_components.solarman.solarman] RECD: a5 17 00 10 15 a8 52 12 60 9e 8d 02 01 f8 cd 29 00 33 03 00 00 1f eb ed 65 01 03 04 00 00 00 01 3b f3 8d 15
2024-04-11 12:19:04.237 DEBUG (SyncWorker_8) [custom_components.solarman.solarman] Querying [38 - 39] succeeded
2024-04-11 12:19:04.237 DEBUG (SyncWorker_8) [custom_components.solarman.solarman] All queries succeeded, exposing updated values.

I do not understand why it randomly receives as incomplete packets leading to incorrect parsing and thus disconnection.

Is it possible that the reason is because the wifi stick also sends data to the Zucchetti ZCS cloud?

Solarman version: 1.5.1
HA:
Core 2024.4.2
Supervisor 2024.04.0
Operating System 12.1
Frontend 20240404.1
@githubDante
Copy link

Hi,

Are you sure that the registers in the range 10-16 are readable. Anyway, check your documentation for error 167, this is the number returned in both cases:

2024-04-11 12:20:28.781 ... Querying [10 - 10]...
2024-04-11 12:20:28.781 ... SENT: a5 17 00 10 45 aa 00 12 60 9e 8d 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 0a 00 01 a4 08 70 15
2024-04-11 12:20:29.860 ... RECD: a5 15 00 10 15 aa 55 12 60 9e 8d 02 01 4e ce 29 00 89 03 00 00 1f eb ed 65 01 03 02 00 a7 f9 fe aa 15
2024-04-11 12:20:29.860 ... Querying [10 - 10] succeeded
2024-04-11 12:20:29.861 ... Querying [12 - 16]...
2024-04-11 12:20:29.861 ... SENT: a5 17 00 10 45 ab 00 12 60 9e 8d 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 0c 00 05 45 ca da 15
2024-04-11 12:20:29.940 ... RECD: a5 15 00 10 15 ab 56 12 60 9e 8d 02 01 4e ce 29 00 89 03 00 00 1f eb ed 65 01 03 02 00 a7 f9 fe ac 15

It is not detected in the first attempt as only one register is requested which satisfies the packet length of the response. The error is raised directly from the umodbus lib.

Is it possible that the reason is because the wifi stick also sends data to the Zucchetti ZCS cloud?

Highly unlikely. You should see something like:

Querying [<start> - <end>] failed with exception [V5FrameError: V5 frame contains invalid sequence number]

if responses to requests not generated by the current pysolrmanv5 instance are received on the socket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants