Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong output if jk04 and jkv11 used in config (different proto per section) #496

Open
mfu-mcosys opened this issue Jun 15, 2024 · 9 comments

Comments

@mfu-mcosys
Copy link

mfu-mcosys commented Jun 15, 2024

if the config looks like this:

[JKBMS_UNTEN]
type=jkbms
protocol=jk04
port=C8:47:8C:E5:CC:9F
command=getCellData
outputs=screen

[JKBMS_BOX1_UNTEN] 
type=jkbms 
protocol=jkv11 
port=C8:47:80:13:CC:AE 
command=getCellData 
outputs=screen

the output for the first proto (jk04) is wrong.
If there is just one proto used in the config, it works.

I just upgraded from Python3.9 to Python3.11 to get latest mpp-solar (version: 0.16.34, python version: 3.11.2) ... but the problem is the same.

Any suggestions?

Output with wrong values for jk04

Command: getCellData - BLE Cell Data inquiry

Parameter Value Unit
header 55aaeb90
record_type 02
record_counter 39
voltage_cell01 5.771 V
voltage_cell02 16.474 V
voltage_cell03 0.579 V
voltage_cell04 16.474 V
voltage_cell05 0.579 V
voltage_cell06 16.474 V
voltage_cell07 0.579 V
voltage_cell08 16.474 V
voltage_cell09 0.579 V
voltage_cell10 16.474 V
voltage_cell11 0.579 V
voltage_cell12 16.474 V
voltage_cell13 0.579 V
voltage_cell14 16.474 V
voltage_cell15 0.579 V
voltage_cell16 16.474 V
voltage_cell17 5.771 V
voltage_cell18 16.474 V
voltage_cell19 5.771 V
voltage_cell20 16.474 V
voltage_cell21 0.579 V
voltage_cell22 16.474 V
voltage_cell23 5.771 V
voltage_cell24 16.474 V
voltage_cell25 5.771 V
voltage_cell26 16.474 V
voltage_cell27 5.771 V
voltage_cell28 16.474 V
voltage_cell29 5.771 V
voltage_cell30 16.474 V
voltage_cell31 5.771 V
voltage_cell32 16.474 V
average_cell_voltage 0.0 V
delta_cell_voltage 0.0 V
current_balancer 0.0 A
resistance_cell01 0.0 Ohm
resistance_cell02 0.0 Ohm
resistance_cell03 0.0 Ohm
resistance_cell04 0.0 Ohm
resistance_cell05 0.0 Ohm
resistance_cell06 0.0 Ohm
resistance_cell07 0.0 Ohm
resistance_cell08 0.0 Ohm
resistance_cell09 0.0 Ohm
resistance_cell10 0.0 Ohm
resistance_cell11 0.0 Ohm
resistance_cell12 -22.859 Ohm
resistance_cell13 15.715 Ohm
resistance_cell14 -19.218 Ohm
resistance_cell15 15.725 Ohm
resistance_cell16 31.35 Ohm
resistance_cell17 15.726 Ohm
resistance_cell18 -0.95 Ohm
resistance_cell19 15.728 Ohm
resistance_cell20 -4.096 Ohm
resistance_cell21 15.729 Ohm
resistance_cell22 -6.512 Ohm
resistance_cell23 15.731 Ohm
resistance_cell24 -27.123 Ohm
resistance_cell25 15.732 Ohm
resistance_cell26 5.032 Ohm
resistance_cell27 15.734 Ohm
resistance_cell28 13.413 Ohm
resistance_cell29 15.736 Ohm
resistance_cell30 31.912 Ohm
resistance_cell31 15.737 Ohm
resistance_cell32 -29.646 Ohm
battery_voltage 1031131.923 V
battery_power 1031103.326 W
balance_current 1030649.248 A
battery_t1 -3220.5 °C
battery_t2 1572.4 °C
mos_temp 0.0 °C
percent_remain 0 %
capacity_remain 0.0 Ah
nominal_capacity 0.0 Ah
cycle_count 0
cycle_capacity 0.0 Ah
time 0D0H0M0S
current_charge 0.001 A
current_discharge 0.0 A

Command: getCellData - BLE Cell Data inquiry

Parameter Value Unit
header 55aaeb90
record_type 02
record_counter 16
voltage_cell01 3.402 V
voltage_cell02 3.402 V
voltage_cell03 3.402 V
voltage_cell04 3.402 V
voltage_cell05 3.402 V
voltage_cell06 3.402 V
voltage_cell07 3.402 V
voltage_cell08 3.402 V
voltage_cell09 3.402 V
voltage_cell10 3.402 V
voltage_cell11 3.402 V
voltage_cell12 3.402 V
voltage_cell13 3.402 V
voltage_cell14 3.403 V
voltage_cell15 3.403 V
voltage_cell16 3.402 V
voltage_cell17 0.0 V
voltage_cell18 0.0 V
voltage_cell19 0.0 V
voltage_cell20 0.0 V
voltage_cell21 0.0 V
voltage_cell22 0.0 V
voltage_cell23 0.0 V
voltage_cell24 0.0 V
voltage_cell25 0.0 V
voltage_cell26 0.0 V
voltage_cell27 0.0 V
voltage_cell28 0.0 V
voltage_cell29 0.0 V
voltage_cell30 0.0 V
voltage_cell31 0.0 V
voltage_cell32 0.0 V
average_cell_voltage 3.402 V
delta_cell_voltage 0.0 V
current_balancer 0.0 A
resistance_cell01 0.07 Ohm
resistance_cell02 0.068 Ohm
resistance_cell03 0.069 Ohm
resistance_cell04 0.068 Ohm
resistance_cell05 0.069 Ohm
resistance_cell06 0.068 Ohm
resistance_cell07 0.07 Ohm
resistance_cell08 0.071 Ohm
resistance_cell09 0.072 Ohm
resistance_cell10 0.072 Ohm
resistance_cell11 0.073 Ohm
resistance_cell12 0.073 Ohm
resistance_cell13 0.074 Ohm
resistance_cell14 0.074 Ohm
resistance_cell15 0.069 Ohm
resistance_cell16 0.066 Ohm
resistance_cell17 0.0 Ohm
resistance_cell18 0.0 Ohm
resistance_cell19 0.0 Ohm
resistance_cell20 0.0 Ohm
resistance_cell21 0.0 Ohm
resistance_cell22 0.0 Ohm
resistance_cell23 0.0 Ohm
resistance_cell24 0.0 Ohm
resistance_cell25 0.0 Ohm
resistance_cell26 0.0 Ohm
resistance_cell27 0.0 Ohm
resistance_cell28 0.0 Ohm
resistance_cell29 0.0 Ohm
resistance_cell30 0.0 Ohm
resistance_cell31 0.0 Ohm
resistance_cell32 0.0 Ohm
battery_voltage 54.437 V
battery_power 0.0 W
balance_current 0.0 A
battery_t1 0.0 °C
battery_t2 0.0 °C
mos_temp 0.0 °C
percent_remain 0 %
capacity_remain 0.0 Ah
nominal_capacity 40.0 Ah
cycle_count 0
cycle_capacity 0.0 Ah
time 0D8H11M25S
current_charge 0.003 A
current_discharge 0.0 A

@jblance
Copy link
Owner

jblance commented Jun 16, 2024 via email

@mfu-mcosys
Copy link
Author

Thats what i do as workaround.
Just dont run as a daemon and use a one line per device in a bash script which is triggered per cron.

@jblance
Copy link
Owner

jblance commented Jun 16, 2024 via email

@mfu-mcosys
Copy link
Author

Want work (tested it) - because the PI3 BLE-device seems to be blocked if in use by any of the 2 daemons.

@jblance
Copy link
Owner

jblance commented Jun 16, 2024 via email

@firemen027
Copy link

I don't want to hijack the post, But Mppsolar run here since 2021 with one Bms (daly wired) one Balancer (JK04 bluetooth) nd one inverter mppsolar wired.
Run smooth since that.
I justed add a second battery bank with JK BMS bluetooth (jkv11), since I added it, the first JK bms show erroned data in the same range of [mfu-mcosys] result.

So we are in the same boat

@jblance
Copy link
Owner

jblance commented Jul 9, 2024

I don't want to hijack the post, But Mppsolar run here since 2021 with one Bms (daly wired) one Balancer (JK04 bluetooth) nd one inverter mppsolar wired. Run smooth since that. I justed add a second battery bank with JK BMS bluetooth (jkv11), since I added it, the first JK bms show erroned data in the same range of [mfu-mcosys] result.

So we are in the same boat

can you post your config file (as this shouldnt happen)

@firemen027
Copy link

firemen027 commented Jul 10, 2024

My config

This post is from my tablet, hard time with post formating

Required section

[SETUP]
# Number of seconds to pause at the end of each loop (0 is no pause)
pause=7
# Hostname / IP address of the MQTT broker
mqtt_broker=localhost
#mqtt_broker=screen
 

[PIP3048]
model=standard
protocol=PI30
port=/dev/hidraw0
baud=2400
#command=QPGS0
command=QPIGS
tag=PIP3048
outputs=mqtt


[DALY]
protocol=DALY
port=/dev/ttyUSB0
#port=/dev/ttyUSB0
porttype=DALY
baud=9600
#command=mosStatus
#command=SOC,status,cellVoltages
command=SOC#mosStatus#status#cellMinMaxVoltages#cellVoltages#cellMinMaxTemps
tag=DALY
outputs=mqtt


[JKBMS]
type=jkbms
protocol=JK04
port=3C:A5:51:86:53:FF
command=getCellData
tag=Balancer
#outputs=influx_mqtt
outputs=mqtt

[JKBANK2]
type=jkbms
protocol=JKV11
port=C8:47:80:0B:F1:95
command=getCellData
tag=Bank2
outputs=mqtt

@jblance
Copy link
Owner

jblance commented Jul 10, 2024

oh, nvm I missed that both JKBMSs were BLE
this will need to wait on a code level fix and BLE re-write - sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants