I now have this working in Openhab 4.0.1. I am using an RPi4 as my Openhab server. I installed Mosquitto on this server. I installed the Bluetti-MQTT package with PIP and followed all the other instructions to configure it. I installed MQTT Broker on this server and a remote server both pointing to the Mosquitto server. My Bluetooth is on the remote RPI 3 with an external BT dongle, as the internal BT was not strong enough to reach my Bluetti AC300. I also installed the Jinja Transformation addon. I searched for new Things using the HomeAssistant MQTT component. It immediately found my Bluetti AC300. I used MQTT Explorer to verify that all the data was coming in as configured. Setup the channels I wanted to see, and everything is working great. Thank you all for the work on this. The documentation is great, and it made it easy to install and configure.Has anyone looked at doing an Openhab integration?
print('#' + name + '#')
#AC300123456789012345 #
DEVICE_NAME_RE = re.compile(r'^(AC200M|AC300|AC500|AC60|EP500P|EP500|EP600|EB3A)(\d+)$')
name = name[:-3]
bluetti-mqtt --scann
I'm assuming this will show if you have set limits on max and min battery levels (i.e Charge to 80%, stop discharging at 20% etc).Two numbers Battery range start and end. I do not know what that is supposed to be.
Hello all,
maybe you can help me.
I control and monitor a Bluetti AC200MAX via the Home Assistant.
Unfortunately it does not work without problems, from time to time the Home Assistant loses the connection to the AC200MAX.
It also happens rarely that the ADD-ON "Bluetti to MQTT" is not started when booting from the Raspi. But this is not the main problem.
I have set the query interval to 10 seconds, but it is not really better.
When I get no connection at all, I have to restart the HA completely, then the connection is there again.
I don't know where else I can set something.
The Raspi is on the powerbox, so the Bluetooth range should not be a problem.
Technical data.
Home Assistant 2023.8.4 Supervisor 2023.08.1 Operating System 10.5 Frontend 20230802.1 - latest
Rasbeery Pi3 rpi3-64
attached the log file
thank you....
May I ask how you solved this? I also have this problem sometimes (not often) when the addon cannot get data from the AC200MAX and I have to reboot HA.Problem fixed, has taken care of itself.
I missed your post - I was dealing with the same issue and entered in my device name directly into the code to get around it. I'm not sure what the extra characters are that you are seeing. I have an AC500. I noticed that when I run a scan on MacOS I get my full serial number as the 'name' and when I run the scan from a different OS I get AC500 + the first 4 numbers. I'm not sure on the exact break down but the device name appear to be 'AC500' + the first 4 characters the remainder are a unique identifier to make up the serial.Hello all,
I have recently bought a second hand AC300 with two B300. And came across this threat. So I also wanted to connect my AC300 to Home Assistant.
I don't like the fact that when I want to control the AC300 by wifi, it first go's unencrypted to Singapore and back. So I installed Python on macbook air running windows 10. And installed the bleutti-mqtt package through pip. All went well.
The only problem I did face was that when I want to try to start the service, the program exited on a error that match was a none type in bluethoot\__int__.py line 28.
So did some digging in the code (I not a python programmer, but can read it well) and this is what I figured out:
The name string in "def build_device(address: str, name: str):" contains the the device name that contains of model and serial number. Only there are 3 characters at the end of this string that care blank. I print the name string to the console with:
print('#' + name + '#')
And the console gives me:
#AC300123456789012345 #
And this is going to conflict with
DEVICE_NAME_RE = re.compile(r'^(AC200M|AC300|AC500|AC60|EP500P|EP500|EP600|EB3A)(\d+)$')
So what I did to make it work on my laptop is to trim the last 3 characters of the string. Only this is not a good fix in my opinion.
my fix isname = name[:-3]
My question is, where are the extra characters coming from?
When I run
bluetti-mqtt --scann
it is giving me the device name without the extra characters.
Just run bluetti-mqtt twice and use the ip and login data of the second MQTT Broker when you start it the second time.Is it possible to share this data to 2 separate MQTT servers? I have this in my camper for local display when on the road, but I would also like to keep a copy on my primary server at the house. I would like it to sync all updates as long as it sees the primary server. If I am gone and come back, I would like to to bring the primary up to date.
For my AC300 I created a new entity for PV2 which is the subtraction of the reported PV1 input from the total PV input. Works a treat.I noticed I'm only getting 1 dc_input detail (ie. Total DC input plus one of the mppt controllers). Anyone had any luck in connecting to the second MPPT controller to get the data?
This can only be done via the app, right?Just an FYI to everyone.. it appears that the latest firmware from Bluetti appears to break the Bluetti-mqtt service.... therefore don't upgrade the firmware of your bluetti at this time.
1. yes. When Bluetti is connected to your device, the Bluetti app is no longer capable to connect via bluetooth (only one single BT session is allowed)Is there a walkthrough on how to set this up? I'm having a hard time following what the chain is supposed to look like. Here's what I'm gathering:
Anyone have an update as to whether this works with the latest firmware? Can someone post what that version is?
- Bluetti (AC300) -> connects over Bluetooth to a Device running BLE + WiFi + the Python scripts found in Bluetti_MQTT
- The Device is either a laptop, Raspberry Pi, or ESP32
- A MQTT server (broker?) subscribes to the Device. It communicates messages over WiFi (Mosquitto broker?)
- These messages are parsed by Home Assistant (through... add-ons?).
- Visualization is handled by... ?
- Command setting is handled by... ? (turning AC on or off, say)
Yes, I believe so.This can only be done via the app, right?