Open asenyshyn opened 4 months ago
JK_BD4A8S4P Hardware Ver: V15A Software Ver: V15.26
$ mpp-solar -p C8:47:80:1A:1F:18 -P JK04 -D
2024-08-30 13:54:05,112:INFO:init:main@216: Solar Device Command Utility, version: 0.16.39, python version: 3.12.3
2024-08-30 13:54:05,112:DEBUG:mqttbrokerc:init@29: mqttbroker config: {'name': 'localhost', 'port': 1883, 'user': None, 'pass': None}
2024-08-30 13:54:05,112:DEBUG:init:main@251: MqttBroker name: localhost, port: 1883, user: None
2024-08-30 13:54:05,113:DEBUG:init:main@253: udp port 5555
2024-08-30 13:54:05,113:DEBUG:init:main@255: Using Postgres None
2024-08-30 13:54:05,113:DEBUG:init:main@258: Using Mongo None with mppsolar
2024-08-30 13:54:05,115:INFO:init:main@275: Daemon DISABLED
2024-08-30 13:54:05,115:INFO:init:main@379: Creating device "unnamed" (type: "mppsolar") on port "C8:47:80:1A:1F:18 (porttype=None)" using protocol "JK04"
2024-08-30 13:54:05,119:DEBUG:init:main@383: device_class <class 'mppsolar.devices.mppsolar.mppsolar'>
2024-08-30 13:54:05,120:DEBUG:device:init@34: init args ()
2024-08-30 13:54:05,120:DEBUG:device:init@35: init kwargs {'name': 'unnamed', 'port': 'C8:47:80:1A:1F:18', 'protocol': 'JK04', 'baud': 2400, 'porttype': None, 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0xffff9c7d9700>, 'udp_port': 5555, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway', 'prom_output_dir': '/var/lib/node_exporter'}
2024-08-30 13:54:05,120:DEBUG:init:get_port_type@51: port matches jkble ':'
2024-08-30 13:54:05,120:INFO:init:get_port@105: Using jkbleio for communications
2024-08-30 13:54:05,162:DEBUG:init:get_protocol@13: Protocol JK04
2024-08-30 13:54:05,539:DEBUG:device:init@39: init name unnamed, port <mppsolar.inout.jkbleio.JkBleIO object at 0xffff9c3c3f50>, protocol JK04 - JKBMS BLE 4 byte data communication protocol handler
2024-08-30 13:54:05,539:DEBUG:init:main@430: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0xffff9c3c3650>, '', '', 'screen', None, None)]
2024-08-30 13:54:05,539:INFO:init:main@435: Looping 1 commands
2024-08-30 13:54:05,539:INFO:init:main@441: Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.inout.jkbleio.JkBleIO object at 0xffff9c3c3f50>, protocol: JK04 - JKBMS BLE 4 byte data communication protocol handler for command: , tag: , outputs: screen
2024-08-30 13:54:05,539:INFO:device:run_command@51: Running command
2024-08-30 13:54:05,540:INFO:jkabstractprotocol:get_full_command@74: Using protocol b'JK04' with 2 commands
2024-08-30 13:54:05,540:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getCellData
2024-08-30 13:54:05,540:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'getCellData'
2024-08-30 13:54:05,540:DEBUG:abstractprotocol:get_command_defn@73: Found command getCellData in protocol b'JK04'
2024-08-30 13:54:05,540:DEBUG:jkabstractprotocol:get_full_command@79: self._command = getCellData
2024-08-30 13:54:05,540:DEBUG:jkabstractprotocol:get_full_command@90: cmd with SOR: bytearray(b'\xaaU\x90\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2024-08-30 13:54:05,540:DEBUG:jkabstractprotocol:get_full_command@98: cmd with command code: bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2024-08-30 13:54:05,540:DEBUG:jkabstractprotocol:get_full_command@100: cmd with crc: bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10')
2024-08-30 13:54:05,541:INFO:device:run_command@81: full command bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10') for command getCellData
2024-08-30 13:54:05,541:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getCellData
2024-08-30 13:54:05,541:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'getCellData'
2024-08-30 13:54:05,541:DEBUG:abstractprotocol:get_command_defn@73: Found command getCellData in protocol b'JK04'
2024-08-30 13:54:05,541:INFO:jkabstractprotocol:get_full_command@74: Using protocol b'JK04' with 2 commands
2024-08-30 13:54:05,541:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getCellData
2024-08-30 13:54:05,541:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'getCellData'
2024-08-30 13:54:05,541:DEBUG:abstractprotocol:get_command_defn@73: Found command getCellData in protocol b'JK04'
2024-08-30 13:54:05,541:DEBUG:jkabstractprotocol:get_full_command@79: self._command = getCellData
2024-08-30 13:54:05,541:DEBUG:jkabstractprotocol:get_full_command@90: cmd with SOR: bytearray(b'\xaaU\x90\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2024-08-30 13:54:05,542:DEBUG:jkabstractprotocol:get_full_command@98: cmd with command code: bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2024-08-30 13:54:05,542:DEBUG:jkabstractprotocol:get_full_command@100: cmd with crc: bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10')
2024-08-30 13:54:05,542:INFO:jkbleio:send_and_receive@35: full command bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10') for command getCellData
2024-08-30 13:54:05,542:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getCellData
2024-08-30 13:54:05,542:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'getCellData'
2024-08-30 13:54:05,542:DEBUG:abstractprotocol:get_command_defn@73: Found command getCellData in protocol b'JK04'
2024-08-30 13:54:05,542:DEBUG:jkbleio:send_and_receive@39: expected record type 2 for command getCellData
2024-08-30 13:54:05,542:INFO:jkbleio:ble_connect@63: Attempting to connect to C8:47:80:1A:1F:18
2024-08-30 13:54:06,268:DEBUG:jkbledelegate:handleNotification@27: From handle: 0x12 Got 4 bytes of data
2024-08-30 13:54:06,269:DEBUG:jkbledelegate:handleNotification@29: Pre wipe to start bytearray(b'AT\r\n')
2024-08-30 13:54:06,270:DEBUG:jkabstractprotocol:wipe_to_start@150: SOR not found in record
2024-08-30 13:54:06,270:DEBUG:jkbledelegate:handleNotification@31: Post wipe to start bytearray(b'')
2024-08-30 13:54:06,270:DEBUG:jkbledelegate:handleNotification@38: Not expected type of record - wiping data bytearray(b'')
2024-08-30 13:54:06,271:DEBUG:jkabstractprotocol:is_record_complete@166: No SOR found in record looking for completenessbytearray(b'')
2024-08-30 13:54:06,271:DEBUG:jkbleio:ble_get_data@88: Command: bytearray(b'\xaaU\x90\xeb\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10')
2024-08-30 13:54:06,586:INFO:jkbleio:ble_get_data@97: Connected to b''
2024-08-30 13:54:06,662:DEBUG:jkbledelegate:handleNotification@27: From handle: 0x12 Got 4 bytes of data
2024-08-30 13:54:06,663:DEBUG:jkbledelegate:handleNotification@29: Pre wipe to start bytearray(b'AT\r\n')
2024-08-30 13:54:06,663:DEBUG:jkabstractprotocol:wipe_to_start@150: SOR not found in record
2024-08-30 13:54:06,663:DEBUG:jkbledelegate:handleNotification@31: Post wipe to start bytearray(b'')
2024-08-30 13:54:06,664:DEBUG:jkbledelegate:handleNotification@38: Not expected type of record - wiping data bytearray(b'')
2024-08-30 13:54:06,664:DEBUG:jkabstractprotocol:is_record_complete@166: No SOR found in record looking for completenessbytearray(b'')
2024-08-30 13:54:06,868:INFO:jkbleio:ble_get_data@113: Read characteristic: Characteristic
Same here on JK_PB2A16S15P. i however once had data ouput on getinfo. nothing since.
It loops on these
2024-08-31 12:47:21,448:DEBUG:jkbledelegate:handleNotification@27: From handle: 0x12 Got 4 bytes of data
2024-08-31 12:47:21,448:DEBUG:jkbledelegate:handleNotification@29: Pre wipe to start bytearray(b'AT\r\n')
2024-08-31 12:47:21,448:DEBUG:jkabstractprotocol:wipe_to_start@150: SOR not found in record
2024-08-31 12:47:21,448:DEBUG:jkbledelegate:handleNotification@31: Post wipe to start bytearray(b'')
2024-08-31 12:47:21,448:DEBUG:jkbledelegate:handleNotification@38: Not expected type of record - wiping data bytearray(b'')
2024-08-31 12:47:21,449:DEBUG:jkabstractprotocol:is_record_complete@166: No SOR found in record looking for completeness
2024-08-31 12:47:21,654:DEBUG:jkbledelegate:handleNotification@27: From handle: 0x12 Got 4 bytes of data
2024-08-31 12:47:21,654:DEBUG:jkbledelegate:handleNotification@29: Pre wipe to start bytearray(b'AT\r\n')
2024-08-31 12:47:21,655:DEBUG:jkabstractprotocol:wipe_to_start@150: SOR not found in record
2024-08-31 12:47:21,655:DEBUG:jkbledelegate:handleNotification@31: Post wipe to start bytearray(b'')
2024-08-31 12:47:21,655:DEBUG:jkbledelegate:handleNotification@38: Not expected type of record - wiping data bytearray(b'')
2024-08-31 12:47:21,656:DEBUG:jkabstractprotocol:is_record_complete@166: No SOR found in record looking for completeness
Looks like a data parse issue ?
here is whats i got when it works once (jkbms-monitoring) root@HOMEASSISTANT:~# jkbms -p C8:47:80:1A:61:9C -n "40517481729-01" -P jk02 -c getInfo Command: getInfo - BLE Device Information inquiry
--------------------------------------------------------------------------------
Parameter Value Unit
header 55aaeb90
record_type 03
record_counter 221
device_model JK_PB2A16S15P
hardware_version 15A
software_version 15.26
up_time 0D22H20M0S
power-on_times 3
device_name 40517481729P
device_passcode 1234
manufacturing_date 240830
serial_number 40517481729
passcode 000
user_data JK-BMS
setup_passcode ****
--------------------------------------------------------------------------------
Same problem here ... cannot read data with JK_PB1A16S10P Any help here?
Hi, I have JKBMS JK_PB1A16S15P Hardware version V15A Software V15.27
I cannot read any data from it.
Could anyone suggest how to get it working?