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

Any chance to get the Felicity Solar LUX-Y-48300LG01 battery working? #161

Closed
4 tasks done
edelstahlratte opened this issue Jan 29, 2025 · 19 comments · Fixed by #192
Closed
4 tasks done

Any chance to get the Felicity Solar LUX-Y-48300LG01 battery working? #161

edelstahlratte opened this issue Jan 29, 2025 · 19 comments · Fixed by #192
Assignees
Labels
enhancement New feature or request

Comments

@edelstahlratte
Copy link

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.

I have a Felicity Solar LUX-Y-48300LG01 battery, but it does not get recognised... It has WiFi and BLE connection...

The device name is like F100011002424470238

bluetoothctl info A8:17:10:68:8B:46
Unable to open mgmt_socket
Device A8:17:10:68:8B:46 (public)
        Name: F100011002424470238
        Alias: F100011002424470238
        Paired: no
        Bonded: no
        Trusted: no
        Blocked: no
        Connected: no
        LegacyPairing: no
        RSSI: 0xffffffc8 (-56)
        AdvertisingFlags:
  06                            

I know nothing about Bluetooth, what else can I provide?

Additional context

https://play.google.com/store/apps/details?id=com.felicity.solar

@edelstahlratte edelstahlratte added the enhancement New feature or request label Jan 29, 2025
@patman15
Copy link
Owner

I know nothing about Bluetooth, what else can I provide?

As stated in the additional context field description:

To speed up the integration please see if you are able to capture the Bluetooth traffic on Android or iOS while using the vendor app with the battery.

That would be really helpful to figure out which communication is run. Then possibly a reverse-engineering would work, unless you can just ask a BLE protocol documentation from the vendor?

So I'm pretty confident is doable, mainly depends on your patience and my availabilty. 😄

Best regards,
Patrick

@edelstahlratte
Copy link
Author

That was very fast. Thank you!

I will try to capture the bluetooth traffic via Wireshark...

Greetings,
Nico.

@edelstahlratte
Copy link
Author

I'm not sure what I did there, but at least I captured something...

fsolar.pcapng.zip

@patman15
Copy link
Owner

Impressive, you are quick and successful!
Can you get me a screenshot of the app, so I can get an idea how to map the values?
I need some infos on how many cells you have, how many packs, temperature sensors, mostly to verify against the output:

{"CommVer":1,"wifiSN":"F100011002424470238","modID":1,"date":"20210101010501","DevSN":"100011002424470238","Type":112,"SubType":7300,"Estate":960,"Bfault":0,"Bwarn":0,"Bstate":960,"BBfault":0,"BBwarn":0,"BTemp":[[130,130],[256,256]],"Batt":[[52800],[-1],[null]],"Batsoc":[[3300,1000,300000]],"Templist":[[130,130],[0,0],[65535,65535],[65535,65535]],"BattList":[[52750,65535],[-1,-1]],"BatsocList":[[3300,1000,300000]],"BatcelList":[[3296,3296,3297,3297,3297,3297,3297,3297,3297,3297,3296,3297,3297,3297,3297,3297],[65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535,65535]],"EMSpara":[[1,2]],"BMaxMin":[[3297,3296],[2,0]],"LVolCur":[[576,480],[1500,1500]],"BMSpara":[[1,2]],"BLVolCu":[[576,480],[1500,1500]],"BtemList":[[130,130,130,130,32767,32767,32767,32767]]}

@edelstahlratte
Copy link
Author

Here are the screenshots:

Image

Image

@edelstahlratte
Copy link
Author

Sorry for the German, here is the English version

Image

Image

@patman15
Copy link
Owner

"Bat Model" -> "Fledermausmodel" 😂 hilarious!

@edelstahlratte
Copy link
Author

Seems to be pure Google Translate without human interaction....

@patman15
Copy link
Owner

patman15 commented Jan 29, 2025

Ok, for the moment it looks like I have all input I need to produce a test version. Since I already have a queue of topics to work on, please be patient with me. The code itself does not look to complicated to do.

@edelstahlratte
Copy link
Author

Thank you very much for all your effort!

I can wait, no problem.

Tell me if you need more Infos....

Greeting,

Nico.

@patman15 patman15 self-assigned this Feb 16, 2025
@patman15
Copy link
Owner

@edelstahlratte could you get me the output of the serice explorer script? Did would help me verify some communication parameters.

@edelstahlratte
Copy link
Author

Hello @patman15!

This is the output I get:

2025-02-16 13:30:13,615 __main__ INFO: starting scan...
2025-02-16 13:30:13,769 __main__ INFO: connecting to device...
2025-02-16 13:30:15,008 __main__ INFO: connected
2025-02-16 13:30:15,008 __main__ INFO: [Service] 00001801-0000-1000-8000-00805f9b34fb (Handle: 1): Generic Attribute Profile
2025-02-16 13:30:15,008 __main__ INFO:   [Characteristic] 00002a05-0000-1000-8000-00805f9b34fb (Handle: 2): Service Changed (indicate)
2025-02-16 13:30:15,354 __main__ INFO:     [Descriptor] 00002902-0000-1000-8000-00805f9b34fb (Handle: 4): Client Characteristic Configuration, Value: bytearray(b'\x02\x00')
2025-02-16 13:30:15,354 __main__ INFO: [Service] 6e6f736a-4643-4d44-8fa9-0fafd005e455 (Handle: 12): Unknown
2025-02-16 13:30:15,354 __main__ INFO:   [Characteristic] 49535258-184d-4bd9-bc61-20c647249616 (Handle: 16): Unknown (write-without-response), Max write w/o rsp size: 244
2025-02-16 13:30:15,354 __main__ INFO:   [Characteristic] 49535458-8341-43f4-a9d4-ec0e34729bb3 (Handle: 13): Unknown (notify)
2025-02-16 13:30:15,444 __main__ INFO:     [Descriptor] 00002902-0000-1000-8000-00805f9b34fb (Handle: 15): Client Characteristic Configuration, Value: bytearray(b'\x00\x00')
2025-02-16 13:30:15,444 __main__ INFO: [Service] 7362646d-1b0a-2908-0706-052403020101 (Handle: 18): Unknown
2025-02-16 13:30:15,445 __main__ INFO:   [Characteristic] 102b5258-3b3a-2308-2726-750403420106 (Handle: 22): Unknown (write-without-response), Max write w/o rsp size: 244
2025-02-16 13:30:15,445 __main__ INFO:   [Characteristic] 102b5458-0b2a-0938-1716-650423020150 (Handle: 19): Unknown (notify)
2025-02-16 13:30:15,534 __main__ INFO:     [Descriptor] 00002902-0000-1000-8000-00805f9b34fb (Handle: 21): Client Characteristic Configuration, Value: bytearray(b'\x00\x00')
2025-02-16 13:30:15,534 __main__ INFO: disconnecting...
2025-02-16 13:30:17,874 __main__ INFO: disconnected

Hope this helps...

Greetings,

Nico.

@patman15
Copy link
Owner

Hi @edelstahlratte, I have a basic version that could work. Please install the linked branch via manual install. I would need some debug logs to identify the right parameters. Would be great if you could generate a longer log and switch between charging, discharging or change the current to just see varying values.
I'm unsure about the current and totally miss the number of charge cycles. Let's see if I can add the missing values.

Thanks,
Patrick

@edelstahlratte
Copy link
Author

Installation went well:

Image

Debug log is now running...

@patman15
Copy link
Owner

Debug log is now running...

Thanks, a few minutes are enough and please let me know if the existing values look plausible.

@edelstahlratte
Copy link
Author

The shown values are absolutely plausible.

@edelstahlratte
Copy link
Author

Here comes the log file...

home-assistant_bms_ble_2025-02-16T15-20-15.180Z.log

@patman15
Copy link
Owner

Thanks, I added the missing values, if you update you should see them. I still can't find a cycle counter. Do you have one in the app? Should I implement one based on the SoC or are you ok with having it unknown?

@edelstahlratte
Copy link
Author

That looks very good to me. Thanks for your work!

Having the cycles counter unknown is no problem for me.

Greetings,
Nico.

@patman15 patman15 linked a pull request Feb 16, 2025 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