Official Bluetti Device API Survey

Ohhh That is good news . I am stuck with the matter . I am now trying to get something out of Esphome BLE tracker/client . This machine is stubborn , to the max…My question is ; Protecing from what/who ??? BLE devices will not mantain an stable connection from more than 6-8 mts away …and that is not even the distance to your backyard. I find this really , … crazy ? . Greetings and hope your tip becomes reallity. I my case , from 4 Phones/ablets I got at home , onlt 1 “sometimes” connects with the app… I have no easy control of basic settings I would like to change on a daily basis … like AC charging regime … Oh My … Annoying

1 Like

After some digging and trying I found a way to fully integrate a elite 200 v2 into home assistant. Nearly all controls are integrated (thx to desalvo for creating the fork and integrating the necessary code). It’s basically putting together the things from different users.
The approach is a bit hacky but doable (thx to toeachbyeach for the approach,

  1. Download this github repo to your desktop: GitHub - jesherman/bluetti2mqtt: Home Assistant Add-on for bluetti_mqtt
    You only need the content of the folder bluetti2mqtt
  2. Now modify three files in the folder (build.yaml, config.yaml and dockerfile) as follows:
    A. dockerfile:
ARG BUILD_FROM
FROM $BUILD_FROM

# Copy data for add-on new 1
COPY rootfs /

# Install system dependencies using apk (Alpine package manager)
# Note: build-base is the Alpine equivalent of build-essential
# Note: openssl-dev is the Alpine equivalent of libssl-dev
# Note: Removing bluez version pin initially - add back if needed and available
RUN apk add --no-cache --force-overwrite \
    openssl=3.5.2-r0 \
    openssl-dev=3.5.2-r0 \
    libcrypto3=3.5.2-r0 \
    libssl3=3.5.2-r0

RUN apk add --no-cache \
    git \
    build-base \
    python3-dev \
    libffi-dev \
    cargo \
    bluez

# Install pip dependencies FIRST with explicit versions
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir \
	aiomqtt==2.1.0 \
        bleak==0.22.3 \
        crcmod==1.7 \
        cryptography==44.0.0 \
        dbus-next==0.2.3 \
        pyasn1==0.6.1 \
        pyserial==3.5 \
        prometheus_client==0.20.0

RUN pip install --no-cache-dir --no-deps git+https://github.com/desalvo/bluetti_mqtt.git@v2devices

# Set permissions for run script
RUN chmod a+x /run.sh

RUN sed -i 's/sys.exit(main())/sys.exit(main(sys.argv))/' /usr/local/bin/bluetti-mqtt

# Optional: Clean apk cache if needed, though --no-cache minimizes it
# RUN rm -rf /var/cache/apk/*

CMD [ "/run.sh" ]

B. config.yaml:

Commented out the “image:” line; changed version and deleted irrelevant archs for good measure.

arch:
  - amd64
#image: ghcr.io/jesherman/{arch}-addon-bluetti2mqtt
host_dbus: true

C. build.yaml

bumped version of base python, deleted irrelevant archs.

---
build_from:
  amd64: ghcr.io/hassio-addons/base-python/amd64:17.0.0

Afterwards install the SMB Addon in Home Assistant and access the share via your computer.
Now copy the prepared bluetti2mqtt folder from earlier into the addons folder on the Home Assistant SMB share.
Restart Home Assistant. Next go to addons and click on add-on store. If everything worked as planned you should see “Local add-ons” directly at the top and there the bluetti2mqtt add-on. Install it. Now you should be able to discover your elite 200 v2 with the scan feature of the add-on (see protocol to get the details). Afterwards enter the Mac address which is listed in protocol in configuration of the add-on.
If everything worked as planned there should be a new MQTT device:

2 Likes

Hi everyone,

I’m about to be a proudly and happy (hope so!) owner of a Elite 200 V2. Good for me! :joy:

I just answered the survey for the API development - hope we get it soon.

I have a Hubitat Elevation hub and I’d like to integrate my future device to it.

BTW, has somebody any information about a possible Matter support? It would be a breeze to integrate to my hub and, being so, it would be not necessary to develop an integration/driver myself … :smiling_face_with_tear:

Any Hubitat user around?

1 Like

Thank you very much .Will give it a try . My HA runs on an x86 mini Pc without self Bluetooth support. I am thinking of using the ESp32 bluetooth proxy for that … Will se how it goes. Greetings , Alles Gute.

Filled in the Survey. I had a few esp32 with screens and planned to run the Bluetooth MQTT for the esp32. To then strip away the MQTT to instead display the information on the esp32 screen as a control panel in my Mhome. Only to discover that after trying the code on my new purchase of the Elite100. The data looks encrypted. I hope there will be a stand alone away from the internet esp32 once off API that can be imbedded into the esp32. I understand the security issue of the open BLE. But it would have been nice to have read only basic plain data.

1 Like