jblance / mpp-solar

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

"no response" when trying to connect to Daly BMS #113

Closed SirkoVZ closed 3 years ago

SirkoVZ commented 3 years ago

Hi,

I connected my Daly BMS using the shipped RS485 USB Adapter to my RPi4, which seems to be fine: dmesg:

[ 4849.385451] usb 1-1.1.2: new full-speed USB device number 7 using xhci_hcd
[ 4849.521650] usb 1-1.1.2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[ 4849.521671] usb 1-1.1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 4849.521688] usb 1-1.1.2: Product: USB Serial
[ 4849.526542] ch341 1-1.1.2:1.0: ch341-uart converter detected
[ 4849.532007] usb 1-1.1.2: ch341-uart converter now attached to ttyUSB1

lsusb:

...
Bus 001 Device 007: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
...

lsmod | grep ch341

ch341                  16384  0
usbserial              36864  2 cp210x,ch341

I tried mpp-solr (0.7.55):

mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY -c cellVoltages -I -D but I get "no response"

INFO:root:Solar Device Command Utility, version: 0.7.55, recent changes: add extra pi17 commands from lonertic
INFO:root:Creating device "unnamed" (type: "mppsolar") on port "/dev/ttyUSB1 (porttype=daly)" using protocol "DALY"
DEBUG:root:device_class <class 'mppsolar.devices.mppsolar.mppsolar'>
DEBUG:device:mppsolar __init__ args ()
DEBUG:device:mppsolar __init__ kwargs {'name': 'unnamed', 'port': '/dev/ttyUSB1', 'protocol': 'DALY', 'baud': 9600, 'porttype': 'daly', 'mqtt_broker': 'localhost', 'mqtt_port': 1883, 'mqtt_user': None, 'mqtt_pass': None}
INFO:device:set_port: Port overide - using port 'daly'
DEBUG:device:get_port_type: port matches daly
INFO:device:set_port: Using dalyserialio for communications
DEBUG:device:set_protocol: Protocol DALY
DEBUG:device:mppsolar __init__ name unnamed, port <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5eb9e30>, protocol <mppsolar.protocols.daly.daly object at 0xb5eb9c70>
DEBUG:root:Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0xb5eb9f90>, 'cellVoltages', 'cellVoltages', 'screen', None, None)]
INFO:root:Looping 1 commands
INFO:root:Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5eb9e30>, protocol: <mppsolar.protocols.daly.daly object at 0xb5eb9c70> for command: cellVoltages, tag: cellVoltages, outputs: screen
INFO:device:run_command: Running command cellVoltages
INFO:daly:get_full_command: Using protocol b'DALY' with 7 commands
DEBUG:AbstractProtocol:get_command_defn: Processing command 'cellVoltages'
DEBUG:AbstractProtocol:get_command_defn: Found command cellVoltages in protocol b'DALY'
DEBUG:daly:get_full_command: full command: b'\xa5\x80\x95\x08\x00\x00\x00\x00\x00\x00\x00\x00\xc2\n'
INFO:device:run_command: full command b'\xa5\x80\x95\x08\x00\x00\x00\x00\x00\x00\x00\x00\xc2\n' for command cellVoltages
DEBUG:AbstractProtocol:get_command_defn: Processing command 'cellVoltages'
DEBUG:AbstractProtocol:get_command_defn: Found command cellVoltages in protocol b'DALY'
DEBUG:DalySerialIO:send_and_receive: port /dev/ttyUSB1, baudrate 9600
DEBUG:DalySerialIO:send_and_receive: Executing command via dalyserialio...
DEBUG:DalySerialIO:send_and_receive: serial response was: b''
DEBUG:device:run_command: Send and Receive Response b''
INFO:AbstractProtocol:decode: response passed to decode: b''
INFO:AbstractProtocol:No response
INFO:device:run_command: Decoded response {'ERROR': ['No response', '']}
DEBUG:root:results: {'ERROR': ['No response', '']}
INFO:root:attempting to create output processor: screen
DEBUG:screen:processor.screen __init__ kwargs {}
DEBUG:root:Using output filter: None
INFO:screen:output: Using output processor: screen
DEBUG:screen:output: kwargs {'data': {'ERROR': ['No response', '']}, 'tag': 'cellVoltages', 'mqtt_broker': 'localhost', 'mqtt_port': 1883, 'mqtt_user': None, 'mqtt_pass': None, 'mqtt_topic': 'mpp-solar', 'filter': None, 'excl_filter': None, 'keep_case': False}
Parameter                       Value           Unit
DEBUG:helpers:key_wanted: No filter and key error not excluded by excl_filter None so key wanted
error                           No response
DEBUG:root:Not daemon, so not looping

What do I wrong?

jblance commented 3 years ago

I'm not sure - what version of the BMS are you using? It has worked for some people, but some forums have noted that different models have different protocols. Can you try sending b'\xDD\xA5\x05\x00\xFF\xFB\x77\n' and/or b'\xa5\x40\x63\x08\x00\x00\x00\x00\x00\x00\x00\x00\x50' and see what response is given

refs: https://diysolarforum.com/threads/daly-bms-rs232-communication-protocol-crc-calculation.21853/ https://diysolarforum.com/threads/decoding-the-daly-smartbms-protocol.21898/

jblance commented 3 years ago

Use a script like

import serial
import time

## Vars ################
port = "/dev/ttyUSB1"
baud = 9600
########################

cmd = b'\xDD\xA5\x05\x00\xFF\xFB\x77\n'
#cmd = b'\xa5\x40\x63\x08\x00\x00\x00\x00\x00\x00\x00\x00\x50'
print (f"sending command {cmd}")

with serial.serial_for_url(port, baud) as s:
    s.timeout = 1
    s.write_timeout = 1
    s.flushInput()
    s.flushOutput()
    bytes_written = s.write(cmd)
    print (f"wrote {bytes_written} bytes")

    for _ in range(10):
        response_line = s.readline()
        time.sleep(10)
        print (f"Got response: {response_line}")
SirkoVZ commented 3 years ago

Thanks for your response. in first case I got:

[07:40:16][pi@raspi:~/solar]$ python daly_test.py
sending command b'\xdd\xa5\x05\x00\xff\xfbw\n'
wrote 8 bytes
Got response: b''
Got response: b''
Got response: b''
^CTraceback (most recent call last):
  File "daly_test.py", line 24, in <module>
    time.sleep(10)
KeyboardInterrupt

in second case I got:

[07:41:22][pi@raspi:~/solar]$ python daly_test.py
sending command b'\xa5@c\x08\x00\x00\x00\x00\x00\x00\x00\x00P'
wrote 13 bytes
Got response: b'\xa5\x01c\x08\x01DL-BMS-\xde\xa5\x01c\x08\x02R32-01E\x9d'
Got response: b''
Got response: b''
^CTraceback (most recent call last):
  File "daly_test.py", line 24, in <module>
    time.sleep(10)
KeyboardInterrupt

I have abrand of Daly BMS: MGod BMS https://de.aliexpress.com/item/1005001971361691.html?spm=a2g0s.9042311.0.0.4aa24c4d3z4a8C 16s LiFePo 150A It is just the different Color, manual and so on is the same as for Daly BMS, Windows Software is also the same...

SirkoVZ commented 3 years ago

I installed a Serial Port Monitor from https://www.eltima.com/products/serial-port-monitor/ for Windows, please see attached screenshot. It shows the values of the cell voltage, but I don't have a clue how to interpret the values or whether they help. serial

However, I can do tests, maybe also the initialization (when I start the Daly BMS Software) is interesting?

jblance commented 3 years ago

it looks like your BMS is responding to a different 'address' compared to the others that have tested the code I've made a quick change and added a protocol DALY40 that is basically the same as DALY but using address 0x40 for the BMS Can you grab the latest code from git and try the commands using -P DALY40 ie mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -c cellVoltages -I

It looks like the decode is the same (or very similar), so I'm interested to see what results you get

SirkoVZ commented 3 years ago

Thanks, looks much better:

[11:57:04][pi@raspi:~]$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -c cellVoltages -I
INFO:root:Solar Device Command Utility, version: 0.7.56, recent changes: add daly40
INFO:root:Creating device "unnamed" (type: "mppsolar") on port "/dev/ttyUSB1 (porttype=daly)" using protocol "DALY40"
INFO:device:set_port: Port overide - using port 'daly'
INFO:device:set_port: Using dalyserialio for communications
INFO:root:Looping 1 commands
INFO:root:Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5f25f50>, protocol: <mppsolar.protocols.daly40.daly40 object at 0xb5f25c30> for command: cellVoltages, tag: cellVoltages, outputs: screen
INFO:device:run_command: Running command cellVoltages
INFO:daly40:get_full_command: Using protocol b'DALY40' with 7 commands
INFO:device:run_command: full command b'\xa5@\x95\x08\x00\x00\x00\x00\x00\x00\x00\x00\x82\n' for command cellVoltages
INFO:AbstractProtocol:decode: response passed to decode: b'\xa5\x01\x95\x08\x01\x0c\x86\x0c\x89\x0c\x89\x00\x00\xa5\x01\x95\x08\x02\x0c\x89\x0c\x83\x0c\x87\x00\xfc\xa5\x01\x95\x08\x03\x0c\x88\x0c\x87\x0c\x88\x00\x01\xa5\x01\x95\x08\x04\x0c\x89\x0c\x89\x0c\x87\x00\x04\xa5\x01\x95\x08\x05\x0c\x88\x0c\x89\x0c\x88\x00\x05\xa5\x01\x95\x08\x06\x0c\x86\x0c\x89\x0c\x88\x00\x04'
INFO:daly40:is multiframe response - assuming ok for now
INFO:daly40:Multi frame response with 6 frames
INFO:AbstractProtocol:decode: Processing response of type MULTIFRAME-POSITIONAL
INFO:device:run_command: Decoded response {'raw_response': ['¥\x01\x95\x08\x01\x0c\x86\x0c\x89\x0c\x89\x00\x00¥\x01\x95\x08\x02\x0c\x89\x0c\x83\x0c\x87\x00ü¥\x01\x95\x08\x03\x0c\x88\x0c\x87\x0c\x88\x00\x01¥\x01\x95\x08\x04\x0c\x89\x0c\x89\x0c\x87\x00\x04¥\x01\x95\x08\x05\x0c\x88\x0c\x89\x0c\x88\x00\x05¥\x01\x95\x08\x06\x0c\x86\x0c\x89\x0c\x88\x00\x04', ''], '_command': 'cellVoltages', '_command_description': 'Cell Voltages Information', 'Cell 01 Voltage': [3.206, 'V'], 'Cell 02 Voltage': [3.209, 'V'], 'Cell 03 Voltage': [3.209, 'V'], 'Cell 04 Voltage': [3.209, 'V'], 'Cell 05 Voltage': [3.203, 'V'], 'Cell 06 Voltage': [3.207, 'V'], 'Cell 07 Voltage': [3.208, 'V'], 'Cell 08 Voltage': [3.207, 'V'], 'Cell 09 Voltage': [3.208, 'V'], 'Cell 10 Voltage': [3.209, 'V'], 'Cell 11 Voltage': [3.209, 'V'], 'Cell 12 Voltage': [3.207, 'V'], 'Cell 13 Voltage': [3.208, 'V'], 'Cell 14 Voltage': [3.209, 'V'], 'Cell 15 Voltage': [3.208, 'V'], 'Cell 16 Voltage': [3.206, 'V'], 'Cell 17 Voltage': [3.209, 'V'], 'Cell 18 Voltage': [3.208, 'V']}
INFO:root:attempting to create output processor: screen
INFO:screen:output: Using output processor: screen
Command: cellVoltages - Cell Voltages Information
------------------------------------------------------------
Parameter                       Value           Unit
cell_01_voltage                 3.206           V
cell_02_voltage                 3.209           V
cell_03_voltage                 3.209           V
cell_04_voltage                 3.209           V
cell_05_voltage                 3.203           V
cell_06_voltage                 3.207           V
cell_07_voltage                 3.208           V
cell_08_voltage                 3.207           V
cell_09_voltage                 3.208           V
cell_10_voltage                 3.209           V
cell_11_voltage                 3.209           V
cell_12_voltage                 3.207           V
cell_13_voltage                 3.208           V
cell_14_voltage                 3.209           V
cell_15_voltage                 3.208           V
cell_16_voltage                 3.206           V
cell_17_voltage                 3.209           V
cell_18_voltage                 3.208           V

but, there are only 16 cells, not 18 as shown

jblance commented 3 years ago

Oh, thats weird. The response is definitely 6 frames with 3 results in each Can you get a screenshot of the app and the comand results as close to the same time?

The decode should be the same... Can you try some of other commands to see if there are other anomalies

SirkoVZ commented 3 years ago

ok, the first 16 voltages are fine, I don't know what voltage 17 and 18 is:

[14:14:22][pi@raspi:~]$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -c cellVoltages
Command: cellVoltages - Cell Voltages Information
------------------------------------------------------------
Parameter                       Value           Unit
cell_01_voltage                 3.142           V
cell_02_voltage                 3.142           V
cell_03_voltage                 3.142           V
cell_04_voltage                 3.142           V
cell_05_voltage                 3.138           V
cell_06_voltage                 3.14            V
cell_07_voltage                 3.14            V
cell_08_voltage                 3.142           V
cell_09_voltage                 3.141           V
cell_10_voltage                 3.141           V
cell_11_voltage                 3.142           V
cell_12_voltage                 3.14            V
cell_13_voltage                 3.142           V
cell_14_voltage                 3.142           V
cell_15_voltage                 3.142           V
cell_16_voltage                 3.142           V
cell_17_voltage                 3.142           V
cell_18_voltage                 3.142           V

daly

The temperatures show some more, there is only one I guess: 22°C

[14:27:14][pi@raspi:~]$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -c cellTemperatures -I
INFO:root:Solar Device Command Utility, version: 0.7.56, recent changes: add daly40
INFO:root:Creating device "unnamed" (type: "mppsolar") on port "/dev/ttyUSB1 (porttype=daly)" using protocol "DALY40"
INFO:device:set_port: Port overide - using port 'daly'
INFO:device:set_port: Using dalyserialio for communications
INFO:root:Looping 1 commands
INFO:root:Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5eb7fb0>, protocol: <mppsolar.protocols.daly40.daly40 object at 0xb5eb7c90> for command: cellTemperatures, tag: cellTemperatures, outputs: screen
INFO:device:run_command: Running command cellTemperatures
INFO:daly40:get_full_command: Using protocol b'DALY40' with 7 commands
INFO:device:run_command: full command b'\xa5@\x96\x08\x00\x00\x00\x00\x00\x00\x00\x00\x83\n' for command cellTemperatures
INFO:AbstractProtocol:decode: response passed to decode: b'\xa5\x01\x96\x08\x01>8\x0c9\x0c8\x10T'
INFO:daly40:Multi frame response with 1 frames
INFO:AbstractProtocol:decode: Processing response of type MULTIFRAME-POSITIONAL
INFO:device:run_command: Decoded response {'raw_response': ['¥\x01\x96\x08\x01>8\x0c9\x0c8\x10T', ''], '_command': 'cellTemperatures', '_command_description': 'Cell Temperature Information', 'Cell 01 Temperature': [22, '°C'], 'Cell 02 Temperature': [16, '°C'], 'Cell 03 Temperature': [-28, '°C'], 'Cell 04 Temperature': [17, '°C'], 'Cell 05 Temperature': [-28, '°C'], 'Cell 06 Temperature': [16, '°C'], 'Cell 07 Temperature': [-24, '°C']}
INFO:root:attempting to create output processor: screen
INFO:screen:output: Using output processor: screen
Command: cellTemperatures - Cell Temperature Information
------------------------------------------------------------
Parameter                       Value           Unit
cell_01_temperature             22              °C
cell_02_temperature             16              °C
cell_03_temperature             -28             °C
cell_04_temperature             17              °C
cell_05_temperature             -28             °C
cell_06_temperature             16              °C
cell_07_temperature             -24             °C

The Status seems to be fine:

[14:27:37][pi@raspi:~]$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -c status -I
INFO:root:Solar Device Command Utility, version: 0.7.56, recent changes: add daly40
INFO:root:Creating device "unnamed" (type: "mppsolar") on port "/dev/ttyUSB1 (porttype=daly)" using protocol "DALY40"
INFO:device:set_port: Port overide - using port 'daly'
INFO:device:set_port: Using dalyserialio for communications
INFO:root:Looping 1 commands
INFO:root:Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5f78f10>, protocol: <mppsolar.protocols.daly40.daly40 object at 0xb5f78c90> for command: status, tag: status, outputs: screen
INFO:device:run_command: Running command status
INFO:daly40:get_full_command: Using protocol b'DALY40' with 7 commands
INFO:device:run_command: full command b'\xa5@\x94\x08\x00\x00\x00\x00\x00\x00\x00\x00\x81\n' for command status
INFO:AbstractProtocol:decode: response passed to decode: b'\xa5\x01\x94\x08\x10\x01\x00\x00\x02\x00\x00\x10e'
INFO:AbstractProtocol:decode: Processing response of type POSITIONAL
INFO:device:run_command: Decoded response {'raw_response': ['¥\x01\x94\x08\x10\x01\x00\x00\x02\x00\x00\x10e', ''], '_command': 'status', '_command_description': 'Status Information', 'Battery String': [16, ''], 'Temperature': ['01', ''], 'Charger Status': ['disconnected', ''], 'Load Status': ['disconnected', ''], 'Flags (TODO)': ['02', ''], 'Charge/Discharge Cycles': [0, 'cycles'], 'Reserved': ['10', '']}
INFO:root:attempting to create output processor: screen
INFO:screen:output: Using output processor: screen
Command: status - Status Information
------------------------------------------------------------
Parameter                       Value           Unit
battery_string                  16
temperature                     01
charger_status                  disconnected
load_status                     disconnected
flags_(todo)                    02
charge/discharge_cycles         0               cycles
reserved                        10

and the SOC:

[14:28:26][pi@raspi:~]$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -c SOC -I
INFO:root:Solar Device Command Utility, version: 0.7.56, recent changes: add daly40
INFO:root:Creating device "unnamed" (type: "mppsolar") on port "/dev/ttyUSB1 (porttype=daly)" using protocol "DALY40"
INFO:device:set_port: Port overide - using port 'daly'
INFO:device:set_port: Using dalyserialio for communications
INFO:root:Looping 1 commands
INFO:root:Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5ec8f10>, protocol: <mppsolar.protocols.daly40.daly40 object at 0xb5ec8cb0> for command: SOC, tag: SOC, outputs: screen
INFO:device:run_command: Running command SOC
INFO:daly40:get_full_command: Using protocol b'DALY40' with 7 commands
INFO:device:run_command: full command b'\xa5@\x90\x08\x00\x00\x00\x00\x00\x00\x00\x00}\n' for command SOC
INFO:AbstractProtocol:decode: response passed to decode: b'\xa5\x01\x90\x08\x01\xf2\x00\x00uA\x00\x11\xf8'
INFO:AbstractProtocol:decode: Processing response of type POSITIONAL
INFO:device:run_command: Decoded response {'raw_response': ['¥\x01\x90\x08\x01ò\x00\x00uA\x00\x11ø', ''], '_command': 'SOC', '_command_description': 'State of Charge', 'Battery Bank Voltage': [49.8, 'V'], 'acquistion': [0.0, 'V'], 'Current': [1.7, 'A'], 'SOC': [1.7, '%']}
INFO:root:attempting to create output processor: screen
INFO:screen:output: Using output processor: screen
Command: SOC - State of Charge
------------------------------------------------------------
Parameter                       Value           Unit
battery_bank_voltage            49.8            V
acquistion                      0.0             V
current                         1.7             A
soc                             1.7             %

Are there some commands else?

SirkoVZ commented 3 years ago

I made several tests and it seems that cell_17_voltage = cell_14_voltage and cell_18_voltage = cell_15_voltage

jblance commented 3 years ago

There are 7 commands implemented so far. You can see a list by using -c with no command name

It looks like the BMS sends info for cells and temp sensors that are not present (probably to pad the result) I think the gui is taking the earlier results that show the number of cells and Temps into account. This kinda breaks the logic of mppsolar so far (which is send a command and decode the result)

Options as I see it

  1. Fix it by ignoring the unnecessary results
  2. Use filters to exclude the unwanted results
  3. Add an option to tell how many cells etc are present
  4. Change internal logic to make commands rely on other commands

Thoughts from your side?

jblance commented 3 years ago

Note to self: status command's battery_string should be cell_count or number_of_cells status command's temperature should be temperature_count or number_of_temperature_sensors

SirkoVZ commented 3 years ago

Other commands also work:

[07:40:10][pi@raspi:~]$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -q screen -c
Command: command help - List available commands for protocol DALY40
------------------------------------------------------------
Parameter                       Value           Unit
SOC                             State of Charge
cellMinMaxVoltages              Cell Minimum and Maximum Voltages
cellMinMaxTemps                 Cell Minimum and Maximum Temperatures
mosStatus                       mosStatus
status                          Status Information
cellVoltages                    Cell Voltages Information
cellTemperatures                Cell Temperature Information
[07:40:33][pi@raspi:~]$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -q screen -c cellMinMaxVoltages
Command: cellMinMaxVoltages - Cell Minimum and Maximum Voltages
------------------------------------------------------------
Parameter                       Value           Unit
maximum_cell_voltage            3.141           V
maximum_cell_number             14
minimum_cell_voltage            3.133           V
minimum_cell_number             5
[07:40:57][pi@raspi:~]$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -q screen -c cellMinMaxTemps
Command: cellMinMaxTemps - Cell Minimum and Maximum Temperatures
------------------------------------------------------------
Parameter                       Value           Unit
maximum_cell_temperature        22              °C
maximum_cell_number             1
minimum_cell_temperature        22              °C
minimum_cell_number             1
[07:41:30][pi@raspi:~]$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -q screen -c mosStatus
Command: mosStatus - mosStatus
------------------------------------------------------------
Parameter                       Value           Unit
charge_status                   charged
charging_mos_tube_status        01
discharging_mos_tube_status     01
bms_life                        212             cycles
residual_capacity_(todo)        00000d48        (HEX) mAH
[07:42:09][pi@raspi:~]$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -q screen -c status
Command: status - Status Information
------------------------------------------------------------
Parameter                       Value           Unit
battery_string                  16
temperature                     01
charger_status                  disconnected
load_status                     disconnected
flags_(todo)                    02
charge/discharge_cycles         0               cycles
reserved                        48

I would ignore all cell_voltages that are more than battery_string (resp. cell_count).

Another question: As I call several commands the sum of time needed to respond is pretty high. Is there a way to get the results faster? Edit: The 3 commands in a shell script getDalyDaten.sh take 38 seconds

mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -o json_mqtt -q localhost --mqtttopic /SmartHome/DalyBMS/Temperatur/tele -c cellTemperatures
mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -o json_mqtt -q localhost --mqtttopic /SmartHome/DalyBMS/Status/tele -c SOC
mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -o json_mqtt -q localhost --mqtttopic /SmartHome/DalyBMS/Voltage/tele -c cellVoltages
[07:43:47][pi@raspi:~]$ time ~/solar/getDalyDaten.sh

real    0m38,221s
user    0m4,187s
sys     0m0,753s
jblance commented 3 years ago

try testing all 3 commands at once with mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -c cellTemperatures,SOC,cellVoltages and see what the time is like, otherwise i could add times to the log output to see which part is taking all the time

jblance commented 3 years ago

Also, in one of your outputs you got residual_capacity_(todo) 00000d48 (HEX) mAH what is the correct capacity here? (is it 3400mAH?)

SirkoVZ commented 3 years ago

the three commands are about 10% faster, but still more than 34 seconds. As I use MQTT messages with own topics for cellTemperatures, Soc, ... I guess the combined -c cellTemperatures,SOC,cellVoltages is not an option?

mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -o json_mqtt -q localhost --mqtttopic /SmartHome/DalyBMS/Temperatur/tele -c cellTemperatures
mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -o json_mqtt -q localhost --mqtttopic /SmartHome/DalyBMS/Status/tele -c SOC
mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -o json_mqtt -q localhost --mqtttopic /SmartHome/DalyBMS/Voltage/tele -c cellVoltages
mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -o json_mqtt -q localhost --mqtttopic /SmartHome/DalyBMS/MinMaxVoltages/tele -c cellMinMaxVoltages

Debugging output with times would be helpful I guess...

The residualcapacity(todo) seems to me plausible.

Thanks again for your efforts.

jblance commented 3 years ago

latest commits have changes to logging to add times A -I run would be a good place to start for timings

SirkoVZ commented 3 years ago

it´seems that the BMS wastes the time:

[13:56:44][pi@raspi:~]$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -c SOC -I -D
2021-05-21 13:57:28,680:INFO:__init__:main@235: Solar Device Command Utility, version: 0.7.57, recent changes: change logging format
2021-05-21 13:57:28,680:INFO:__init__:main@331: Creating device "unnamed" (type: "mppsolar") on port "/dev/ttyUSB1 (porttype=daly)" using protocol "DALY40"
2021-05-21 13:57:28,700:DEBUG:__init__:main@334: device_class <class 'mppsolar.devices.mppsolar.mppsolar'>
2021-05-21 13:57:28,700:DEBUG:device:__init__@31: __init__ args ()
2021-05-21 13:57:28,700:DEBUG:device:__init__@32: __init__ kwargs {'name': 'unnamed', 'port': '/dev/ttyUSB1', 'protocol': 'DALY40', 'baud': 9600, 'porttype': 'daly', 'mqtt_broker': 'localhost', 'mqtt_port': 1883, 'mqtt_user': None, 'mqtt_pass': None}
2021-05-21 13:57:28,701:INFO:device:set_port@130: Port overide - using port 'daly'
2021-05-21 13:57:28,701:DEBUG:device:get_port_type@77: port matches daly
2021-05-21 13:57:28,701:INFO:device:set_port@166: Using dalyserialio for communications
2021-05-21 13:57:28,719:DEBUG:device:set_protocol@96: Protocol DALY40
2021-05-21 13:57:28,768:DEBUG:device:__init__@36: __init__ name unnamed, port <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5ef8fd0>, protocol <mppsolar.protocols.daly40.daly40 object at 0xb5ef8df0>
2021-05-21 13:57:28,768:DEBUG:__init__:main@381: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0xb5ef8dd0>, 'SOC', 'SOC', 'screen', None, None)]
2021-05-21 13:57:28,768:INFO:__init__:main@386: Looping 1 commands
2021-05-21 13:57:28,769:INFO:__init__:main@397: Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5ef8fd0>, protocol: <mppsolar.protocols.daly40.daly40 object at 0xb5ef8df0> for command: SOC, tag: SOC, outputs: screen
2021-05-21 13:57:28,769:INFO:device:run_command@263: Running command SOC
2021-05-21 13:57:28,769:INFO:daly40:get_full_command@207: Using protocol b'DALY40' with 7 commands
2021-05-21 13:57:28,770:DEBUG:abstractprotocol:get_command_defn@42: Processing command 'SOC'
2021-05-21 13:57:28,770:DEBUG:abstractprotocol:get_command_defn@44: Found command SOC in protocol b'DALY40'
2021-05-21 13:57:28,770:DEBUG:daly40:get_full_command@226: full command: b'**\xa5@\x90\x08\x00\x00\x00\x00\x00\x00\x00\x00**}\n'
2021-05-21 13:57:28,771:INFO:device:run_command@289: full command b'\xa5@\x90\x08\x00\x00\x00\x00\x00\x00\x00\x00}\n' for command SOC
2021-05-21 13:57:28,771:DEBUG:abstractprotocol:get_command_defn@42: Processing command 'SOC'
2021-05-21 13:57:28,771:DEBUG:abstractprotocol:get_command_defn@44: Found command SOC in protocol b'DALY40'
2021-05-21 13:57:28,772:DEBUG:dalyserialio:send_and_receive@19: port /dev/ttyUSB1, baudrate 9600
2021-05-21 13:57:28,783:DEBUG:dalyserialio:send_and_receive@22: Executing command via dalyserialio...
2021-05-21 13:57:39,803:DEBUG:dalyserialio:send_and_receive@39: serial response was: b'\xa5\x01\x90\x08\x02\x02\x00\x00u(\x00 \xff'
2021-05-21 13:57:39,806:DEBUG:device:run_command@308: Send and Receive Response b'\xa5\x01\x90\x08\x02\x02\x00\x00u(\x00 \xff'
2021-05-21 13:57:39,806:INFO:abstractprotocol:decode@137: response passed to decode: b'\xa5\x01\x90\x08\x02\x02\x00\x00u(\x00 \xff'
2021-05-21 13:57:39,806:DEBUG:daly40:check_response_valid@245: checking validity of b'\xa5\x01\x90\x08\x02\x02\x00\x00u(\x00 \xff'
2021-05-21 13:57:39,806:DEBUG:daly40:check_response_valid@258: DALY Checksum matches response 'b'\xa5\x01\x90\x08\x02\x02\x00\x00u(\x00 \xff'' checksum:255
2021-05-21 13:57:39,807:DEBUG:abstractprotocol:get_command_defn@42: Processing command 'SOC'
2021-05-21 13:57:39,807:DEBUG:abstractprotocol:get_command_defn@44: Found command SOC in protocol b'DALY40'
2021-05-21 13:57:39,807:DEBUG:abstractprotocol:decode@174: trimmed and split responses: [b'\xa5', b'\x01', b'\x90', b'\x08', b'\x02\x02', b'\x00\x00', b'u(', b'\x00 ', b'\xff']
2021-05-21 13:57:39,807:INFO:abstractprotocol:decode@181: Processing response of type POSITIONAL
2021-05-21 13:57:39,807:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-05-21 13:57:39,807:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: start flag, raw_value b'\xa5'
2021-05-21 13:57:39,808:DEBUG:abstractprotocol:process_response@93: Discarding start flag:b'\xa5'
2021-05-21 13:57:39,808:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-05-21 13:57:39,808:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: module address, raw_value b'\x01'
2021-05-21 13:57:39,808:DEBUG:abstractprotocol:process_response@93: Discarding module address:b'\x01'
2021-05-21 13:57:39,808:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-05-21 13:57:39,809:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: command id, raw_value b'\x90'
2021-05-21 13:57:39,809:DEBUG:abstractprotocol:process_response@93: Discarding command id:b'\x90'
2021-05-21 13:57:39,809:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-05-21 13:57:39,809:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: data length, raw_value b'\x08'
2021-05-21 13:57:39,809:DEBUG:abstractprotocol:process_response@93: Discarding data length:b'\x08'
2021-05-21 13:57:39,809:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-05-21 13:57:39,809:DEBUG:abstractprotocol:process_response@84: Got template r/10 for Battery Bank Voltage b'\x02\x02'
2021-05-21 13:57:39,810:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: Battery Bank Voltage, raw_value b'\x02\x02'
2021-05-21 13:57:39,810:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-05-21 13:57:39,810:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\x02\x02' 2 byte decoded to 514
2021-05-21 13:57:39,810:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-05-21 13:57:39,810:DEBUG:abstractprotocol:process_response@84: Got template r/10 for acquistion b'\x00\x00'
2021-05-21 13:57:39,811:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: acquistion, raw_value b'\x00\x00'
2021-05-21 13:57:39,811:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-05-21 13:57:39,811:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\x00\x00' 2 byte decoded to 0
2021-05-21 13:57:39,811:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-05-21 13:57:39,811:DEBUG:abstractprotocol:process_response@84: Got template (r-30000)/10 for Current b'u('
2021-05-21 13:57:39,812:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: Current, raw_value b'u('
2021-05-21 13:57:39,812:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-05-21 13:57:39,812:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'u(' 2 byte decoded to 29992
2021-05-21 13:57:39,812:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-05-21 13:57:39,812:DEBUG:abstractprotocol:process_response@84: Got template r/10 for SOC b'\x00 '
2021-05-21 13:57:39,813:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: SOC, raw_value b'\x00 '
2021-05-21 13:57:39,813:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-05-21 13:57:39,813:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\x00 ' 2 byte decoded to 32
2021-05-21 13:57:39,813:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-05-21 13:57:39,813:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: checksum, raw_value b'\xff'
2021-05-21 13:57:39,814:DEBUG:abstractprotocol:process_response@93: Discarding checksum:b'\xff'
2021-05-21 13:57:39,814:INFO:device:run_command@327: Decoded response {'raw_response': ['¥\x01\x90\x08\x02\x02\x00\x00u(\x00 ÿ', ''], '_command': 'SOC', '_command_description': 'State of Charge', 'Battery Bank Voltage': [51.4, 'V'], 'acquistion': [0.0, 'V'], 'Current': [-0.8, 'A'], 'SOC': [3.2, '%']}
2021-05-21 13:57:39,814:DEBUG:__init__:main@400: results: {'raw_response': ['¥\x01\x90\x08\x02\x02\x00\x00u(\x00 ÿ', ''], '_command': 'SOC', '_command_description': 'State of Charge', 'Battery Bank Voltage': [51.4, 'V'], 'acquistion': [0.0, 'V'], 'Current': [-0.8, 'A'], 'SOC': [3.2, '%']}
2021-05-21 13:57:39,814:INFO:__init__:get_outputs@26: attempting to create output processor: screen
2021-05-21 13:57:39,818:DEBUG:screen:__init__@16: processor.screen __init__ kwargs {}
2021-05-21 13:57:39,818:DEBUG:__init__:main@406: Using output filter: None
2021-05-21 13:57:39,818:INFO:screen:output@19: Using output processor: screen
2021-05-21 13:57:39,819:DEBUG:screen:output@20: kwargs {'data': {'raw_response': ['¥\x01\x90\x08\x02\x02\x00\x00u(\x00 ÿ', ''], '_command': 'SOC', '_command_description': 'State of Charge', 'Battery Bank Voltage': [51.4, 'V'], 'acquistion': [0.0, 'V'], 'Current': [-0.8, 'A'], 'SOC': [3.2, '%']}, 'tag': 'SOC', 'mqtt_broker': 'localhost', 'mqtt_port': 1883, 'mqtt_user': None, 'mqtt_pass': None, 'mqtt_topic': 'mpp-solar', 'filter': None, 'excl_filter': None, 'keep_case': False}
Command: SOC - State of Charge
------------------------------------------------------------
Parameter                       Value           Unit
2021-05-21 13:57:39,819:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key battery_bank_voltage not excluded by excl_filter None so key wanted
battery_bank_voltage            51.4            V
2021-05-21 13:57:39,819:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key acquistion not excluded by excl_filter None so key wanted
acquistion                      0.0             V
2021-05-21 13:57:39,820:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key current not excluded by excl_filter None so key wanted
current                         -0.8            A
2021-05-21 13:57:39,820:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key soc not excluded by excl_filter None so key wanted
soc                             3.2             %
2021-05-21 13:57:39,820:DEBUG:__init__:main@426: Not daemon, so not looping

However, the Windows software shows the first values within a second and updates updates about once a second. Probably the commands are different? I can do some dump using the serial port sniffer, if helpful...

Edit2: forgot to click "Save" at Friday: Edit: Is the sent command really \xa5@\x90\x08\x00\x00\x00\x00\x00\x00\x00\x00 as shown in the log above? I can repeat this command in Windows without success. Also it seems that all requests I sniffed hava 40 as second byte. Here is the startup of the Windows BMS software for about 1 second, probably it helps:

[21/05/2021 14:37:22] - Open port COM9 (C:\Users\Latitude\Downloads\BmsMonitorV1.2.8\PCMaster.exe) 

[21/05/2021 14:37:23] Written data (COM9) 
    a5 40 95 08 00 00 00 00 00 00 00 00 82            ¥@•.........‚    
[21/05/2021 14:37:23] Read data (COM9) 
    a5 01 95 08 01 0c 6e 0c 6f 0c 6e 45 f8 a5 01 95   ¥.•...n.o.nEø¥.• 
    08 02 0c 6f 0c 6c 0c 6f 45 f8 a5 01 95 08 03 0c   ...o.l.oEø¥.•... 
    6e 0c 6f 0c 6e 45 fa a5 01 95 08 04 0c 6f 0c 6f   n.o.nEú¥.•...o.o 
    0c 6f 45 fd a5 01 95 08 05 0c 6e 0c 6f 0c 6e 45   .oEý¥.•...n.o.nE 
    fc a5 01 95 08 06 0c 6f 0c 6f 0c 6e 45 fe         ü¥.•...o.o.nEþ   
[21/05/2021 14:37:24] Written data (COM9) 
    a5 40 96 08 00 00 00 00 00 00 00 00 83            ¥@–.........ƒ    
[21/05/2021 14:37:24] Read data (COM9) 
    a5 01 96 08 01 3e 6f 0c 6f 0c 6e 45 2c            ¥.–..>o.o.nE,    
[21/05/2021 14:37:24] Written data (COM9) 
    a5 40 97 08 00 00 00 00 00 00 00 00 84            ¥@—.........„    
[21/05/2021 14:37:24] Read data (COM9) 
    a5 01 97 08 00 00 00 00 00 00 00 00 45            ¥.—.........E    
[21/05/2021 14:37:24] Written data (COM9) 
    a5 40 98 08 00 00 00 00 00 00 00 00 85            ¥@˜.........…    
[21/05/2021 14:37:24] Read data (COM9) 
    a5 01 98 08 00 00 80 00 00 00 00 00 c6            ¥.˜...€.....Æ    
[21/05/2021 14:37:24] Written data (COM9) 
    a5 40 d8 08 00 00 00 00 00 00 00 00 c5            ¥@Ø.........Å    
[21/05/2021 14:37:24] Read data (COM9) 
    a5 01 d8 08 00 00 46 00 01 00 00 00 cd            ¥.Ø...F.....Í    
[21/05/2021 14:37:24] Written data (COM9) 
    a5 40 90 08 00 00 00 00 00 00 00 00 7d            ¥@.........}    
[21/05/2021 14:37:24] Read data (COM9) 
    a5 01 90 08 01 fd 00 00 75 30 00 1c fd            ¥...ý..u0..ý    
[21/05/2021 14:37:24] Written data (COM9) 
    a5 40 91 08 00 00 00 00 00 00 00 00 7e            ¥@‘.........~    
[21/05/2021 14:37:24] Read data (COM9) 
    a5 01 91 08 0c 6f 0f 0c 6d 05 00 1c 63            ¥.‘..o..m...c    
[21/05/2021 14:37:24] Written data (COM9) 
    a5 40 92 08 00 00 00 00 00 00 00 00 7f            ¥@’.........    
[21/05/2021 14:37:24] Read data (COM9) 
    a5 01 92 08 3e 01 3e 01 6d 05 00 1c 4c            ¥.’.>.>.m...L    
[21/05/2021 14:37:24] Written data (COM9) 
    a5 40 93 08 00 00 00 00 00 00 00 00 80            ¥@“.........€    
[21/05/2021 14:37:24] Read data (COM9) 
    a5 01 93 08 02 01 01 15 00 00 15 e0 4f            ¥.“........àO    
[21/05/2021 14:37:24] Written data (COM9) 
    a5 40 94 08 00 00 00 00 00 00 00 00 81            ¥@”.........    
[21/05/2021 14:37:24] Read data (COM9) 
    a5 01 94 08 10 01 00 00 02 00 00 e0 35            ¥.”........à5    
[21/05/2021 14:37:25] Written data (COM9) 
    a5 40 95 08 00 00 00 00 00 00 00 00 82            ¥@•.........‚    
[21/05/2021 14:37:25] Read data (COM9) 
    a5 01 95 08 01 0c 6e 0c 6f 0c 6f e0 94 a5 01 95   ¥.•...n.o.oà”¥.• 
    08 02 0c 6f 0c 6c 0c 6e e0 92 a5 01 95 08 03 0c   ...o.l.nà’¥.•... 
    6e 0c 6f 0c 6f e0 96 a5 01 95 08 04 0c 6f 0c 70   n.o.oà–¥.•...o.p 
    0c 6f e0 99 a5 01 95 08 05 0c 6f 0c 6f 0c 6e e0   .oà™¥.•...o.o.nà 
jblance commented 3 years ago

That looks like a bug in the io handler. I'll try coding a fix and let you know when I'm done

SirkoVZ commented 3 years ago

Hi, as a workaround(?) I set s.timeout = 0.1 https://github.com/jblance/mpp-solar/blob/019b9b023dedd54de32074a8f7102e2b2f5a73f2/mppsolar/io/dalyserialio.py#L23 But I'm not sure whether this is a good idea ;-)

jblance commented 3 years ago

Not ideal, it's the readline function need to change that and make sure that it exits correctly. But if it works ok.....

Sorry I haven't had a chance to make changes lately

jblance commented 3 years ago

added a change that should improve performance in 0.7.60 can you try when you get a chance and post a debug run, thanks

jblance commented 3 years ago

Edit: Is the sent command really \xa5@\x90\x08\x00\x00\x00\x00\x00\x00\x00\x00 as shown in the log above? I can repeat this command in Windows without success. Also it seems that all requests I sniffed hava 40 as second byte.

0x40 is 64 decimal which is @ as an ascii char, ie

>>> 0x40
64
>>> chr(64)
'@'
SirkoVZ commented 3 years ago

very fast now :-)

$ mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -q screen -c SOC  -D -I
2021-06-02 10:57:23,547:INFO:__init__:main@235: Solar Device Command Utility, version: 0.7.61, first try at pi17 setter
2021-06-02 10:57:23,548:INFO:__init__:main@339: Creating device "unnamed" (type: "mppsolar") on port "/dev/ttyUSB1 (porttype=daly)" using protocol "DALY40"
2021-06-02 10:57:23,567:DEBUG:__init__:main@342: device_class <class 'mppsolar.devices.mppsolar.mppsolar'>
2021-06-02 10:57:23,567:DEBUG:device:__init__@31: __init__ args ()
2021-06-02 10:57:23,568:DEBUG:device:__init__@32: __init__ kwargs {'name': 'unnamed', 'port': '/dev/ttyUSB1', 'protocol': 'DALY40', 'baud': 9600, 'porttype': 'daly', 'mqtt_broker': 'screen', 'mqtt_port': 1883, 'mqtt_user': None, 'mqtt_pass': None}
2021-06-02 10:57:23,568:INFO:device:set_port@130: Port overide - using port 'daly'
2021-06-02 10:57:23,568:DEBUG:device:get_port_type@77: port matches daly
2021-06-02 10:57:23,569:INFO:device:set_port@166: Using dalyserialio for communications
2021-06-02 10:57:23,587:DEBUG:device:set_protocol@96: Protocol DALY40
2021-06-02 10:57:23,641:DEBUG:device:__init__@36: __init__ name unnamed, port <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5edfe30>, protocol <mppsolar.protocols.daly40.daly40 object at 0xb5edfff0>
2021-06-02 10:57:23,641:DEBUG:__init__:main@389: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0xb5f9a790>, 'SOC', 'SOC', 'screen', None, None)]
2021-06-02 10:57:23,642:INFO:__init__:main@394: Looping 1 commands
2021-06-02 10:57:23,642:INFO:__init__:main@405: Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5edfe30>, protocol: <mppsolar.protocols.daly40.daly40 object at 0xb5edfff0> for command: SOC, tag: SOC, outputs: screen
2021-06-02 10:57:23,643:INFO:device:run_command@263: Running command SOC
2021-06-02 10:57:23,643:INFO:daly:get_full_command@208: Using protocol b'DALY40' with 7 commands
2021-06-02 10:57:23,644:DEBUG:abstractprotocol:get_command_defn@42: Processing command 'SOC'
2021-06-02 10:57:23,644:DEBUG:abstractprotocol:get_command_defn@44: Found command SOC in protocol b'DALY40'
2021-06-02 10:57:23,645:DEBUG:daly:get_full_command@225: full command: b'\xa5@\x90\x08\x00\x00\x00\x00\x00\x00\x00\x00}\n'
2021-06-02 10:57:23,645:INFO:device:run_command@289: full command b'\xa5@\x90\x08\x00\x00\x00\x00\x00\x00\x00\x00}\n' for command SOC
2021-06-02 10:57:23,645:DEBUG:abstractprotocol:get_command_defn@42: Processing command 'SOC'
2021-06-02 10:57:23,646:DEBUG:abstractprotocol:get_command_defn@44: Found command SOC in protocol b'DALY40'
2021-06-02 10:57:23,646:DEBUG:dalyserialio:send_and_receive@19: port /dev/ttyUSB1, baudrate 9600
2021-06-02 10:57:23,666:DEBUG:dalyserialio:send_and_receive@22: Executing command via dalyserialio...
2021-06-02 10:57:23,767:DEBUG:dalyserialio:send_and_receive@32: bytes waiting 13
2021-06-02 10:57:23,768:DEBUG:dalyserialio:send_and_receive@32: bytes waiting 0
2021-06-02 10:57:23,768:DEBUG:dalyserialio:send_and_receive@38: serial response was: b'\xa5\x01\x90\x08\x02\x19\x00\x00uc\x03\x82\xb6'
2021-06-02 10:57:23,771:DEBUG:device:run_command@308: Send and Receive Response b'\xa5\x01\x90\x08\x02\x19\x00\x00uc\x03\x82\xb6'
2021-06-02 10:57:23,772:INFO:abstractprotocol:decode@137: response passed to decode: b'\xa5\x01\x90\x08\x02\x19\x00\x00uc\x03\x82\xb6'
2021-06-02 10:57:23,772:DEBUG:daly:check_response_valid@244: checking validity of b'\xa5\x01\x90\x08\x02\x19\x00\x00uc\x03\x82\xb6'
2021-06-02 10:57:23,773:DEBUG:daly:check_response_valid@257: DALY Checksum matches response 'b'\xa5\x01\x90\x08\x02\x19\x00\x00uc\x03\x82\xb6'' checksum:182
2021-06-02 10:57:23,773:DEBUG:abstractprotocol:get_command_defn@42: Processing command 'SOC'
2021-06-02 10:57:23,774:DEBUG:abstractprotocol:get_command_defn@44: Found command SOC in protocol b'DALY40'
2021-06-02 10:57:23,774:DEBUG:abstractprotocol:decode@174: trimmed and split responses: [b'\xa5', b'\x01', b'\x90', b'\x08', b'\x02\x19', b'\x00\x00', b'uc', b'\x03\x82', b'\xb6']
2021-06-02 10:57:23,774:INFO:abstractprotocol:decode@181: Processing response of type POSITIONAL
2021-06-02 10:57:23,775:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 10:57:23,776:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: start flag, raw_value b'\xa5'
2021-06-02 10:57:23,776:DEBUG:abstractprotocol:process_response@93: Discarding start flag:b'\xa5'
2021-06-02 10:57:23,776:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 10:57:23,777:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: module address, raw_value b'\x01'
2021-06-02 10:57:23,777:DEBUG:abstractprotocol:process_response@93: Discarding module address:b'\x01'
2021-06-02 10:57:23,777:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 10:57:23,778:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: command id, raw_value b'\x90'
2021-06-02 10:57:23,778:DEBUG:abstractprotocol:process_response@93: Discarding command id:b'\x90'
2021-06-02 10:57:23,778:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 10:57:23,779:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: data length, raw_value b'\x08'
2021-06-02 10:57:23,779:DEBUG:abstractprotocol:process_response@93: Discarding data length:b'\x08'
2021-06-02 10:57:23,779:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 10:57:23,780:DEBUG:abstractprotocol:process_response@84: Got template r/10 for Battery Bank Voltage b'\x02\x19'
2021-06-02 10:57:23,780:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: Battery Bank Voltage, raw_value b'\x02\x19'
2021-06-02 10:57:23,781:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 10:57:23,781:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\x02\x19' 2 byte decoded to 537
2021-06-02 10:57:23,782:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 10:57:23,782:DEBUG:abstractprotocol:process_response@84: Got template r/10 for acquistion b'\x00\x00'
2021-06-02 10:57:23,783:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: acquistion, raw_value b'\x00\x00'
2021-06-02 10:57:23,789:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 10:57:23,790:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\x00\x00' 2 byte decoded to 0
2021-06-02 10:57:23,791:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 10:57:23,793:DEBUG:abstractprotocol:process_response@84: Got template (r-30000)/10 for Current b'uc'
2021-06-02 10:57:23,794:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: Current, raw_value b'uc'
2021-06-02 10:57:23,794:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 10:57:23,795:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'uc' 2 byte decoded to 30051
2021-06-02 10:57:23,796:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 10:57:23,796:DEBUG:abstractprotocol:process_response@84: Got template r/10 for SOC b'\x03\x82'
2021-06-02 10:57:23,797:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: SOC, raw_value b'\x03\x82'
2021-06-02 10:57:23,797:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 10:57:23,798:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\x03\x82' 2 byte decoded to 898
2021-06-02 10:57:23,799:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 10:57:23,799:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: checksum, raw_value b'\xb6'
2021-06-02 10:57:23,800:DEBUG:abstractprotocol:process_response@93: Discarding checksum:b'\xb6'
2021-06-02 10:57:23,800:INFO:device:run_command@327: Decoded response {'raw_response': ['¥\x01\x90\x08\x02\x19\x00\x00uc\x03\x82¶', ''], '_command': 'SOC', '_command_description': 'State of Charge', 'Battery Bank Voltage': [53.7, 'V'], 'acquistion': [0.0, 'V'], 'Current': [5.1, 'A'], 'SOC': [89.8, '%']}
2021-06-02 10:57:23,801:DEBUG:__init__:main@408: results: {'raw_response': ['¥\x01\x90\x08\x02\x19\x00\x00uc\x03\x82¶', ''], '_command': 'SOC', '_command_description': 'State of Charge', 'Battery Bank Voltage': [53.7, 'V'], 'acquistion': [0.0, 'V'], 'Current': [5.1, 'A'], 'SOC': [89.8, '%']}
2021-06-02 10:57:23,801:INFO:__init__:get_outputs@26: attempting to create output processor: screen
2021-06-02 10:57:23,811:DEBUG:screen:__init__@16: processor.screen __init__ kwargs {}
2021-06-02 10:57:23,812:DEBUG:__init__:main@414: Using output filter: None
2021-06-02 10:57:23,812:INFO:screen:output@19: Using output processor: screen
2021-06-02 10:57:23,813:DEBUG:screen:output@20: kwargs {'data': {'raw_response': ['¥\x01\x90\x08\x02\x19\x00\x00uc\x03\x82¶', ''], '_command': 'SOC', '_command_description': 'State of Charge', 'Battery Bank Voltage': [53.7, 'V'], 'acquistion': [0.0, 'V'], 'Current': [5.1, 'A'], 'SOC': [89.8, '%']}, 'tag': 'SOC', 'mqtt_broker': 'screen', 'mqtt_port': 1883, 'mqtt_user': None, 'mqtt_pass': None, 'mqtt_topic': 'mpp-solar', 'filter': None, 'excl_filter': None, 'keep_case': False}
Command: SOC - State of Charge
------------------------------------------------------------
Parameter                       Value           Unit
2021-06-02 10:57:23,814:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key battery_bank_voltage not excluded by excl_filter None so key wanted
battery_bank_voltage            53.7            V
2021-06-02 10:57:23,815:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key acquistion not excluded by excl_filter None so key wanted
acquistion                      0.0             V
2021-06-02 10:57:23,815:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key current not excluded by excl_filter None so key wanted
current                         5.1             A
2021-06-02 10:57:23,816:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key soc not excluded by excl_filter None so key wanted
soc                             89.8            %
2021-06-02 10:57:23,817:DEBUG:__init__:main@434: Not daemon, so not looping
SirkoVZ commented 3 years ago

oh, the cell voltages are not shown completely, sometimes 6 sometimes 9:

 mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -q screen -c cellVoltages -I -D
2021-06-02 11:35:28,021:INFO:__init__:main@235: Solar Device Command Utility, version: 0.7.61, first try at pi17 setter
2021-06-02 11:35:28,022:INFO:__init__:main@339: Creating device "unnamed" (type: "mppsolar") on port "/dev/ttyUSB1 (porttype=daly)" using protocol "DALY40"
[...snip...]
2021-06-02 11:35:28,135:DEBUG:dalyserialio:send_and_receive@22: Executing command via dalyserialio...
2021-06-02 11:35:28,237:DEBUG:dalyserialio:send_and_receive@32: bytes waiting 39
2021-06-02 11:35:28,237:DEBUG:dalyserialio:send_and_receive@32: bytes waiting 0
2021-06-02 11:35:28,237:DEBUG:dalyserialio:send_and_receive@38: serial response was: b'\xa5\x01\x95\x08\x01\r1\r3\r3\xa0\xa2\xa5\x01\x95\x08\x02\r3\r1\r3\xa0\xa3\xa5\x01\x95\x08\x03\r4\r2\r4\xa0\xa7'
[...snip...]
Command: cellVoltages - Cell Voltages Information
------------------------------------------------------------
Parameter                       Value           Unit
2021-06-02 11:35:28,290:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_01_voltage not excluded by excl_filter None so key wanted
cell_01_voltage                 3.377           V
2021-06-02 11:35:28,290:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_02_voltage not excluded by excl_filter None so key wanted
cell_02_voltage                 3.379           V
2021-06-02 11:35:28,291:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_03_voltage not excluded by excl_filter None so key wanted
cell_03_voltage                 3.379           V
2021-06-02 11:35:28,291:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_04_voltage not excluded by excl_filter None so key wanted
cell_04_voltage                 3.379           V
2021-06-02 11:35:28,292:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_05_voltage not excluded by excl_filter None so key wanted
cell_05_voltage                 3.377           V
2021-06-02 11:35:28,292:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_06_voltage not excluded by excl_filter None so key wanted
cell_06_voltage                 3.379           V
2021-06-02 11:35:28,293:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_07_voltage not excluded by excl_filter None so key wanted
cell_07_voltage                 3.38            V
2021-06-02 11:35:28,293:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_08_voltage not excluded by excl_filter None so key wanted
cell_08_voltage                 3.378           V
2021-06-02 11:35:28,293:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_09_voltage not excluded by excl_filter None so key wanted
cell_09_voltage                 3.38            V
2021-06-02 11:35:28,294:DEBUG:__init__:main@434: Not daemon, so not looping

but should be 16 (or 18)

jblance commented 3 years ago

ok, so outpacing the serial data i think have a go with v0.7.62+

SirkoVZ commented 3 years ago

much better now:

mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -q screen -c cellVoltages -I -D
2021-06-02 14:40:20,212:INFO:__init__:main@235: Solar Device Command Utility, version: 0.7.62, dalyio add wiat to read loop
2021-06-02 14:40:20,213:INFO:__init__:main@339: Creating device "unnamed" (type: "mppsolar") on port "/dev/ttyUSB1 (porttype=daly)" using protocol "DALY40"
2021-06-02 14:40:20,219:DEBUG:__init__:main@342: device_class <class 'mppsolar.devices.mppsolar.mppsolar'>
2021-06-02 14:40:20,220:DEBUG:device:__init__@31: __init__ args ()
2021-06-02 14:40:20,220:DEBUG:device:__init__@32: __init__ kwargs {'name': 'unnamed', 'port': '/dev/ttyUSB1', 'protocol': 'DALY40', 'baud': 9600, 'porttype': 'daly', 'mqtt_broker': 'screen', 'mqtt_port': 1883, 'mqtt_user': None, 'mqtt_pass': None}
2021-06-02 14:40:20,221:INFO:device:set_port@130: Port overide - using port 'daly'
2021-06-02 14:40:20,221:DEBUG:device:get_port_type@77: port matches daly
2021-06-02 14:40:20,221:INFO:device:set_port@166: Using dalyserialio for communications
2021-06-02 14:40:20,238:DEBUG:device:set_protocol@96: Protocol DALY40
2021-06-02 14:40:20,259:DEBUG:device:__init__@36: __init__ name unnamed, port <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5e79770>, protocol <mppsolar.protocols.daly40.daly40 object at 0xb5e653f0>
2021-06-02 14:40:20,260:DEBUG:__init__:main@389: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0xb5f3d790>, 'cellVoltages', 'cellVoltages', 'screen', None, None)]
2021-06-02 14:40:20,260:INFO:__init__:main@394: Looping 1 commands
2021-06-02 14:40:20,261:INFO:__init__:main@405: Getting results from device: mppsolar device - name: unnamed, port: <mppsolar.io.dalyserialio.DalySerialIO object at 0xb5e79770>, protocol: <mppsolar.protocols.daly40.daly40 object at 0xb5e653f0> for command: cellVoltages, tag: cellVoltages, outputs: screen
2021-06-02 14:40:20,261:INFO:device:run_command@270: Running command cellVoltages
2021-06-02 14:40:20,261:INFO:daly:get_full_command@208: Using protocol b'DALY40' with 7 commands
2021-06-02 14:40:20,262:DEBUG:abstractprotocol:get_command_defn@42: Processing command 'cellVoltages'
2021-06-02 14:40:20,262:DEBUG:abstractprotocol:get_command_defn@44: Found command cellVoltages in protocol b'DALY40'
2021-06-02 14:40:20,263:DEBUG:daly:get_full_command@225: full command: b'\xa5@\x95\x08\x00\x00\x00\x00\x00\x00\x00\x00\x82\n'
2021-06-02 14:40:20,263:INFO:device:run_command@296: full command b'\xa5@\x95\x08\x00\x00\x00\x00\x00\x00\x00\x00\x82\n' for command cellVoltages
2021-06-02 14:40:20,263:DEBUG:abstractprotocol:get_command_defn@42: Processing command 'cellVoltages'
2021-06-02 14:40:20,264:DEBUG:abstractprotocol:get_command_defn@44: Found command cellVoltages in protocol b'DALY40'
2021-06-02 14:40:20,264:DEBUG:dalyserialio:send_and_receive@19: port /dev/ttyUSB1, baudrate 9600
2021-06-02 14:40:20,271:DEBUG:dalyserialio:send_and_receive@22: Executing command via dalyserialio...
2021-06-02 14:40:20,372:DEBUG:dalyserialio:send_and_receive@32: bytes waiting 39
2021-06-02 14:40:20,473:DEBUG:dalyserialio:send_and_receive@32: bytes waiting 39
2021-06-02 14:40:20,574:DEBUG:dalyserialio:send_and_receive@32: bytes waiting 0
2021-06-02 14:40:20,574:DEBUG:dalyserialio:send_and_receive@38: serial response was: b'\xa5\x01\x95\x08\x01\r.\r6\r8\xab\xb2\xa5\x01\x95\x08\x02\r2\r.\r,\xab\xa3\xa5\x01\x95\x08\x03\r3\r6\r6\xab\xb7\xa5\x01\x95\x08\x04\r2\r/\r2\xab\xac\xa5\x01\x95\x08\x05\r2\r2\r0\xab\xae\xa5\x01\x95\x08\x06\r1\r2\r0\xab\xae'
2021-06-02 14:40:20,578:DEBUG:device:run_command@315: Send and Receive Response b'\xa5\x01\x95\x08\x01\r.\r6\r8\xab\xb2\xa5\x01\x95\x08\x02\r2\r.\r,\xab\xa3\xa5\x01\x95\x08\x03\r3\r6\r6\xab\xb7\xa5\x01\x95\x08\x04\r2\r/\r2\xab\xac\xa5\x01\x95\x08\x05\r2\r2\r0\xab\xae\xa5\x01\x95\x08\x06\r1\r2\r0\xab\xae'
2021-06-02 14:40:20,579:INFO:abstractprotocol:decode@137: response passed to decode: b'\xa5\x01\x95\x08\x01\r.\r6\r8\xab\xb2\xa5\x01\x95\x08\x02\r2\r.\r,\xab\xa3\xa5\x01\x95\x08\x03\r3\r6\r6\xab\xb7\xa5\x01\x95\x08\x04\r2\r/\r2\xab\xac\xa5\x01\x95\x08\x05\r2\r2\r0\xab\xae\xa5\x01\x95\x08\x06\r1\r2\r0\xab\xae'
2021-06-02 14:40:20,579:DEBUG:daly:check_response_valid@244: checking validity of b'\xa5\x01\x95\x08\x01\r.\r6\r8\xab\xb2\xa5\x01\x95\x08\x02\r2\r.\r,\xab\xa3\xa5\x01\x95\x08\x03\r3\r6\r6\xab\xb7\xa5\x01\x95\x08\x04\r2\r/\r2\xab\xac\xa5\x01\x95\x08\x05\r2\r2\r0\xab\xae\xa5\x01\x95\x08\x06\r1\r2\r0\xab\xae'
2021-06-02 14:40:20,580:INFO:daly:check_response_valid@248: is multiframe response - assuming ok for now
2021-06-02 14:40:20,580:DEBUG:abstractprotocol:get_command_defn@42: Processing command 'cellVoltages'
2021-06-02 14:40:20,581:DEBUG:abstractprotocol:get_command_defn@44: Found command cellVoltages in protocol b'DALY40'
2021-06-02 14:40:20,581:INFO:daly:get_responses@279: Multi frame response with 6 frames
2021-06-02 14:40:20,581:DEBUG:abstractprotocol:decode@174: trimmed and split responses: [[b'\xa5', b'\x01', b'\x95', b'\x08', b'\x01', b'\r.', b'\r6', b'\r8', b'\xab', b'\xb2'], [b'\xa5', b'\x01', b'\x95', b'\x08', b'\x02', b'\r2', b'\r.', b'\r,', b'\xab', b'\xa3'], [b'\xa5', b'\x01', b'\x95', b'\x08', b'\x03', b'\r3', b'\r6', b'\r6', b'\xab', b'\xb7'], [b'\xa5', b'\x01', b'\x95', b'\x08', b'\x04', b'\r2', b'\r/', b'\r2', b'\xab', b'\xac'], [b'\xa5', b'\x01', b'\x95', b'\x08', b'\x05', b'\r2', b'\r2', b'\r0', b'\xab', b'\xae'], [b'\xa5', b'\x01', b'\x95', b'\x08', b'\x06', b'\r1', b'\r2', b'\r0', b'\xab', b'\xae']]
2021-06-02 14:40:20,582:INFO:abstractprotocol:decode@181: Processing response of type MULTIFRAME-POSITIONAL
2021-06-02 14:40:20,582:DEBUG:abstractprotocol:decode@294: Processing MULTIFRAME-POSITIONAL type responses
2021-06-02 14:40:20,583:DEBUG:abstractprotocol:decode@298: got 6 frames
2021-06-02 14:40:20,583:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,583:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: start flag, raw_value b'\xa5'
2021-06-02 14:40:20,584:DEBUG:abstractprotocol:process_response@93: Discarding start flag:b'\xa5'
2021-06-02 14:40:20,584:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,584:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: module address, raw_value b'\x01'
2021-06-02 14:40:20,585:DEBUG:abstractprotocol:process_response@93: Discarding module address:b'\x01'
2021-06-02 14:40:20,585:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,585:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: command id, raw_value b'\x95'
2021-06-02 14:40:20,585:DEBUG:abstractprotocol:process_response@93: Discarding command id:b'\x95'
2021-06-02 14:40:20,586:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,586:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: data length, raw_value b'\x08'
2021-06-02 14:40:20,586:DEBUG:abstractprotocol:process_response@93: Discarding data length:b'\x08'
2021-06-02 14:40:20,587:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,587:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: f'Frame Number {f:02d}', raw_value b'\x01'
2021-06-02 14:40:20,587:DEBUG:abstractprotocol:process_response@93: Discarding f'Frame Number {f:02d}':b'\x01'
2021-06-02 14:40:20,588:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,588:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+1:02d} Voltage' b'\r.'
2021-06-02 14:40:20,588:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+1:02d} Voltage', raw_value b'\r.'
2021-06-02 14:40:20,589:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,589:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r.' 2 byte decoded to 3374
2021-06-02 14:40:20,590:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,590:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+2:02d} Voltage' b'\r6'
2021-06-02 14:40:20,591:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+2:02d} Voltage', raw_value b'\r6'
2021-06-02 14:40:20,591:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,592:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r6' 2 byte decoded to 3382
2021-06-02 14:40:20,592:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,593:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+3:02d} Voltage' b'\r8'
2021-06-02 14:40:20,593:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+3:02d} Voltage', raw_value b'\r8'
2021-06-02 14:40:20,594:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,594:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r8' 2 byte decoded to 3384
2021-06-02 14:40:20,595:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,595:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: Reserved, raw_value b'\xab'
2021-06-02 14:40:20,596:DEBUG:abstractprotocol:process_response@93: Discarding Reserved:b'\xab'
2021-06-02 14:40:20,596:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,596:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: checksum, raw_value b'\xb2'
2021-06-02 14:40:20,597:DEBUG:abstractprotocol:process_response@93: Discarding checksum:b'\xb2'
2021-06-02 14:40:20,597:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,597:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: start flag, raw_value b'\xa5'
2021-06-02 14:40:20,597:DEBUG:abstractprotocol:process_response@93: Discarding start flag:b'\xa5'
2021-06-02 14:40:20,598:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,598:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: module address, raw_value b'\x01'
2021-06-02 14:40:20,598:DEBUG:abstractprotocol:process_response@93: Discarding module address:b'\x01'
2021-06-02 14:40:20,599:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,599:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: command id, raw_value b'\x95'
2021-06-02 14:40:20,599:DEBUG:abstractprotocol:process_response@93: Discarding command id:b'\x95'
2021-06-02 14:40:20,600:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,600:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: data length, raw_value b'\x08'
2021-06-02 14:40:20,600:DEBUG:abstractprotocol:process_response@93: Discarding data length:b'\x08'
2021-06-02 14:40:20,600:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,601:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: f'Frame Number {f:02d}', raw_value b'\x02'
2021-06-02 14:40:20,601:DEBUG:abstractprotocol:process_response@93: Discarding f'Frame Number {f:02d}':b'\x02'
2021-06-02 14:40:20,601:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,602:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+1:02d} Voltage' b'\r2'
2021-06-02 14:40:20,602:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+1:02d} Voltage', raw_value b'\r2'
2021-06-02 14:40:20,602:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,603:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r2' 2 byte decoded to 3378
2021-06-02 14:40:20,604:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,604:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+2:02d} Voltage' b'\r.'
2021-06-02 14:40:20,605:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+2:02d} Voltage', raw_value b'\r.'
2021-06-02 14:40:20,605:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,606:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r.' 2 byte decoded to 3374
2021-06-02 14:40:20,606:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,607:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+3:02d} Voltage' b'\r,'
2021-06-02 14:40:20,607:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+3:02d} Voltage', raw_value b'\r,'
2021-06-02 14:40:20,608:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,608:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r,' 2 byte decoded to 3372
2021-06-02 14:40:20,609:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,609:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: Reserved, raw_value b'\xab'
2021-06-02 14:40:20,610:DEBUG:abstractprotocol:process_response@93: Discarding Reserved:b'\xab'
2021-06-02 14:40:20,610:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,610:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: checksum, raw_value b'\xa3'
2021-06-02 14:40:20,611:DEBUG:abstractprotocol:process_response@93: Discarding checksum:b'\xa3'
2021-06-02 14:40:20,611:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,611:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: start flag, raw_value b'\xa5'
2021-06-02 14:40:20,612:DEBUG:abstractprotocol:process_response@93: Discarding start flag:b'\xa5'
2021-06-02 14:40:20,612:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,613:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: module address, raw_value b'\x01'
2021-06-02 14:40:20,613:DEBUG:abstractprotocol:process_response@93: Discarding module address:b'\x01'
2021-06-02 14:40:20,613:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,614:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: command id, raw_value b'\x95'
2021-06-02 14:40:20,614:DEBUG:abstractprotocol:process_response@93: Discarding command id:b'\x95'
2021-06-02 14:40:20,614:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,615:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: data length, raw_value b'\x08'
2021-06-02 14:40:20,615:DEBUG:abstractprotocol:process_response@93: Discarding data length:b'\x08'
2021-06-02 14:40:20,615:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,616:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: f'Frame Number {f:02d}', raw_value b'\x03'
2021-06-02 14:40:20,616:DEBUG:abstractprotocol:process_response@93: Discarding f'Frame Number {f:02d}':b'\x03'
2021-06-02 14:40:20,617:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,617:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+1:02d} Voltage' b'\r3'
2021-06-02 14:40:20,617:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+1:02d} Voltage', raw_value b'\r3'
2021-06-02 14:40:20,618:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,618:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r3' 2 byte decoded to 3379
2021-06-02 14:40:20,619:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,619:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+2:02d} Voltage' b'\r6'
2021-06-02 14:40:20,620:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+2:02d} Voltage', raw_value b'\r6'
2021-06-02 14:40:20,620:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,621:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r6' 2 byte decoded to 3382
2021-06-02 14:40:20,622:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,622:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+3:02d} Voltage' b'\r6'
2021-06-02 14:40:20,623:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+3:02d} Voltage', raw_value b'\r6'
2021-06-02 14:40:20,623:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,624:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r6' 2 byte decoded to 3382
2021-06-02 14:40:20,624:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,625:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: Reserved, raw_value b'\xab'
2021-06-02 14:40:20,625:DEBUG:abstractprotocol:process_response@93: Discarding Reserved:b'\xab'
2021-06-02 14:40:20,626:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,626:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: checksum, raw_value b'\xb7'
2021-06-02 14:40:20,626:DEBUG:abstractprotocol:process_response@93: Discarding checksum:b'\xb7'
2021-06-02 14:40:20,627:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,627:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: start flag, raw_value b'\xa5'
2021-06-02 14:40:20,628:DEBUG:abstractprotocol:process_response@93: Discarding start flag:b'\xa5'
2021-06-02 14:40:20,628:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,628:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: module address, raw_value b'\x01'
2021-06-02 14:40:20,629:DEBUG:abstractprotocol:process_response@93: Discarding module address:b'\x01'
2021-06-02 14:40:20,629:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,629:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: command id, raw_value b'\x95'
2021-06-02 14:40:20,630:DEBUG:abstractprotocol:process_response@93: Discarding command id:b'\x95'
2021-06-02 14:40:20,630:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,631:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: data length, raw_value b'\x08'
2021-06-02 14:40:20,631:DEBUG:abstractprotocol:process_response@93: Discarding data length:b'\x08'
2021-06-02 14:40:20,631:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,632:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: f'Frame Number {f:02d}', raw_value b'\x04'
2021-06-02 14:40:20,632:DEBUG:abstractprotocol:process_response@93: Discarding f'Frame Number {f:02d}':b'\x04'
2021-06-02 14:40:20,633:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,633:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+1:02d} Voltage' b'\r2'
2021-06-02 14:40:20,633:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+1:02d} Voltage', raw_value b'\r2'
2021-06-02 14:40:20,634:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,634:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r2' 2 byte decoded to 3378
2021-06-02 14:40:20,635:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,636:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+2:02d} Voltage' b'\r/'
2021-06-02 14:40:20,636:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+2:02d} Voltage', raw_value b'\r/'
2021-06-02 14:40:20,636:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,637:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r/' 2 byte decoded to 3375
2021-06-02 14:40:20,638:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,638:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+3:02d} Voltage' b'\r2'
2021-06-02 14:40:20,639:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+3:02d} Voltage', raw_value b'\r2'
2021-06-02 14:40:20,639:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,639:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r2' 2 byte decoded to 3378
2021-06-02 14:40:20,640:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,641:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: Reserved, raw_value b'\xab'
2021-06-02 14:40:20,641:DEBUG:abstractprotocol:process_response@93: Discarding Reserved:b'\xab'
2021-06-02 14:40:20,641:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,642:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: checksum, raw_value b'\xac'
2021-06-02 14:40:20,642:DEBUG:abstractprotocol:process_response@93: Discarding checksum:b'\xac'
2021-06-02 14:40:20,643:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,643:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: start flag, raw_value b'\xa5'
2021-06-02 14:40:20,644:DEBUG:abstractprotocol:process_response@93: Discarding start flag:b'\xa5'
2021-06-02 14:40:20,644:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,644:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: module address, raw_value b'\x01'
2021-06-02 14:40:20,645:DEBUG:abstractprotocol:process_response@93: Discarding module address:b'\x01'
2021-06-02 14:40:20,645:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,645:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: command id, raw_value b'\x95'
2021-06-02 14:40:20,646:DEBUG:abstractprotocol:process_response@93: Discarding command id:b'\x95'
2021-06-02 14:40:20,646:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,646:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: data length, raw_value b'\x08'
2021-06-02 14:40:20,647:DEBUG:abstractprotocol:process_response@93: Discarding data length:b'\x08'
2021-06-02 14:40:20,647:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,647:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: f'Frame Number {f:02d}', raw_value b'\x05'
2021-06-02 14:40:20,648:DEBUG:abstractprotocol:process_response@93: Discarding f'Frame Number {f:02d}':b'\x05'
2021-06-02 14:40:20,648:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,649:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+1:02d} Voltage' b'\r2'
2021-06-02 14:40:20,649:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+1:02d} Voltage', raw_value b'\r2'
2021-06-02 14:40:20,649:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,650:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r2' 2 byte decoded to 3378
2021-06-02 14:40:20,651:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,651:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+2:02d} Voltage' b'\r2'
2021-06-02 14:40:20,652:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+2:02d} Voltage', raw_value b'\r2'
2021-06-02 14:40:20,652:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,652:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r2' 2 byte decoded to 3378
2021-06-02 14:40:20,653:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,654:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+3:02d} Voltage' b'\r0'
2021-06-02 14:40:20,654:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+3:02d} Voltage', raw_value b'\r0'
2021-06-02 14:40:20,654:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,655:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r0' 2 byte decoded to 3376
2021-06-02 14:40:20,656:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,656:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: Reserved, raw_value b'\xab'
2021-06-02 14:40:20,656:DEBUG:abstractprotocol:process_response@93: Discarding Reserved:b'\xab'
2021-06-02 14:40:20,657:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,657:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: checksum, raw_value b'\xae'
2021-06-02 14:40:20,657:DEBUG:abstractprotocol:process_response@93: Discarding checksum:b'\xae'
2021-06-02 14:40:20,658:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,658:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: start flag, raw_value b'\xa5'
2021-06-02 14:40:20,659:DEBUG:abstractprotocol:process_response@93: Discarding start flag:b'\xa5'
2021-06-02 14:40:20,659:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,659:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: module address, raw_value b'\x01'
2021-06-02 14:40:20,660:DEBUG:abstractprotocol:process_response@93: Discarding module address:b'\x01'
2021-06-02 14:40:20,660:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,660:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: command id, raw_value b'\x95'
2021-06-02 14:40:20,661:DEBUG:abstractprotocol:process_response@93: Discarding command id:b'\x95'
2021-06-02 14:40:20,661:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,662:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: data length, raw_value b'\x08'
2021-06-02 14:40:20,662:DEBUG:abstractprotocol:process_response@93: Discarding data length:b'\x08'
2021-06-02 14:40:20,663:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,663:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: f'Frame Number {f:02d}', raw_value b'\x06'
2021-06-02 14:40:20,663:DEBUG:abstractprotocol:process_response@93: Discarding f'Frame Number {f:02d}':b'\x06'
2021-06-02 14:40:20,664:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,664:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+1:02d} Voltage' b'\r1'
2021-06-02 14:40:20,664:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+1:02d} Voltage', raw_value b'\r1'
2021-06-02 14:40:20,665:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,665:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r1' 2 byte decoded to 3377
2021-06-02 14:40:20,666:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,666:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+2:02d} Voltage' b'\r2'
2021-06-02 14:40:20,667:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+2:02d} Voltage', raw_value b'\r2'
2021-06-02 14:40:20,667:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,668:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r2' 2 byte decoded to 3378
2021-06-02 14:40:20,669:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,669:DEBUG:abstractprotocol:process_response@84: Got template r/1000 for f'Cell {3*f+3:02d} Voltage' b'\r0'
2021-06-02 14:40:20,669:DEBUG:abstractprotocol:process_response@86: Processing data_type: Big2ByteHex2Int for data_name: f'Cell {3*f+3:02d} Voltage', raw_value b'\r0'
2021-06-02 14:40:20,670:DEBUG:abstractprotocol:process_response@119: Processing format string Big2ByteHex2Int(raw_value)
2021-06-02 14:40:20,670:DEBUG:protocol_helpers:Big2ByteHex2Int@113: Hex b'\r0' 2 byte decoded to 3376
2021-06-02 14:40:20,671:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,672:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: Reserved, raw_value b'\xab'
2021-06-02 14:40:20,672:DEBUG:abstractprotocol:process_response@93: Discarding Reserved:b'\xab'
2021-06-02 14:40:20,672:DEBUG:abstractprotocol:decode@325: Processing POSITIONAL type responses
2021-06-02 14:40:20,673:DEBUG:abstractprotocol:process_response@86: Processing data_type: discard for data_name: checksum, raw_value b'\xae'
2021-06-02 14:40:20,673:DEBUG:abstractprotocol:process_response@93: Discarding checksum:b'\xae'
2021-06-02 14:40:20,674:INFO:device:run_command@334: Decoded response {'raw_response': ['¥\x01\x95\x08\x01\r.\r6\r8«²¥\x01\x95\x08\x02\r2\r.\r,«£¥\x01\x95\x08\x03\r3\r6\r6«·¥\x01\x95\x08\x04\r2\r/\r2«¬¥\x01\x95\x08\x05\r2\r2\r0«®¥\x01\x95\x08\x06\r1\r2\r0«®', ''], '_command': 'cellVoltages', '_command_description': 'Cell Voltages Information', 'Cell 01 Voltage': [3.374, 'V'], 'Cell 02 Voltage': [3.382, 'V'], 'Cell 03 Voltage': [3.384, 'V'], 'Cell 04 Voltage': [3.378, 'V'], 'Cell 05 Voltage': [3.374, 'V'], 'Cell 06 Voltage': [3.372, 'V'], 'Cell 07 Voltage': [3.379, 'V'], 'Cell 08 Voltage': [3.382, 'V'], 'Cell 09 Voltage': [3.382, 'V'], 'Cell 10 Voltage': [3.378, 'V'], 'Cell 11 Voltage': [3.375, 'V'], 'Cell 12 Voltage': [3.378, 'V'], 'Cell 13 Voltage': [3.378, 'V'], 'Cell 14 Voltage': [3.378, 'V'], 'Cell 15 Voltage': [3.376, 'V'], 'Cell 16 Voltage': [3.377, 'V'], 'Cell 17 Voltage': [3.378, 'V'], 'Cell 18 Voltage': [3.376, 'V']}
2021-06-02 14:40:20,674:DEBUG:__init__:main@408: results: {'raw_response': ['¥\x01\x95\x08\x01\r.\r6\r8«²¥\x01\x95\x08\x02\r2\r.\r,«£¥\x01\x95\x08\x03\r3\r6\r6«·¥\x01\x95\x08\x04\r2\r/\r2«¬¥\x01\x95\x08\x05\r2\r2\r0«®¥\x01\x95\x08\x06\r1\r2\r0«®', ''], '_command': 'cellVoltages', '_command_description': 'Cell Voltages Information', 'Cell 01 Voltage': [3.374, 'V'], 'Cell 02 Voltage': [3.382, 'V'], 'Cell 03 Voltage': [3.384, 'V'], 'Cell 04 Voltage': [3.378, 'V'], 'Cell 05 Voltage': [3.374, 'V'], 'Cell 06 Voltage': [3.372, 'V'], 'Cell 07 Voltage': [3.379, 'V'], 'Cell 08 Voltage': [3.382, 'V'], 'Cell 09 Voltage': [3.382, 'V'], 'Cell 10 Voltage': [3.378, 'V'], 'Cell 11 Voltage': [3.375, 'V'], 'Cell 12 Voltage': [3.378, 'V'], 'Cell 13 Voltage': [3.378, 'V'], 'Cell 14 Voltage': [3.378, 'V'], 'Cell 15 Voltage': [3.376, 'V'], 'Cell 16 Voltage': [3.377, 'V'], 'Cell 17 Voltage': [3.378, 'V'], 'Cell 18 Voltage': [3.376, 'V']}
2021-06-02 14:40:20,675:INFO:__init__:get_outputs@26: attempting to create output processor: screen
2021-06-02 14:40:20,679:DEBUG:screen:__init__@16: processor.screen __init__ kwargs {}
2021-06-02 14:40:20,680:DEBUG:__init__:main@414: Using output filter: None
2021-06-02 14:40:20,680:INFO:screen:output@19: Using output processor: screen
2021-06-02 14:40:20,681:DEBUG:screen:output@20: kwargs {'data': {'raw_response': ['¥\x01\x95\x08\x01\r.\r6\r8«²¥\x01\x95\x08\x02\r2\r.\r,«£¥\x01\x95\x08\x03\r3\r6\r6«·¥\x01\x95\x08\x04\r2\r/\r2«¬¥\x01\x95\x08\x05\r2\r2\r0«®¥\x01\x95\x08\x06\r1\r2\r0«®', ''], '_command': 'cellVoltages', '_command_description': 'Cell Voltages Information', 'Cell 01 Voltage': [3.374, 'V'], 'Cell 02 Voltage': [3.382, 'V'], 'Cell 03 Voltage': [3.384, 'V'], 'Cell 04 Voltage': [3.378, 'V'], 'Cell 05 Voltage': [3.374, 'V'], 'Cell 06 Voltage': [3.372, 'V'], 'Cell 07 Voltage': [3.379, 'V'], 'Cell 08 Voltage': [3.382, 'V'], 'Cell 09 Voltage': [3.382, 'V'], 'Cell 10 Voltage': [3.378, 'V'], 'Cell 11 Voltage': [3.375, 'V'], 'Cell 12 Voltage': [3.378, 'V'], 'Cell 13 Voltage': [3.378, 'V'], 'Cell 14 Voltage': [3.378, 'V'], 'Cell 15 Voltage': [3.376, 'V'], 'Cell 16 Voltage': [3.377, 'V'], 'Cell 17 Voltage': [3.378, 'V'], 'Cell 18 Voltage': [3.376, 'V']}, 'tag': 'cellVoltages', 'mqtt_broker': 'screen', 'mqtt_port': 1883, 'mqtt_user': None, 'mqtt_pass': None, 'mqtt_topic': 'mpp-solar', 'filter': None, 'excl_filter': None, 'keep_case': False}
Command: cellVoltages - Cell Voltages Information
------------------------------------------------------------
Parameter                       Value           Unit
2021-06-02 14:40:20,682:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_01_voltage not excluded by excl_filter None so key wanted
cell_01_voltage                 3.374           V
2021-06-02 14:40:20,682:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_02_voltage not excluded by excl_filter None so key wanted
cell_02_voltage                 3.382           V
2021-06-02 14:40:20,683:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_03_voltage not excluded by excl_filter None so key wanted
cell_03_voltage                 3.384           V
2021-06-02 14:40:20,684:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_04_voltage not excluded by excl_filter None so key wanted
cell_04_voltage                 3.378           V
2021-06-02 14:40:20,684:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_05_voltage not excluded by excl_filter None so key wanted
cell_05_voltage                 3.374           V
2021-06-02 14:40:20,685:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_06_voltage not excluded by excl_filter None so key wanted
cell_06_voltage                 3.372           V
2021-06-02 14:40:20,685:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_07_voltage not excluded by excl_filter None so key wanted
cell_07_voltage                 3.379           V
2021-06-02 14:40:20,686:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_08_voltage not excluded by excl_filter None so key wanted
cell_08_voltage                 3.382           V
2021-06-02 14:40:20,686:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_09_voltage not excluded by excl_filter None so key wanted
cell_09_voltage                 3.382           V
2021-06-02 14:40:20,687:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_10_voltage not excluded by excl_filter None so key wanted
cell_10_voltage                 3.378           V
2021-06-02 14:40:20,687:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_11_voltage not excluded by excl_filter None so key wanted
cell_11_voltage                 3.375           V
2021-06-02 14:40:20,688:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_12_voltage not excluded by excl_filter None so key wanted
cell_12_voltage                 3.378           V
2021-06-02 14:40:20,688:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_13_voltage not excluded by excl_filter None so key wanted
cell_13_voltage                 3.378           V
2021-06-02 14:40:20,689:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_14_voltage not excluded by excl_filter None so key wanted
cell_14_voltage                 3.378           V
2021-06-02 14:40:20,690:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_15_voltage not excluded by excl_filter None so key wanted
cell_15_voltage                 3.376           V
2021-06-02 14:40:20,690:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_16_voltage not excluded by excl_filter None so key wanted
cell_16_voltage                 3.377           V
2021-06-02 14:40:20,691:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_17_voltage not excluded by excl_filter None so key wanted
cell_17_voltage                 3.378           V
2021-06-02 14:40:20,691:DEBUG:helpers:key_wanted@22: key_wanted: No filter and key cell_18_voltage not excluded by excl_filter None so key wanted
cell_18_voltage                 3.376           V
2021-06-02 14:40:20,692:DEBUG:__init__:main@434: Not daemon, so not looping
SirkoVZ commented 3 years ago

My tests show no issues any more, thank you very much :-) A hopefully last question: Currently I use a shell script to run several commands and send the result using mqtt:

mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -o json_mqtt -q localhost --mqtttopic /SmartHome/DalyBMS/mosStatus/tele -c mosStatus
mpp-solar -p /dev/ttyUSB1 --porttype daly -b 9600 -P DALY40 -o json_mqtt -q localhost --mqtttopic /SmartHome/DalyBMS/Status/tele -c SOC

Is it possible to use only on command? Something like -c mosStatus,SOC It would be ok, when the results of both commands are send to one and the same topic, e.g. /SmartHome/DalyBMS/UnifiedStatus/tele

jblance commented 3 years ago

That should work