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

New BMS type: ECO-WORTHY LiFePO4 #134

Closed
4 tasks done
JohnsonDanielsHA opened this issue Dec 30, 2024 · 3 comments · Fixed by #135
Closed
4 tasks done

New BMS type: ECO-WORTHY LiFePO4 #134

JohnsonDanielsHA opened this issue Dec 30, 2024 · 3 comments · Fixed by #135
Assignees
Labels
enhancement New feature or request

Comments

@JohnsonDanielsHA
Copy link

JohnsonDanielsHA commented Dec 30, 2024

Checklist

  • I have filled out the template to the best of my ability.
  • I have understood that this integration is only about battery management systems with Bluetooth Low Energy support.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate of any previous feature requests.

Please describe the enhancement you would like to have.

Hello
I would like to request support be added to your integration for the below battery:
https://ca.eco-worthy.com/products/lifepo4-12v-100ah-lithium-iron-phosphate-battery-with-bluetooth-and-low-temperature-protection

Additional context

Hello

First off, I appreciate the amazing work you are doing for the community. I have attempted to provide you with the information needed below, but I am not a developer and some of the processes were not in my comfort zone but were best effort.

I would like to request support be added to your integration for the below battery.

Product:
ECO-WORTHY LiFePO4 12V 100Ah Lithium Iron Phosphate Battery With Bluetooth And Low-temperature Protection
https://ca.eco-worthy.com/products/lifepo4-12v-100ah-lithium-iron-phosphate-battery-with-bluetooth-and-low-temperature-protection

Link to iOS App:
https://apps.apple.com/ca/app/eco-worthy/id1630107624

Google Play Store App:
https://play.google.com/store/apps/details?id=uni.UNI5B1C700&hl=en_CA

Additional context requirements:
bluetoothctl info
[core-ssh ~]$ bluetoothctl info A5:C2:37:XX:XX:XX
Unable to open mgmt_socket
Device A5:C2:37:XX:XX:XX(public)
Name: DP04S0XX:XX:XX
Alias: DP04S00XX:XX:XX
Paired: no
Bonded: no
Trusted: no
Blocked: no
Connected: no
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Unknown (0000ff00-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (00010203-0405-0607-0809-0a0b0c0d1912)
Modalias: usb:v248Ap8266d0001
ManufacturerData Key: 0x2298 (8856)
ManufacturerData Value:
28 37 c2 a5 (7..
RSSI: 0xffffffcb (-53)
AdvertisingFlags:
06

service explorer script
└─$ python service_explorer.py --address A5:C2:37:XX:XX:XX >> gatt_explorer1.txt
2024-12-30 00:38:17,633 main INFO: starting scan...
2024-12-30 00:38:18,169 main INFO: connecting to device...
2024-12-30 00:38:20,608 main INFO: connected
2024-12-30 00:38:20,608 main INFO: [Service] 00001801-0000-1000-8000-00805f9b34fb (Handle: 8): Generic Attribute Profile
2024-12-30 00:38:20,608 main INFO: [Characteristic] 00002a05-0000-1000-8000-00805f9b34fb (Handle: 9): Service Changed (indicate)
2024-12-30 00:38:21,082 main INFO: [Descriptor] 00002902-0000-1000-8000-00805f9b34fb (Handle: 11): Client Characteristic Configuration, Value: bytearray(b'\x02\x00')
2024-12-30 00:38:21,082 main INFO: [Service] 00010203-0405-0607-0809-0a0b0c0d1912 (Handle: 23): Unknown
2024-12-30 00:38:21,181 main INFO: [Characteristic] 00010203-0405-0607-0809-0a0b0c0d2b12 (Handle: 24): Unknown (read,write-without-response), Value: bytearray(b'\x00'), Max write w/o rsp size: 20
2024-12-30 00:38:21,285 main INFO: [Descriptor] 00002901-0000-1000-8000-00805f9b34fb (Handle: 26): Characteristic User Description, Value: bytearray(b'OTA')
2024-12-30 00:38:21,285 main INFO: [Service] 0000ff00-0000-1000-8000-00805f9b34fb (Handle: 15): Vendor specific
2024-12-30 00:38:21,382 main INFO: [Characteristic] 0000ff01-0000-1000-8000-00805f9b34fb (Handle: 16): Vendor specific (read,notify), Value: bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2024-12-30 00:38:21,481 main INFO: [Descriptor] 00002902-0000-1000-8000-00805f9b34fb (Handle: 18): Client Characteristic Configuration, Value: bytearray(b'\x01\x00')
2024-12-30 00:38:21,689 main INFO: [Descriptor] 00002901-0000-1000-8000-00805f9b34fb (Handle: 19): Characteristic User Description, Value: bytearray(b'GQ SPP: Module->Phone\x00')
2024-12-30 00:38:21,782 main INFO: [Characteristic] 0000ff02-0000-1000-8000-00805f9b34fb (Handle: 20): Vendor specific (read,write-without-response), Value: bytearray(b'\xdd\xa5\x03\x00\xff\xfdw\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), Max write w/o rsp size: 20
2024-12-30 00:38:21,982 main INFO: [Descriptor] 00002901-0000-1000-8000-00805f9b34fb (Handle: 22): Characteristic User Description, Value: bytearray(b'GQ SPP: Phone->Module\x00')
2024-12-30 00:38:21,982 main INFO: [Service] 0000180a-0000-1000-8000-00805f9b34fb (Handle: 12): Device Information
2024-12-30 00:38:22,082 main INFO: [Characteristic] 00002a50-0000-1000-8000-00805f9b34fb (Handle: 13): PnP ID (read), Value: bytearray(b'\x02\x8a$f\x82\x01\x00')
2024-12-30 00:38:22,082 main INFO: disconnecting...
2024-12-30 00:38:24,831 main INFO: disconnected
Note: I looked in the “gatt_explorer1.txt” output file and it was blank, so I attached the terminal output.

To speed up the integration please see if you are able to capture the Bluetooth traffic while using the vendor app with the battery.
Note: I do not have an Android phone and dig some digging to try to perform the same on iOS and came across https://novelbits.io/debugging-sniffing-secure-ble-ios/ which appears to have the equivalent instructions on how to capture Bluetooth traffic on an iOS device using MacOS hardware. I have attached the file to this request as an exported “BTSnoop” format, which I can confirm can be opened in Wireshark.

Again,
Thank you so much for your work!

Bluetooth traffic logs:
**Removing logs as no longer needed after request complete

Service explorer logs:
**Removing logs as no longer needed after request complete

@JohnsonDanielsHA JohnsonDanielsHA added the enhancement New feature or request label Dec 30, 2024
@patman15 patman15 self-assigned this Dec 30, 2024
@patman15
Copy link
Owner

Hi @JohnsonDanielsHA! Perfect input, you provided everything I needed. It's even simpler than anticipated, they use a JBD BMS which is already supported. My tests using your captured traffic passed, so you can try the version on the linked branch (see right column of this issue). If you need install instructions, have a look at how to install manually. Let me know if it also works for you!

@JohnsonDanielsHA
Copy link
Author

Hi @patman15

I appreciate the quick turn around and work!

I have added the linked branch and can confirm everything is working!

image

Thank you again!
: )

@patman15
Copy link
Owner

I appreciate the quick turn around and work!

It's holidays time ... you're welcome! 😃
Happy New Year!

@patman15 patman15 linked a pull request Dec 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants