dmytro-tsepilov / pq_bms_bluetooth

Python library for PowerQueen BMS Bluetooth connection
GNU General Public License v3.0
2 stars 2 forks source link

Works also for a Powerqueen 24V 100Ah #1

Closed Mediacj closed 1 week ago

Mediacj commented 1 month ago

Just to let you know: I used your script on the bms of a Powerqueen 24V 100Ah instead of 12V, it works perfectly :)

Thank you!

dmytro-tsepilov commented 4 weeks ago

Thank you for your feedback! It's very helpful!

Hannibal2206 commented 2 weeks ago

Also using this on Powerqueen 24V 100Ah succesfully, however with 1 issue.

When current goes out of the battery it is reported like 4 million Amp !

{ "packVoltage": 26261, "voltage": 26540, "batteryPack": { "1": 3.317, "2": 3.318, "3": 3.317, "4": 3.319, "5": 3.317, "6": 3.317, "7": 3.317, "8": 3.318 }, "current": 4294964269, "remianAh": 103.17, "factoryAh": 103.4, "cellTemperature": 22, "mosfetTemperature": 22, "heat": 0, "protectState": 0, "failureState": 0, "equilibriumState": 0, "batteryState": 2, "SOC": "99%", "SOH": "103%", "dischargesCount": 12, "dischargesAHCount": 1305, "firmwareVersion": "1.0.0", "manfactureDate": "2023-12-20", "hardwareVersion": "T40-11T40-10" }

dmytro-tsepilov commented 2 weeks ago

@Hannibal2206 Hi, thanks for feedback. I uploaded new version v0.1.2, The current value should be fixed there.

Try it, and let me know please.

Mediacj commented 2 weeks ago

Thanks for the update!

I indeed also had that high current during discharge, installed the update, and now it shows -0.0. Is there no value available during discharge? And during charging, does it now stay at 0.0

dmytro-tsepilov commented 2 weeks ago

@Mediacj Hm, that's strange. Can you please run script with --verbose option, during battery charging or discharging (with some load) for more information. And post output here, please.

For example: python main.py AA:BB:CC:DD:29:11 --bms --verbose

Mediacj commented 2 weeks ago

Ok I will do that!

Mediacj commented 2 weeks ago

I was mistaken, sorry. The value in the JSON is correct, but I think there is an issue with my Home Assistant template sensor! So everything is ok now, thx!

During charge:

python main.py --bms C8:47:80:12:D8:E9 --verbose 2024-11-03 15:41:51,967 [bulk_send] Connecting to C8:47:80:12:D8:E9... 2024-11-03 15:41:53,495 [bulk_send] Sending command: bytearray(b'\x00\x00\x04\x01\x16U\xaa\x1a') 2024-11-03 15:41:53,666 [_data_callback] Callback: 0000ffe1-0000-1000-8000-00805f9b34fb (Handle: 15): Vendor specific Raw data: bytearray(b'\x00\x00U\x01\x96U\xaa\x00\x01\x00\x00\x00\x00\x00\xe7\x07\x0c\x14T24100-V1.1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00T24100-V1.0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5') 2024-11-03 15:41:54,570 [bulk_send] Raw result: None 2024-11-03 15:41:54,642 [bulk_send] Sending command: bytearray(b'\x00\x00\x04\x01\x13U\xaa\x17') 2024-11-03 15:41:54,776 [_data_callback] Callback: 0000ffe1-0000-1000-8000-00805f9b34fb (Handle: 15): Vendor specific Raw data: bytearray(b"\x00\x00e\x01\x93U\xaa\x00og\x00\x00?h\x00\x00\x08\r\x07\r\x08\r\x08\r\x08\r\x08\r\x08\r\x08\r\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00X\n\x00\x00\x12\x00\x12\x00\x12\x00\x00\x00\x00\x00-\x1f\xb6\'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00N\x00d\x00\x00\x00!\x00\x00\x00I\r\x00\x00\x07") 2024-11-03 15:41:55,680 [bulk_send] Raw result: None 2024-11-03 15:41:57,814 [bulk_send] Disconnecting C8:47:80:12:D8:E9... 2024-11-03 15:41:57,815 [bulk_send] Disconnected C8:47:80:12:D8:E9 { "packVoltage": 26479, "voltage": 26687, "batteryPack": { "1": 3.336, "2": 3.335, "3": 3.336, "4": 3.336, "5": 3.336, "6": 3.336, "7": 3.336, "8": 3.336 }, "current": 2.65, "watt": 70.667, "remainAh": 79.81, "factoryAh": 101.66, "cellTemperature": 18, "mosfetTemperature": 18, "heat": [ 0, 0, 0, 0 ], "protectState": [ 0, 0, 0, 0 ], "failureState": [ 0, 0, 0, 0 ], "equilibriumState": 0, "batteryState": 1, "SOC": "78%", "SOH": "100%", "dischargesCount": 33, "dischargesAHCount": 3401, "firmwareVersion": "1.0.0", "manfactureDate": "2023-12-20", "hardwareVersion": "T40-11T40-10", "battery_status": "Charging", "balance_status": "All cells are well-balanced.", "cell_status": "Battery is in optimal working condition.", "bms_status": null, "heat_status": null }

During discharge: python main.py --bms C8:47:80:12:D8:E9 --verbose 2024-11-03 15:44:31,796 [bulk_send] Connecting to C8:47:80:12:D8:E9... 2024-11-03 15:44:33,257 [bulk_send] Sending command: bytearray(b'\x00\x00\x04\x01\x16U\xaa\x1a') 2024-11-03 15:44:33,372 [_data_callback] Callback: 0000ffe1-0000-1000-8000-00805f9b34fb (Handle: 15): Vendor specific Raw data: bytearray(b'\x00\x00U\x01\x96U\xaa\x00\x01\x00\x00\x00\x00\x00\xe7\x07\x0c\x14T24100-V1.1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00T24100-V1.0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5') 2024-11-03 15:44:34,294 [bulk_send] Raw result: None 2024-11-03 15:44:34,378 [bulk_send] Sending command: bytearray(b'\x00\x00\x04\x01\x13U\xaa\x17') 2024-11-03 15:44:34,513 [_data_callback] Callback: 0000ffe1-0000-1000-8000-00805f9b34fb (Handle: 15): Vendor specific Raw data: bytearray(b"\x00\x00e\x01\x93U\xaa\x00\x94e\x00\x00~f\x00\x00\xcc\x0c\xd3\x0c\xcf\x0c\xce\x0c\xcf\x0c\xd2\x0c\xd0\x0c\xd1\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00H\xa9\xff\xff\x12\x00\x12\x00\x12\x00\x00\x00\x00\x00\x0b\x1f\xb6\'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00N\x00d\x00\x00\x00!\x00\x00\x00I\r\x00\x00\n") 2024-11-03 15:44:35,415 [bulk_send] Raw result: None 2024-11-03 15:44:37,832 [bulk_send] Disconnecting C8:47:80:12:D8:E9... 2024-11-03 15:44:37,832 [bulk_send] Disconnected C8:47:80:12:D8:E9 { "packVoltage": 26004, "voltage": 26238, "batteryPack": { "1": 3.276, "2": 3.283, "3": 3.279, "4": 3.278, "5": 3.279, "6": 3.282, "7": 3.28, "8": 3.281 }, "current": -22.2, "watt": -582.484, "remainAh": 79.47, "factoryAh": 101.66, "cellTemperature": 18, "mosfetTemperature": 18, "heat": [ 0, 0, 0, 0 ], "protectState": [ 0, 0, 0, 0 ], "failureState": [ 0, 0, 0, 0 ], "equilibriumState": 0, "batteryState": 2, "SOC": "78%", "SOH": "100%", "dischargesCount": 33, "dischargesAHCount": 3401, "firmwareVersion": "1.0.0", "manfactureDate": "2023-12-20", "hardwareVersion": "T40-11T40-10", "battery_status": "Discharging", "balance_status": "All cells are well-balanced.", "cell_status": "Battery is in optimal working condition.", "bms_status": null, "heat_status": null }

Hannibal2206 commented 2 weeks ago

Yes, I see exactly the same behaviour !

Thanks for the quick update !!

dmytro-tsepilov commented 2 weeks ago

@Mediacj Thanks for verbose data. So it looks good now :) "current": 2.65 - when charging and "current": -22.2 - when discharging, the negative value

Hannibal2206 commented 1 week ago

Hi,

Thanks again for your code to start with and alsof or the quick fix on the negative current issue

I would like to express my gratitude, is there a way I can donate to you for this ? via Paypal maybe ?

BR, Han

Van: Dmytro Tsepilov @.> Verzonden: dinsdag 12 november 2024 19:49 Aan: dmytro-tsepilov/pq_bms_bluetooth @.> CC: Hannibal2206 @.>; Mention @.> Onderwerp: Re: [dmytro-tsepilov/pq_bms_bluetooth] Works also for a Powerqueen 24V 100Ah (Issue #1)

Closed #1https://github.com/dmytro-tsepilov/pq_bms_bluetooth/issues/1 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/dmytro-tsepilov/pq_bms_bluetooth/issues/1#event-15269497339, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJIM76AMXLG3WBZBGQKQXPD2AJETJAVCNFSM6AAAAABQOZNQVKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJVGI3DSNBZG4ZTGOI. You are receiving this because you were mentioned.Message ID: @.**@.>>

dmytro-tsepilov commented 1 week ago

@Hannibal2206 Hi, Yes, I have PayPal: dimon.freeman@gmail.com

Thanks

Hannibal2206 commented 1 week ago

done :-)