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

Bulltron battery setup error #85

Open
3 tasks done
PG248 opened this issue Nov 14, 2024 · 9 comments
Open
3 tasks done

Bulltron battery setup error #85

PG248 opened this issue Nov 14, 2024 · 9 comments
Labels
question Further information is requested

Comments

@PG248
Copy link

PG248 commented Nov 14, 2024

Checklist

  • I need support with using the integration.
  • My issue is not a feature request
  • I'm not avoiding to fill out the bug report form.

Describe the issue

I try to read entities from a Bulltron LiFePo battery with HA. The battery is automatically recognised but when I confirm to proceed with the automatic setup I get the following error:

device communicating failed: [org.bluez.Error.Failed]
Operation failed with ATT error: 0x0e (Unlikely Error) (BleakDBusError)

In terminal I can connect to the battery (sensitive data changed to XXX) :

bluetoothctl connect B4:XX:XX:XX:XX:XX
Attempting to connect to B4:XX:XX:XX:XX:XX
[CHG] Device E1:XX:XX:XX:XX:XX RSSI: 0xffffffbb (-69)
AdvertisementMonitor path registered
[CHG] Device B4:XX:XX:XX:XX:XX RSSI: 0xffffffc7 (-57)
hci0 B4:XX:XX:XX:XX:XX type LE Public connected eir_len 17
[CHG] Device B4:XX:XX:XX:XX:XX Connected: yes
Connection successful

bluetoothctl info B4:XX:XX:XX:XX:XX   
Device B4:XX:XX:XX:XX:XX (public)
        Name: DL-FB4XXXXXXXXXX
        Alias: DL-FB4XXXXXXXXXX
        Appearance: 0x0XXX (XXX)
        Paired: no
        Bonded: no
        Trusted: no
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Generic Access Profile    (00001800-0000-1000-8000-XXXXXXXXXXXX)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-XXXXXXXXXXXX)
        UUID: Unknown                   (0000ff00-0000-1000-8000-XXXXXXXXXXXX)
        UUID: Unknown                   (0000fff0-0000-1000-8000-XXXXXXXXXXXX)
        ManufacturerData.Key: 0x0XXX (XXX)
        ManufacturerData.Value:
  00 b4 ...                    .......DL.      
        RSSI: 0xffffffc9 (-55)
        AdvertisingFlags:
  06 

I tried to pair the battery with bluetoothctl pair MAC but the pairing process stops after some timeout probably waiting for a pin. Don't get a prompt to enter a PIN

I think pairing with a PIN is not necessary unless I want to change parameters of the battery. At least that's the case with the Bulltron Mobile App. I do not want to change parameters via HA only read actual charging level, voltage, current.

Any help appreciated.

@PG248 PG248 added the question Further information is requested label Nov 14, 2024
@patman15
Copy link
Owner

Hi! I would need a debug log to tell you more / analyze the issue. Do you know which BMS is used by the battery? (If not, logs will tell anyway.) Thanks.

@PG248
Copy link
Author

PG248 commented Nov 14, 2024

Thanks for looking. I think it is Daly BMS though I have no official confirmation from manufacturer.

I'll send debug log tomorrow. Can I send it directly to you? Don't like to post it publicly because it might contain sensitive data.

@patman15
Copy link
Owner

Can I send it directly to you?

Sure, there are links in my github profile you can use, e.g. my user on HA community which allows DMs.

@PG248
Copy link
Author

PG248 commented Nov 17, 2024

Sent the debug files to your Discord account as I already have an account in Discord.

@patman15
Copy link
Owner

Thanks for sending the logs. I had a look at them and there are two possible issues.

  1. Please try to pair the device before using the integrations. See the FAQ on how to do that.
  2. if (1) does not help, it could be related to Daly BMS "Failed setup, will retry: device communication timed out" since v1.7.0 #89 as well. See my last post there on how to update.

A feedback with a log is highly appreciated so I can nail down the issue. Thanks for raising the issue!

@PG248
Copy link
Author

PG248 commented Nov 17, 2024

Thanks for looking.

I've already tried to pair the device with bluetoothctrl pair MAC but I never get a prompt to enter a PIN and the pairing process just times out with an error.

When using the Atom bluetooth proxy pairing is even more problematic as bluetoothctl doesn't work with the proxy.

If you can guide me I'd give it another try.

I'll try as well your hint 2 with manual installation but this will take some time because the mobile home where the Bulltron is installed will be serviced during the next 2-3 days.

@patman15
Copy link
Owner

@PG248 I looked at the logs again and can see a number of Bluetooth errors (indicating that the connection does not work). Have you tried rebooting once? Can you let me know, which HA version you use, what OS, what Bluetooth adapter? Did you ensure that your phone / the app or any other software that could access the battery is disabled?

@PG248
Copy link
Author

PG248 commented Dec 9, 2024

Just updated everything:
Core 2024.12.1
Supervisor 2024.11.4
Operating System 14.0
Frontend 20241127.6

BLE BMS 1.10.0

Bluetooth is via Atom Stack M5 proxy.
Hardware is RPI4.
Battery is a Bulltron Polar 185Ah LiFePO4 battery.

Still get the following error every few seconds:
device communicating failed: Bluetooth GATT Error address= B4:XX:XX:XX:XX handle=21 error=14 description=Unlikely error (BleakError)

Can connect to the battery with bluetoothctl connect B4:XX:XX:XX:XX but cannot pair with bluetoothctl pair B4:XX:XX:XX:XX probably because pairing needs a PIN that I cannot enter during the pairing process (no request).

Maybe an option to set the PIN in the config file for BLE BMS might be helpful?

If you want me to do further testing tell me what you need.

@patman15
Copy link
Owner

patman15 commented Dec 9, 2024

I'm still not sure what the reason is. I can see that the BMS responds with a frame that looks like from a Daly BMS but only after disconnect. The fastest way to figure out what the issue is would be to capture the Bluetooth traffic when you are using the app. Are you able to do so?
I suspect the battery uses a dongle as described in this topic about a new Daly UART protocol. I have no account there, so unfortunately I cannot get the protocol description. That is the one I'm using. My fault.

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

When branches are created from issues, their pull requests are automatically linked.

2 participants