Tomcat42 / pylontech-python

Functions to communicate to Pylontech Batteries using RS-485 serial communication
MIT License
11 stars 7 forks source link

Request: Some kind of sniffing mode to enable it function parallel to inverter also connected to RS-485 #9

Open Gboyegs opened 1 year ago

Gboyegs commented 1 year ago
          Hi, I took your advice and temporarily disconnected the Inverter... more info came through this time..

pi@xxxxxxxxxx:~/.local/lib/python3.7/site-packages/pylontech $ python3 pylontech_stack.py b'20024xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' b'20034xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' b'20044xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' b'20054xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' b'20064xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' b'20074xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' ('Timeout waiting for an answer.',) b'20024600F07A00020F0D170D140D150D150D180D170D140D150D150D180D170D140D150D150D18050C0B0BEF0BF00BED0C0B00C9C447FFFF04FFFF00120172B90186A0E2D1' b'20024600B01402D002AFC800C8FE0CC0F915' b'20024600A04200020F000000000000000000000000000000050000000000000000000E80000000F101' b'20034600F07A00030F0D140D120D120D120D140D140D120D120D120D140D140D130D130D130D14050BFD0BEF0BF10BED0BFE00BFC41DFFFF04FFFF00110172B90186A0E2B4' b'20034600B01403D002AFC800C8FE0CC0F913' b'20034600A04200030F000000000000000000000000000000050000000000000000000E80000000F0FF' b'20044600F07A00040F0D180D150D160D140D180D180D150D160D140D180D190D150D160D150D18050BFB0BEE0BED0BE90BF800BDC44FFFFF04FFFF00B2016CC90186A0E263' b'20044600B01404D002AFC800C8FE0CC0F911' b'20044600A04200040F000000000000000000000000000000050000000000000000000E80000000F0FD' b'20054600F07A00050F0D140D120D120D120D150D140D120D120D120D140D150D120D130D120D14050BF90BE80BE90BE40BF600C1C41DFFFF04FFFF00B5016C6A0186A0E2D4' b'20054600B01405D002AFC800C8FE0CC0F90F' b'20054600A04200050F000000000000000000000000000000050000000000000000000E80000000F0FB' b'20064600F07A00060F0D170D130D140D130D140D160D140D140D130D150D170D140D140D140D15050C010BF00BF10BEE0BFC00CBC433FFFF04FFFF00120172B90186A0E2E7' b'20064600B01406D002AFC800C8FE0CC0F90D' b'20064600A04200060F000000000000000000000000000000050000000000000000000E80000000F0F9' {'ChargePower_kW': 4.90726, 'DischargePower_kW': 0, 'Power_kW': 4.90726, 'RemainCapacity_Ah': 471.39, 'Remain_Percent': 94.0, 'TotalCapacity_Ah': 500.0}

It seems to be missing one battery as I've got 6x100AH units (Pylontech UP5000)

So it seems the interference was the problem... shame, because I have to keep the inverter connected to communicate with the battery BMS... is it possible to modify so the program can function parallel to an Inverter connect via RS-485?

The upper and lower ports of the newer Pylontechs are labels A/CAN -- B/RS485 respectively, but apparently both are identical...
pylontech-frontal-US2000C

Originally posted by @Gboyegs in https://github.com/Tomcat42/pylontech-python/issues/7#issuecomment-1421621519

dulitz commented 1 year ago

With RS-485 that is definitely possible. Have to look at the code to see how easy or difficult that might be to do.