jblance / mpp-solar

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

Waveshare RS232/RS485 to Ethernet Converter Question #457

Open preussal opened 7 months ago

preussal commented 7 months ago

Hello,

I got a "Waveshare RS232/RS485 to Ethernet Converter".

I still have to see how I get the Seriel Port via the network on my Linux server. Has anyone already had experience with it? I could use it on my Mppsolar inverter via RS232 and make it independent of the computer.

I found nothing about it in the documentary. Maybe someone can give me a few tips

preussal commented 7 months ago

Apparently you can do this with ser2net. Or directly with Pyserial

sante85 commented 7 months ago

@preussal not run for me jkbms -p /dev/ttyUSB0 -P JK02 -c getCellData -D 2024-02-14 13:48:26,959:INFO:init:main@205: Solar Device Command Utility, version: 0.16.19, python version: 3.11.1 2024-02-14 13:48:26,959:DEBUG:mqttbrokerc:init@29: mqttbroker config: {'name': 'localhost', 'port': 1883, 'user': None, 'pass': None} 2024-02-14 13:48:26,959:DEBUG:init:main@240: MqttBroker name: localhost, port: 1883, user: None 2024-02-14 13:48:26,959:DEBUG:init:main@242: udp port 5555 2024-02-14 13:48:26,960:DEBUG:init:main@244: Using Postgres None 2024-02-14 13:48:26,960:DEBUG:init:main@247: Using Mongo None with mppsolar 2024-02-14 13:48:26,960:INFO:init:main@358: Creating device "unnamed" (type: "jkbms") on port "/dev/ttyUSB0 (porttype=None)" using protocol "JK02" 2024-02-14 13:48:26,963:DEBUG:init:main@362: device_class <class 'mppsolar.devices.jkbms.jkbms'> 2024-02-14 13:48:26,963:DEBUG:device:init@34: init args () 2024-02-14 13:48:26,963:DEBUG:device:init@35: init kwargs {'name': 'unnamed', 'port': '/dev/ttyUSB0', 'protocol': 'JK02', 'baud': 2400, 'porttype': None, 'mqtt_broker': <mppsolar.libs.mqttbrokerc.MqttBroker object at 0xf6f33ad0>, 'udp_port': 5555, 'mongo_url': None, 'mongo_db': 'mppsolar', 'push_url': 'http://localhost:9091/metrics/job/pushgateway'} 2024-02-14 13:48:26,964:DEBUG:init:get_port_type@69: port matches ttyusb 2024-02-14 13:48:26,964:INFO:init:get_port@111: Using serialio for communications 2024-02-14 13:48:26,971:DEBUG:init:get_protocol@13: Protocol JK02 2024-02-14 13:48:27,291:DEBUG:device:init@39: init name unnamed, port <mppsolar.inout.serialio.SerialIO object at 0xf6e0d9f0>, protocol JK02 - JKBMS BLE 2 byte data communication protocol handler 2024-02-14 13:48:27,291:DEBUG:init:main@408: Commands [(<mppsolar.devices.jkbms.jkbms object at 0xf6e0d970>, 'getCellData', 'getCellData', 'screen', None, None)] 2024-02-14 13:48:27,291:INFO:init:main@413: Looping 1 commands 2024-02-14 13:48:27,292:INFO:init:main@423: Getting results from device: jkbms device - name: unnamed, port: <mppsolar.inout.serialio.SerialIO object at 0xf6e0d9f0>, protocol: JK02 - JKBMS BLE 2 byte data communication protocol handler for command: getCellData, tag: getCellData, outputs: screen 2024-02-14 13:48:27,292:INFO:device:run_command@51: Running command getCellData 2024-02-14 13:48:27,292:INFO:jkabstractprotocol:get_full_command@74: Using protocol b'JK02' with 3 commands 2024-02-14 13:48:27,292:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getCellData 2024-02-14 13:48:27,292:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'getCellData' 2024-02-14 13:48:27,292:DEBUG:abstractprotocol:get_command_defn@73: Found command getCellData in protocol b'JK02' 2024-02-14 13:48:27,292:DEBUG:jkabstractprotocol:get_full_command@79: self._command = getCellData 2024-02-14 13:48:27,292: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-02-14 13:48:27,292: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-02-14 13:48:27,293: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-02-14 13:48:27,293: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-02-14 13:48:27,293:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getCellData 2024-02-14 13:48:27,293:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'getCellData' 2024-02-14 13:48:27,293:DEBUG:abstractprotocol:get_command_defn@73: Found command getCellData in protocol b'JK02' 2024-02-14 13:48:27,293:DEBUG:serialio:send_and_receive@19: port /dev/ttyUSB0, baudrate 2400 2024-02-14 13:48:27,299:DEBUG:serialio:send_and_receive@22: Executing command via serialio... 2024-02-14 13:48:28,400:DEBUG:serialio:send_and_receive@30: serial response was: b'' 2024-02-14 13:48:28,405:DEBUG:device:run_command@98: Send and Receive Response b'' 2024-02-14 13:48:28,405:INFO:abstractprotocol:decode@236: response passed to decode: b'' 2024-02-14 13:48:28,405:DEBUG:jkabstractprotocol:get_command_defn@105: get_command_defn for: getCellData 2024-02-14 13:48:28,405:DEBUG:abstractprotocol:get_command_defn@71: Processing command 'getCellData' 2024-02-14 13:48:28,405:DEBUG:abstractprotocol:get_command_defn@73: Found command getCellData in protocol b'JK02' 2024-02-14 13:48:28,406:INFO:abstractprotocol:decode@280: Processing response of type POSITIONAL 2024-02-14 13:48:28,406:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 4, 'Header', ''] 2024-02-14 13:48:28,406:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Str', 1, 'Record_Type', ''] 2024-02-14 13:48:28,406:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Record_Counter', ''] 2024-02-14 13:48:28,406:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell01', 'V'] 2024-02-14 13:48:28,406:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell02', 'V'] 2024-02-14 13:48:28,406:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell03', 'V'] 2024-02-14 13:48:28,406:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell04', 'V'] 2024-02-14 13:48:28,406:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell05', 'V'] 2024-02-14 13:48:28,407:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell06', 'V'] 2024-02-14 13:48:28,407:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell07', 'V'] 2024-02-14 13:48:28,407:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell08', 'V'] 2024-02-14 13:48:28,407:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell09', 'V'] 2024-02-14 13:48:28,407:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell10', 'V'] 2024-02-14 13:48:28,407:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell11', 'V'] 2024-02-14 13:48:28,407:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell12', 'V'] 2024-02-14 13:48:28,407:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell13', 'V'] 2024-02-14 13:48:28,407:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell14', 'V'] 2024-02-14 13:48:28,407:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell15', 'V'] 2024-02-14 13:48:28,408:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell16', 'V'] 2024-02-14 13:48:28,408:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell17', 'V'] 2024-02-14 13:48:28,408:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell18', 'V'] 2024-02-14 13:48:28,408:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell19', 'V'] 2024-02-14 13:48:28,408:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell20', 'V'] 2024-02-14 13:48:28,408:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell21', 'V'] 2024-02-14 13:48:28,408:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell22', 'V'] 2024-02-14 13:48:28,408:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell23', 'V'] 2024-02-14 13:48:28,408:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Voltage_Cell24', 'V'] 2024-02-14 13:48:28,408:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 4, 'discard1', ''] 2024-02-14 13:48:28,408:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Average_Cell_Voltage', 'V'] 2024-02-14 13:48:28,409:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Delta_Cell_Voltage', 'V'] 2024-02-14 13:48:28,409:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Current_Balancer', ''] 2024-02-14 13:48:28,409:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell01', 'Ohm'] 2024-02-14 13:48:28,409:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell02', 'Ohm'] 2024-02-14 13:48:28,409:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell03', 'Ohm'] 2024-02-14 13:48:28,409:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell04', 'Ohm'] 2024-02-14 13:48:28,409:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell05', 'Ohm'] 2024-02-14 13:48:28,409:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell06', 'Ohm'] 2024-02-14 13:48:28,409:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell07', 'Ohm'] 2024-02-14 13:48:28,409:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell08', 'Ohm'] 2024-02-14 13:48:28,410:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell09', 'Ohm'] 2024-02-14 13:48:28,410:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell10', 'Ohm'] 2024-02-14 13:48:28,410:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell11', 'Ohm'] 2024-02-14 13:48:28,410:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell12', 'Ohm'] 2024-02-14 13:48:28,410:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell13', 'Ohm'] 2024-02-14 13:48:28,410:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell14', 'Ohm'] 2024-02-14 13:48:28,410:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell15', 'Ohm'] 2024-02-14 13:48:28,410:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell16', 'Ohm'] 2024-02-14 13:48:28,410:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell17', 'Ohm'] 2024-02-14 13:48:28,410:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell18', 'Ohm'] 2024-02-14 13:48:28,410:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell19', 'Ohm'] 2024-02-14 13:48:28,411:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell20', 'Ohm'] 2024-02-14 13:48:28,411:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell21', 'Ohm'] 2024-02-14 13:48:28,411:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell22', 'Ohm'] 2024-02-14 13:48:28,411:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell23', 'Ohm'] 2024-02-14 13:48:28,411:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Resistance_Cell24', 'Ohm'] 2024-02-14 13:48:28,411:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 6, 'discard2', ''] 2024-02-14 13:48:28,411:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2UInt:r/1000', 4, 'Battery_Voltage', 'V'] 2024-02-14 13:48:28,411:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2UInt', 4, 'Battery_Power', 'W'] 2024-02-14 13:48:28,411:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Int:r/1000', 4, 'Balance_Current', 'A'] 2024-02-14 13:48:28,411:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/10', 2, 'Battery_T1', '°C'] 2024-02-14 13:48:28,412:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/10', 2, 'Battery_T2', '°C'] 2024-02-14 13:48:28,412:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/10', 2, 'MOS_Temp', '°C'] 2024-02-14 13:48:28,412:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 4, 'discard4', ''] 2024-02-14 13:48:28,412:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 1, 'discard4_1', ''] 2024-02-14 13:48:28,412:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['Hex2Int', 1, 'Percent_Remain', '%'] 2024-02-14 13:48:28,412:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2UInt:r/1000', 4, 'Capacity_Remain', 'Ah'] 2024-02-14 13:48:28,412:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2UInt:r/1000', 4, 'Nominal_Capacity', 'Ah'] 2024-02-14 13:48:28,412:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2UInt', 4, 'Cycle_Count', ''] 2024-02-14 13:48:28,412:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2UInt:r/1000', 4, 'Cycle_Capacity', 'Ah'] 2024-02-14 13:48:28,412:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown12', ''] 2024-02-14 13:48:28,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown13', ''] 2024-02-14 13:48:28,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['uptime', 3, 'Time', ''] 2024-02-14 13:48:28,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown15', ''] 2024-02-14 13:48:28,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown16', ''] 2024-02-14 13:48:28,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown17', ''] 2024-02-14 13:48:28,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 12, 'discard6', ''] 2024-02-14 13:48:28,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown18', ''] 2024-02-14 13:48:28,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown19', ''] 2024-02-14 13:48:28,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown20', ''] 2024-02-14 13:48:28,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Current_Charge', ''] 2024-02-14 13:48:28,413:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['LittleHex2Short:r/1000', 2, 'Current_Discharge', ''] 2024-02-14 13:48:28,414:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown23', ''] 2024-02-14 13:48:28,414:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown24', ''] 2024-02-14 13:48:28,414:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown25', ''] 2024-02-14 13:48:28,414:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown26', ''] 2024-02-14 13:48:28,414:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown27', ''] 2024-02-14 13:48:28,414:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown28', ''] 2024-02-14 13:48:28,414:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 2, 'Unknown29', ''] 2024-02-14 13:48:28,414:DEBUG:jkabstractprotocol:get_responses@127: Got defn: ['discard', 93, 'Unknown30', ''] 2024-02-14 13:48:28,414:DEBUG:abstractprotocol:decode@284: 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'', 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'', b'', b'', b'', b'', b''] 2024-02-14 13:48:28,414:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-02-14 13:48:28,415:DEBUG:abstractprotocol:decode@512: Got defn ['Hex2Str', 4, 'Header', ''] 2024-02-14 13:48:28,415:DEBUG:abstractprotocol:process_response@118: Processing data_type: Hex2Str for data_name: Header, raw_value b'' 2024-02-14 13:48:28,415:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Str(raw_value) 2024-02-14 13:48:28,415:DEBUG:protocol_helpers:Hex2Str@104: Hex b'' decoded to 2024-02-14 13:48:28,415:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-02-14 13:48:28,415:DEBUG:abstractprotocol:decode@512: Got defn ['Hex2Str', 1, 'Record_Type', ''] 2024-02-14 13:48:28,415:DEBUG:abstractprotocol:process_response@118: Processing data_type: Hex2Str for data_name: Record_Type, raw_value b'' 2024-02-14 13:48:28,416:DEBUG:abstractprotocol:process_response@201: Processing format string Hex2Str(raw_value) 2024-02-14 13:48:28,416:DEBUG:protocol_helpers:Hex2Str@104: Hex b'' decoded to 2024-02-14 13:48:28,416:DEBUG:abstractprotocol:decode@485: Processing POSITIONAL type responses 2024-02-14 13:48:28,416:DEBUG:abstractprotocol:decode@512: Got defn ['Hex2Int', 1, 'Record_Counter', ''] 2024-02-14 13:48:28,416:DEBUG:abstractprotocol:process_response@118: Processing data_type: Hex2Int for data_name: Record_Counter, raw_value b'' 2024-02-14 13:48:28,416: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.11/site-packages/mppsolar/init.py", line 426, in main results = _device.run_command(command=_command) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/mppsolar/devices/device.py", line 115, in run_command decoded_response = self._protocol.decode(raw_response, command) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/mppsolar/protocols/abstractprotocol.py", line 543, in decode processed_responses = self.process_response( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/mppsolar/protocols/abstractprotocol.py", line 203, in process_response r = eval(format_string) ^^^^^^^^^^^^^^^^^^^ File "", line 1, in File "/usr/local/lib/python3.11/site-packages/mppsolar/protocols/protocol_helpers.py", line 90, in Hex2Int answer = hexString[0]


IndexError: index out of range
jblance commented 7 months ago

protocols jk02, jk04 and jkv11 are for bluetooth connections and arent applicable to serial connections try jkserial, jk232 or jk485

jblance commented 6 months ago

if you are still interested, first update to version 0.16.22+ anf then try: mppsolar -p /dev/ttyUSB0 -P jkserial -D and post the results - this will allow me to diagnose