powermon.protocols.helpers module

powermon / protocols / helpers.py

powermon.protocols.helpers.crc_jk232(byte_data)

Generate JK RS232 / RS485 CRC - 2 bytes, the verification field is “command code + length byte + data segment content”, the verification method is thesum of the above fields and then the inverse plus 1, the high bit is in the front and the low bit is in the back.

powermon.protocols.helpers.crc_pi30(data_bytes)

Calculates CRC for supplied data_bytes

powermon.protocols.helpers.victron_checksum(byte_data)

Generate VE Direct HEX Checksum - sum of byteData + checksum = 0x55