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

CRC Pass=no after a while #78

Open
makkanftw opened this issue Aug 18, 2023 · 3 comments
Open

CRC Pass=no after a while #78

makkanftw opened this issue Aug 18, 2023 · 3 comments

Comments

@makkanftw
Copy link

Hi!
Recently built the P1 reader using the PCB from Naesstrom and using this repo and it works fine for a while but then I start getting CRC PASS = NO and then garbled data and after that nothing.
I have S34U18 (Sanxing SX631) / Vattenfall with P1 active and using D1 mini MCU. Any suggestions?

Logs:
`[11:52:22][I][crc:281]: Telegram read. CRC: F122 = F122. PASS = YES
[11:52:22][D][sensor:093]: 'Cumulative Active Import': Sending state 1626.19897 kWh with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Cumulative Active Export': Sending state 0.00000 kWh with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Cumulative Reactive Import': Sending state 2.60200 kvarh with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Cumulative Reactive Export': Sending state 1235.21204 kvarh with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Active Import': Sending state 0.76800 kW with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Active Export': Sending state 0.00000 kW with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Reactive Import': Sending state 0.00000 kvar with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Reactive Export': Sending state 0.49600 kvar with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Active Import Phase 1': Sending state 0.35000 kW with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Active Export Phase 1': Sending state 0.00000 kW with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Active Import Phase 2': Sending state 0.26900 kW with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Active Export Phase 2': Sending state 0.00000 kW with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Active Import Phase 3': Sending state 0.14800 kW with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Active Export Phase 3': Sending state 0.00000 kW with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Reactive Import Phase 1': Sending state 0.00000 kvar with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Reactive Export Phase 1': Sending state 0.11900 kvar with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Reactive Import Phase 2': Sending state 0.00000 kvar with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Reactive Export Phase 2': Sending state 0.14100 kvar with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Reactive Import Phase 3': Sending state 0.00000 kvar with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Momentary Reactive Export Phase 3': Sending state 0.23400 kvar with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Voltage Phase 1': Sending state 235.30000 V with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Voltage Phase 2': Sending state 236.39999 V with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Voltage Phase 3': Sending state 235.70000 V with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Current Phase 1': Sending state 1.60000 A with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Current Phase 2': Sending state 1.30000 A with 3 decimals of accuracy
[11:52:22][D][sensor:093]: 'Current Phase 3': Sending state 1.20000 A with 3 decimals of accuracy
[11:52:22][W][component:204]: Component took a long time for an operation (0.12 s).
[11:52:22][W][component:205]: Components should block for at most 20-30ms.

[11:52:27][D][data:270]: 1-0:2.8.0(000000.00
[11:52:27][D][data:270]: 1-0:3.8.0(000002.602*kvarh �
[11:52:27][D][data:270]: 1
[11:52:27][D][data:270]: 1-0:1.
[11:52:27][D][data:270]: 1�0:2�7,0(0
[11:52:27][D][data:270]: � :3.7.0(0000.
[11:52:27][D][data:270]: \xb9s\xe5
[11:52:27][D][data:270]: (
[11:52:27][D][data:270]:
[11:52:27][D][data:270]:
[11:52:27][D][data:270]:
[11:52:27][D][data:270]:
[11:52:27][D][data:270]:
[11:52:27][D][data:270]:
[11:52:27][D][data:270]:
[11:52:27][D][data:270]: I�\x8es \xbb\xb0\xff\xfe{\xed\xff\x9b\xbf\xfb\xb0
[11:52:27][D][data:270]: �
[11:52:27][D][data:270]: 4�n\x96��\xea\xfc\xff~\xff\xbf\xbb\xee\xbf\xdd\xfb\xbf\xf7 �\xff\xff\x83\xf3���\xfb\xddò�\xcc\xd9\xff\xff\xff\xff\xf7\xb7\xff\xf7\x97\xbf\xf7\xf7\xffw\xbf\xf7�\xbf\xff\xbf\xf7\xff\xf7\xb7\xbb

[11:52:27][D][data:270]: ,\x95\xe87D\x81\xb2\xc0%
[11:52:27][D][data:270]: �x\xaf\xfb\xf3�\xbe\xeb\xf7_\xdf\xff\xfb\xff7\xbe�
[11:52:27][D][data:270]:
[11:52:27][D][data:270]: \x80\xec\xff\xfew\xe6~O�\x80
[11:52:27][D][data:270]:
[11:52:27][D][data:270]: �@� @�\xd8�
[11:52:27][D][data:270]: $�8
[11:52:27][D][data:270]: 5D<
[11:52:27][D][data:270]: ��
[11:52:27][D][data:270]:
[11:52:27][D][data:270]:
[11:52:27][D][data:270]:
[11:52:27][D][data:270]: \x88
[11:52:27][D][data:270]:
[11:52:27][D][data:270]: �
[11:52:28][D][data:270]: w\xf3\xfe\xdc\xdfn \x94
[11:52:28][D][data:270]: 7
[11:52:28][D][data:270]:
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: @ �@
[11:52:28][D][data:270]: \xfb\xa4�D
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: \x82D\xd3V@ ��N0
[11:52:28][D][data:270]:
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: \x80D;\x80\xc0�V\xc9\xf9\xbf�\x95\x82�R@ �\xfc��\xc3\xee��
[11:52:28][D][data:270]: @$�\xf4\x91�
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: �
[11:52:28][D][data:270]: �
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: �\xb4\xa6\xbf�\xc5\xc9
\xbf\xae\xa3���
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: �;m�\xa1\xa3a\xa3\xff\xff\xff\xfb\xbf\xf7\xaf\xbb\xbbg\xff\xe7\xff
\xb66r\xa8\xb1\xb7\xb7Ȁ\x80
[11:52:28][D][data:270]: #\xf0�
[11:52:28][D][data:270]: \x80|\xff\x83\xfa��
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: \xff\xff
[11:52:28][D][data:270]: u\xfd\xfd�\xff\xf7\xff\xb7\xfb\xfb\xeb\xff_\xa7&3�\xe0�;�\xfdݻ\xff\xfb$a�\xa6\x82
[11:52:28][D][data:270]: \x9a�\xe9\x9f}\xa3
[11:52:28][D][data:270]: \xce�B&\xbf?k9#\xa1@\xc83N�
[11:52:28][D][data:270]:
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: \x81�
[11:52:28][D][data:270]: �
[11:52:28][D][data:270]: �\x90�\xe8\xfc\xca\xfd\xe0\xe0\xff\xff\xff\xbf\xf77'7W
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: >
[11:52:28][D][data:270]: >�
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: \x80
[11:52:28][D][data:270]: �
[11:52:28][D][data:270]: �
[11:52:28][D][data:270]: x
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: \xc2\xf7߂\xd9�-.\xbfe\xff\xfd\xe0\xf7\xfe\xf0\xbf\xf7\xbf\xb7\xb3�6V
[11:52:28][D][data:270]: \x80
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: \xf0\xf0\xc0\xb7\xb3vvv7f$�
[11:52:28][D][data:270]:
[11:52:28][D][data:270]: \x92\xb2\x96\x9b\xfe\xff�\xff\xfe\xff\xe0
[11:52:28][D][data:270]: �
[11:52:28][D][data:270]: \xff\xe0
[11:52:29][D][data:270]: \x81�4�\xd12��\x83F\xfc\xbf*\xf7\xb5
[11:52:29][D][data:270]:
[11:52:29][D][data:270]:
[11:52:29][D][data:270]:
[11:52:29][D][data:270]:
[11:52:29][D][data:270]: �
[11:52:29][D][data:270]: �
[11:52:29][D][data:270]:
[11:52:29][D][data:270]:
[11:52:29][D][data:270]: \xff&\x80TA\x80���\x82
[11:52:29][D][data:270]: \x80\xd0\xff
[11:52:29][D][data:270]:
[11:52:29][D][data:270]:
[11:52:29][D][data:270]: ��
[11:52:29][D][data:270]: \xf0m\xff\xff\xff\xff\xff\xff\xfdo\xff\xe0
[11:52:29][D][data:270]:
[11:52:29][D][data:270]:
[11:52:29][D][data:270]:
[11:52:29][D][data:270]: \xe2?>��\xc0
[11:52:29][D][data:270]: 3\xff\xff\xaf\xbb7\xfe
[11:52:29][D][data:270]: �\x80\xc0�\xfa
[11:52:29][D][data:270]:
[11:52:30][D][data:270]:
[11:52:30][D][data:270]:
[11:52:30][D][data:270]: \xfb
[11:52:30][D][data:270]: �
[11:52:30][D][data:270]: �
[11:52:30][D][data:270]: \xb9@\xd2\xff\xff\xff\x9f\xfe\xff\xfb\xfe\xffQD�\xfe
[11:52:30][D][data:270]: \xf7J\xc0�\xc0\xf4\xfbB\xc0\xff\xff\xfe�\xfe
[11:52:30][D][data:270]:
[11:52:30][D][data:270]:
[11:52:30][D][data:270]:
[11:52:30][D][data:270]: \x96#\xf7\xbd3>�\xef�D\xf8\xff7\xbf\xdf @
[11:52:30][D][data:270]: |�
[11:52:30][D][data:270]:
[11:52:30][D][data:270]: �
[11:52:31][D][data:270]: �
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: \xe3�\xd7u
[11:52:31][D][data:270]: �@�\xc00
[11:52:31][D][data:270]:
[11:52:31][D][data:270]:
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: &\xaa\x80\xb5\xf2\xb1D�\xd91\xff�p\xb1wIS�\x85p
[11:52:31][D][data:270]:
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: \x89�<\xff
[11:52:31][D][data:270]: !"\xe0�N\xfb\x94\xff\xbb\xff\xff\xf0\xf0\xff\xb7w7\xf7\xb7\xbf\xf7\xff\xbb\xff\xff\xff\xff7w\xf7wv;77w\xb7\xb7w7�\xb7\xb7\xb7\xff\xff\xff\xff!\xb7�d65\xcc7\xb7\xff\xbbw

[11:52:31][I][crc:281]: Telegram read. CRC: 107C = 0000. PASS = NO
[11:52:31][D][data:270]: 0@\xe1\xdf�
[11:52:31][D][data:270]: �\xd1�$
[11:52:31][D][data:270]: \xf0
[11:52:31][D][data:270]:
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: \x80
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: \xb9!\xb5\xfe}\xf3v\xed\xff\xbf�2\xf5vs\xbb\xb6\xeb\xfc3\xbf\xeb\xf9\xf7\xf7\xff\xf7\xf7�ۧ7\xfb\xdcd\xef\x94?\xf7\xef\xff\xff\xbf6��
[11:52:31][D][data:270]: \xb6\xb5u\x97\xab\xb5\xb3\xeeٹw$\xb4�/\xfb\xa5�� \x93\xdd��w'л6��\xb7\x80aw6\x8d\x807��w "
[11:52:31][D][data:270]: �Ĝ\x97\xe0\xf0
[11:52:31][D][data:270]: @
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: �
[11:52:31][D][data:270]: �\x80� �r�\xa9
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: ��
[11:52:31][D][data:270]: ?\xf6\xff2&\xf3o\xff
[11:52:31][D][data:270]: �\xff7�
[11:52:31][D][data:270]: n&wL\xa7\xce]
}m\x9f�
[11:52:31][D][data:270]:
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: 0Tݓv?\xed�\x9a�^\xf6\xfdݐQ\xbb\xb7\xfbw\x97s\xfd\xff\xf0\xff� \x93\xe3\xff\xff\xd07\xb77\xbb7\xbf\xff
[11:52:31][D][data:270]: &0\xd9\xf6\x902�\xa0\xadv\xbf\xf53\xf6\xbf˓"\xf0\x8b
[11:52:31][D][data:270]: \xa3�\xf6'\xfd\xb3;�,\xff" w\xff\xa6\xa5
λ��2$�\xb3;\xff�\x95\x83\xff\xfe\xff\xfb\xf7\xf7\xff\xc0\xefj\xaf槳\xb6\xbf\xb7\xd7\xf7\xb7\xb7\xb7\xb7\xb7\xbb7w\xf7\xb7

[11:52:31][D][data:270]: \x9aN\xce�\xb7T\xb1#\x99\x90\xb7\xf8۟\xbb\xb2\xf5\x91\xb5\xe4\xbb�\xfb\x9d
[11:52:31][D][data:270]: �@\x9c\xb3��hG\xd0\xc4�7&\xec_{O\xf8\xf2
[11:52:31][D][data:270]: A
[11:52:31][D][data:270]:
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: B
[11:52:31][D][data:270]: \x91 �@e��`\x81HQ\xcd$\xc4 %\xfcFHؠd\xfd\xff\xff\xff�
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: H
[11:52:31][D][data:270]:
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: \x97\xff�*='\xfe;�
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: ����
[11:52:31][D][data:270]: �\x8bPU!E@
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: \x81
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: P� ���\x80
[11:52:31][D][data:270]:
[11:52:31][D][data:270]:
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: ,��"�
[11:52:31][D][data:270]:
[11:52:31][D][data:270]: %
[11:52:31][D][data:270]: 1V\xe7\x93:��r\xf6o\x99\xffD3r$S\x96�\x858w$仵Gv ?F\x977\xbf\xb7\xb7\xb7\xb7\xb7\xff\xa0\x922�jH��٢7\xb777\xf3\xbf\xff
[11:52:31][D][data:270]: \xd8\xff\xff\xdf17qس\x9f&\xf7\xfe6<j\xd85V\xcd1"\xed\xb3\xf6\xf7\xef\xbf6�\xff\xc0\033\xb3\xb7\xf7\xb7\xb73\x9f\xa0�XQU\x89\x95bB
\xbb\xf3\xff\xf7\xf7\xb7\xf7\xb7\xbf\xbf

[11:52:31][D][data:270]: \xadR\xed?\xff\xb8G\xfb\xdf�\x94\xff�\xb8\xf7w\xc1]\xfd\xd7f\xdf\xf9�\x80\xb7\xb7\xff\xff�\033�\xa3\xa5\xc7#\x8e\xfb\xff\xff\xb7\xff\xbf\xff\xf7\xbf\xff
[11:52:31][D][data:270]: \xa3\xf6\xb7\xbe\x92Ĭw\xcb7\xfb\xff/\xf7/\xfbw~�\xbf\xbb\xc6\xf7\xff\xf3\xc0\xff\xff\xf7\xf7�\xeb\xff\xa3\xf67\xabۓ\xb3\xff\xf7\xff\xff?\xb7\xf7\xff\xbf\xbf\xff\xbf7\xbb\xb7\xf7\xb7\xb7\xb7\xa7

[11:52:31][D][data:270]: 4Dͷ\xec\x88!6\xe5\xf0׷w\xb7n�3
[11:52:31][D][data:270]: �2\xb0\xa9@\xd0&1�\xdc�Db
[11:52:31][D][data:270]: D\x981'@�\x82\x84"�&�\x927 \x9d&i\x815�d \xee� �|\x90�wf�� [11:52:31][D][data:270]: \x99�!�77\xec\xe2v�@\x80S [11:52:31][D][data:270]: � [11:52:31][D][data:270]: ��\x80FH [11:52:31][D][data:270]: P� [11:52:31][D][data:270]: 0 [11:52:31][D][data:270]: 5�\xd86'��\x83@dG \xd0\xe0\x80\xc7\xf7w\x9c\xd2\xfbTR�\xa0(
[11:52:32][D][data:270]: [11:52:32][D][data:270]: �� [11:52:32][D][data:270]: H@�� [11:52:32][D][data:270]: [11:52:32][D][data:270]: \xb0@\xa1\xa3�ٲ@�\xa0��٣�\xb5 [11:52:32][D][data:270]: [11:52:32][D][data:270]: �@\xd8$tH\x88\x9b\x80b\xb7&\xff\xbf\xa7gm\xd1� [11:52:32][D][data:270]: [11:52:32][D][data:270]: � [11:52:32][D][data:270]: '5Y T
[11:52:32][D][data:270]: �
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]: �
[11:52:32][D][data:270]:
[11:52:32][D][data:270]: 0
[11:52:32][D][data:270]: �
[11:52:32][D][data:270]: �\x90 %H\x8c�\x84\x81��
[11:52:32][D][data:270]:
[11:52:32][D][data:270]: �
[11:52:32][D][data:270]:
[11:52:32][D][data:270]: @
[11:52:32][D][data:270]:
[11:52:32][D][data:270]: 8
[11:52:32][D][data:270]: @
[11:52:32][D][data:270]: \x84\x86\xed\xe0\xff0
[11:52:32][D][data:270]: t3\xf1\xff\xff
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:32][D][data:270]:
[11:52:33][D][data:270]:
[11:52:33][W][component:204]: Component took a long time for an operation (6.28 s).
[11:52:33][W][component:205]: Components should block for at most 20-30ms.
[11:52:35][D][data:270]: \xff\xff0\xff
[11:52:37][D][data:270]: \xf7'\xf6\xff

[11:52:37][I][crc:281]: Telegram read. CRC: C3DB = AF3B. PASS = NO
[11:52:37][W][component:204]: Component took a long time for an operation (1.63 s).
[11:52:37][W][component:205]: Components should block for at most 20-30ms.
[11:52:42][D][data:270]:
[11:52:42][D][data:270]:
[11:52:42][D][data:270]:
[11:52:42][D][data:270]:
[11:52:42][D][data:270]:
[11:52:42][D][data:270]:
[11:52:42][D][data:270]:
[11:52:42][D][data:270]:
[11:52:42][D][data:270]:
[11:52:42][D][data:270]:
[11:52:42][D][data:270]:
[11:52:42][D][data:270]:
[11:52:43][D][data:270]:
[11:52:43][W][component:204]: Component took a long time for an operation (1.40 s).
[11:52:43][W][component:205]: Components should block for at most 20-30ms.
[11:52:47][D][data:270]:
[11:52:47][D][data:270]:
[11:52:47][D][data:270]:
[11:52:47][D][data:270]:
[11:52:47][D][data:270]:
[11:52:47][D][data:270]:
[11:52:47][D][data:270]:
[11:52:47][D][data:270]:
[11:52:47][D][data:270]:
[11:52:47][D][data:270]:
[11:52:47][D][data:270]:
[11:52:47][D][data:270]:
[11:52:48][D][data:270]:
[11:52:48][W][component:204]: Component took a long time for an operation (1.12 s).
[11:52:48][W][component:205]: Components should block for at most 20-30ms.
[11:52:52][D][data:270]:
[11:52:52][W][component:204]: Component took a long time for an operation (2.21 s).
[11:52:52][W][component:205]: Components should block for at most 20-30ms.
[11:52:52][D][data:270]:
[11:52:52][D][data:270]:
[11:52:52][D][data:270]:
[11:52:52][D][data:270]:
[11:52:52][D][data:270]:
[11:52:52][D][data:270]:
[11:52:52][D][data:270]:
[11:52:52][D][data:270]:
[11:52:52][D][data:270]:
[11:52:52][D][data:270]:
[11:52:52][D][data:270]:
[11:52:52][D][data:270]:
[11:52:53][D][data:270]:
[11:52:53][W][component:204]: Component took a long time for an operation (1.12 s).
[11:52:53][W][component:205]: Components should block for at most 20-30ms.
[11:52:57][D][data:270]:
[11:52:57][D][data:270]:
[11:52:57][D][data:270]:
[11:52:57][D][data:270]:
[11:52:57][D][data:270]:
[11:52:57][D][data:270]:
[11:52:57][D][data:270]:
[11:52:57][D][data:270]:
[11:52:57][D][data:270]:
[11:52:57][D][data:270]:
[11:52:57][D][data:270]:
[11:52:57][D][data:270]: `

@makkanftw
Copy link
Author

makkanftw commented Aug 18, 2023

I have tried this suggestion with no change:
#36 (comment)

Also tried different cable and different D1 Mini, same behavior.

@Beaky2000
Copy link

I believe that the S34U18 (Sanxing SX631) sometimes and for unknown reasons take very long (several seconds) to transmit an update, and it seems that this reader does not work well in those cases.

It looks like there is a pull-request that will adress this so it could be that your problem will be fixed when/if that PR is approved.

You could also try my fork of this project, which I believe works well with the S34U18: https://github.com/Beaky2000/esphome-p1mini

@makkanftw
Copy link
Author

@Beaky2000 I found your fork after giving up troubleshooting this one and has been working perfect for a couple of days now. Thanks!

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