Encryption and decryption module provides APIs

I have two Bluetti’s an EB3A and an AC180.
The AC180 is a replacment, to one that used to connect to HomeAssistant, with a variation of the “warhammerkid/bluetti_mqtt”.
But the replacement does not work with HomeAssistant any more, due to, “Bluetooth wireless messages are transmitted using ciphertext”

Having communicated with Bluetti. I was told, “We have opened a targeted decryption channel, and you can send the SN code of the device to us to decrypt your device.
Please note that the decryption core code is not open to the public due to information security, but we provide an API that can encrypt and decrypt our Bluetooth messages. The reference example includes the method of calling the API in the Home Assistant system.”

So I sent my SN to bluetti, and have been sent,
“” We have attached the device authorization file for your reference.
For detailed instructions on how to use the device authorization file, please refer to the guide available at the following GitHub link:
[GitHub - bluetti-official/bluetti-bluetooth-lib] "

Along with a CSV file for each machine, … no indication which is which!..It looks something like this
“bluetti
1741234512345
12345764d94137c4a7cbffd77212345
123452d30594844a3d80e1a75bff90000c3a6c87ca0f646c7e9a6b1f49355675da56600363bd2283dfb9a6very long set of hex numbers…my 12345s”"

What I am asking for is Help.
What do I do next, the instructions I am finding difficult to follow.
I have downloaded, and put the files in my Python directory, on my windows PC, because that was how I did it before. Right/wrong?
I originally had,
“bluetti-mqtt --broker 192.168.1.97 --username mqttuser --password xxxxxx XX:7F:17:CD:B1:XX”
running on PC, and HomeAssistant, on a separate BeeLink dedicated HA with MQTT, picked up the information, and made it available in HA. Relatively easy.

I have now installed/integrated “hassio-bluetti-bt” as the refered to example in the bluetti link.

If anyone has suggestions, advice, or know how to get to the next stage, please let me know,

1 Like

Following this with interest as I will need to do something similar soon.

1 Like

Hi @bres55, We’re sorry we can’t provide further assistance beyond granting API access.
Subsequent operations will need to be handled by customers themselves.
If you have questions about installing HomeAssistant, we recommend searching for relevant tutorials on YouTube.

Following as well. Just received an AC500 to upgrade my AC300 and being able to monitor is a dealbreaker if I can’t get it to work. Also using HomeAssistant with the same BT monitor plugin.

1 Like

What is the format of the .csv file? Where should it be located? I have it almost up and running but get this error:

bluetti-discovery-dev --log the-log-file.log F8:B3:B7:42:XX:YY
Connecting to F8:B3:B7:42:XX:YY
Waiting for connection...
Waiting for connection...
[cryptModule]: Bluetti crypt module version:V1.0.0-L
[cryptModule]: crypt init end
[cryptModule]:Could not open bluetti_device_licence.csv
[cryptModule]: read sn list fail
[cryptModule]: Bluetti crypt module version:V1.0.0-L
[cryptModule]: crypt init end
[cryptModule]:Could not open bluetti_device_licence.csv
[cryptModule]: read sn list fail
Waiting for connection...

I put my full AC500
and

in the csv file and got a failure so I’m assuming there’s more to this story

[cryptModule]: Bluetti crypt module version:V1.0.0-L
[cryptModule]: crypt init end
[cryptModule]:Read check error
[cryptModule]: read sn list fail
[cryptModule]: Bluetti crypt module version:V1.0.0-L
[cryptModule]: crypt init end
[cryptModule]:Read check error
[cryptModule]: read sn list fail

Apparently you have to email support, per this CLOSED thread.

Thank you for a response But must express how surprised I am at its content.
Taking from bottom up.
“If you have questions about installing HomeAssistant, we recommend searching for relevant tutorials on YouTube.”
Where have I asked for HomeAssistant installation tutoring? I have not.
So left with two lines.
“Subsequent operations will need to be handled by customers themselves.”
This sounds like BLuetti are not sure how to help. Is that so?
“We’re sorry we can’t provide further assistance beyond granting API access”
Again why is Bluetti unwilling to help?
So my questions have been dismissed.
Clearly there is a need for clarification of the instructions within the link
GitHub - bluetti-official/bluetti-bluetooth-lib
I ask you to reconsider your response, and at your end ask tech-support to get involved.

That’s useful info.
You have got further than me. I cant get past a simply --scan, without errors all over the place.
If you have more that one Bluetti, order codes seperatly, as they do not within the e-mail or indeed anywhere, let you know what machine it is for. So now Not only is it not clear where these/this file is put, but how do I merge two files into one??
.
Why would this thread be closed?

The thread on Github was closed, not this one.

I’ll give you all the info I have, perhaps we can make progress together. It’s a bit if a niche within a niche.

I have HA running on a Proxmox VM. I was using Bluetti-BT with my AC300, but that became unreliable, so I switched to Bluetti-MQTT.

To Get that working, I spun up another VM, put fresh Ubuntu on it. I passed a USB BT dongle to the VM. The only way I could get Bluetti-MQTT installed and working was via pipx. Using that, it was relatively seamless with MQTT (mosquito?) in HA. That was about a month ago.

Today, I received an AC500 as an upgrade. I assumed it was using encrypted firmware, but I can’t confirm that. It’s fully updated (IoT v9041.10, ARM v4044.07, DSP v4059.04). I was not able to use my existing setup (by changing the MAC address found in a --scan, so I went down the encryption library rabbit hole.

Using ChatGPT (it’s very useful for HA & Python), I was able to get Bluetti’s version side-by-side with the published version. I was able to install the library and get to the point where I needed the decryption csv.

Instead of recreating it, you can poke through my ChatGPT log. Hopefully that’s useful.

Here’s the crazy thing: My AC500 might not be encrypted. :crazy_face: I came back home, and looked at the Bluetti-BT plug-in in HA, and found… DATA! :exploding_head: WTF!?! It wasn’t working before, so I have no idea what’s going on. I’m using the original, and not the modified version from Bluetti, and I haven’t received my encryption .CSV file from tech support yet.

I’ll post more if I learn more. Hopefully there’s some help here.

Thanks for all of that.
I’ve decided to start again ! Removed Python 3.9.13, and 3.13.3, all linked enviomental variables, and python Launch, so hopefully no dregs, kept a backup of some of the important bits, in case I need to refer to them. Upon Windows restart, it decided to do an update! 30 mins later, hopefully all clean.
And I am taking you advice and see if ChatGPT can guide me. It wasn’t a good start, as I had to ask the question does this version work with AC180, and admitted it didn’t. Anyway, I’ll slog away.
This all seems a bit bonkers. I just want to be able to control a machine that cost several hundred pounds, it has blootooth, I want to be able to monitor it and control it. I really don’t think that is asking too much, from Bluetti. I cannot believe their attitude! I know it’s slightly different, but I can pair my headphones, and use them freely, listen to music from my phone, in a crowded train, no one else able to connect. The only thing I had to do was pair them. Simple!
.
My big dilema is which version of bluetti-mqtt do I go with. I think I’ll try and us the one from “GitHub - bluetti-official/bluetti-bluetooth-lib”. I have tried it before, but errors abound.
I have tried soooo many different versions.
(GitHub - jesherman/bluetti_mqtt: MQTT interface for Bluetti power stations)
(GitHub - nhurman/bluetti_mqtt: MQTT interface for Bluetti power stations)
most recently. I found the error messages difficult to understand, so maybe ChatGPT will be able to help.

interested by this therefore following it. Thanks

1 Like

The more the merrier.

One possibility is to install virtualbox or vmware on your pc and run a Linux VM as a test (or permanent if necessary). It shouldn’t make a difference, but could, and the niche of nerds that monitor things like this are more likely running Linux (and therefore might be able to help more).

I cut Bluetti support some slack - what we’re trying to do is really outside the mainstream (even if I agree with you that “it shouldn’t be this hard, people!!!”.

My AC500 continues to run through the night. When I moved it to it’s to-be-final-place last night, it wouldn’t reconnect, and I tinkered and… about 10 minutes later it started responding. :man_shrugging: So it looks like, for me at least, I’m not encrypted. The delay is weird.

The AC500 doesn’t have the same outputs as the AC300, which is curious (like Battery discharging/charging/standby state reporting).

I have got this far. The ChatGPT conversation helped, with where files went.
Windows PC running the example, bluetti-mqtt. I was rather hoping the Broker in HA would now pick the info up. But nothing is happening.

It’s been a bit of trial and error process. Feel a bit weary now, so will leave for a while, see if any one else can see what the next stage is. Maybe it will come to me, with time. Apologies for paranoia blackouts, the numbers bear no similarities to the numbers in the CSV file.