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

jiabaida bms , bluetooth not able to connect #252

Open
ouinouin opened this issue Aug 26, 2022 · 1 comment
Open

jiabaida bms , bluetooth not able to connect #252

ouinouin opened this issue Aug 26, 2022 · 1 comment
Milestone

Comments

@ouinouin
Copy link

Hi,
im trying to connect to my Jiabaida BMS with JKBMS,
unfortunately there seems to be differences with UUIDS or notify mecanism.

while running the command i get :

jkbms -p A4:C1:38:1B:16:29
Traceback (most recent call last):
File "/usr/local/bin/jkbms", line 8, in
sys.exit(main())
File "/home/ouinouin/mpp-solar-docker/src/mppsolar/mppsolar/init.py", line 417, in main
results = _device.run_command(command=_command)
File "/home/ouinouin/mpp-solar-docker/src/mppsolar/mppsolar/devices/device.py", line 316, in run_command
raw_response = self._port.send_and_receive(
File "/home/ouinouin/mpp-solar-docker/src/mppsolar/mppsolar/inout/jkbleio.py", line 37, in send_and_receive
response = self.ble_get_data(full_command)
File "/home/ouinouin/mpp-solar-docker/src/mppsolar/mppsolar/inout/jkbleio.py", line 94, in ble_get_data
serviceNotify = self._device.getServiceByUUID(serviceNotifyUuid)
File "/usr/local/lib/python3.9/dist-packages/bluepy/btle.py", line 490, in getServiceByUUID
raise BTLEGattError("Service %s not found" % (uuid.getCommonName()), rsp)
bluepy.btle.BTLEGattError: Service ffe0 not found

i actually grab the data of this bms with another tool but i would like to use jkbms and JBD to have a more centralized setup.
i use this script uccessfully :bmsinfo
i also use this successfully to forward messages to nodered bmstcp

in this code they use those uuids :

 
device_information_service = next(
            s for s in self.services
            if s.uuid == '0000ff00-0000-1000-8000-00805f9b34fb')

        self.bms_read_characteristic = next(
            c for c in device_information_service.characteristics
            if c.uuid == '0000ff01-0000-1000-8000-00805f9b34fb')

        self.bms_write_characteristic = next(
            c for c in device_information_service.characteristics
            if c.uuid == '0000ff02-0000-1000-8000-00805f9b34fb')

i ll try do dig your code to see if its just uuids to adapt or if the structure of bluetooth is greatly different. my coding skills are unfortunately very limited in this case to do more than few modifications, but i was having a deep look on the structure of the payload to be able ot interpret it on nodered side so i could help to implement jiabaida bms if interrested.

@jblance jblance added this to the Improve BLE support milestone Jan 8, 2023
@jblance jblance modified the milestones: 0.17 release, ble updates Jul 28, 2023
@NeariX67
Copy link

You have a JBD BMS, not a JK BMS.

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

No branches or pull requests

3 participants