jblance / mpp-solar

Python package to communicate to MPP Solar PIP-4048MS inverters (and similar)
MIT License
365 stars 151 forks source link

jkbms connect via rs485 #342

Open krime777 opened 1 year ago

krime777 commented 1 year ago

I'm querying the jkbms via bluetooth every minute and besides being slow sometimes it gets stuck, so I tried to switch to the solution presented by the solar assistant image

lsusb:

Bus 001 Device 007: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port / Mobile Action MA-8910P
Bus 001 Device 004: ID 0665:5161 Cypress Semiconductor USB to Serial
Bus 001 Device 005: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC)
Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

dmesg:

[814179.432398] usb 1-1.2: new full-speed USB device number 8 using dwc_otg
[814179.564650] usb 1-1.2: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 3.00
[814179.564682] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[814179.564698] usb 1-1.2: Product: USB-Serial Controller
[814179.564711] usb 1-1.2: Manufacturer: Prolific Technology Inc.
[814179.565697] pl2303 1-1.2:1.0: pl2303 converter detected
[814179.569828] usb 1-1.2: pl2303 converter now attached to ttyUSB0

jkbms:

Solar Device Command Utility, version: 0.15.28

tried with -P JK485 and JK232, tried with -b 115200 and 9600, serial response is always b''

not sure what else i can try :(

krime777 commented 1 year ago

Info via bluetooth about the bms:

jkbms -p C8:47:8C:E1:E4:72 -P JK02 -c getInfo
Command: getInfo - BLE Device Information inquiry
--------------------------------------------------------------------------------
Parameter          Value                Unit
header             55aaeb90
record_type        03
record_counter     107
device_model       JK-B1A24S15P
hardware_version   10.XG
software_version   10.07
up_time            373D8H30M0S
power-on_times     4
device_name        JK-B1A24S15P
device_passcode    1234
manufacturing_date 220411
serial_number      2012601118
passcode           0000
user_data          Input Userdata
setup_passcode     123456
jblance commented 1 year ago

ive not had an opportunity to debug this so far (not had someone with the rs485 connection have the time to see what is going on) im pretty sure it doesnt work yet - but if you have time for testing (and testing again...) we can try to work on it adding -D and posting all the output is key to help see what is and isnt working and trying to fix the problems

note: others have used their own code and suggested that not everything works via rs485

krime777 commented 1 year ago
root@raspberrypi:/home/pi# jkbms -p /dev/ttyUSB0 -b 9600 -P JK485 -D
2023-04-27 06:44:43,725:INFO:__init__:main@213: Solar Device Command Utility, version: 0.15.28
2023-04-27 06:44:43,726:DEBUG:mqttbrokerc:__init__@32: mqttbroker config: {'name': 'localhost', 'port': 1883, 'user': None, 'pass': None}
2023-04-27 06:44:43,726:DEBUG:__init__:main@238: MqttBroker name: localhost, port: 1883, user: None
2023-04-27 06:44:43,726:DEBUG:__init__:main@240: udp port 5555
2023-04-27 06:44:43,727:DEBUG:__init__:main@242: Using Postgres None
2023-04-27 06:44:43,727:DEBUG:__init__:main@245: Using Mongo None with mppsolar
2023-04-27 06:44:43,727:INFO:__init__:main@346: Creating device "unnamed" (type: "jkbms") on port "/dev/ttyUSB0 (porttype=None)" using protocol "JK485"
2023-04-27 06:44:43,732:DEBUG:__init__:main@350: device_class <class 'mppsolar.devices.jkbms.jkbms'>
2023-04-27 06:44:43,732:DEBUG:device:__init__@33: __init__ args ()
2023-04-27 06:44:43,733:DEBUG:device:__init__@34: __init__ kwargs {'name': 'unnamed', 'port': '/dev/ttyUSB0', 'protocol': 'JK485', 'baud': 9600, 'porttype': None, 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0x76099bc8>, 'udp_port': '5555', 'mongo_url': None, 'mongo_db': 'mppsolar'}
2023-04-27 06:44:43,733:DEBUG:__init__:get_port_type@73: port matches ttyusb
2023-04-27 06:44:43,733:INFO:__init__:get_port@121: Using serialio for communications
2023-04-27 06:44:43,747:DEBUG:__init__:get_protocol@13: Protocol JK485
2023-04-27 06:44:43,753:DEBUG:device:__init__@38: __init__ name unnamed, port <mppsolar.inout.serialio.SerialIO object at 0x76099cd0>, protocol JKBMS RS485 serial communication protocol handler
2023-04-27 06:44:43,753:DEBUG:__init__:main@401: Commands [(<mppsolar.devices.jkbms.jkbms object at 0x76099ad8>, '', '', 'screen', None, None)]
2023-04-27 06:44:43,753:INFO:__init__:main@406: Looping 1 commands
2023-04-27 06:44:43,754:INFO:__init__:main@416: Getting results from device: jkbms device - name: unnamed, port: <mppsolar.inout.serialio.SerialIO object at 0x76099cd0>, protocol: JKBMS RS485 serial communication protocol handler for command: , tag: , outputs: screen
2023-04-27 06:44:43,754:INFO:device:run_command@50: Running command
2023-04-27 06:44:43,754:INFO:jk485:get_full_command@100: Using protocol b'JK485' with 1 commands
2023-04-27 06:44:43,755:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getBalancerData
2023-04-27 06:44:43,755:DEBUG:abstractprotocol:get_command_defn@59: Processing command 'getBalancerData'
2023-04-27 06:44:43,755:DEBUG:abstractprotocol:get_command_defn@61: Found command getBalancerData in protocol b'JK485'
2023-04-27 06:44:43,755:DEBUG:jk485:get_full_command@114: cmd with header: bytearray(b'U\xaa\x00\x00\x00\x00\x00')
2023-04-27 06:44:43,756:DEBUG:jk485:get_full_command@117: cmd with header + slave address: bytearray(b'U\xaa\x01\x00\x00\x00\x00')
2023-04-27 06:44:43,756:DEBUG:jk485:get_full_command@122: cmd with command code and frame data: bytearray(b'U\xaa\x01\xff\x00\x00\x00')
2023-04-27 06:44:43,756:DEBUG:jk485:get_full_command@125: cmd with crc: bytearray(b'U\xaa\x01\xff\x00\x00\xff')
2023-04-27 06:44:43,756:INFO:device:run_command@78: full command bytearray(b'U\xaa\x01\xff\x00\x00\xff') for command getBalancerData
2023-04-27 06:44:43,757:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getBalancerData
2023-04-27 06:44:43,757:DEBUG:abstractprotocol:get_command_defn@59: Processing command 'getBalancerData'
2023-04-27 06:44:43,757:DEBUG:abstractprotocol:get_command_defn@61: Found command getBalancerData in protocol b'JK485'
2023-04-27 06:44:43,757:DEBUG:serialio:send_and_receive@19: port /dev/ttyUSB0, baudrate 9600
2023-04-27 06:44:43,762:DEBUG:serialio:send_and_receive@22: Executing command via serialio...
2023-04-27 06:44:44,864:DEBUG:serialio:send_and_receive@30: serial response was: b''
2023-04-27 06:44:45,135:DEBUG:device:run_command@95: Send and Receive Response b''
2023-04-27 06:44:45,135:INFO:abstractprotocol:decode@218: response passed to decode: b''
2023-04-27 06:44:45,136:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getBalancerData
2023-04-27 06:44:45,136:DEBUG:abstractprotocol:get_command_defn@59: Processing command 'getBalancerData'
2023-04-27 06:44:45,137:DEBUG:abstractprotocol:get_command_defn@61: Found command getBalancerData in protocol b'JK485'
2023-04-27 06:44:45,137:INFO:abstractprotocol:decode@262: Processing response of type POSITIONAL
2023-04-27 06:44:45,138:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 2, 'Header', '']
2023-04-27 06:44:45,138:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Slave Address', '']
2023-04-27 06:44:45,139:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Command Code', '']
2023-04-27 06:44:45,139:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/100', 2, 'Total Battery Voltage', 'V']
2023-04-27 06:44:45,140:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Average Cell Voltage', 'V']
2023-04-27 06:44:45,140:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Number of Cells', '']
2023-04-27 06:44:45,141:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Highest Cell', '']
2023-04-27 06:44:45,141:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Lowest Cell', '']
2023-04-27 06:44:45,142:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Charging / Discharging', '']
2023-04-27 06:44:45,142:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Alarm - todo', '']
2023-04-27 06:44:45,143:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Difference', 'V']
2023-04-27 06:44:45,143:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Balance Current', 'A']
2023-04-27 06:44:45,144:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Balance Trigger Voltage', 'V']
2023-04-27 06:44:45,145:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Max Balance Current', 'A']
2023-04-27 06:44:45,145:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Balance On / Off', '']
2023-04-27 06:44:45,146:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Set Number of Cells', '']
2023-04-27 06:44:45,146:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell01', 'V']
2023-04-27 06:44:45,147:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell02', 'V']
2023-04-27 06:44:45,147:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell03', 'V']
2023-04-27 06:44:45,148:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell04', 'V']
2023-04-27 06:44:45,148:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell05', 'V']
2023-04-27 06:44:45,149:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell06', 'V']
2023-04-27 06:44:45,149:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell07', 'V']
2023-04-27 06:44:45,150:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell08', 'V']
2023-04-27 06:44:45,150:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell09', 'V']
2023-04-27 06:44:45,151:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell10', 'V']
2023-04-27 06:44:45,151:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell11', 'V']
2023-04-27 06:44:45,152:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell12', 'V']
2023-04-27 06:44:45,152:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell13', 'V']
2023-04-27 06:44:45,153:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell14', 'V']
2023-04-27 06:44:45,153:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell15', 'V']
2023-04-27 06:44:45,154:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell16', 'V']
2023-04-27 06:44:45,154:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell17', 'V']
2023-04-27 06:44:45,155:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell18', 'V']
2023-04-27 06:44:45,155:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell19', 'V']
2023-04-27 06:44:45,156:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell20', 'V']
2023-04-27 06:44:45,156:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell21', 'V']
2023-04-27 06:44:45,157:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell22', 'V']
2023-04-27 06:44:45,157:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell23', 'V']
2023-04-27 06:44:45,158:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell24', 'V']
2023-04-27 06:44:45,158:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short', 2, 'Temperature', '°C']
2023-04-27 06:44:45,159:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Checksum', '']
2023-04-27 06:44:45,159:DEBUG:abstractprotocol:decode@266: trimmed and split responses: [b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'']
2023-04-27 06:44:45,160:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 06:44:45,160:DEBUG:abstractprotocol:decode@493: Got defn ['Hex2Str', 2, 'Header', '']
2023-04-27 06:44:45,161:DEBUG:abstractprotocol:process_response@106: Processing data_type: Hex2Str for data_name: Header, raw_value b''
2023-04-27 06:44:45,161:DEBUG:abstractprotocol:process_response@195: Processing format string Hex2Str(raw_value)
2023-04-27 06:44:45,162:DEBUG:protocol_helpers:Hex2Str@109: Hex b'' decoded to
2023-04-27 06:44:45,162:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 06:44:45,163:DEBUG:abstractprotocol:decode@493: Got defn ['Hex2Str', 1, 'Slave Address', '']
2023-04-27 06:44:45,163:DEBUG:abstractprotocol:process_response@106: Processing data_type: Hex2Str for data_name: Slave Address, raw_value b''
2023-04-27 06:44:45,164:DEBUG:abstractprotocol:process_response@195: Processing format string Hex2Str(raw_value)
2023-04-27 06:44:45,165:DEBUG:protocol_helpers:Hex2Str@109: Hex b'' decoded to
2023-04-27 06:44:45,165:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 06:44:45,166:DEBUG:abstractprotocol:decode@493: Got defn ['Hex2Str', 1, 'Command Code', '']
2023-04-27 06:44:45,167:DEBUG:abstractprotocol:process_response@106: Processing data_type: Hex2Str for data_name: Command Code, raw_value b''
2023-04-27 06:44:45,167:DEBUG:abstractprotocol:process_response@195: Processing format string Hex2Str(raw_value)
2023-04-27 06:44:45,168:DEBUG:protocol_helpers:Hex2Str@109: Hex b'' decoded to
2023-04-27 06:44:45,168:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 06:44:45,169:DEBUG:abstractprotocol:decode@493: Got defn ['BigHex2Short:r/100', 2, 'Total Battery Voltage', 'V']
2023-04-27 06:44:45,169:DEBUG:abstractprotocol:process_response@105: Got template r/100 for Total Battery Voltage b''
2023-04-27 06:44:45,170:DEBUG:abstractprotocol:process_response@106: Processing data_type: BigHex2Short for data_name: Total Battery Voltage, raw_value b''
2023-04-27 06:44:45,170:DEBUG:abstractprotocol:process_response@195: Processing format string BigHex2Short(raw_value)
2023-04-27 06:44:45,171:INFO:protocol_helpers:BigHex2Short@148: Hex encoded value must be 2 bytes long. Was 0 length
2023-04-27 06:44:45,172:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 06:44:45,173:DEBUG:abstractprotocol:decode@493: Got defn ['BigHex2Short:r/1000', 2, 'Average Cell Voltage', 'V']
2023-04-27 06:44:45,173:DEBUG:abstractprotocol:process_response@105: Got template r/1000 for Average Cell Voltage b''
2023-04-27 06:44:45,174:DEBUG:abstractprotocol:process_response@106: Processing data_type: BigHex2Short for data_name: Average Cell Voltage, raw_value b''
2023-04-27 06:44:45,174:DEBUG:abstractprotocol:process_response@195: Processing format string BigHex2Short(raw_value)
2023-04-27 06:44:45,175:INFO:protocol_helpers:BigHex2Short@148: Hex encoded value must be 2 bytes long. Was 0 length
2023-04-27 06:44:45,176:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 06:44:45,176:DEBUG:abstractprotocol:decode@493: Got defn ['Hex2Int', 1, 'Number of Cells', '']
2023-04-27 06:44:45,177:DEBUG:abstractprotocol:process_response@106: Processing data_type: Hex2Int for data_name: Number of Cells, raw_value b''
2023-04-27 06:44:45,177:DEBUG:abstractprotocol:process_response@195: Processing format string Hex2Int(raw_value)
Traceback (most recent call last):
  File "/usr/local/bin/jkbms", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/mppsolar/__init__.py", line 419, in main
    results = _device.run_command(command=_command)
  File "/usr/local/lib/python3.9/dist-packages/mppsolar/devices/device.py", line 112, in run_command
    decoded_response = self._protocol.decode(raw_response, command)
  File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/abstractprotocol.py", line 526, in decode
    processed_responses = self.process_response(
  File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/abstractprotocol.py", line 197, in process_response
    r = eval(format_string)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/protocol_helpers.py", line 95, in Hex2Int
    answer = hexString[0]
IndexError: index out of range
sugar012 commented 1 year ago

Hello, can i join the party? I'm fiddling with my JK for a few days and i came to the conclusion that the implementation is broken as jblance said. However BLE seems to works "almost" fine but is not so reliable. I need to be constant to send data to a database

I don't have so much time and knowledge but i bring 11,XW hardware! I can try your instructions to make it work for all

I have the exact same setup as the pic from SA, i already tried the usual noob tricks like switching wires, switching USBs and such

pi@raspberrypi:~ $ jkbms -p C8:47:8C:EC:B7:28 -P JK02 -c getInfo
Command: getInfo - BLE Device Information inquiry
--------------------------------------------------------------------------------
Parameter          Value                Unit
header             55aaeb90
record_type        03
record_counter     63
device_model       JK_B2A24S15P
hardware_version   11.XW
software_version   11.26
up_time            18D12H54M60S
power-on_times     2
device_name        JK_B2A24S15P
device_passcode    1234
manufacturing_date 230409
serial_number      3010546682
passcode           0000
user_data          Input Userdata
setup_passcode     1234
pi@raspberrypi:~ $ jkbms -p /dev/ttyUSB1 -b 9600 -P JK485 -D
2023-04-27 22:15:32,067:INFO:__init__:main@213: Solar Device Command Utility, version: 0.15.28
2023-04-27 22:15:32,067:DEBUG:mqttbrokerc:__init__@32: mqttbroker config: {'name': 'localhost', 'port': 1883, 'user': None, 'pass': None}
2023-04-27 22:15:32,068:DEBUG:__init__:main@238: MqttBroker name: localhost, port: 1883, user: None
2023-04-27 22:15:32,068:DEBUG:__init__:main@240: udp port 5555
2023-04-27 22:15:32,068:DEBUG:__init__:main@242: Using Postgres None
2023-04-27 22:15:32,068:DEBUG:__init__:main@245: Using Mongo None with mppsolar
2023-04-27 22:15:32,069:INFO:__init__:main@346: Creating device "unnamed" (type: "jkbms") on port "/dev/ttyUSB1 (porttype=None)" using protocol "JK485"
2023-04-27 22:15:32,072:DEBUG:__init__:main@350: device_class <class 'mppsolar.devices.jkbms.jkbms'>
2023-04-27 22:15:32,073:DEBUG:device:__init__@33: __init__ args ()
2023-04-27 22:15:32,073:DEBUG:device:__init__@34: __init__ kwargs {'name': 'unnamed', 'port': '/dev/ttyUSB1', 'protocol': 'JK485', 'baud': 9600, 'porttype': None, 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0x7faefaaa90>, 'udp_port': '5555', 'mongo_url': None, 'mongo_db': 'mppsolar'}
2023-04-27 22:15:32,073:DEBUG:__init__:get_port_type@73: port matches ttyusb
2023-04-27 22:15:32,073:INFO:__init__:get_port@121: Using serialio for communications
2023-04-27 22:15:32,083:DEBUG:__init__:get_protocol@13: Protocol JK485
2023-04-27 22:15:32,088:DEBUG:device:__init__@38: __init__ name unnamed, port <mppsolar.inout.serialio.SerialIO object at 0x7faefaaca0>, protocol JKBMS RS485 serial communication protocol handler
2023-04-27 22:15:32,088:DEBUG:__init__:main@401: Commands [(<mppsolar.devices.jkbms.jkbms object at 0x7faefaa8b0>, '', '', 'screen', None, None)]
2023-04-27 22:15:32,088:INFO:__init__:main@406: Looping 1 commands
2023-04-27 22:15:32,089:INFO:__init__:main@416: Getting results from device: jkbms device - name: unnamed, port: <mppsolar.inout.serialio.SerialIO object at 0x7faefaaca0>, protocol: JKBMS RS485 serial communication protocol handler for command: , tag: , outputs: screen
2023-04-27 22:15:32,089:INFO:device:run_command@50: Running command
2023-04-27 22:15:32,089:INFO:jk485:get_full_command@100: Using protocol b'JK485' with 1 commands
2023-04-27 22:15:32,089:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getBalancerData
2023-04-27 22:15:32,090:DEBUG:abstractprotocol:get_command_defn@59: Processing command 'getBalancerData'
2023-04-27 22:15:32,090:DEBUG:abstractprotocol:get_command_defn@61: Found command getBalancerData in protocol b'JK485'
2023-04-27 22:15:32,090:DEBUG:jk485:get_full_command@114: cmd with header: bytearray(b'U\xaa\x00\x00\x00\x00\x00')
2023-04-27 22:15:32,091:DEBUG:jk485:get_full_command@117: cmd with header + slave address: bytearray(b'U\xaa\x01\x00\x00\x00\x00')
2023-04-27 22:15:32,091:DEBUG:jk485:get_full_command@122: cmd with command code and frame data: bytearray(b'U\xaa\x01\xff\x00\x00\x00')
2023-04-27 22:15:32,091:DEBUG:jk485:get_full_command@125: cmd with crc: bytearray(b'U\xaa\x01\xff\x00\x00\xff')
2023-04-27 22:15:32,091:INFO:device:run_command@78: full command bytearray(b'U\xaa\x01\xff\x00\x00\xff') for command getBalancerData
2023-04-27 22:15:32,092:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getBalancerData
2023-04-27 22:15:32,092:DEBUG:abstractprotocol:get_command_defn@59: Processing command 'getBalancerData'
2023-04-27 22:15:32,092:DEBUG:abstractprotocol:get_command_defn@61: Found command getBalancerData in protocol b'JK485'
2023-04-27 22:15:32,093:DEBUG:serialio:send_and_receive@19: port /dev/ttyUSB1, baudrate 9600
2023-04-27 22:15:32,102:DEBUG:serialio:send_and_receive@22: Executing command via serialio...
2023-04-27 22:15:33,204:DEBUG:serialio:send_and_receive@30: serial response was: b''
2023-04-27 22:15:33,207:DEBUG:device:run_command@95: Send and Receive Response b''
2023-04-27 22:15:33,207:INFO:abstractprotocol:decode@218: response passed to decode: b''
2023-04-27 22:15:33,208:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getBalancerData
2023-04-27 22:15:33,208:DEBUG:abstractprotocol:get_command_defn@59: Processing command 'getBalancerData'
2023-04-27 22:15:33,208:DEBUG:abstractprotocol:get_command_defn@61: Found command getBalancerData in protocol b'JK485'
2023-04-27 22:15:33,208:INFO:abstractprotocol:decode@262: Processing response of type POSITIONAL
2023-04-27 22:15:33,208:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 2, 'Header', '']
2023-04-27 22:15:33,208:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Slave Address', '']
2023-04-27 22:15:33,208:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Command Code', '']
2023-04-27 22:15:33,208:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/100', 2, 'Total Battery Voltage', 'V']
2023-04-27 22:15:33,208:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Average Cell Voltage', 'V']
2023-04-27 22:15:33,208:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Number of Cells', '']
2023-04-27 22:15:33,209:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Highest Cell', '']
2023-04-27 22:15:33,209:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Lowest Cell', '']
2023-04-27 22:15:33,209:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Charging / Discharging', '']
2023-04-27 22:15:33,209:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Alarm - todo', '']
2023-04-27 22:15:33,209:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Difference', 'V']
2023-04-27 22:15:33,209:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Balance Current', 'A']
2023-04-27 22:15:33,209:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Balance Trigger Voltage', 'V']
2023-04-27 22:15:33,209:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Max Balance Current', 'A']
2023-04-27 22:15:33,209:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Balance On / Off', '']
2023-04-27 22:15:33,209:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Set Number of Cells', '']
2023-04-27 22:15:33,210:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell01', 'V']
2023-04-27 22:15:33,210:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell02', 'V']
2023-04-27 22:15:33,210:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell03', 'V']
2023-04-27 22:15:33,210:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell04', 'V']
2023-04-27 22:15:33,210:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell05', 'V']
2023-04-27 22:15:33,210:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell06', 'V']
2023-04-27 22:15:33,210:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell07', 'V']
2023-04-27 22:15:33,210:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell08', 'V']
2023-04-27 22:15:33,210:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell09', 'V']
2023-04-27 22:15:33,211:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell10', 'V']
2023-04-27 22:15:33,211:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell11', 'V']
2023-04-27 22:15:33,211:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell12', 'V']
2023-04-27 22:15:33,211:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell13', 'V']
2023-04-27 22:15:33,211:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell14', 'V']
2023-04-27 22:15:33,211:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell15', 'V']
2023-04-27 22:15:33,211:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell16', 'V']
2023-04-27 22:15:33,211:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell17', 'V']
2023-04-27 22:15:33,212:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell18', 'V']
2023-04-27 22:15:33,212:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell19', 'V']
2023-04-27 22:15:33,212:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell20', 'V']
2023-04-27 22:15:33,212:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell21', 'V']
2023-04-27 22:15:33,212:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell22', 'V']
2023-04-27 22:15:33,212:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell23', 'V']
2023-04-27 22:15:33,212:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell24', 'V']
2023-04-27 22:15:33,213:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short', 2, 'Temperature', '°C']
2023-04-27 22:15:33,213:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Checksum', '']
2023-04-27 22:15:33,213:DEBUG:abstractprotocol:decode@266: trimmed and split responses: [b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'']
2023-04-27 22:15:33,213:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 22:15:33,213:DEBUG:abstractprotocol:decode@493: Got defn ['Hex2Str', 2, 'Header', '']
2023-04-27 22:15:33,213:DEBUG:abstractprotocol:process_response@106: Processing data_type: Hex2Str for data_name: Header, raw_value b''
2023-04-27 22:15:33,213:DEBUG:abstractprotocol:process_response@195: Processing format string Hex2Str(raw_value)
2023-04-27 22:15:33,214:DEBUG:protocol_helpers:Hex2Str@109: Hex b'' decoded to
2023-04-27 22:15:33,214:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 22:15:33,214:DEBUG:abstractprotocol:decode@493: Got defn ['Hex2Str', 1, 'Slave Address', '']
2023-04-27 22:15:33,214:DEBUG:abstractprotocol:process_response@106: Processing data_type: Hex2Str for data_name: Slave Address, raw_value b''
2023-04-27 22:15:33,214:DEBUG:abstractprotocol:process_response@195: Processing format string Hex2Str(raw_value)
2023-04-27 22:15:33,214:DEBUG:protocol_helpers:Hex2Str@109: Hex b'' decoded to
2023-04-27 22:15:33,215:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 22:15:33,215:DEBUG:abstractprotocol:decode@493: Got defn ['Hex2Str', 1, 'Command Code', '']
2023-04-27 22:15:33,215:DEBUG:abstractprotocol:process_response@106: Processing data_type: Hex2Str for data_name: Command Code, raw_value b''
2023-04-27 22:15:33,215:DEBUG:abstractprotocol:process_response@195: Processing format string Hex2Str(raw_value)
2023-04-27 22:15:33,215:DEBUG:protocol_helpers:Hex2Str@109: Hex b'' decoded to
2023-04-27 22:15:33,215:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 22:15:33,216:DEBUG:abstractprotocol:decode@493: Got defn ['BigHex2Short:r/100', 2, 'Total Battery Voltage', 'V']
2023-04-27 22:15:33,216:DEBUG:abstractprotocol:process_response@105: Got template r/100 for Total Battery Voltage b''
2023-04-27 22:15:33,216:DEBUG:abstractprotocol:process_response@106: Processing data_type: BigHex2Short for data_name: Total Battery Voltage, raw_value b''
2023-04-27 22:15:33,216:DEBUG:abstractprotocol:process_response@195: Processing format string BigHex2Short(raw_value)
2023-04-27 22:15:33,216:INFO:protocol_helpers:BigHex2Short@148: Hex encoded value must be 2 bytes long. Was 0 length
2023-04-27 22:15:33,216:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 22:15:33,217:DEBUG:abstractprotocol:decode@493: Got defn ['BigHex2Short:r/1000', 2, 'Average Cell Voltage', 'V']
2023-04-27 22:15:33,217:DEBUG:abstractprotocol:process_response@105: Got template r/1000 for Average Cell Voltage b''
2023-04-27 22:15:33,217:DEBUG:abstractprotocol:process_response@106: Processing data_type: BigHex2Short for data_name: Average Cell Voltage, raw_value b''
2023-04-27 22:15:33,217:DEBUG:abstractprotocol:process_response@195: Processing format string BigHex2Short(raw_value)
2023-04-27 22:15:33,217:INFO:protocol_helpers:BigHex2Short@148: Hex encoded value must be 2 bytes long. Was 0 length
2023-04-27 22:15:33,217:DEBUG:abstractprotocol:decode@466: Processing POSITIONAL type responses
2023-04-27 22:15:33,218:DEBUG:abstractprotocol:decode@493: Got defn ['Hex2Int', 1, 'Number of Cells', '']
2023-04-27 22:15:33,218:DEBUG:abstractprotocol:process_response@106: Processing data_type: Hex2Int for data_name: Number of Cells, raw_value b''
2023-04-27 22:15:33,218:DEBUG:abstractprotocol:process_response@195: Processing format string Hex2Int(raw_value)
Traceback (most recent call last):
  File "/usr/local/bin/jkbms", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/mppsolar/__init__.py", line 419, in main
    results = _device.run_command(command=_command)
  File "/usr/local/lib/python3.9/dist-packages/mppsolar/devices/device.py", line 112, in run_command
    decoded_response = self._protocol.decode(raw_response, command)
  File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/abstractprotocol.py", line 526, in decode
    processed_responses = self.process_response(
  File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/abstractprotocol.py", line 197, in process_response
    r = eval(format_string)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/protocol_helpers.py", line 95, in Hex2Int
    answer = hexString[0]
IndexError: index out of range
krime777 commented 1 year ago

How can we help?

sugar012 commented 1 year ago

ive not had an opportunity to debug this so far (not had someone with the rs485 connection have the time to see what is going on) im pretty sure it doesnt work yet - but if you have time for testing (and testing again...) we can try to work on it adding -D and posting all the output is key to help see what is and isnt working and trying to fix the problems

note: others have used their own code and suggested that not everything works via rs485

That's a bummer. I managed to take data from bluetooth and send It to mysql but since i'm waiting to install a second JK i can't use bluetooth for both in continuous polling. Hope we can arrange something

sw25481 commented 1 year ago

I have the same setup. First I installed Solar Assistant and confirmed it could communicate with my JK BMS over RS485, so I know my connection is good. You can see form the debug I do get some data back

$ jkbms -p /dev/ttyUSB1 -P JK485 -c

Command: command help - List available commands for protocol JK485

Parameter Value Unit getBalancerData Get Balancer Data -- Get Balancer Data

$ jkbms -p /dev/ttyUSB1 -P JK485 -c getBalancerData Traceback (most recent call last): File "/usr/local/bin/jkbms", line 8, in sys.exit(main()) File "/usr/local/lib/python3.9/dist-packages/mppsolar/init.py", line 420, in main results = _device.run_command(command=_command) File "/usr/local/lib/python3.9/dist-packages/mppsolar/devices/device.py", line 112, in run_command decoded_response = self._protocol.decode(raw_response, command) File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/abstractprotocol.py", line 532, in decode processed_responses = self.process_response( File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/abstractprotocol.py", line 203, in process_response r = eval(format_string) File "", line 1, in File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/protocol_helpers.py", line 95, in Hex2Int answer = hexString[0] IndexError: index out of range

$ jkbms -p /dev/ttyUSB1 -P JK485 -c getBalancerData -D 2023-05-14 19:28:29,092:INFO:init:main@214: Solar Device Command Utility, version: 0.15.57 2023-05-14 19:28:29,098:DEBUG:mqttbrokerc:init@29: mqttbroker config: {'name': 'localhost', 'port': 1883, 'user': None, 'pass': None} 2023-05-14 19:28:29,104:DEBUG:init:main@239: MqttBroker name: localhost, port: 1883, user: None 2023-05-14 19:28:29,107:DEBUG:init:main@241: udp port 5555 2023-05-14 19:28:29,111:DEBUG:init:main@243: Using Postgres None 2023-05-14 19:28:29,115:DEBUG:init:main@246: Using Mongo None with mppsolar 2023-05-14 19:28:29,120:INFO:init:main@347: Creating device "unnamed" (type: "jkbms") on port "/dev/ttyUSB1 (porttype=None)" using protocol "JK485" 2023-05-14 19:28:29,156:DEBUG:init:main@351: device_class <class 'mppsolar.devices.jkbms.jkbms'> 2023-05-14 19:28:29,160:DEBUG:device:init@33: init args () 2023-05-14 19:28:29,163:DEBUG:device:init@34: init kwargs {'name': 'unnamed', 'port': '/dev/ttyUSB1', 'protocol': 'JK485', 'baud': 2400, 'porttype': None, 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0xb5cdaf10>, 'udp_port': '5555', 'mongo_url': None, 'mongo_db': 'mppsolar'} 2023-05-14 19:28:29,169:DEBUG:init:get_port_type@73: port matches ttyusb 2023-05-14 19:28:29,172:INFO:init:get_port@121: Using serialio for communications 2023-05-14 19:28:29,225:DEBUG:init:get_protocol@13: Protocol JK485 2023-05-14 19:28:30,119:DEBUG:device:init@38: init name unnamed, port <mppsolar.inout.serialio.SerialIO object at 0xb5cdafe8>, protocol JKBMS RS485 serial communication protocol handler 2023-05-14 19:28:30,122:DEBUG:init:main@402: Commands [(<mppsolar.devices.jkbms.jkbms object at 0xb5cdaf28>, 'getBalancerData', 'getBalancerData', 'screen', None, None)] 2023-05-14 19:28:30,126:INFO:init:main@407: Looping 1 commands 2023-05-14 19:28:30,130:INFO:init:main@417: Getting results from device: jkbms device - name: unnamed, port: <mppsolar.inout.serialio.SerialIO object at 0xb5cdafe8>, protocol: JKBMS RS485 serial communication protocol handler for command: getBalancerData, tag: getBalancerData, outputs: screen 2023-05-14 19:28:30,135:INFO:device:run_command@50: Running command getBalancerData 2023-05-14 19:28:30,140:INFO:jk485:get_full_command@100: Using protocol b'JK485' with 1 commands 2023-05-14 19:28:30,143:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getBalancerData 2023-05-14 19:28:30,149:DEBUG:abstractprotocol:get_command_defn@65: Processing command 'getBalancerData' 2023-05-14 19:28:30,152:DEBUG:abstractprotocol:get_command_defn@67: Found command getBalancerData in protocol b'JK485' 2023-05-14 19:28:30,157:DEBUG:jk485:get_full_command@114: cmd with header: bytearray(b'U\xaa\x00\x00\x00\x00\x00') 2023-05-14 19:28:30,161:DEBUG:jk485:get_full_command@117: cmd with header + slave address: bytearray(b'U\xaa\x01\x00\x00\x00\x00') 2023-05-14 19:28:30,165:DEBUG:jk485:get_full_command@122: cmd with command code and frame data: bytearray(b'U\xaa\x01\xff\x00\x00\x00') 2023-05-14 19:28:30,168:DEBUG:jk485:get_full_command@125: cmd with crc: bytearray(b'U\xaa\x01\xff\x00\x00\xff') 2023-05-14 19:28:30,175:INFO:device:run_command@78: full command bytearray(b'U\xaa\x01\xff\x00\x00\xff') for command getBalancerData 2023-05-14 19:28:30,179:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getBalancerData 2023-05-14 19:28:30,184:DEBUG:abstractprotocol:get_command_defn@65: Processing command 'getBalancerData' 2023-05-14 19:28:30,188:DEBUG:abstractprotocol:get_command_defn@67: Found command getBalancerData in protocol b'JK485' 2023-05-14 19:28:30,192:DEBUG:serialio:send_and_receive@19: port /dev/ttyUSB1, baudrate 2400 2023-05-14 19:28:30,202:DEBUG:serialio:send_and_receive@22: Executing command via serialio... 2023-05-14 19:28:31,311:DEBUG:serialio:send_and_receive@30: serial response was: b'' 2023-05-14 19:28:31,319:DEBUG:device:run_command@95: Send and Receive Response b'' 2023-05-14 19:28:31,326:INFO:abstractprotocol:decode@224: response passed to decode: b'' 2023-05-14 19:28:31,331:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getBalancerData 2023-05-14 19:28:31,338:DEBUG:abstractprotocol:get_command_defn@65: Processing command 'getBalancerData' 2023-05-14 19:28:31,345:DEBUG:abstractprotocol:get_command_defn@67: Found command getBalancerData in protocol b'JK485' 2023-05-14 19:28:31,351:INFO:abstractprotocol:decode@268: Processing response of type POSITIONAL 2023-05-14 19:28:31,357:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 2, 'Header', ''] 2023-05-14 19:28:31,363:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Slave Address', ''] 2023-05-14 19:28:31,372:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Command Code', ''] 2023-05-14 19:28:31,378:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/100', 2, 'Total Battery Voltage', 'V'] 2023-05-14 19:28:31,384:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Average Cell Voltage', 'V'] 2023-05-14 19:28:31,388:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Number of Cells', ''] 2023-05-14 19:28:31,395:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Highest Cell', ''] 2023-05-14 19:28:31,401:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Lowest Cell', ''] 2023-05-14 19:28:31,405:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Charging / Discharging', ''] 2023-05-14 19:28:31,409:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Alarm - todo', ''] 2023-05-14 19:28:31,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Difference', 'V'] 2023-05-14 19:28:31,420:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Balance Current', 'A'] 2023-05-14 19:28:31,425:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Balance Trigger Voltage', 'V'] 2023-05-14 19:28:31,428:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Max Balance Current', 'A'] 2023-05-14 19:28:31,432:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Balance On / Off', ''] 2023-05-14 19:28:31,436:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Set Number of Cells', ''] 2023-05-14 19:28:31,441:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell01', 'V'] 2023-05-14 19:28:31,445:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell02', 'V'] 2023-05-14 19:28:31,449:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell03', 'V'] 2023-05-14 19:28:31,454:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell04', 'V'] 2023-05-14 19:28:31,458:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell05', 'V'] 2023-05-14 19:28:31,462:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell06', 'V'] 2023-05-14 19:28:31,467:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell07', 'V'] 2023-05-14 19:28:31,471:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell08', 'V'] 2023-05-14 19:28:31,475:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell09', 'V'] 2023-05-14 19:28:31,480:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell10', 'V'] 2023-05-14 19:28:31,484:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell11', 'V'] 2023-05-14 19:28:31,488:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell12', 'V'] 2023-05-14 19:28:31,493:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell13', 'V'] 2023-05-14 19:28:31,497:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell14', 'V'] 2023-05-14 19:28:31,502:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell15', 'V'] 2023-05-14 19:28:31,506:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell16', 'V'] 2023-05-14 19:28:31,511:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell17', 'V'] 2023-05-14 19:28:31,516:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell18', 'V'] 2023-05-14 19:28:31,522:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell19', 'V'] 2023-05-14 19:28:31,525:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell20', 'V'] 2023-05-14 19:28:31,529:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell21', 'V'] 2023-05-14 19:28:31,534:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell22', 'V'] 2023-05-14 19:28:31,538:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell23', 'V'] 2023-05-14 19:28:31,542:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short:r/1000', 2, 'Voltage Cell24', 'V'] 2023-05-14 19:28:31,547:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['BigHex2Short', 2, 'Temperature', '°C'] 2023-05-14 19:28:31,551:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Checksum', ''] 2023-05-14 19:28:31,558:DEBUG:abstractprotocol:decode@272: trimmed and split responses: [b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b''] 2023-05-14 19:28:31,562:DEBUG:abstractprotocol:decode@472: Processing POSITIONAL type responses 2023-05-14 19:28:31,566:DEBUG:abstractprotocol:decode@499: Got defn ['Hex2Str', 2, 'Header', ''] 2023-05-14 19:28:31,571:DEBUG:abstractprotocol:process_response@112: Processing data_type: Hex2Str for data_name: Header, raw_value b'' 2023-05-14 19:28:31,576:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Str(raw_value) 2023-05-14 19:28:31,583:DEBUG:protocol_helpers:Hex2Str@109: Hex b'' decoded to 2023-05-14 19:28:31,586:DEBUG:abstractprotocol:decode@472: Processing POSITIONAL type responses 2023-05-14 19:28:31,590:DEBUG:abstractprotocol:decode@499: Got defn ['Hex2Str', 1, 'Slave Address', ''] 2023-05-14 19:28:31,595:DEBUG:abstractprotocol:process_response@112: Processing data_type: Hex2Str for data_name: Slave Address, raw_value b'' 2023-05-14 19:28:31,598:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Str(raw_value) 2023-05-14 19:28:31,604:DEBUG:protocol_helpers:Hex2Str@109: Hex b'' decoded to 2023-05-14 19:28:31,607:DEBUG:abstractprotocol:decode@472: Processing POSITIONAL type responses 2023-05-14 19:28:31,612:DEBUG:abstractprotocol:decode@499: Got defn ['Hex2Str', 1, 'Command Code', ''] 2023-05-14 19:28:31,616:DEBUG:abstractprotocol:process_response@112: Processing data_type: Hex2Str for data_name: Command Code, raw_value b'' 2023-05-14 19:28:31,620:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Str(raw_value) 2023-05-14 19:28:31,626:DEBUG:protocol_helpers:Hex2Str@109: Hex b'' decoded to 2023-05-14 19:28:31,630:DEBUG:abstractprotocol:decode@472: Processing POSITIONAL type responses 2023-05-14 19:28:31,634:DEBUG:abstractprotocol:decode@499: Got defn ['BigHex2Short:r/100', 2, 'Total Battery Voltage', 'V'] 2023-05-14 19:28:31,638:DEBUG:abstractprotocol:process_response@111: Got template r/100 for Total Battery Voltage b'' 2023-05-14 19:28:31,643:DEBUG:abstractprotocol:process_response@112: Processing data_type: BigHex2Short for data_name: Total Battery Voltage, raw_value b'' 2023-05-14 19:28:31,648:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2023-05-14 19:28:31,654:INFO:protocol_helpers:BigHex2Short@148: Hex encoded value must be 2 bytes long. Was 0 length 2023-05-14 19:28:31,659:DEBUG:abstractprotocol:decode@472: Processing POSITIONAL type responses 2023-05-14 19:28:31,663:DEBUG:abstractprotocol:decode@499: Got defn ['BigHex2Short:r/1000', 2, 'Average Cell Voltage', 'V'] 2023-05-14 19:28:31,667:DEBUG:abstractprotocol:process_response@111: Got template r/1000 for Average Cell Voltage b'' 2023-05-14 19:28:31,673:DEBUG:abstractprotocol:process_response@112: Processing data_type: BigHex2Short for data_name: Average Cell Voltage, raw_value b'' 2023-05-14 19:28:31,677:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2023-05-14 19:28:31,683:INFO:protocol_helpers:BigHex2Short@148: Hex encoded value must be 2 bytes long. Was 0 length 2023-05-14 19:28:31,688:DEBUG:abstractprotocol:decode@472: Processing POSITIONAL type responses 2023-05-14 19:28:31,691:DEBUG:abstractprotocol:decode@499: Got defn ['Hex2Int', 1, 'Number of Cells', ''] 2023-05-14 19:28:31,695:DEBUG:abstractprotocol:process_response@112: Processing data_type: Hex2Int for data_name: Number of Cells, raw_value b'' 2023-05-14 19:28:31,700:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Int(raw_value) Traceback (most recent call last): File "/usr/local/bin/jkbms", line 8, in sys.exit(main()) File "/usr/local/lib/python3.9/dist-packages/mppsolar/init.py", line 420, in main results = _device.run_command(command=_command) File "/usr/local/lib/python3.9/dist-packages/mppsolar/devices/device.py", line 112, in run_command decoded_response = self._protocol.decode(raw_response, command) File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/abstractprotocol.py", line 532, in decode processed_responses = self.process_response( File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/abstractprotocol.py", line 203, in process_response r = eval(format_string) File "", line 1, in File "/usr/local/lib/python3.9/dist-packages/mppsolar/protocols/protocol_helpers.py", line 95, in Hex2Int answer = hexString[0] IndexError: index out of range

sw25481 commented 1 year ago

Also printbms.py from https://github.com/fah/jk-bms works so this is possible

$ python3 printbms.py
Cell 1 : 3.297 V Cell 2 : 3.289 V Cell 3 : 3.295 V Cell 4 : 3.295 V Cell 5 : 3.295 V Cell 6 : 3.293 V Cell 7 : 3.29 V Cell 8 : 3.294 V Cell 9 : 3.29 V Cell 10 : 3.289 V Cell 11 : 3.292 V Cell 12 : 3.295 V Cell 13 : 3.295 V Cell 14 : 3.297 V Cell 15 : 3.29 V Cell 16 : 3.294 V Temp1: 20 ?C Temp2: 21 ?C Battery voltage: 52.68 V Current: 24.05 A Remaining capacity: 75 %

sugar012 commented 1 year ago

Also printbms.py from https://github.com/fah/jk-bms works so this is possible

$ python3 printbms.py Cell 1 : 3.297 V Cell 2 : 3.289 V Cell 3 : 3.295 V Cell 4 : 3.295 V Cell 5 : 3.295 V Cell 6 : 3.293 V Cell 7 : 3.29 V Cell 8 : 3.294 V Cell 9 : 3.29 V Cell 10 : 3.289 V Cell 11 : 3.292 V Cell 12 : 3.295 V Cell 13 : 3.295 V Cell 14 : 3.297 V Cell 15 : 3.29 V Cell 16 : 3.294 V Temp1: 20 ?C Temp2: 21 ?C Battery voltage: 52.68 V Current: 24.05 A Remaining capacity: 75 %

How Is connected to the bms?

sw25481 commented 1 year ago

Just like the picture at the top of this thread which comes from here https://solar-assistant.io/help/battery/jk-bms

A USB RS485 adapter using the FTDI chip bought from Amazon, plugged into the JK BMS RS485 module. The JK BMS RS485 module connected to the BMS using the GPS port. I use a Pi Zero W (the first one) which does not have much power for the USB ports so I use a small powered USB hub.

sugar012 commented 1 year ago

Just like the picture at the top of this thread which comes from here https://solar-assistant.io/help/battery/jk-bms

A USB RS485 adapter using the FTDI chip bought from Amazon, plugged into the JK BMS RS485 module. The JK BMS RS485 module connected to the BMS using the GPS port. I use a Pi Zero W (the first one) which does not have much power for the USB ports so I use a small powered USB hub.

i have the exact same setup as the photo in #1 but it doesen't work for me. I already tried that

sugar012 commented 1 year ago

Hello there. @jblance do you have any news for the 485 support? I'm stuck with bluetooth and is very bad

nfaction commented 1 year ago

Hello all! I've been very interested in this option via RS485 due to Bluetooth instabilities people are talking about.

I was able to confirm that I can get data using the JKBMS RS485 adapter connected to a USB adapter.

Once connected to a raspberry pi zero w via USB, I was able to get data from USB using https://github.com/fah/jk-bms as well.

# Git diff (changing to USB2)
$ git diff
diff --git a/printbms.py b/printbms.py
index 01dd162..9f68c62 100644
--- a/printbms.py
+++ b/printbms.py
@@ -14,7 +14,7 @@ import serial
 sleepTime = 10

 try:
-    bms = serial.Serial('/dev/ttyUSB0')
+    bms = serial.Serial('/dev/ttyUSB2')
     bms.baudrate = 115200
     bms.timeout  = 0.2
 except:

# Output
~/jk-bms $ python3 printbms.py
Cell 1 : 3.305 V
Cell 2 : 3.299 V
Cell 3 : 3.3 V
Cell 4 : 3.3 V
Cell 5 : 3.301 V
Cell 6 : 3.32 V
Cell 7 : 3.311 V
Cell 8 : 3.305 V
Cell 9 : 3.3 V
Cell 10 : 3.3 V
Cell 11 : 3.297 V
Cell 12 : 3.3 V
Cell 13 : 3.299 V
Cell 14 : 3.3 V
Cell 15 : 3.3 V
Cell 16 : 3.293 V
Temp1:  21 ?C
Temp2:  21 ?C
Battery voltage:  52.78 V
Current:  0.72 A
Remaining capacity:  14 %

As many others have mentioned, I get :

$ jkbms -b 115200 -P JK485 -D -p /dev/ttyUSB2
...
2023-07-08 03:03:56,258:DEBUG:abstractprotocol:process_response@117: Processing data_type: Hex2Int for data_name: Number of Cells, raw_value b''
2023-07-08 03:03:56,262:DEBUG:abstractprotocol:process_response@206: Processing format string Hex2Int(raw_value)
...
    answer = hexString[0]
IndexError: index out of range

As you can see, same exact setup and USB, but the jkbms command via mpp-solar does not work. Any ideas?

As a somewhat related note, the TTL connection (RS485 connection via GPS) does NOT work. I only have success with the JK BMS dongle. I have two JK BMS connected to two separate 16s LifePo4 batteries, one using dongle (ttyUSB2), the other using TTL cable (ttyUSB1) and USB1 does not work.

I was successful in getting data via ESP32 bluetooth esphome-jk-bms but it's pretty unreliable. Also I was hoping to emulate Pylontec protocol for my MPP inverter. I get data from both JK BMS. I'd much prefer to use USB.

torndar commented 1 year ago

As others have said I can get data via printbms.py from https://github.com/fah/jk-bms . Using the Waveshare USB to RS458 and the command jkbms -P jkserial -b 115000 -I

The first run I got this output

$ jkbms -P jkserial -b 115200 -I
2023-11-23 15:03:30,347:INFO:__init__:main@216: Solar Device Command Utility, version: 0.16.13, python version: 3.10.12
2023-11-23 15:03:30,347:INFO:__init__:main@359: Creating device "unnamed" (type: "jkbms") on port "/dev/ttyUSB0 (porttype=None)" using protocol "jkserial"
2023-11-23 15:03:30,348:INFO:__init__:get_port@111: Using serialio for communications
2023-11-23 15:03:30,350:INFO:__init__:main@413: Looping 1 commands
2023-11-23 15:03:30,350:INFO:__init__:main@423: Getting results from device: jkbms device - name: unnamed, port: <mppsolar.inout.serialio.SerialIO object at 0x7ff1d06126b0>, protocol: JKBMS TTL serial communication protocol handler for command: , tag: , outputs: screen
2023-11-23 15:03:30,350:INFO:device:run_command@51: Running command 
2023-11-23 15:03:30,350:INFO:device:run_command@81: full command bytearray(b'NW\x00\x13\x00\x00\x00\x00\x03\x03\x00\x00\x00\x00\x00\x00h\x00\x00\x01&') for command getBalancerData
2023-11-23 15:03:31,460:INFO:abstractprotocol:decode@246: response passed to decode: b"]\x05\xda\x02\x04\x04\x04h\x08PP/\xa5@(\x96\x90\xe85\xec\xa8\x9f\x90\xa8V\x90\xa8\x96\x90\x88\xd6\x90\xa8\x13\xc8hS\xc8\x88\xdf\xc8(\xd6\xc8(\xc5\xc8\xa8V\xc8\xa8\xdf\xc8\xa8\x1f\x180\xa20@!0`h\x18\x91#\x18 \xa0a'\x98\xa0\x180\xa0s@\xc0\x80\x80\x8a\x00\x0e\x8b\x00\x00\x8c\x00\x03\x8e\x16\xea\x8f\x10\xf4\x90\x10^\x91\x10@\x92\x00\x05\x93\x0c\x1c\x94\x0c\x80\x95\x00\x05\x96\x01,\x97\x00*\x98\x00\x1e\x99\x00\x19\x9a\x00\x1e\x9b\x0fn\x9c\x00\n\x9d\x01\x9e\x00F\x9f\x00<\xa0\x00d\xa1\x00d\xa2\x00\x14\xa3\x002\xa4\x00<\xa5\x00\x01\xa6\x00\x05\xa7\xff\xec\xa8\xff\xf6\xa9\x0e\xaa\x00\x00\x00\x15\xab\x01\xac\x01\xad\x03I\xae\x01\xaf\x01\xb0\x00\n\xb1\x14\xb2631790\x00\x00\x00\x00\xb3\x00\xb4Input Us\xb52310\xb6\x00\x00S\xbc\xb711.XW_S11.271__\xb8\x00\xb9\x00\x00\x00\x15\xbaInput UserdaTestStandBMS\xc0\x01\x00\x00\x00\x00h\x00\x00J\x81"
2023-11-23 15:03:31,461:INFO:abstractprotocol:decode@290: Processing response of type POSITIONAL
2023-11-23 15:03:31,465:INFO:device:run_command@116: Decoded response {'_command': 'getBalancerData', '_command_description': 'Get Balancer Data', 'raw_response': ["]\x05Ú\x02\x04\x04\x04h\x08PP/¥@(\x96\x90è5ì¨\x9f\x90¨V\x90¨\x96\x90\x88Ö\x90¨\x13ÈhSÈ\x88ßÈ(ÖÈ(ÅȨVȨßȨ\x1f\x180¢0@!0`h\x18\x91#\x18 \xa0a'\x98\xa0\x180\xa0s@À\x80\x80\x8a\x00\x0e\x8b\x00\x00\x8c\x00\x03\x8e\x16ê\x8f\x10ô\x90\x10^\x91\x10@\x92\x00\x05\x93\x0c\x1c\x94\x0c\x80\x95\x00\x05\x96\x01,\x97\x00*\x98\x00\x1e\x99\x00\x19\x9a\x00\x1e\x9b\x0fn\x9c\x00\n\x9d\x01\x9e\x00F\x9f\x00<\xa0\x00d¡\x00d¢\x00\x14£\x002¤\x00<¥\x00\x01¦\x00\x05§ÿì¨ÿö©\x0eª\x00\x00\x00\x15«\x01¬\x01\xad\x03I®\x01¯\x01°\x00\n±\x14²631790\x00\x00\x00\x00³\x00´Input Usµ2310¶\x00\x00S¼·11.XW_S11.271__¸\x00¹\x00\x00\x00\x15ºInput UserdaTestStandBMSÀ\x01\x00\x00\x00\x00h\x00\x00J\x81", ''], 'Cells_connected': [55.0, ''], 'Voltage_Cell01': [10.39, 'V'], 'Voltage_Cell02': [-6.091, 'V'], 'Voltage_Cell03': [-22.369, 'V'], 'Voltage_Cell04': [-22.442, 'V'], 'Voltage_Cell05': [-22.378, 'V'], 'Voltage_Cell06': [-30.506, 'V'], 'Voltage_Cell07': [-22.509, 'V'], 'Voltage_Cell08': [26.707, 'V'], 'Voltage_Cell09': [-30.497, 'V'], 'Voltage_Cell10': [10.454, 'V'], 'Voltage_Cell11': [10.437, 'V'], 'Voltage_Cell12': [-22.442, 'V'], 'Voltage_Cell13': [-22.305, 'V'], 'Voltage_Cell14': [-22.497, 'V'], 'Voltage_Cell15': [12.45, 'V'], 'Voltage_Cell16': [16.417, 'V'], 'MOS_Temp': [24680, '°C'], 'Battery_T1': [-28381, '°C'], 'Battery_T2': [8352, '°C'], 'Battery_Voltage': [101.36, 'V'], 'Battery_Current': [-61.92, 'A'], 'Percent_Remain': [115, '%'], 'Cycle_Count': [-32630, ''], 'Total_capacity': [243990528, 'Ahr'], 'Battery Warning Message': ['16ea', ''], 'Battery status information': ['10f4', ''], 'Balancer Active': [60, ''], 'Capacity Setting': [2885790979, 'Ahr'], 'Charge Enabled': [174, ''], 'Discharge Enabled': [175, '']}
2023-11-23 15:03:31,465:INFO:__init__:get_output@40: attempting to create output processor: screen
2023-11-23 15:03:31,466:INFO:screen:output@21: Using output processor: screen
Command: getBalancerData - Get Balancer Data
--------------------------------------------------------------------------------
Parameter                  Value            Unit
cells_connected            55.0                 
voltage_cell01             10.39            V   
voltage_cell02             -6.091           V   
voltage_cell03             -22.369          V   
voltage_cell04             -22.442          V   
voltage_cell05             -22.378          V   
voltage_cell06             -30.506          V   
voltage_cell07             -22.509          V   
voltage_cell08             26.707           V   
voltage_cell09             -30.497          V   
voltage_cell10             10.454           V   
voltage_cell11             10.437           V   
voltage_cell12             -22.442          V   
voltage_cell13             -22.305          V   
voltage_cell14             -22.497          V   
voltage_cell15             12.45            V   
voltage_cell16             16.417           V   
mos_temp                   24680            °C  
battery_t1                 -28381           °C  
battery_t2                 8352             °C  
battery_voltage            101.36           V   
battery_current            -61.92           A   
percent_remain             115              %   
cycle_count                -32630               
total_capacity             243990528        Ahr 
battery_warning_message    16ea                 
battery_status_information 10f4                 
balancer_active            60                   
capacity_setting           2885790979       Ahr 
charge_enabled             174                  
discharge_enabled          175                  
--------------------------------------------------------------------------------

Every run after that I get

$ .local/bin/jkbms -P jkserial -b 115000 -I
2023-11-23 15:19:50,087:INFO:__init__:main@216: Solar Device Command Utility, version: 0.16.13, python version: 3.10.12
2023-11-23 15:19:50,088:INFO:__init__:main@359: Creating device "unnamed" (type: "jkbms") on port "/dev/ttyUSB0 (porttype=None)" using protocol "jkserial"
2023-11-23 15:19:50,088:INFO:__init__:get_port@111: Using serialio for communications
2023-11-23 15:19:50,090:INFO:__init__:main@413: Looping 1 commands
2023-11-23 15:19:50,090:INFO:__init__:main@423: Getting results from device: jkbms device - name: unnamed, port: <mppsolar.inout.serialio.SerialIO object at 0x7f0bf6d326b0>, protocol: JKBMS TTL serial communication protocol handler for command: , tag: , outputs: screen
2023-11-23 15:19:50,090:INFO:device:run_command@51: Running command 
2023-11-23 15:19:50,090:INFO:device:run_command@81: full command bytearray(b'NW\x00\x13\x00\x00\x00\x00\x03\x03\x00\x00\x00\x00\x00\x00h\x00\x00\x01&') for command getBalancerData
2023-11-23 15:19:50,194:INFO:abstractprotocol:decode@246: response passed to decode: b'NW\x01\x1b\x00\x00\x00\x00\x03\x00\x01y*\x01\x0ea\x02\x0e_\x03\x0ee\x04\x0ed\x05\x0ee\x06\x0ed\x07\x0e4\x08\x0e3\t\x0ed\n\x0ea\x0b\x0eY\x0c\x0ee\r'
2023-11-23 15:19:50,194:INFO:abstractprotocol:decode@290: Processing response of type POSITIONAL
2023-11-23 15:19:50,196:INFO:protocol_helpers:BigHex2Short@144: Hex encoded value must be 2 bytes long. Was 0 length
2023-11-23 15:19:50,196:INFO:protocol_helpers:BigHex2Short@144: Hex encoded value must be 2 bytes long. Was 0 length
2023-11-23 15:19:50,197:INFO:protocol_helpers:BigHex2Short@144: Hex encoded value must be 2 bytes long. Was 0 length
2023-11-23 15:19:50,197:INFO:protocol_helpers:BigHex2Short@144: Hex encoded value must be 2 bytes long. Was 0 length
2023-11-23 15:19:50,197:INFO:protocol_helpers:BigHex2Short@144: Hex encoded value must be 2 bytes long. Was 0 length
2023-11-23 15:19:50,197:INFO:protocol_helpers:BigHex2Short@144: Hex encoded value must be 2 bytes long. Was 0 length
2023-11-23 15:19:50,198:INFO:protocol_helpers:BigHex2Short@144: Hex encoded value must be 2 bytes long. Was 0 length
2023-11-23 15:19:50,198:INFO:protocol_helpers:BigHex2Short@144: Hex encoded value must be 2 bytes long. Was 0 length
2023-11-23 15:19:50,198:INFO:protocol_helpers:BigHex2Short@144: Hex encoded value must be 2 bytes long. Was 0 length
Traceback (most recent call last):
  File "/home/jonathan/.local/bin/jkbms", line 8, in <module>
    sys.exit(main())
  File "/home/jonathan/.local/lib/python3.10/site-packages/mppsolar/__init__.py", line 426, in main
    results = _device.run_command(command=_command)
  File "/home/jonathan/.local/lib/python3.10/site-packages/mppsolar/devices/device.py", line 115, in run_command
    decoded_response = self._protocol.decode(raw_response, command)
  File "/home/jonathan/.local/lib/python3.10/site-packages/mppsolar/protocols/abstractprotocol.py", line 553, in decode
    processed_responses = self.process_response(
  File "/home/jonathan/.local/lib/python3.10/site-packages/mppsolar/protocols/abstractprotocol.py", line 209, in process_response
    r = eval(format_string)
  File "<string>", line 1, in <module>
  File "/home/jonathan/.local/lib/python3.10/site-packages/mppsolar/protocols/protocol_helpers.py", line 91, in Hex2Int
    answer = hexString[0]
IndexError: index out of range

Powering the BMS off with the button and turning it back on I get the initial response and then everything after that is the second example response.

The Victron BMS driver from https://github.com/Louisvdw/dbus-serialbattery/issues/29 seems to be working but the BMS is blocking charge and discharge. Not by disabling a Victron charger but in the BMS itself as it won't take anything from a bench power supply even when not connected to the RPI. Everything looks fine in the app so I figured we'd try a different piece of software to troubleshoot.

jblance commented 9 months ago

you are getting incomplete results from the BMS - likely due to the serial input/output logic you'd need to use jkbms -P jkserial -b 115000 -I --porttype dalyserial

jblance commented 8 months ago

Use --porttype serial

On Sun, 3 Mar 2024, 6:59 pm geobitus, @.***> wrote:

Hardware: R_pi4 with CAN/RS485 hut connected trough 485 bus to a JK_B2A8S20P hw V11.XW sw V11.261H using CAN/RS485 port configured for CAN protocol (the RS485 protocol doesn't return anything, maybe the JK messed up the CAN/RS485 ticks).

On my system the hut native port is: /dev/ttyS0 wich is not recognized by the script so for be abble to access it I do a dirty but fast " mv /dev/ttyS0 /dev/ttyUSB0 "

mppsolar -p /dev/ttyUSB0 -P jkserial -D

2024-03-03 @.: Solar Device Command Utility, version: 0.16.27-dev, python version: 3.11.2 2024-03-03 @. https://github.com/29: mqttbroker config: {'name': 'localhost', 'port': 1883, 'user': None, 'pass': None} 2024-03-03 @.: MqttBroker name: localhost, port: 1883, user: None 2024-03-03 @.: udp port 5555 2024-03-03 @.: Using Postgres None 2024-03-03 @.: Using Mongo None with mppsolar 2024-03-03 @.: Creating device "unnamed" (type: "mppsolar") on port "/dev/ttyUSB0 (porttype=None)" using protocol "jkserial" 2024-03-03 @.: device_class <class 'mppsolar.devices.mppsolar.mppsolar'> 2024-03-03 @. https://github.com/34: init args () 2024-03-03 @. https://github.com/35: init kwargs {'name': 'unnamed', 'port': '/dev/ttyUSB0', 'protocol': 'jkserial', 'baud': 2400, 'porttype': None, 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0x7f933c1dd0>, 'udp_port': 5555, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': ' http://localhost:9091/metrics/job/pushgateway'} 2024-03-03 @.: port matches ttyusb 2024-03-03 @.: Using serialio for communications 2024-03-03 @.: Protocol jkserial 2024-03-03 @. https://github.com/39: init name unnamed, port <mppsolar.inout.serialio.SerialIO object at 0x7f9382a6d0>, protocol JKBMS TTL serial communication protocol handler 2024-03-03 @.: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0x7f92c57490>, '', '', 'screen', None, None)] 2024-03-03 @.: Looping 1 commands 2024-03-03 @.: Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.inout.serialio.SerialIO object at 0x7f9382a6d0>, protocol: JKBMS TTL serial communication protocol handler for command: , tag: , outputs: screen 2024-03-03 @.: Running command 2024-03-03 @.: Using protocol b'JKSERIAL' with 1 commands 2024-03-03 @.: Processing command 'getBalancerData' 2024-03-03 @.: Found command getBalancerData in protocol b'JKSERIAL' 2024-03-03 @.: cmd with crc: bytearray(b'NW\x00\x13\x00\x00\x00\x00\x03\x03\x00\x00\x00\x00\x00\x00h\x00\x00\x01&') 2024-03-03 @.: full command bytearray(b'NW\x00\x13\x00\x00\x00\x00\x03\x03\x00\x00\x00\x00\x00\x00h\x00\x00\x01&') for command getBalancerData 2024-03-03 @.: Processing command 'getBalancerData' 2024-03-03 @.: Found command getBalancerData in protocol b'JKSERIAL' 2024-03-03 @.: port /dev/ttyUSB0, baudrate 2400 2024-03-03 @.: Executing command via serialio... 2024-03-03 @.: serial response was: b'\xfc\xff\x94GBT\xceD\xc7U\xcfDG\x0eT\xceD\xc7U\xcfDG\x86T^\xceD\xc7U\xcfD\xc7\x86T^\xceD\xc7U\xcfD\xc7LD\xcfDFBU\xcfD\xc7LL\xcfDFBU\xcfD\xc7LL\xcfDGBT\xcfD\xc7LL\xcfDGBT\xceD\xc7LL\xcfDGBT\xceD\xc7LL\xcfDGBT\xceD\xc7U\xcfDG\x86T\xceD\xc7U\xcfDG\x86T^\xceD\xc7U\xcfD\xc7\x86T^\xceD\xc7U\xcfD\xc7LD\xcfDFBU\xcfD\xc7LL\xcfDFBU\xcfD\xc7LL\xcfDGBT\xcfD\xc7LL\xcfDGBT\xceD\xc7LL\xcfDGBT' 2024-03-03 @.: Send and Receive Response b'\xfc\xff\x94GBT\xceD\xc7U\xcfDG\x0eT\xceD\xc7U\xcfDG\x86T^\xceD\xc7U\xcfD\xc7\x86T^\xceD\xc7U\xcfD\xc7LD\xcfDFBU\xcfD\xc7LL\xcfDFBU\xcfD\xc7LL\xcfDGBT\xcfD\xc7LL\xcfDGBT\xceD\xc7LL\xcfDGBT\xceD\xc7LL\xcfDGBT\xceD\xc7U\xcfDG\x86T\xceD\xc7U\xcfDG\x86T^\xceD\xc7U\xcfD\xc7\x86T^\xceD\xc7U\xcfD\xc7LD\xcfDFBU\xcfD\xc7LL\xcfDFBU\xcfD\xc7LL\xcfDGBT\xcfD\xc7LL\xcfDGBT\xceD\xc7LL\xcfDGBT' 2024-03-03 @.: response passed to decode: b'\xfc\xff\x94GBT\xceD\xc7U\xcfDG\x0eT\xceD\xc7U\xcfDG\x86T^\xceD\xc7U\xcfD\xc7\x86T^\xceD\xc7U\xcfD\xc7LD\xcfDFBU\xcfD\xc7LL\xcfDFBU\xcfD\xc7LL\xcfDGBT\xcfD\xc7LL\xcfDGBT\xceD\xc7LL\xcfDGBT\xceD\xc7LL\xcfDGBT\xceD\xc7U\xcfDG\x86T\xceD\xc7U\xcfDG\x86T^\xceD\xc7U\xcfD\xc7\x86T^\xceD\xc7U\xcfD\xc7LD\xcfDFBU\xcfD\xc7LL\xcfDFBU\xcfD\xc7LL\xcfDGBT\xcfD\xc7LL\xcfDGBT\xceD\xc7LL\xcfDGBT' 2024-03-03 @.: Processing command 'getBalancerData' 2024-03-03 @.: Found command getBalancerData in protocol b'JKSERIAL' 2024-03-03 @.: Processing response of type POSITIONAL 2024-03-03 @.: get_responses: responses [b'\xfc\xff\x94GBT\xceD\xc7U', b'\', b'\xcf', b'D', b'G\x0e', b'T', b'\xce', b'D', b'\xc7U', b'\', b'\xcfD', b'G', b'\x86T', b'^', b'\xceD', b'\xc7', b'U\', b'\xcf', b'D\xc7', b'\x86', b'T^', b'\xce', b'D\xc7', b'U', b'\xcf', b'D', b'\xc7L', b'D', b'\xcfD', b'F', b'BU', b'\', b'\xcfD', b'\xc7', b'LL', b'\xcf', b'DF', b'B', b'U\', b'\xcf', b'D\xc7', b'L', b'L\xcf', b'D', b'GB', b'T', b'\', b'\xcfD', b'\xc7', b'LL', b'\xcf', b'DGBT', b'\xceD', b'\xc7', b'LL', b'\xcf', b'DG', b'BT\xceD\xc7LL\xcfDGBT\xceD\xc7U\xcfDG\x86T\xceD\xc7U\xcfDG\x86T^\xceD\xc7U\xcfD\xc7\x86', b'T', b'^', b'\xceD\xc7U\xcfD\xc7LD\xcfDFBU\xcfD\xc7LL', b'\xcfDFBU\xcfD\xc7LL\xcf', b'DG', b'B', b'T\xcfD', b'\xc7', b'L', b'L', b'\xcf', b'DGBT\xceD\xc7LL\xcfDGBT'] 2024-03-03 @.: trimmed and split responses: [b'\xfc\xff\x94GBT\xceD\xc7U', b'\', b'\xcf', b'D', b'G\x0e', b'T', b'\xce', b'D', b'\xc7U', b'\', b'\xcfD', b'G', b'\x86T', b'^', b'\xceD', b'\xc7', b'U\', b'\xcf', b'D\xc7', b'\x86', b'T^', b'\xce', b'D\xc7', b'U', b'\xcf', b'D', b'\xc7L', b'D', b'\xcfD', b'F', b'BU', b'\', b'\xcfD', b'\xc7', b'LL', b'\xcf', b'DF', b'B', b'U\', b'\xcf', b'D\xc7', b'L', b'L\xcf', b'D', b'GB', b'T', b'\', b'\xcfD', b'\xc7', b'LL', b'\xcf', b'DGBT', b'\xceD', b'\xc7', b'LL', b'\xcf', b'DG', b'BT\xceD\xc7LL\xcfDGBT\xceD\xc7U\xcfDG\x86T\xceD\xc7U\xcfDG\x86T^\xceD\xc7U\xcfD\xc7\x86', b'T', b'^', b'\xceD\xc7U\xcfD\xc7LD\xcfDFBU\xcfD\xc7LL', b'\xcfDFBU\xcfD\xc7LL\xcf', b'DG', b'B', b'T\xcfD', b'\xc7', b'L', b'L', b'\xcf', b'DGBT\xceD\xc7LL\xcfDGBT'] 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 11, 'Packet header', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Packet header, raw_value b'\xfc\xff\x94GBT\xceD\xc7U' 2024-03-03 @.: Discarding Packet header:b'\xfc\xff\x94GBT\xceD\xc7U' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Cells connected', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Cells connected, raw_value b'\' 2024-03-03 @.: Discarding Cells connected:b'\' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['Hex2Int:r/3', 1, 'Cells_connected', ''] 2024-03-03 @.: Got template r/3 for Cells_connected b'\xcf' 2024-03-03 @.: Processing data_type: Hex2Int for data_name: Cells_connected, raw_value b'\xcf' 2024-03-03 @.: Processing format string Hex2Int(raw_value) 2024-03-03 @.: Hex b'\xcf' decoded to 207 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell01', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell01, raw_value b'D' 2024-03-03 @.: Discarding Voltage_Cell01:b'D' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell01', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell01 b'G\x0e' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell01, raw_value b'G\x0e' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'G\x0e' 2 byte decoded to 18190 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell02', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell02, raw_value b'T' 2024-03-03 @.: Discarding Voltage_Cell02:b'T' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell02', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell02 b'\xce' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell02, raw_value b'\xce' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'\xce' 2 byte decoded to 23758 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell03', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell03, raw_value b'D' 2024-03-03 @.: Discarding Voltage_Cell03:b'D' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell03', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell03 b'\xc7U' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell03, raw_value b'\xc7U' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'\xc7U' 2 byte decoded to -14507 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell04', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell04, raw_value b'\' 2024-03-03 @.: Discarding Voltage_Cell04:b'\' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell04', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell04 b'\xcfD' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell04, raw_value b'\xcfD' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'\xcfD' 2 byte decoded to -12476 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell05', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell05, raw_value b'G' 2024-03-03 @.: Discarding Voltage_Cell05:b'G' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell05', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell05 b'\x86T' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell05, raw_value b'\x86T' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'\x86T' 2 byte decoded to -31148 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell06', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell06, raw_value b'^' 2024-03-03 @.: Discarding Voltage_Cell06:b'^' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell06', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell06 b'\xceD' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell06, raw_value b'\xceD' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'\xceD' 2 byte decoded to -12732 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell07', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell07, raw_value b'\xc7' 2024-03-03 @.: Discarding Voltage_Cell07:b'\xc7' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell07', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell07 b'U\' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell07, raw_value b'U\' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'U\' 2 byte decoded to 21852 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell08', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell08, raw_value b'\xcf' 2024-03-03 @.: Discarding Voltage_Cell08:b'\xcf' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell08', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell08 b'D\xc7' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell08, raw_value b'D\xc7' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'D\xc7' 2 byte decoded to 17607 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell09', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell09, raw_value b'\x86' 2024-03-03 @.: Discarding Voltage_Cell09:b'\x86' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell09', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell09 b'T^' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell09, raw_value b'T^' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'T^' 2 byte decoded to 21598 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell10', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell10, raw_value b'\xce' 2024-03-03 @.: Discarding Voltage_Cell10:b'\xce' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell10', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell10 b'D\xc7' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell10, raw_value b'D\xc7' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'D\xc7' 2 byte decoded to 17607 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell11', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell11, raw_value b'U' 2024-03-03 @.: Discarding Voltage_Cell11:b'U' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell11', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell11 b'\xcf' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell11, raw_value b'\xcf' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'\xcf' 2 byte decoded to 23759 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell12', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell12, raw_value b'D' 2024-03-03 @.: Discarding Voltage_Cell12:b'D' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell12', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell12 b'\xc7L' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell12, raw_value b'\xc7L' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'\xc7L' 2 byte decoded to -14516 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell13', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell13, raw_value b'D' 2024-03-03 @.: Discarding Voltage_Cell13:b'D' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell13', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell13 b'\xcfD' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell13, raw_value b'\xcfD' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'\xcfD' 2 byte decoded to -12476 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell14', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell14, raw_value b'F' 2024-03-03 @.: Discarding Voltage_Cell14:b'F' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell14', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell14 b'BU' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell14, raw_value b'BU' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'BU' 2 byte decoded to 16981 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell15', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell15, raw_value b'\' 2024-03-03 @.: Discarding Voltage_Cell15:b'\' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell15', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell15 b'\xcfD' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell15, raw_value b'\xcfD' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'\xcfD' 2 byte decoded to -12476 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Voltage_Cell16', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Voltage_Cell16, raw_value b'\xc7' 2024-03-03 @.: Discarding Voltage_Cell16:b'\xc7' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell16', 'V'] 2024-03-03 @.: Got template r/1000 for Voltage_Cell16 b'LL' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Voltage_Cell16, raw_value b'LL' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'LL' 2 byte decoded to 19532 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'MOS_Temp', ''] 2024-03-03 @.: Processing data_type: discard for data_name: MOS_Temp, raw_value b'\xcf' 2024-03-03 @.: Discarding MOS_Temp:b'\xcf' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short', 2, 'MOS_Temp', '°C'] 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: MOS_Temp, raw_value b'DF' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'DF' 2 byte decoded to 17478 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Battery_T1', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Battery_T1, raw_value b'B' 2024-03-03 @.: Discarding Battery_T1:b'B' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short', 2, 'Battery_T1', '°C'] 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Battery_T1, raw_value b'U\' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'U\' 2 byte decoded to 21852 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Battery_T2', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Battery_T2, raw_value b'\xcf' 2024-03-03 @.: Discarding Battery_T2:b'\xcf' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short', 2, 'Battery_T2', '°C'] 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Battery_T2, raw_value b'D\xc7' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'D\xc7' 2 byte decoded to 17607 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Battery_Voltage', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Battery_Voltage, raw_value b'L' 2024-03-03 @.: Discarding Battery_Voltage:b'L' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:r/100', 2, 'Battery_Voltage', 'V'] 2024-03-03 @.: Got template r/100 for Battery_Voltage b'L\xcf' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Battery_Voltage, raw_value b'L\xcf' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'L\xcf' 2 byte decoded to 19663 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Battery_Current', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Battery_Current, raw_value b'D' 2024-03-03 @.: Discarding Battery_Current:b'D' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short:(r&0x7FFF)/100(((r&0x8000)>>15) 2-1)', 2, 'Battery_Current', 'A'] 2024-03-03 @.: Got template (r&0x7FFF)/100(((r&0x8000)>>15)2-1) for Battery_Current b'GB' 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Battery_Current, raw_value b'GB' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'GB' 2 byte decoded to 18242 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Percent_Remain', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Percent_Remain, raw_value b'T' 2024-03-03 @.: Discarding Percent_Remain:b'T' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['Hex2Int', 1, 'Percent_Remain', '%'] 2024-03-03 @.: Processing data_type: Hex2Int for data_name: Percent_Remain, raw_value b'\' 2024-03-03 @.: Processing format string Hex2Int(raw_value) 2024-03-03 @.: Hex b'\' decoded to 92 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 2, 'Number of battery sensors', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Number of battery sensors, raw_value b'\xcfD' 2024-03-03 @.: Discarding Number of battery sensors:b'\xcfD' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Cycle_Count', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Cycle_Count, raw_value b'\xc7' 2024-03-03 @.: Discarding Cycle_Count:b'\xc7' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Short', 2, 'Cycle_Count', ''] 2024-03-03 @.: Processing data_type: BigHex2Short for data_name: Cycle_Count, raw_value b'LL' 2024-03-03 @.: Processing format string BigHex2Short(raw_value) 2024-03-03 @.: Hex b'LL' 2 byte decoded to 19532 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Total_capacity', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Total_capacity, raw_value b'\xcf' 2024-03-03 @.: Discarding Total_capacity:b'\xcf' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Float', 4, 'Total_capacity', 'Ahr'] 2024-03-03 @.: Processing data_type: BigHex2Float for data_name: Total_capacity, raw_value b'DGBT' 2024-03-03 @.: Processing format string BigHex2Float(raw_value) 2024-03-03 @.: Hex b'DGBT' 4 byte decoded to 1145520724 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 3, 'Total number of battery strings', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Total number of battery strings, raw_value b'\xceD' 2024-03-03 @.: Discarding Total number of battery strings:b'\xceD' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Battery Warning Message', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Battery Warning Message, raw_value b'\xc7' 2024-03-03 @.: Discarding Battery Warning Message:b'\xc7' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['Hex2Str', 2, 'Battery Warning Message', ''] 2024-03-03 @.: Processing data_type: Hex2Str for data_name: Battery Warning Message, raw_value b'LL' 2024-03-03 @.: Processing format string Hex2Str(raw_value) 2024-03-03 @.: Hex b'LL' decoded to 4c4c 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Battery status information', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Battery status information, raw_value b'\xcf' 2024-03-03 @.: Discarding Battery status information:b'\xcf' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['Hex2Str', 2, 'Battery status information', ''] 2024-03-03 @.: Processing data_type: Hex2Str for data_name: Battery status information, raw_value b'DG' 2024-03-03 @.: Processing format string Hex2Str(raw_value) 2024-03-03 @.: Hex b'DG' decoded to 4447 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 45, 'settings', ''] 2024-03-03 @.: Processing data_type: discard for data_name: settings, raw_value b'BT\xceD\xc7LL\xcfDGBT\xceD\xc7U\xcfDG\x86T\xceD\xc7U\xcfDG\x86T^\xceD\xc7U\xcfD\xc7\x86' 2024-03-03 @.: Discarding settings:b'BT\xceD\xc7LL\xcfDGBT\xceD\xc7U\xcfDG\x86T\xceD\xc7U\xcfDG\x86T^\xceD\xc7U\xcfD\xc7\x86' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Balancer Active', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Balancer Active, raw_value b'T' 2024-03-03 @.: Discarding Balancer Active:b'T' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['Hex2Int', 1, 'Balancer Active', ''] 2024-03-03 @.: Processing data_type: Hex2Int for data_name: Balancer Active, raw_value b'^' 2024-03-03 @.: Processing format string Hex2Int(raw_value) 2024-03-03 @.: Hex b'^' decoded to 94 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 21, 'more settings', ''] 2024-03-03 @.: Processing data_type: discard for data_name: more settings, raw_value b'\xceD\xc7U\xcfD\xc7LD\xcfDFBU\xcfD\xc7LL' 2024-03-03 @.: Discarding more settings:b'\xceD\xc7U\xcfD\xc7LD\xcfDFBU\xcfD\xc7LL' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 12, 'temp settings', ''] 2024-03-03 @.: Processing data_type: discard for data_name: temp settings, raw_value b'\xcfDFBU\xcfD\xc7LL\xcf' 2024-03-03 @.: Discarding temp settings:b'\xcfDFBU\xcfD\xc7LL\xcf' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 2, 'string count', ''] 2024-03-03 @.: Processing data_type: discard for data_name: string count, raw_value b'DG' 2024-03-03 @.: Discarding string count:b'DG' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Capacity Setting', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Capacity Setting, raw_value b'B' 2024-03-03 @.: Discarding Capacity Setting:b'B' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['BigHex2Float', 4, 'Capacity Setting', 'Ahr'] 2024-03-03 @.: Processing data_type: BigHex2Float for data_name: Capacity Setting, raw_value b'T\xcfD' 2024-03-03 @.: Processing format string BigHex2Float(raw_value) 2024-03-03 @.: Hex b'T\xcfD' 4 byte decoded to 1415368516 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Charge Enabled', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Charge Enabled, raw_value b'\xc7' 2024-03-03 @.: Discarding Charge Enabled:b'\xc7' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['Hex2Int', 1, 'Charge Enabled', ''] 2024-03-03 @.: Processing data_type: Hex2Int for data_name: Charge Enabled, raw_value b'L' 2024-03-03 @.: Processing format string Hex2Int(raw_value) 2024-03-03 @.: Hex b'L' decoded to 76 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 1, 'Discharge Enabled', ''] 2024-03-03 @.: Processing data_type: discard for data_name: Discharge Enabled, raw_value b'L' 2024-03-03 @.: Discarding Discharge Enabled:b'L' 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['Hex2Int', 1, 'Discharge Enabled', ''] 2024-03-03 @.: Processing data_type: Hex2Int for data_name: Discharge Enabled, raw_value b'\xcf' 2024-03-03 @.: Processing format string Hex2Int(raw_value) 2024-03-03 @.: Hex b'\xcf' decoded to 207 2024-03-03 @.: Processing POSITIONAL type responses 2024-03-03 @.: Got defn ['discard', 116, 'remaining data', ''] 2024-03-03 @.: Processing data_type: discard for data_name: remaining data, raw_value b'DGBT\xceD\xc7LL\xcfDGBT' 2024-03-03 @.: Discarding remaining data:b'DGBT\xceD\xc7LL\xcfDGBT' 2024-03-03 @.: Decoded response {'_command': 'getBalancerData', '_command_description': 'Get Balancer Data', 'raw_response': ['üÿ\x94GBT\ÎDÇU\ÏDG\x0eT\ÎDÇU\ÏDG\x86T^ÎDÇU\ÏDÇ\x86T^ÎDÇU\ÏDÇLDÏDFBU\ÏDÇLLÏDFBU\ÏDÇLLÏDGBT\ÏDÇLLÏDGBT\ÎDÇLLÏDGBT\ÎDÇLLÏDGBT\ÎDÇU\ÏDG\x86T\ÎDÇU\ÏDG\x86T^ÎDÇU\ÏDÇ\x86T^ÎDÇU\ÏDÇLDÏDFBU\ÏDÇLLÏDFBU\ÏDÇLLÏDGBT\ÏDÇLLÏDGBT\ÎDÇLLÏDGBT', ''], 'Cells_connected': [69.0, ''], 'Voltage_Cell01': [18.19, 'V'], 'Voltage_Cell02': [23.758, 'V'], 'Voltage_Cell03': [-14.507, 'V'], 'Voltage_Cell04': [-12.476, 'V'], 'Voltage_Cell05': [-31.148, 'V'], 'Voltage_Cell06': [-12.732, 'V'], 'Voltage_Cell07': [21.852, 'V'], 'Voltage_Cell08': [17.607, 'V'], 'Voltage_Cell09': [21.598, 'V'], 'Voltage_Cell10': [17.607, 'V'], 'Voltage_Cell11': [23.759, 'V'], 'Voltage_Cell12': [-14.516, 'V'], 'Voltage_Cell13': [-12.476, 'V'], 'Voltage_Cell14': [16.981, 'V'], 'Voltage_Cell15': [-12.476, 'V'], 'Voltage_Cell16': [19.532, 'V'], 'MOS_Temp': [17478, '°C'], 'Battery_T1': [21852, '°C'], 'Battery_T2': [17607, '°C'], 'Battery_Voltage': [196.63, 'V'], 'Battery_Current': [-182.42, 'A'], 'Percent_Remain': [92, '%'], 'Cycle_Count': [19532, ''], 'Total_capacity': [1145520724, 'Ahr'], 'Battery Warning Message': ['4c4c', ''], 'Battery status information': ['4447', ''], 'Balancer Active': [94, ''], 'Capacity Setting': [1415368516, 'Ahr'], 'Charge Enabled': [76, ''], 'Discharge Enabled': [207, '']} 2024-03-03 @.: results: {'_command': 'getBalancerData', '_command_description': 'Get Balancer Data', 'raw_response': ['üÿ\x94GBT\ÎDÇU\ÏDG\x0eT\ÎDÇU\ÏDG\x86T^ÎDÇU\ÏDÇ\x86T^ÎDÇU\ÏDÇLDÏDFBU\ÏDÇLLÏDFBU\ÏDÇLLÏDGBT\ÏDÇLLÏDGBT\ÎDÇLLÏDGBT\ÎDÇLLÏDGBT\ÎDÇU\ÏDG\x86T\ÎDÇU\ÏDG\x86T^ÎDÇU\ÏDÇ\x86T^ÎDÇU\ÏDÇLDÏDFBU\ÏDÇLLÏDFBU\ÏDÇLLÏDGBT\ÏDÇLLÏDGBT\ÎDÇLLÏDGBT', ''], 'Cells_connected': [69.0, ''], 'Voltage_Cell01': [18.19, 'V'], 'Voltage_Cell02': [23.758, 'V'], 'Voltage_Cell03': [-14.507, 'V'], 'Voltage_Cell04': [-12.476, 'V'], 'Voltage_Cell05': [-31.148, 'V'], 'Voltage_Cell06': [-12.732, 'V'], 'Voltage_Cell07': [21.852, 'V'], 'Voltage_Cell08': [17.607, 'V'], 'Voltage_Cell09': [21.598, 'V'], 'Voltage_Cell10': [17.607, 'V'], 'Voltage_Cell11': [23.759, 'V'], 'Voltage_Cell12': [-14.516, 'V'], 'Voltage_Cell13': [-12.476, 'V'], 'Voltage_Cell14': [16.981, 'V'], 'Voltage_Cell15': [-12.476, 'V'], 'Voltage_Cell16': [19.532, 'V'], 'MOS_Temp': [17478, '°C'], 'Battery_T1': [21852, '°C'], 'Battery_T2': [17607, '°C'], 'Battery_Voltage': [196.63, 'V'], 'Battery_Current': [-182.42, 'A'], 'Percent_Remain': [92, '%'], 'Cycle_Count': [19532, ''], 'Total_capacity': [1145520724, 'Ahr'], 'Battery Warning Message': ['4c4c', ''], 'Battery status information': ['4447', ''], 'Balancer Active': [94, ''], 'Capacity Setting': [1415368516, 'Ahr'], 'Charge Enabled': [76, ''], 'Discharge Enabled': [207, '']} 2024-03-03 @.: attempting to create output processor: screen 2024-03-03 @. https://github.com/17: processor.screen init args: (), kwargs: {} 2024-03-03 @.: Using output filter: None 2024-03-03 @.: Using output processor: screen 2024-03-03 @.: kwargs {'data': {'_command': 'getBalancerData', '_command_description': 'Get Balancer Data', 'raw_response': ['üÿ\x94GBT\ÎDÇU\ÏDG\x0eT\ÎDÇU\ÏDG\x86T^ÎDÇU\ÏDÇ\x86T^ÎDÇU\ÏDÇLDÏDFBU\ÏDÇLLÏDFBU\ÏDÇLLÏDGBT\ÏDÇLLÏDGBT\ÎDÇLLÏDGBT\ÎDÇLLÏDGBT\ÎDÇU\ÏDG\x86T\ÎDÇU\ÏDG\x86T^ÎDÇU\ÏDÇ\x86T^ÎDÇU\ÏDÇLDÏDFBU\ÏDÇLLÏDFBU\ÏDÇLLÏDGBT\ÏDÇLLÏDGBT\ÎDÇLLÏDGBT', ''], 'Cells_connected': [69.0, ''], 'Voltage_Cell01': [18.19, 'V'], 'Voltage_Cell02': [23.758, 'V'], 'Voltage_Cell03': [-14.507, 'V'], 'Voltage_Cell04': [-12.476, 'V'], 'Voltage_Cell05': [-31.148, 'V'], 'Voltage_Cell06': [-12.732, 'V'], 'Voltage_Cell07': [21.852, 'V'], 'Voltage_Cell08': [17.607, 'V'], 'Voltage_Cell09': [21.598, 'V'], 'Voltage_Cell10': [17.607, 'V'], 'Voltage_Cell11': [23.759, 'V'], 'Voltage_Cell12': [-14.516, 'V'], 'Voltage_Cell13': [-12.476, 'V'], 'Voltage_Cell14': [16.981, 'V'], 'Voltage_Cell15': [-12.476, 'V'], 'Voltage_Cell16': [19.532, 'V'], 'MOS_Temp': [17478, '°C'], 'Battery_T1': [21852, '°C'], 'Battery_T2': [17607, '°C'], 'Battery_Voltage': [196.63, 'V'], 'Battery_Current': [-182.42, 'A'], 'Percent_Remain': [92, '%'], 'Cycle_Count': [19532, ''], 'Total_capacity': [1145520724, 'Ahr'], 'Battery Warning Message': ['4c4c', ''], 'Battery status information': ['4447', ''], 'Balancer Active': [94, ''], 'Capacity Setting': [1415368516, 'Ahr'], 'Charge Enabled': [76, ''], 'Discharge Enabled': [207, '']}, 'tag': '', 'name': 'unnamed', 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0x7f933c1dd0>, 'udp_port': 5555, 'postgres_url': None, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': ' http://localhost:9091/metrics/job/pushgateway', 'mqtt_topic': None, 'filter': None, 'excl_filter': None, 'keep_case': False} 2024-03-03 @.: displayData: {'cells_connected': [69.0, ''], 'voltage_cell01': [18.19, 'V'], 'voltage_cell02': [23.758, 'V'], 'voltage_cell03': [-14.507, 'V'], 'voltage_cell04': [-12.476, 'V'], 'voltage_cell05': [-31.148, 'V'], 'voltage_cell06': [-12.732, 'V'], 'voltage_cell07': [21.852, 'V'], 'voltage_cell08': [17.607, 'V'], 'voltage_cell09': [21.598, 'V'], 'voltage_cell10': [17.607, 'V'], 'voltage_cell11': [23.759, 'V'], 'voltage_cell12': [-14.516, 'V'], 'voltage_cell13': [-12.476, 'V'], 'voltage_cell14': [16.981, 'V'], 'voltage_cell15': [-12.476, 'V'], 'voltage_cell16': [19.532, 'V'], 'mos_temp': [17478, '°C'], 'battery_t1': [21852, '°C'], 'battery_t2': [17607, '°C'], 'battery_voltage': [196.63, 'V'], 'battery_current': [-182.42, 'A'], 'percent_remain': [92, '%'], 'cycle_count': [19532, ''], 'total_capacity': [1145520724, 'Ahr'], 'battery_warning_message': ['4c4c', ''], 'battery_status_information': ['4447', ''], 'balancer_active': [94, ''], 'capacity_setting': [1415368516, 'Ahr'], 'charge_enabled': [76, ''], 'discharge_enabled': [207, '']} 2024-03-03 @.: Not daemon, so not looping Command: getBalancerData - Get Balancer Data Parameter Value Unit cells_connected 69.0 voltage_cell01 18.19 V voltage_cell02 23.758 V voltage_cell03 -14.507 V voltage_cell04 -12.476 V voltage_cell05 -31.148 V voltage_cell06 -12.732 V voltage_cell07 21.852 V voltage_cell08 17.607 V voltage_cell09 21.598 V voltage_cell10 17.607 V voltage_cell11 23.759 V voltage_cell12 -14.516 V voltage_cell13 -12.476 V voltage_cell14 16.981 V voltage_cell15 -12.476 V voltage_cell16 19.532 V mos_temp 17478 °C battery_t1 21852 °C battery_t2 17607 °C battery_voltage 196.63 V battery_current -182.42 A percent_remain 92 % cycle_count 19532 total_capacity 1145520724 Ahr battery_warning_message 4c4c battery_status_information 4447 balancer_active 94 capacity_setting 1415368516 Ahr charge_enabled 76 discharge_enabled 207

— Reply to this email directly, view it on GitHub https://github.com/jblance/mpp-solar/issues/342#issuecomment-1975053153, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVKNQCZGGIWVV6LHA3RSDYWK327AVCNFSM6AAAAAAXMXQJVGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZVGA2TGMJVGM . You are receiving this because you were mentioned.Message ID: @.***>

geobitus commented 8 months ago

Hardware: R_pi4 with CAN/RS485 hut connected trough 485 bus to a JK_B2A8S20P hw V11.XW sw V11.261H using CAN/RS485 port configured for CAN protocol (the RS485 protocol doesn't return anything, maybe the JK messed up the CAN/RS485 ticks).

On my system the hut native port is: /dev/ttyS0 wich is not recognized by the script so for be abble to access it I do a dirty but fast " mv /dev/ttyS0 /dev/ttyUSB0 "

mppsolar -p /dev/ttyUSB0 -P jkserial -D

jkserial.txt

jblance commented 8 months ago

looks like that baud rate is wrong, try 9600 or 115200

geobitus commented 8 months ago

9600 doesn't return any data.

jkbms -b 115200 -P jkserial --porttype serial >>115200_no_eol.txt (without 120 ohm terminator).

115200_no_eol.txt

jkbms -b 115200 -P jkserial --porttype serial >>115200_eol.txt (with 120 ohm terminator).

115200_eol.txt any further test idea will be much appreciated

jblance commented 8 months ago

oh, wait you are using the CAN protocol. I dont have any support for CAN (yet) maybe try rs485 again at different baud rates (and dont mv the port, just use the system location and specify the port type) also can you add the debug flag to the command -D and post the debug up to where is shows the response (or all of it)

On Tue, 5 Mar 2024 at 02:40, geobitus @.***> wrote:

9600 doesn't return any data. jkbms -b 115200 -P jkserial --porttype serial >>115200_no_eol.txt (without 120 ohm terminator)

115200_no_eol.txt https://github.com/jblance/mpp-solar/files/14482112/115200_no_eol.txt jkbms -b 115200 -P jkserial --porttype serial >>115200_eol.txt (with 120 ohm terminator)

115200_eol.txt https://github.com/jblance/mpp-solar/files/14482139/115200_eol.txt any further test idea will be much appreciated

— Reply to this email directly, view it on GitHub https://github.com/jblance/mpp-solar/issues/342#issuecomment-1976604691, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVKNUARUE3EBVAK7KNMF3YWR2TFAVCNFSM6AAAAAAXMXQJVGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZWGYYDINRZGE . You are receiving this because you were mentioned.Message ID: @.***>

geobitus commented 8 months ago

No success in getting any data so far. I ordered and wait to receive the JK485 adapters (both types) to see if that make any difference. Soonest I have any news I will post the results.

geobitus commented 8 months ago

Back on business. Now just for test the new hardware (jikong RS485 adapter connected to GPS port) using the printbms.py script I get: (mppsolar) geo@solarpi:~ $ python ./printbms.py Cell 1 : 3.358 V Cell 2 : 3.359 V Cell 3 : 3.359 V Cell 4 : 3.35 V Cell 5 : 3.357 V Cell 6 : 3.358 V Cell 7 : 3.353 V Cell 8 : 3.359 V Temp1: 14 ?C Temp2: 14 ?C Battery voltage: 26.85 V Current: 2.55 A Remaining capacity: 99 % mppsolar debug below: (mppsolar) geo@solarpi:~ $ mppsolar -p /dev/ttyS0 -P jkserial -b 115000 --porttype serial -D 2> dbg.txt dbg.txt

Update (mppsolar) geo@solarpi:~ $ mppsolar -p /dev/ttyS0 -b 115200 -P jkserial --porttype dalyserial -D > success.txt

2024-03-11 18:55:04,678:INFO:init:main@205: Solar Device Command Utility, version: 0.16.30-dev, python version: 3.11.2 2024-03-11 18:55:04,678:DEBUG:mqttbrokerc:init@29: mqttbroker config: {'name': 'localhost', 'port': 1883, 'user': None, 'pass': None} 2024-03-11 18:55:04,678:DEBUG:init:main@240: MqttBroker name: localhost, port: 1883, user: None 2024-03-11 18:55:04,679:DEBUG:init:main@242: udp port 5555 2024-03-11 18:55:04,679:DEBUG:init:main@244: Using Postgres None 2024-03-11 18:55:04,679:DEBUG:init:main@247: Using Mongo None with mppsolar 2024-03-11 18:55:04,679:INFO:init:main@358: Creating device "unnamed" (type: "mppsolar") on port "/dev/ttyS0 (porttype=dalyserial)" using protocol "jkserial" 2024-03-11 18:55:04,682:DEBUG:init:main@362: device_class <class 'mppsolar.devices.mppsolar.mppsolar'> 2024-03-11 18:55:04,682:DEBUG:device:init@34: init args () 2024-03-11 18:55:04,682:DEBUG:device:init@35: init kwargs {'name': 'unnamed', 'port': '/dev/ttyS0', 'protocol': 'jkserial', 'baud': 115200, 'porttype': 'dalyserial', 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0x7fafcbb190>, 'udp_port': 5555, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway'} 2024-03-11 18:55:04,682:INFO:init:get_port@81: Port overide - using port 'dalyserial' 2024-03-11 18:55:04,682:DEBUG:init:get_port_type@57: port matches daly 2024-03-11 18:55:04,682:INFO:init:get_port@117: Using dalyserialio for communications 2024-03-11 18:55:04,690:DEBUG:init:get_protocol@13: Protocol jkserial 2024-03-11 18:55:04,963:DEBUG:device:init@39: init name unnamed, port <mppsolar.inout.dalyserialio.DalySerialIO object at 0x7faf337490>, protocol JKBMS TTL serial communication protocol handler 2024-03-11 18:55:04,963:DEBUG:init:main@408: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0x7faf337310>, '', '', 'screen', None, None)] 2024-03-11 18:55:04,963:INFO:init:main@413: Looping 1 commands 2024-03-11 18:55:04,963:INFO:init:main@423: Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.inout.dalyserialio.DalySerialIO object at 0x7faf337490>, protocol: JKBMS TTL serial communication protocol handler for command: , tag: , outputs: screen 2024-03-11 18:55:04,963:INFO:device:run_command@51: Running command 2024-03-11 18:55:04,964:DEBUG:jkserial:get_full_command@117: Using protocol b'JKSERIAL' with 1 commands 2024-03-11 18:55:04,964:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'getBalancerData' 2024-03-11 18:55:04,964:DEBUG:abstractprotocol:get_command_defn@73: Found command getBalancerData in protocol b'JKSERIAL' 2024-03-11 18:55:04,964:DEBUG:jkserial:get_full_command@159: cmd with crc: bytearray(b'NW\x00\x13\x00\x00\x00\x00\x03\x03\x00\x00\x00\x00\x00\x00h\x00\x00\x01&') 2024-03-11 18:55:04,964:INFO:device:run_command@81: full command bytearray(b'NW\x00\x13\x00\x00\x00\x00\x03\x03\x00\x00\x00\x00\x00\x00h\x00\x00\x01&') for command getBalancerData 2024-03-11 18:55:04,964:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'getBalancerData' 2024-03-11 18:55:04,964:DEBUG:abstractprotocol:get_command_defn@73: Found command getBalancerData in protocol b'JKSERIAL' 2024-03-11 18:55:04,964:DEBUG:dalyserialio:send_and_receive@19: port /dev/ttyS0, baudrate 115200 2024-03-11 18:55:04,965:DEBUG:dalyserialio:send_and_receive@22: Executing command via dalyserialio... 2024-03-11 18:55:05,465:DEBUG:dalyserialio:send_and_receive@32: bytes waiting 267 2024-03-11 18:55:05,966:DEBUG:dalyserialio:send_and_receive@32: bytes waiting 0 2024-03-11 18:55:05,966:DEBUG:dalyserialio:send_and_receive@38: serial response was: b'NW\x01\t\x00\x00\x00\x00\x03\x00\x01y\x18\x01\x0c\xf6\x02\x0c\xf7\x03\x0c\xf7\x04\x0c\xf5\x05\x0c\xf6\x06\x0c\xf6\x07\x0c\xf5\x08\x0c\xf6\x80\x00\x15\x81\x00\x0f\x82\x00\x0f\x83\n^\x84\x01\xfe\x85b\x86\x02\x87\x00\x01\x89\x00\x00\x03Z\x8a\x00\x08\x8b\x00\x00\x8c\x00\x03\x8e\x0bP\x8f\x08 \x90\x0e)\x91\x0e\x10\x92\x00\x05\x93\n(\x94\nZ\x95\x00\x05\x96\x01,\x97\x00\xc8\x98\x01,\x99\x00d\x9a\x00\x1e\x9b\rz\x9c\x00\x05\x9d\x01\x9e\x00d\x9f\x00P\xa0\x00d\xa1\x00d\xa2\x00\x14\xa3\x00F\xa4\x00F\xa5\x00\x03\xa6\x00\x05\xa7\xff\xec\xa8\xff\xf6\xa9\x08\xaa\x00\x00\x02\xab\x01\xac\x01\xad\x03\xd6\xae\x01\xaf\x00\xb0\x00\n\xb1\x14\xb2000000\x00\x00\x00\x00\xb3\x00\xb4BMS2\x00\x00\x00\x00\xb52402\xb6\x00\x00\xaa\xa5\xb711.XW_S11.261H_\xb8\x00\xb9\x00\x00\x02\xbaBMS2\x00\x00\x00\x00\x00\x00\x00\x00BMS2\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x01\x00\x00\x00\x00h\x00\x00E\xc9' 2024-03-11 18:55:05,966:DEBUG:device:run_command@98: Send and Receive Response b'NW\x01\t\x00\x00\x00\x00\x03\x00\x01y\x18\x01\x0c\xf6\x02\x0c\xf7\x03\x0c\xf7\x04\x0c\xf5\x05\x0c\xf6\x06\x0c\xf6\x07\x0c\xf5\x08\x0c\xf6\x80\x00\x15\x81\x00\x0f\x82\x00\x0f\x83\n^\x84\x01\xfe\x85b\x86\x02\x87\x00\x01\x89\x00\x00\x03Z\x8a\x00\x08\x8b\x00\x00\x8c\x00\x03\x8e\x0bP\x8f\x08 \x90\x0e)\x91\x0e\x10\x92\x00\x05\x93\n(\x94\nZ\x95\x00\x05\x96\x01,\x97\x00\xc8\x98\x01,\x99\x00d\x9a\x00\x1e\x9b\rz\x9c\x00\x05\x9d\x01\x9e\x00d\x9f\x00P\xa0\x00d\xa1\x00d\xa2\x00\x14\xa3\x00F\xa4\x00F\xa5\x00\x03\xa6\x00\x05\xa7\xff\xec\xa8\xff\xf6\xa9\x08\xaa\x00\x00\x02\xab\x01\xac\x01\xad\x03\xd6\xae\x01\xaf\x00\xb0\x00\n\xb1\x14\xb2000000\x00\x00\x00\x00\xb3\x00\xb4BMS2\x00\x00\x00\x00\xb52402\xb6\x00\x00\xaa\xa5\xb711.XW_S11.261H_\xb8\x00\xb9\x00\x00\x02\xbaBMS2\x00\x00\x00\x00\x00\x00\x00\x00BMS2\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x01\x00\x00\x00\x00h\x00\x00E\xc9' 2024-03-11 18:55:05,967:INFO:abstractprotocol:decode@236: response passed to decode: b'NW\x01\t\x00\x00\x00\x00\x03\x00\x01y\x18\x01\x0c\xf6\x02\x0c\xf7\x03\x0c\xf7\x04\x0c\xf5\x05\x0c\xf6\x06\x0c\xf6\x07\x0c\xf5\x08\x0c\xf6\x80\x00\x15\x81\x00\x0f\x82\x00\x0f\x83\n^\x84\x01\xfe\x85b\x86\x02\x87\x00\x01\x89\x00\x00\x03Z\x8a\x00\x08\x8b\x00\x00\x8c\x00\x03\x8e\x0bP\x8f\x08 \x90\x0e)\x91\x0e\x10\x92\x00\x05\x93\n(\x94\nZ\x95\x00\x05\x96\x01,\x97\x00\xc8\x98\x01,\x99\x00d\x9a\x00\x1e\x9b\rz\x9c\x00\x05\x9d\x01\x9e\x00d\x9f\x00P\xa0\x00d\xa1\x00d\xa2\x00\x14\xa3\x00F\xa4\x00F\xa5\x00\x03\xa6\x00\x05\xa7\xff\xec\xa8\xff\xf6\xa9\x08\xaa\x00\x00\x02\xab\x01\xac\x01\xad\x03\xd6\xae\x01\xaf\x00\xb0\x00\n\xb1\x14\xb2000000\x00\x00\x00\x00\xb3\x00\xb4BMS2\x00\x00\x00\x00\xb52402\xb6\x00\x00\xaa\xa5\xb711.XW_S11.261H_\xb8\x00\xb9\x00\x00\x02\xbaBMS2\x00\x00\x00\x00\x00\x00\x00\x00BMS2\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x01\x00\x00\x00\x00h\x00\x00E\xc9' 2024-03-11 18:55:05,967:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'getBalancerData' 2024-03-11 18:55:05,967:DEBUG:abstractprotocol:get_command_defn@73: Found command getBalancerData in protocol b'JKSERIAL' 2024-03-11 18:55:05,967:INFO:abstractprotocol:decode@280: Processing response of type POSITIONAL 2024-03-11 18:55:05,967:DEBUG:jkserial:get_responses@187: get_responses: responses [b'NW\x01\t\x00\x00\x00\x00\x03\x00\x01', b'y', b'\x18', b'\x01', b'\x0c\xf6', b'\x02', b'\x0c\xf7', b'\x03', b'\x0c\xf7', b'\x04', b'\x0c\xf5', b'\x05', b'\x0c\xf6', b'\x06', b'\x0c\xf6', b'\x07', b'\x0c\xf5', b'\x08', b'\x0c\xf6', b'\x80', b'\x00\x15', b'\x81', b'\x00\x0f', b'\x82', b'\x00\x0f', b'\x83', b'\n^', b'\x84', b'\x01\xfe', b'\x85', b'b\x86', b'\x02', b'\x87\x00', b'\x01', b'\x89\x00', b'\x00', b'\x03Z', b'\x8a', b'\x00\x08', b'\x8b', b'\x00\x00', b'\x8c', b'\x00\x03', b'\x8e', b'\x0bP', b'\x8f', b'\x08', b' \x90', b'\x0e', b')\x91', b'\x0e', b'\x10\x92\x00\x05', b'\x93\n(', b'\x94', b'\nZ', b'\x95', b'\x00\x05', b'\x96\x01,\x97\x00\xc8\x98\x01,\x99\x00d\x9a\x00\x1e\x9b\rz\x9c\x00\x05\x9d\x01\x9e\x00d\x9f\x00P\xa0\x00d\xa1\x00d\xa2\x00\x14\xa3\x00F\xa4\x00F\xa5', b'\x00', b'\x03', b'\xa6\x00\x05\xa7\xff\xec\xa8\xff\xf6\xa9\x08\xaa\x00\x00\x02\xab\x01\xac\x01\xad', b'\x03\xd6\xae\x01\xaf\x00\xb0\x00\n\xb1\x14\xb2', b'00', b'0', b'000\x00', b'\x00', b'\x00', b'\x00', b'\xb3', b'\x00\xb4BMS2\x00\x00\x00\x00\xb52402\xb6\x00\x00\xaa\xa5\xb711.XW_S11.261H_\xb8\x00\xb9\x00\x00\x02\xbaBMS2\x00\x00\x00\x00\x00\x00\x00\x00BMS2\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x01\x00\x00\x00\x00h\x00\x00E\xc9'] 2024-03-11 18:55:05,967:DEBUG:abstractprotocol:decode@284: trimmed and split responses: [b'NW\x01\t\x00\x00\x00\x00\x03\x00\x01', b'y', b'\x18', b'\x01', b'\x0c\xf6', b'\x02', b'\x0c\xf7', b'\x03', b'\x0c\xf7', b'\x04', b'\x0c\xf5', b'\x05', b'\x0c\xf6', b'\x06', b'\x0c\xf6', b'\x07', b'\x0c\xf5', b'\x08', b'\x0c\xf6', b'\x80', b'\x00\x15', b'\x81', b'\x00\x0f', b'\x82', b'\x00\x0f', b'\x83', b'\n^', b'\x84', b'\x01\xfe', b'\x85', b'b\x86', b'\x02', b'\x87\x00', b'\x01', b'\x89\x00', b'\x00', b'\x03Z', b'\x8a', b'\x00\x08', b'\x8b', b'\x00\x00', b'\x8c', b'\x00\x03', b'\x8e', b'\x0bP', b'\x8f', b'\x08', b' \x90', b'\x0e', b')\x91', b'\x0e', b'\x10\x92\x00\x05', b'\x93\n(', b'\x94', b'\nZ', b'\x95', b'\x00\x05', b'\x96\x01,\x97\x00\xc8\x98\x01,\x99\x00d\x9a\x00\x1e\x9b\rz\x9c\x00\x05\x9d\x01\x9e\x00d\x9f\x00P\xa0\x00d\xa1\x00d\xa2\x00\x14\xa3\x00F\xa4\x00F\xa5', b'\x00', b'\x03', b'\xa6\x00\x05\xa7\xff\xec\xa8\xff\xf6\xa9\x08\xaa\x00\x00\x02\xab\x01\xac\x01\xad', b'\x03\xd6\xae\x01\xaf\x00\xb0\x00\n\xb1\x14\xb2', b'00', b'0', b'000\x00', b'\x00', b'\x00', b'\x00', b'\xb3', b'\x00\xb4BMS2\x00\x00\x00\x00\xb52402\xb6\x00\x00\xaa\xa5\xb711.XW_S11.261H_\xb8\x00\xb9\x00\x00\x02\xbaBMS2\x00\x00\x00\x00\x00\x00\x00\x00BMS2\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x01\x00\x00\x00\x00h\x00\x00E\xc9'] 2024-03-11 18:55:05,967:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,968:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 11, 'Packet header', ''] 2024-03-11 18:55:05,968:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Packet header, raw_value b'NW\x01\t\x00\x00\x00\x00\x03\x00\x01' 2024-03-11 18:55:05,968:DEBUG:abstractprotocol:process_response@124: Discarding Packet header:b'NW\x01\t\x00\x00\x00\x00\x03\x00\x01' 2024-03-11 18:55:05,968:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,968:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Cells connected', ''] 2024-03-11 18:55:05,968:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Cells connected, raw_value b'y' 2024-03-11 18:55:05,968:DEBUG:abstractprotocol:process_response@124: Discarding Cells connected:b'y' 2024-03-11 18:55:05,968:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,968:DEBUG:abstractprotocol:decode@512: Got defn ['Hex2Int:r/3', 1, 'Cells_connected', ''] 2024-03-11 18:55:05,968:DEBUG:abstractprotocol:process_response@117: Got template r/3 for Cells_connected b'\x18' 2024-03-11 18:55:05,968:DEBUG:abstractprotocol:process_response@118: Processing data_type: Hex2Int for data_name: Cells_connected, raw_value b'\x18' 2024-03-11 18:55:05,969:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Int(raw_value) 2024-03-11 18:55:05,969:DEBUG:protocol_helpers:Hex2Int@91: Hex b'\x18' decoded to 24 2024-03-11 18:55:05,969:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,969:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell01', ''] 2024-03-11 18:55:05,969:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell01, raw_value b'\x01' 2024-03-11 18:55:05,969:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell01:b'\x01' 2024-03-11 18:55:05,969:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,969:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell01', 'V'] 2024-03-11 18:55:05,969:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell01 b'\x0c\xf6' 2024-03-11 18:55:05,969:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell01, raw_value b'\x0c\xf6' 2024-03-11 18:55:05,970:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,970:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x0c\xf6' 2 byte decoded to 3318 2024-03-11 18:55:05,970:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,970:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell02', ''] 2024-03-11 18:55:05,970:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell02, raw_value b'\x02' 2024-03-11 18:55:05,970:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell02:b'\x02' 2024-03-11 18:55:05,970:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,970:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell02', 'V'] 2024-03-11 18:55:05,970:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell02 b'\x0c\xf7' 2024-03-11 18:55:05,970:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell02, raw_value b'\x0c\xf7' 2024-03-11 18:55:05,970:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,971:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x0c\xf7' 2 byte decoded to 3319 2024-03-11 18:55:05,971:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,971:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell03', ''] 2024-03-11 18:55:05,971:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell03, raw_value b'\x03' 2024-03-11 18:55:05,971:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell03:b'\x03' 2024-03-11 18:55:05,971:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,971:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell03', 'V'] 2024-03-11 18:55:05,971:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell03 b'\x0c\xf7' 2024-03-11 18:55:05,971:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell03, raw_value b'\x0c\xf7' 2024-03-11 18:55:05,971:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,971:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x0c\xf7' 2 byte decoded to 3319 2024-03-11 18:55:05,972:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,972:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell04', ''] 2024-03-11 18:55:05,972:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell04, raw_value b'\x04' 2024-03-11 18:55:05,972:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell04:b'\x04' 2024-03-11 18:55:05,972:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,972:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell04', 'V'] 2024-03-11 18:55:05,972:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell04 b'\x0c\xf5' 2024-03-11 18:55:05,972:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell04, raw_value b'\x0c\xf5' 2024-03-11 18:55:05,972:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,972:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x0c\xf5' 2 byte decoded to 3317 2024-03-11 18:55:05,973:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,973:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell05', ''] 2024-03-11 18:55:05,973:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell05, raw_value b'\x05' 2024-03-11 18:55:05,973:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell05:b'\x05' 2024-03-11 18:55:05,973:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,973:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell05', 'V'] 2024-03-11 18:55:05,973:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell05 b'\x0c\xf6' 2024-03-11 18:55:05,973:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell05, raw_value b'\x0c\xf6' 2024-03-11 18:55:05,973:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,973:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x0c\xf6' 2 byte decoded to 3318 2024-03-11 18:55:05,973:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,974:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell06', ''] 2024-03-11 18:55:05,974:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell06, raw_value b'\x06' 2024-03-11 18:55:05,974:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell06:b'\x06' 2024-03-11 18:55:05,974:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,974:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell06', 'V'] 2024-03-11 18:55:05,974:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell06 b'\x0c\xf6' 2024-03-11 18:55:05,974:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell06, raw_value b'\x0c\xf6' 2024-03-11 18:55:05,974:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,974:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x0c\xf6' 2 byte decoded to 3318 2024-03-11 18:55:05,974:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,974:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell07', ''] 2024-03-11 18:55:05,974:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell07, raw_value b'\x07' 2024-03-11 18:55:05,975:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell07:b'\x07' 2024-03-11 18:55:05,975:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,975:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell07', 'V'] 2024-03-11 18:55:05,975:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell07 b'\x0c\xf5' 2024-03-11 18:55:05,975:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell07, raw_value b'\x0c\xf5' 2024-03-11 18:55:05,975:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,975:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x0c\xf5' 2 byte decoded to 3317 2024-03-11 18:55:05,975:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,975:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell08', ''] 2024-03-11 18:55:05,975:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell08, raw_value b'\x08' 2024-03-11 18:55:05,975:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell08:b'\x08' 2024-03-11 18:55:05,975:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,976:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell08', 'V'] 2024-03-11 18:55:05,976:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell08 b'\x0c\xf6' 2024-03-11 18:55:05,976:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell08, raw_value b'\x0c\xf6' 2024-03-11 18:55:05,976:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,976:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x0c\xf6' 2 byte decoded to 3318 2024-03-11 18:55:05,976:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,976:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell09', ''] 2024-03-11 18:55:05,976:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell09, raw_value b'\x80' 2024-03-11 18:55:05,976:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell09:b'\x80' 2024-03-11 18:55:05,976:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,976:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell09', 'V'] 2024-03-11 18:55:05,977:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell09 b'\x00\x15' 2024-03-11 18:55:05,977:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell09, raw_value b'\x00\x15' 2024-03-11 18:55:05,977:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,977:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x00\x15' 2 byte decoded to 21 2024-03-11 18:55:05,977:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,977:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell10', ''] 2024-03-11 18:55:05,977:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell10, raw_value b'\x81' 2024-03-11 18:55:05,977:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell10:b'\x81' 2024-03-11 18:55:05,977:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,977:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell10', 'V'] 2024-03-11 18:55:05,977:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell10 b'\x00\x0f' 2024-03-11 18:55:05,977:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell10, raw_value b'\x00\x0f' 2024-03-11 18:55:05,978:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,978:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x00\x0f' 2 byte decoded to 15 2024-03-11 18:55:05,978:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,978:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell11', ''] 2024-03-11 18:55:05,978:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell11, raw_value b'\x82' 2024-03-11 18:55:05,978:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell11:b'\x82' 2024-03-11 18:55:05,978:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,978:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell11', 'V'] 2024-03-11 18:55:05,978:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell11 b'\x00\x0f' 2024-03-11 18:55:05,978:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell11, raw_value b'\x00\x0f' 2024-03-11 18:55:05,978:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,979:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x00\x0f' 2 byte decoded to 15 2024-03-11 18:55:05,979:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,979:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell12', ''] 2024-03-11 18:55:05,979:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell12, raw_value b'\x83' 2024-03-11 18:55:05,979:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell12:b'\x83' 2024-03-11 18:55:05,979:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,979:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell12', 'V'] 2024-03-11 18:55:05,979:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell12 b'\n^' 2024-03-11 18:55:05,979:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell12, raw_value b'\n^' 2024-03-11 18:55:05,979:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,979:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\n^' 2 byte decoded to 2654 2024-03-11 18:55:05,980:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,980:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell13', ''] 2024-03-11 18:55:05,980:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell13, raw_value b'\x84' 2024-03-11 18:55:05,980:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell13:b'\x84' 2024-03-11 18:55:05,980:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,980:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell13', 'V'] 2024-03-11 18:55:05,980:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell13 b'\x01\xfe' 2024-03-11 18:55:05,980:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell13, raw_value b'\x01\xfe' 2024-03-11 18:55:05,980:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,980:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x01\xfe' 2 byte decoded to 510 2024-03-11 18:55:05,980:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,980:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell14', ''] 2024-03-11 18:55:05,981:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell14, raw_value b'\x85' 2024-03-11 18:55:05,981:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell14:b'\x85' 2024-03-11 18:55:05,981:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,981:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell14', 'V'] 2024-03-11 18:55:05,981:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell14 b'b\x86' 2024-03-11 18:55:05,981:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell14, raw_value b'b\x86' 2024-03-11 18:55:05,981:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,981:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'b\x86' 2 byte decoded to 25222 2024-03-11 18:55:05,981:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,981:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell15', ''] 2024-03-11 18:55:05,981:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell15, raw_value b'\x02' 2024-03-11 18:55:05,981:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell15:b'\x02' 2024-03-11 18:55:05,982:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,982:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell15', 'V'] 2024-03-11 18:55:05,982:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell15 b'\x87\x00' 2024-03-11 18:55:05,982:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell15, raw_value b'\x87\x00' 2024-03-11 18:55:05,982:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,982:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x87\x00' 2 byte decoded to -30976 2024-03-11 18:55:05,982:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,982:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Voltage_Cell16', ''] 2024-03-11 18:55:05,982:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Voltage_Cell16, raw_value b'\x01' 2024-03-11 18:55:05,982:DEBUG:abstractprotocol:process_response@124: Discarding Voltage_Cell16:b'\x01' 2024-03-11 18:55:05,983:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,983:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/1000', 2, 'Voltage_Cell16', 'V'] 2024-03-11 18:55:05,983:DEBUG:abstractprotocol:process_response@117: Got template r/1000 for Voltage_Cell16 b'\x89\x00' 2024-03-11 18:55:05,983:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Voltage_Cell16, raw_value b'\x89\x00' 2024-03-11 18:55:05,983:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,983:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x89\x00' 2 byte decoded to -30464 2024-03-11 18:55:05,983:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,983:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'MOS_Temp', ''] 2024-03-11 18:55:05,983:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: MOS_Temp, raw_value b'\x00' 2024-03-11 18:55:05,983:DEBUG:abstractprotocol:process_response@124: Discarding MOS_Temp:b'\x00' 2024-03-11 18:55:05,983:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,983:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short', 2, 'MOS_Temp', '°C'] 2024-03-11 18:55:05,984:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: MOS_Temp, raw_value b'\x03Z' 2024-03-11 18:55:05,984:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,984:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x03Z' 2 byte decoded to 858 2024-03-11 18:55:05,984:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,984:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Battery_T1', ''] 2024-03-11 18:55:05,984:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Battery_T1, raw_value b'\x8a' 2024-03-11 18:55:05,984:DEBUG:abstractprotocol:process_response@124: Discarding Battery_T1:b'\x8a' 2024-03-11 18:55:05,984:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,984:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short', 2, 'Battery_T1', '°C'] 2024-03-11 18:55:05,984:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Battery_T1, raw_value b'\x00\x08' 2024-03-11 18:55:05,984:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,985:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x00\x08' 2 byte decoded to 8 2024-03-11 18:55:05,985:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,985:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Battery_T2', ''] 2024-03-11 18:55:05,985:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Battery_T2, raw_value b'\x8b' 2024-03-11 18:55:05,985:DEBUG:abstractprotocol:process_response@124: Discarding Battery_T2:b'\x8b' 2024-03-11 18:55:05,985:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,985:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short', 2, 'Battery_T2', '°C'] 2024-03-11 18:55:05,985:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Battery_T2, raw_value b'\x00\x00' 2024-03-11 18:55:05,985:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,985:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x00\x00' 2 byte decoded to 0 2024-03-11 18:55:05,985:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Battery_Voltage', ''] 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Battery_Voltage, raw_value b'\x8c' 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:process_response@124: Discarding Battery_Voltage:b'\x8c' 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:r/100', 2, 'Battery_Voltage', 'V'] 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:process_response@117: Got template r/100 for Battery_Voltage b'\x00\x03' 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Battery_Voltage, raw_value b'\x00\x03' 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,986:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x00\x03' 2 byte decoded to 3 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Battery_Current', ''] 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Battery_Current, raw_value b'\x8e' 2024-03-11 18:55:05,986:DEBUG:abstractprotocol:process_response@124: Discarding Battery_Current:b'\x8e' 2024-03-11 18:55:05,987:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,987:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short:(r&0x7FFF)/100(((r&0x8000)>>15)2-1)', 2, 'Battery_Current', 'A'] 2024-03-11 18:55:05,987:DEBUG:abstractprotocol:process_response@117: Got template (r&0x7FFF)/100(((r&0x8000)>>15)2-1) for Battery_Current b'\x0bP' 2024-03-11 18:55:05,987:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Battery_Current, raw_value b'\x0bP' 2024-03-11 18:55:05,987:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,987:DEBUG:protocol_helpers:BigHex2Short@146: Hex b'\x0bP' 2 byte decoded to 2896 2024-03-11 18:55:05,987:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,987:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Percent_Remain', ''] 2024-03-11 18:55:05,987:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Percent_Remain, raw_value b'\x8f' 2024-03-11 18:55:05,987:DEBUG:abstractprotocol:process_response@124: Discarding Percent_Remain:b'\x8f' 2024-03-11 18:55:05,987:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,988:DEBUG:abstractprotocol:decode@512: Got defn ['Hex2Int', 1, 'Percent_Remain', '%'] 2024-03-11 18:55:05,988:DEBUG:abstractprotocol:process_response@118: Processing data_type: Hex2Int for data_name: Percent_Remain, raw_value b'\x08' 2024-03-11 18:55:05,988:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Int(raw_value) 2024-03-11 18:55:05,988:DEBUG:protocol_helpers:Hex2Int@91: Hex b'\x08' decoded to 8 2024-03-11 18:55:05,988:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,988:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 2, 'Number of battery sensors', ''] 2024-03-11 18:55:05,988:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Number of battery sensors, raw_value b' \x90' 2024-03-11 18:55:05,988:DEBUG:abstractprotocol:process_response@124: Discarding Number of battery sensors:b' \x90' 2024-03-11 18:55:05,988:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,988:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Cycle_Count', ''] 2024-03-11 18:55:05,988:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Cycle_Count, raw_value b'\x0e' 2024-03-11 18:55:05,989:DEBUG:abstractprotocol:process_response@124: Discarding Cycle_Count:b'\x0e' 2024-03-11 18:55:05,989:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,989:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Short', 2, 'Cycle_Count', ''] 2024-03-11 18:55:05,989:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Short for data_name: Cycle_Count, raw_value b')\x91' 2024-03-11 18:55:05,989:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Short(raw_value) 2024-03-11 18:55:05,989:DEBUG:protocol_helpers:BigHex2Short@146: Hex b')\x91' 2 byte decoded to 10641 2024-03-11 18:55:05,989:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,989:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Total_capacity', ''] 2024-03-11 18:55:05,989:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Total_capacity, raw_value b'\x0e' 2024-03-11 18:55:05,989:DEBUG:abstractprotocol:process_response@124: Discarding Total_capacity:b'\x0e' 2024-03-11 18:55:05,989:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,989:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Float', 4, 'Total_capacity', 'Ahr'] 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Float for data_name: Total_capacity, raw_value b'\x10\x92\x00\x05' 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Float(raw_value) 2024-03-11 18:55:05,990:DEBUG:protocol_helpers:BigHex2Float@161: Hex b'\x10\x92\x00\x05' 4 byte decoded to 278003717 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 3, 'Total number of battery strings', ''] 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Total number of battery strings, raw_value b'\x93\n(' 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:process_response@124: Discarding Total number of battery strings:b'\x93\n(' 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Battery Warning Message', ''] 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Battery Warning Message, raw_value b'\x94' 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:process_response@124: Discarding Battery Warning Message:b'\x94' 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,990:DEBUG:abstractprotocol:decode@512: Got defn ['Hex2Str', 2, 'Battery Warning Message', ''] 2024-03-11 18:55:05,991:DEBUG:abstractprotocol:process_response@118: Processing data_type: Hex2Str for data_name: Battery Warning Message, raw_value b'\nZ' 2024-03-11 18:55:05,991:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Str(raw_value) 2024-03-11 18:55:05,991:DEBUG:protocol_helpers:Hex2Str@104: Hex b'\nZ' decoded to 0a5a 2024-03-11 18:55:05,991:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,991:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Battery status information', ''] 2024-03-11 18:55:05,991:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Battery status information, raw_value b'\x95' 2024-03-11 18:55:05,991:DEBUG:abstractprotocol:process_response@124: Discarding Battery status information:b'\x95' 2024-03-11 18:55:05,991:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,991:DEBUG:abstractprotocol:decode@512: Got defn ['Hex2Str', 2, 'Battery status information', ''] 2024-03-11 18:55:05,991:DEBUG:abstractprotocol:process_response@118: Processing data_type: Hex2Str for data_name: Battery status information, raw_value b'\x00\x05' 2024-03-11 18:55:05,991:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Str(raw_value) 2024-03-11 18:55:05,992:DEBUG:protocol_helpers:Hex2Str@104: Hex b'\x00\x05' decoded to 0005 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 45, 'settings', ''] 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: settings, raw_value b'\x96\x01,\x97\x00\xc8\x98\x01,\x99\x00d\x9a\x00\x1e\x9b\rz\x9c\x00\x05\x9d\x01\x9e\x00d\x9f\x00P\xa0\x00d\xa1\x00d\xa2\x00\x14\xa3\x00F\xa4\x00F\xa5' 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:process_response@124: Discarding settings:b'\x96\x01,\x97\x00\xc8\x98\x01,\x99\x00d\x9a\x00\x1e\x9b\rz\x9c\x00\x05\x9d\x01\x9e\x00d\x9f\x00P\xa0\x00d\xa1\x00d\xa2\x00\x14\xa3\x00F\xa4\x00F\xa5' 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Balancer Active', ''] 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Balancer Active, raw_value b'\x00' 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:process_response@124: Discarding Balancer Active:b'\x00' 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:decode@512: Got defn ['Hex2Int', 1, 'Balancer Active', ''] 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:process_response@118: Processing data_type: Hex2Int for data_name: Balancer Active, raw_value b'\x03' 2024-03-11 18:55:05,992:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Int(raw_value) 2024-03-11 18:55:05,993:DEBUG:protocol_helpers:Hex2Int@91: Hex b'\x03' decoded to 3 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 21, 'more settings', ''] 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: more settings, raw_value b'\xa6\x00\x05\xa7\xff\xec\xa8\xff\xf6\xa9\x08\xaa\x00\x00\x02\xab\x01\xac\x01\xad' 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:process_response@124: Discarding more settings:b'\xa6\x00\x05\xa7\xff\xec\xa8\xff\xf6\xa9\x08\xaa\x00\x00\x02\xab\x01\xac\x01\xad' 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 12, 'temp settings', ''] 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: temp settings, raw_value b'\x03\xd6\xae\x01\xaf\x00\xb0\x00\n\xb1\x14\xb2' 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:process_response@124: Discarding temp settings:b'\x03\xd6\xae\x01\xaf\x00\xb0\x00\n\xb1\x14\xb2' 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 2, 'string count', ''] 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: string count, raw_value b'00' 2024-03-11 18:55:05,993:DEBUG:abstractprotocol:process_response@124: Discarding string count:b'00' 2024-03-11 18:55:05,994:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,994:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Capacity Setting', ''] 2024-03-11 18:55:05,994:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Capacity Setting, raw_value b'0' 2024-03-11 18:55:05,994:DEBUG:abstractprotocol:process_response@124: Discarding Capacity Setting:b'0' 2024-03-11 18:55:05,994:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,994:DEBUG:abstractprotocol:decode@512: Got defn ['BigHex2Float', 4, 'Capacity Setting', 'Ahr'] 2024-03-11 18:55:05,994:DEBUG:abstractprotocol:process_response@118: Processing data_type: BigHex2Float for data_name: Capacity Setting, raw_value b'000\x00' 2024-03-11 18:55:05,994:DEBUG:abstractprotocol:process_response@201: Processing format string BigHex2Float(raw_value) 2024-03-11 18:55:05,994:DEBUG:protocol_helpers:BigHex2Float@161: Hex b'000\x00' 4 byte decoded to 808464384 2024-03-11 18:55:05,994:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,994:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Charge Enabled', ''] 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Charge Enabled, raw_value b'\x00' 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:process_response@124: Discarding Charge Enabled:b'\x00' 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:decode@512: Got defn ['Hex2Int', 1, 'Charge Enabled', ''] 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:process_response@118: Processing data_type: Hex2Int for data_name: Charge Enabled, raw_value b'\x00' 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Int(raw_value) 2024-03-11 18:55:05,995:DEBUG:protocol_helpers:Hex2Int@91: Hex b'\x00' decoded to 0 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 1, 'Discharge Enabled', ''] 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: Discharge Enabled, raw_value b'\x00' 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:process_response@124: Discarding Discharge Enabled:b'\x00' 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,995:DEBUG:abstractprotocol:decode@512: Got defn ['Hex2Int', 1, 'Discharge Enabled', ''] 2024-03-11 18:55:05,996:DEBUG:abstractprotocol:process_response@118: Processing data_type: Hex2Int for data_name: Discharge Enabled, raw_value b'\xb3' 2024-03-11 18:55:05,996:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Int(raw_value) 2024-03-11 18:55:05,996:DEBUG:protocol_helpers:Hex2Int@91: Hex b'\xb3' decoded to 179 2024-03-11 18:55:05,996:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-03-11 18:55:05,996:DEBUG:abstractprotocol:decode@512: Got defn ['discard', 116, 'remaining data', ''] 2024-03-11 18:55:05,996:DEBUG:abstractprotocol:process_response@118: Processing data_type: discard for data_name: remaining data, raw_value b'\x00\xb4BMS2\x00\x00\x00\x00\xb52402\xb6\x00\x00\xaa\xa5\xb711.XWS11.261H\xb8\x00\xb9\x00\x00\x02\xbaBMS2\x00\x00\x00\x00\x00\x00\x00\x00BMS2\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x01\x00\x00\x00\x00h\x00\x00E\xc9' 2024-03-11 18:55:05,996:DEBUG:abstractprotocol:process_response@124: Discarding remaining data:b'\x00\xb4BMS2\x00\x00\x00\x00\xb52402\xb6\x00\x00\xaa\xa5\xb711.XW_S11.261H_\xb8\x00\xb9\x00\x00\x02\xbaBMS2\x00\x00\x00\x00\x00\x00\x00\x00BMS2\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x01\x00\x00\x00\x00h\x00\x00E\xc9' 2024-03-11 18:55:05,996:INFO:device:run_command@116: Decoded response {'_command': 'getBalancerData', '_command_description': 'Get Balancer Data', 'raw_response': ['NW\x01\t\x00\x00\x00\x00\x03\x00\x01y\x18\x01\x0cö\x02\x0c÷\x03\x0c÷\x04\x0cõ\x05\x0cö\x06\x0cö\x07\x0cõ\x08\x0cö\x80\x00\x15\x81\x00\x0f\x82\x00\x0f\x83\n^\x84\x01þ\x85b\x86\x02\x87\x00\x01\x89\x00\x00\x03Z\x8a\x00\x08\x8b\x00\x00\x8c\x00\x03\x8e\x0bP\x8f\x08 \x90\x0e)\x91\x0e\x10\x92\x00\x05\x93\n(\x94\nZ\x95\x00\x05\x96\x01,\x97\x00È\x98\x01,\x99\x00d\x9a\x00\x1e\x9b\rz\x9c\x00\x05\x9d\x01\x9e\x00d\x9f\x00P\xa0\x00d¡\x00d¢\x00\x14£\x00F¤\x00F¥\x00\x03¦\x00\x05§ÿì¨ÿö©\x08ª\x00\x00\x02«\x01¬\x01\xad\x03Ö®\x01¯\x00°\x00\n±\x14²000000\x00\x00\x00\x00³\x00´BMS2\x00\x00\x00\x00µ2402¶\x00\x00ª¥·11.XW_S11.261H_¸\x00¹\x00\x00\x02ºBMS2\x00\x00\x00\x00\x00\x00\x00\x00BMS2\x00\x00\x00\x00\x00\x00\x00\x00À\x01\x00\x00\x00\x00h\x00\x00EÉ', ''], 'Cells_connected': [8.0, ''], 'Voltage_Cell01': [3.318, 'V'], 'Voltage_Cell02': [3.319, 'V'], 'Voltage_Cell03': [3.319, 'V'], 'Voltage_Cell04': [3.317, 'V'], 'Voltage_Cell05': [3.318, 'V'], 'Voltage_Cell06': [3.318, 'V'], 'Voltage_Cell07': [3.317, 'V'], 'Voltage_Cell08': [3.318, 'V'], 'Voltage_Cell09': [0.021, 'V'], 'Voltage_Cell10': [0.015, 'V'], 'Voltage_Cell11': [0.015, 'V'], 'Voltage_Cell12': [2.654, 'V'], 'Voltage_Cell13': [0.51, 'V'], 'Voltage_Cell14': [25.222, 'V'], 'Voltage_Cell15': [-30.976, 'V'], 'Voltage_Cell16': [-30.464, 'V'], 'MOS_Temp': [858, '°C'], 'Battery_T1': [8, '°C'], 'Battery_T2': [0, '°C'], 'Battery_Voltage': [0.03, 'V'], 'Battery_Current': [-28.96, 'A'], 'Percent_Remain': [8, '%'], 'Cycle_Count': [10641, ''], 'Total_capacity': [278003717, 'Ahr'], 'Battery Warning Message': ['0a5a', ''], 'Battery status information': ['0005', ''], 'Balancer Active': [3, ''], 'Capacity Setting': [808464384, 'Ahr'], 'Charge Enabled': [0, ''], 'Discharge Enabled': [179, '']} 2024-03-11 18:55:05,996:DEBUG:init:main@427: results: {'_command': 'getBalancerData', '_command_description': 'Get Balancer Data', 'raw_response': ['NW\x01\t\x00\x00\x00\x00\x03\x00\x01y\x18\x01\x0cö\x02\x0c÷\x03\x0c÷\x04\x0cõ\x05\x0cö\x06\x0cö\x07\x0cõ\x08\x0cö\x80\x00\x15\x81\x00\x0f\x82\x00\x0f\x83\n^\x84\x01þ\x85b\x86\x02\x87\x00\x01\x89\x00\x00\x03Z\x8a\x00\x08\x8b\x00\x00\x8c\x00\x03\x8e\x0bP\x8f\x08 \x90\x0e)\x91\x0e\x10\x92\x00\x05\x93\n(\x94\nZ\x95\x00\x05\x96\x01,\x97\x00È\x98\x01,\x99\x00d\x9a\x00\x1e\x9b\rz\x9c\x00\x05\x9d\x01\x9e\x00d\x9f\x00P\xa0\x00d¡\x00d¢\x00\x14£\x00F¤\x00F¥\x00\x03¦\x00\x05§ÿì¨ÿö©\x08ª\x00\x00\x02«\x01¬\x01\xad\x03Ö®\x01¯\x00°\x00\n±\x14²000000\x00\x00\x00\x00³\x00´BMS2\x00\x00\x00\x00µ2402¶\x00\x00ª¥·11.XW_S11.261H_¸\x00¹\x00\x00\x02ºBMS2\x00\x00\x00\x00\x00\x00\x00\x00BMS2\x00\x00\x00\x00\x00\x00\x00\x00À\x01\x00\x00\x00\x00h\x00\x00EÉ', ''], 'Cells_connected': [8.0, ''], 'Voltage_Cell01': [3.318, 'V'], 'Voltage_Cell02': [3.319, 'V'], 'Voltage_Cell03': [3.319, 'V'], 'Voltage_Cell04': [3.317, 'V'], 'Voltage_Cell05': [3.318, 'V'], 'Voltage_Cell06': [3.318, 'V'], 'Voltage_Cell07': [3.317, 'V'], 'Voltage_Cell08': [3.318, 'V'], 'Voltage_Cell09': [0.021, 'V'], 'Voltage_Cell10': [0.015, 'V'], 'Voltage_Cell11': [0.015, 'V'], 'Voltage_Cell12': [2.654, 'V'], 'Voltage_Cell13': [0.51, 'V'], 'Voltage_Cell14': [25.222, 'V'], 'Voltage_Cell15': [-30.976, 'V'], 'Voltage_Cell16': [-30.464, 'V'], 'MOS_Temp': [858, '°C'], 'Battery_T1': [8, '°C'], 'Battery_T2': [0, '°C'], 'Battery_Voltage': [0.03, 'V'], 'Battery_Current': [-28.96, 'A'], 'Percent_Remain': [8, '%'], 'Cycle_Count': [10641, ''], 'Total_capacity': [278003717, 'Ahr'], 'Battery Warning Message': ['0a5a', ''], 'Battery status information': ['0005', ''], 'Balancer Active': [3, ''], 'Capacity Setting': [808464384, 'Ahr'], 'Charge Enabled': [0, ''], 'Discharge Enabled': [179, '']} 2024-03-11 18:55:05,997:INFO:init:get_output@40: attempting to create output processor: screen 2024-03-11 18:55:05,998:DEBUG:screen:init@17: processor.screen init args: (), kwargs: {} 2024-03-11 18:55:05,998:DEBUG:init:main@433: Using output filter: None 2024-03-11 18:55:05,998:INFO:screen:output@23: Using output processor: screen 2024-03-11 18:55:05,998:DEBUG:screen:output@24: kwargs {'data': {'_command': 'getBalancerData', '_command_description': 'Get Balancer Data', 'raw_response': ['NW\x01\t\x00\x00\x00\x00\x03\x00\x01y\x18\x01\x0cö\x02\x0c÷\x03\x0c÷\x04\x0cõ\x05\x0cö\x06\x0cö\x07\x0cõ\x08\x0cö\x80\x00\x15\x81\x00\x0f\x82\x00\x0f\x83\n^\x84\x01þ\x85b\x86\x02\x87\x00\x01\x89\x00\x00\x03Z\x8a\x00\x08\x8b\x00\x00\x8c\x00\x03\x8e\x0bP\x8f\x08 \x90\x0e)\x91\x0e\x10\x92\x00\x05\x93\n(\x94\nZ\x95\x00\x05\x96\x01,\x97\x00È\x98\x01,\x99\x00d\x9a\x00\x1e\x9b\rz\x9c\x00\x05\x9d\x01\x9e\x00d\x9f\x00P\xa0\x00d¡\x00d¢\x00\x14£\x00F¤\x00F¥\x00\x03¦\x00\x05§ÿì¨ÿö©\x08ª\x00\x00\x02«\x01¬\x01\xad\x03Ö®\x01¯\x00°\x00\n±\x14²000000\x00\x00\x00\x00³\x00´BMS2\x00\x00\x00\x00µ2402¶\x00\x00ª¥·11.XW_S11.261H_¸\x00¹\x00\x00\x02ºBMS2\x00\x00\x00\x00\x00\x00\x00\x00BMS2\x00\x00\x00\x00\x00\x00\x00\x00À\x01\x00\x00\x00\x00h\x00\x00EÉ', ''], 'Cells_connected': [8.0, ''], 'Voltage_Cell01': [3.318, 'V'], 'Voltage_Cell02': [3.319, 'V'], 'Voltage_Cell03': [3.319, 'V'], 'Voltage_Cell04': [3.317, 'V'], 'Voltage_Cell05': [3.318, 'V'], 'Voltage_Cell06': [3.318, 'V'], 'Voltage_Cell07': [3.317, 'V'], 'Voltage_Cell08': [3.318, 'V'], 'Voltage_Cell09': [0.021, 'V'], 'Voltage_Cell10': [0.015, 'V'], 'Voltage_Cell11': [0.015, 'V'], 'Voltage_Cell12': [2.654, 'V'], 'Voltage_Cell13': [0.51, 'V'], 'Voltage_Cell14': [25.222, 'V'], 'Voltage_Cell15': [-30.976, 'V'], 'Voltage_Cell16': [-30.464, 'V'], 'MOS_Temp': [858, '°C'], 'Battery_T1': [8, '°C'], 'Battery_T2': [0, '°C'], 'Battery_Voltage': [0.03, 'V'], 'Battery_Current': [-28.96, 'A'], 'Percent_Remain': [8, '%'], 'Cycle_Count': [10641, ''], 'Total_capacity': [278003717, 'Ahr'], 'Battery Warning Message': ['0a5a', ''], 'Battery status information': ['0005', ''], 'Balancer Active': [3, ''], 'Capacity Setting': [808464384, 'Ahr'], 'Charge Enabled': [0, ''], 'Discharge Enabled': [179, '']}, 'tag': '', 'name': 'unnamed', 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0x7fafcbb190>, 'udp_port': 5555, 'postgres_url': None, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway', 'mqtt_topic': None, 'filter': None, 'excl_filter': None, 'keep_case': False} 2024-03-11 18:55:05,998:DEBUG:screen:output@68: displayData: {'cells_connected': [8.0, ''], 'voltage_cell01': [3.318, 'V'], 'voltage_cell02': [3.319, 'V'], 'voltage_cell03': [3.319, 'V'], 'voltage_cell04': [3.317, 'V'], 'voltage_cell05': [3.318, 'V'], 'voltage_cell06': [3.318, 'V'], 'voltage_cell07': [3.317, 'V'], 'voltage_cell08': [3.318, 'V'], 'voltage_cell09': [0.021, 'V'], 'voltage_cell10': [0.015, 'V'], 'voltage_cell11': [0.015, 'V'], 'voltage_cell12': [2.654, 'V'], 'voltage_cell13': [0.51, 'V'], 'voltage_cell14': [25.222, 'V'], 'voltage_cell15': [-30.976, 'V'], 'voltage_cell16': [-30.464, 'V'], 'mos_temp': [858, '°C'], 'battery_t1': [8, '°C'], 'battery_t2': [0, '°C'], 'battery_voltage': [0.03, 'V'], 'battery_current': [-28.96, 'A'], 'percent_remain': [8, '%'], 'cycle_count': [10641, ''], 'total_capacity': [278003717, 'Ahr'], 'battery_warning_message': ['0a5a', ''], 'battery_status_information': ['0005', ''], 'balancer_active': [3, ''], 'capacity_setting': [808464384, 'Ahr'], 'charge_enabled': [0, ''], 'discharge_enabled': [179, '']} 2024-03-11 18:55:06,001:DEBUG:init:main@459: Not daemon, so not looping ╔══════════════════════════════════════════════════╗ ║ Command: getBalancerData - Get Balancer Data ║ ╠════════════════════════════╤═══════════╤════════════╣ ║ Parameter │ Value │ Unit ║ ╟────────────────────────────┼───────────┼────────────╢ ║ cells_connected │ 8.0 │ ║ ║ voltage_cell01 │ 3.317 │ V ║ ║ voltage_cell02 │ 3.317 │ V ║ ║ voltage_cell03 │ 3.317 │ V ║ ║ voltage_cell04 │ 3.316 │ V ║ ║ voltage_cell05 │ 3.317 │ V ║ ║ voltage_cell06 │ 3.317 │ V ║ ║ voltage_cell07 │ 3.316 │ V ║ ║ voltage_cell08 │ 3.317 │ V ║ ║ voltage_cell09 │ 0.021 │ V ║ ║ voltage_cell10 │ 0.015 │ V ║ ║ voltage_cell11 │ 0.015 │ V ║ ║ voltage_cell12 │ 2.653 │ V ║ ║ voltage_cell13 │ 0.589 │ V ║ ║ voltage_cell14 │ 25.222 │ V ║ ║ voltage_cell15 │ -30.976 │ V ║ ║ voltage_cell16 │ -30.464 │ V ║ ║ mos_temp │ 859 │ °C ║ ║ battery_t1 │ 8 │ °C ║ ║ battery_t2 │ 0 │ °C ║ ║ battery_voltage │ 0.03 │ V ║ ║ battery_current │ -28.96 │ A ║ ║ percent_remain │ 8 │ % ║ ║ cycle_count │ 10641 │ ║ ║ total_capacity │ 278003717 │ Ahr ║ ║ battery_warning_message │ 0a5a │ ║ ║ battery_status_information │ 0005 │ ║ ║ balancer_active │ 3 │ ║ ║ capacity_setting │ 808464384 │ Ahr ║ ║ charge_enabled │ 0 │ ║ ║ discharge_enabled │ 179 │ ║ ╚════════════════════════════╧═══════════╧════════════╝

jblance commented 8 months ago

try --porttype dalyserial instead of serial (as the data is getting truncated

On Sat, 9 Mar 2024 at 05:11, geobitus @.***> wrote:

Back on business. Now just for test the new hardware (jikong RS485 adapter connected to GPS port) using the printbms.py script I get: (mppsolar) @.:~ $ python ./printbms.py Cell 1 : 3.358 V Cell 2 : 3.359 V Cell 3 : 3.359 V Cell 4 : 3.35 V Cell 5 : 3.357 V Cell 6 : 3.358 V Cell 7 : 3.353 V Cell 8 : 3.359 V Temp1: 14 ?C Temp2: 14 ?C Battery voltage: 26.85 V Current: 2.55 A Remaining capacity: 99 % mppsolar debug below: (mppsolar) @.:~ $ mppsolar -p /dev/ttyS0 -P jkserial -b 115000 --porttype serial -D 2> dbg.txt dbg.txt https://github.com/jblance/mpp-solar/files/14540300/dbg.txt

— Reply to this email directly, view it on GitHub https://github.com/jblance/mpp-solar/issues/342#issuecomment-1985972922, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVKNXBEGK4FKWPXQMK5PTYXHPMTAVCNFSM6AAAAAAXMXQJVGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBVHE3TEOJSGI . You are receiving this because you were mentioned.Message ID: @.***>

geobitus commented 7 months ago

I encountered a new issue that I don't succeed to cleanly address. The dalyserialio.py, in my case, seems that don't/can't access the port unless is opened in the background by an app let say by minicom. The first workaround was to open one of the two ports I have ttySC0 & ttySC1 with "sudo minicom -D /dev/ttySCx " and put it to sleep "^Aj", and that is working fine and logically correct until the rpi is rebooted (I use sudo to stay resident even after I kill the putty terminal) The second workaround was to add in the dalyserialio.py after line 21 (try:)"serial.rs485.RS485('/dev/ttySCx')" , import rs485 subclass also and that seem to work fine for the last week. I will attach the must modify files in my case. jkserial.py.txt dalyserialio.py.txt