Yeah, i already mention this on their repo. There is a fork of one of the Bluetti MQTT Projects that implement the encryption feature without the Bluetti provided part (based on reverse engineering?) Works perfectly. Sadly i dont find this repo anymore
Falls du es findest, lass es mich bitte wissen
@corefusion Think i found it:
GitHub - nhurman/bluetti_mqtt: MQTT interface for Bluetti power stations
Atleast it have the commit for supporting V2 Devices and encryption.
Ah, i know that one. Unfortunately i cant get it to work.
hmm, i use it for the logging part and was able to pull the modbus commands from encrypted and unencrypted units without problem (on raspberry Pi 3). So the basic function seems to be there.
What you error with it?
Well, in the end it comes down to the fact that i’m propably too stupid to work with docker images
i have HAOS running on my pi and the bluetti2mqtt addon always reverts back to the original bluetti_mqtt by warhammerkid
You are not alone.
I’ve tried installing nhurman version. I get errors running it
.
C:\Windows\System32>bluetti-mqtt --scan
Traceback (most recent call last):
File “< frozen runpy>”, line 198, in run_module_as_main
File “< frozen runpy>”, line 88, in run_code
File “C:\Program Files\Python313\Scripts\bluetti-mqtt.exe_main.py”, line 4, in
from bluetti_mqtt.server_cli import main
File “C:\Program Files\Python313\Lib\site-packages\bluetti_mqtt\server_cli.py”, line 9, in
from bluetti_mqtt.bluetooth import scan_devices
File “C:\Program Files\Python313\Lib\site-packages\bluetti_mqtt\bluetooth_init.py”, line 7, in
from .client import BluetoothClient
File “C:\Program Files\Python313\Lib\site-packages\bluetti_mqtt\bluetooth\client.py”, line 9, in
from .encryption import Connection, PassthroughConnection, EncryptedConnection
File “C:\Program Files\Python313\Lib\site-packages\bluetti_mqtt\bluetooth\encryption.py”, line 60, in
from cryptography.exceptions import InvalidSignature
ModuleNotFoundError: No module named ‘cryptography’
.
I find it difficult to understand the vagaries of Python. Different versions for different platforms, different versions within these platforms, different “PIP”. I copied the nhurman version to my “C:\Program Files\Python313\Lib\site-packages”, uninstalled the warhammer version, I think! And installed using the path “C:\Program Files\Python313\Lib\site-packages\bluetti_mqtt_main”, that pointed to the nhurman version. And it seemed to install, but get the errors as above. So no further forward.
I’m a hardware person, I am taking my EB3A apart, to see if I can find somewhere to tap in to the signal before bluetooth mashes it up.
@bres55 @corefusion Im really active on this topic and try to find a solution with Bluettis R&D Team. This survey was the first step.
If there is any news on this topic, i will let you guys now!
I feel one shouldn’t need to be a tech wizard to make it work.
Maybe, in between, while we wait, an alternative from Bluretti, could be to give more options within the app.
Like,
Set a discharge level, to switch off AC, and another for DC.
A trigger based on SOC level for AC and another for DC, to switch on.
Maybe have a Solar minimum maximum trigger too.
Definitely some history graph of inputs and outputs.
You get the idea. Give us more control.
I am also flumoxed why the bluetooth signal is so weak, and drops off all the time, even standing right next to it.
Happy to try any suggestions, from Bluetti, or others, to find solutions.
Sure, they could put a lot of work in the App. In my opinion, such a API is much easier for them. Instead of note every little feature people want to see, they just provide a API and people build exactly what they need with it.
Well, i did it.
Using this repo. Had to hack around as root a bit on my Pi, but now it seems to work just fine.
here’s the diff of what i have changed
bluetti_mqtt/bluetooth/__init__.py
13c13
< DEVICE_NAME_RE = re.compile(r'^(AC180|AC200M|AC300|AC500|AC60|EP500P|EP500|EP600|EB3A)(\d+)$')
---
> DEVICE_NAME_RE = re.compile(r'^(AC180P|AC180|AC200M|AC300|AC500|AC60|EP500P|EP500|EP600|EB3A)(\d+)$')
30a31,32
> if match[1] == 'AC180P':
> return V2Device(address, match[2], 'AC180P')
Hope this info is of use to someone.
be carefull with root, everything you do is at your own risk
In your case you’re missing the crypthography package.
install it with
pip install cryptography==44.0.0
also make sure you’ve installed all the other packages as listed in the requirements.txt file that came with bluetti_mqtt.
hope that helps
Thanks for that.
I’m sure I installed all the requirments previously, and then, when errors occured, started again, must have missed it second time around.
It got me further.
.
C:\Windows\System32>bluetti-mqtt --scan
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Program Files\Python313\Scripts\bluetti-mqtt.exe\__main__.py", line 7, in <module>
sys.exit(main())
~~~~^^
TypeError: main() missing 1 required positional argument: 'argv'
.
I can’t see anything looking like main.py so not sure what’s missing.
Hmmm… Since im no expert in python whatsoever, i dont know what’s wrong there. I would suggest to remove and reinstall the bluetti_mqtt package via pip. maybe that will help you solving the issue.
That’s exactly how I did it.
C:\Windows\System32>pip uninstall bluetti_mqtt
Found existing installation: bluetti-mqtt 0.15.0
Uninstalling bluetti-mqtt-0.15.0:
Would remove:
c:\program files\python313\lib\site-packages\bluetti_mqtt-0.15.0.dist-info\*
c:\program files\python313\lib\site-packages\bluetti_mqtt\*
c:\program files\python313\scripts\bluetti-discovery.exe
c:\program files\python313\scripts\bluetti-logger.exe
c:\program files\python313\scripts\bluetti-mqtt.exe
Successfully uninstalled bluetti-mqtt-0.15.0
C:\Windows\System32>pip install "C:\Program Files\Python313\Lib\site-packages\bluetti_mqtt_main"
Processing c:\program files\python313\lib\site-packages\bluetti_mqtt_main
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: asyncio-mqtt in c:\program files\python313\lib\site-packages (from bluetti_mqtt==0.15.0) (0.12.1)
Requirement already satisfied: bleak in c:\program files\python313\lib\site-packages (from bluetti_mqtt==0.15.0) (0.22.3)
Requirement already satisfied: crcmod in c:\program files\python313\lib\site-packages (from bluetti_mqtt==0.15.0) (1.7)
Requirement already satisfied: paho-mqtt>=1.6.0 in c:\program files\python313\lib\site-packages (from asyncio-mqtt->bluetti_mqtt==0.15.0) (1.6.1)
Requirement already satisfied: winrt-Windows.Devices.Bluetooth<3,>=2 in c:\program files\python313\lib\site-packages (from bleak->bluetti_mqtt==0.15.0) (2.3.0)
Requirement already satisfied: winrt-Windows.Devices.Bluetooth.Advertisement<3,>=2 in c:\program files\python313\lib\site-packages (from bleak->bluetti_mqtt==0.15.0) (2.3.0)
Requirement already satisfied: winrt-Windows.Devices.Bluetooth.GenericAttributeProfile<3,>=2 in c:\program files\python313\lib\site-packages (from bleak->bluetti_mqtt==0.15.0) (2.3.0)
Requirement already satisfied: winrt-Windows.Devices.Enumeration<3,>=2 in c:\program files\python313\lib\site-packages (from bleak->bluetti_mqtt==0.15.0) (2.3.0)
Requirement already satisfied: winrt-Windows.Foundation<3,>=2 in c:\program files\python313\lib\site-packages (from bleak->bluetti_mqtt==0.15.0) (2.3.0)
Requirement already satisfied: winrt-Windows.Foundation.Collections<3,>=2 in c:\program files\python313\lib\site-packages (from bleak->bluetti_mqtt==0.15.0) (2.3.0)
Requirement already satisfied: winrt-Windows.Storage.Streams<3,>=2 in c:\program files\python313\lib\site-packages (from bleak->bluetti_mqtt==0.15.0) (2.3.0)
Requirement already satisfied: winrt-runtime<3,>=2 in c:\program files\python313\lib\site-packages (from bleak->bluetti_mqtt==0.15.0) (2.3.0)
Building wheels for collected packages: bluetti_mqtt
Building wheel for bluetti_mqtt (pyproject.toml) ... done
Created wheel for bluetti_mqtt: filename=bluetti_mqtt-0.15.0-py3-none-any.whl size=44080 sha256=283c6db554679de632842f921ed33badb3cbb5555a42eeb8eea014631b543dec
Stored in directory: C:\Users\micha\AppData\Local\Temp\pip-ephem-wheel-cache-th0tcu25\wheels\08\45\e2\59a23d3fdd112998c5a88405090be030ceb3c3fcc8127608ca
Successfully built bluetti_mqtt
Installing collected packages: bluetti_mqtt
Successfully installed bluetti_mqtt-0.15.0
[notice] A new release of pip is available: 25.0.1 -> 25.1.1
[notice] To update, run: python.exe -m pip install --upgrade pip
C:\Windows\System32>bluetti-mqtt --scan
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Program Files\Python313\Scripts\bluetti-mqtt.exe\__main__.py", line 7, in <module>
sys.exit(main())
~~~~^^
TypeError: main() missing 1 required positional argument: 'argv'
C:\Windows\System32>
I’m the same about Python, and not really in the frame of mind to get too involved with it.
But I do appreciate your suggestions.
Did you try using Python 3.9? I think thats what i used last time
The way you install the package looks kinda odd to me.
maybe you could try installing it from github directly?
pip install git+https://github.com/jesherman/bluetti_mqtt
if that doesnt work, you could try to download the zip archive from the above mentioned repo and install it with
pip install /path/to/bluetti_mqtt-main.zip
Thanks again.
Tried the git, thing, had to install git, and went with all the defaults, all of them!
I got the same errors, and so installed Python 3.9.13, the only 3.9 version still available…
I am getting a bit muddled, as, I think the jesherman version, is to be running on the homeassistant machine, or does it not matter? I tried a variation of that method many moons ago, and left it when I got the warhammer version, running on a PC to work. Does the jesherman version also run from/on a windows PC?
I would like to be sure, what I am trying, is actually achievable. Or do I go back to the nhurman one?
Well, this is the version i am running on my home assistant, so i can definitely say it works. it also should run on windows.
i’m out of ideas now. sorry to hear it didnt work, hope you can find a solution
Thanks, for suggestions. It hopefully will eventually lead to a solution. I’ll keep plugging away.