diy solar

diy solar

Monitoring Bluetti Systems

Hi,
bluetti-mqtt is not longer working for me, found out that an update this morning may be the case. /var/log/dpkg.log says:

Code:
2024-04-02 06:34:22 startup archives unpack
2024-04-02 06:34:24 upgrade python3-anyio:all 4.2.0-1 4.3.0-1
2024-04-02 06:34:24 status half-configured python3-anyio:all 4.2.0-1
2024-04-02 06:34:24 status unpacked python3-anyio:all 4.2.0-1
2024-04-02 06:34:24 status half-installed python3-anyio:all 4.2.0-1
2024-04-02 06:34:25 status unpacked python3-anyio:all 4.3.0-1
2024-04-02 06:34:25 startup packages configure
2024-04-02 06:34:25 configure python3-anyio:all 4.3.0-1 <none>
2024-04-02 06:34:25 status unpacked python3-anyio:all 4.3.0-1
2024-04-02 06:34:25 status half-configured python3-anyio:all 4.3.0-1
2024-04-02 06:34:27 status installed python3-anyio:all 4.3.0-1

Calling bluetti-mqtt with the correct parameters now leads to

Code:
root@bananapi:~# 2024-04-02 07:38:38 ERROR    Crashing with uncaught exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/bluetti_mqtt/server_cli.py", line 98, in run
    devices = await check_addresses(addresses)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/bluetti_mqtt/bluetooth/__init__.py", line 28, in check_addresses
    devices = await BleakScanner.discover()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/bleak/__init__.py", line 216, in discover
    async with cls(**kwargs) as scanner:
  File "/usr/local/lib/python3.11/dist-packages/bleak/__init__.py", line 126, in __aenter__
    await self._backend.start()
  File "/usr/local/lib/python3.11/dist-packages/bleak/backends/bluezdbus/scanner.py", line 179, in start
    adapter_path = manager.get_default_adapter()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/bleak/backends/bluezdbus/manager.py", line 299, in get_default_adapter
    raise BleakError("No Bluetooth adapters found.")
bleak.exc.BleakError: No Bluetooth adapters found.
2024-04-02 07:38:38 INFO     Shutting down...

Who can help me out of this?
Thanks




Edit:

Managed to help me out for now...added trixie to the sources.list and did
Code:
apt install python3-anyio=4.2.0-1
and its working again...for now...
But next update will kill it again, I think...any suggestions how to fix this permanently really appreciated, thanks...

Edit: python3-anyio set to HOLD.
 
Last edited:
I own an AC500+2xB300S and I am interested to find the Registers for the PV2 Input Values
Since the current app now has a separate page to display the PV1+PV2 Input power and voltage I thought that it might be possible to find the proper registers.

Therefore I started the Logging function and connected the bluetti App via Bluetooth to the AC500 and displayed the PV1+PV2 infos page in the app and took some screenshots each time after the values in the display changed.

I have been working a little with modbus TCP, but I am to far away to decode the values in the log.

Anybody has got more experience and is interested in the log+screenshots ?

UPDATE: I just checked the Time in the Log and in the screenshots.
The strange thing is that there was no logging dhappening during the time I was connected via Bluetooth from the app. Only from before.

Question: Do I have to connect from the App via the Bluetti Server instead of Bluetooth ?
I thought the logging captures the Bluetooth traffic between the AC500 and the App while the app is connected via Bluetooth ?
 
Last edited:
Yowza - your B1 and B2 SOC %'s are way different (as are mine)! Yesterday I had one at 100%, and the other at... 38%. I ran my AC for an hour to drain the batteries a hair, and within a few minutes of shutting off the AC it shot up to 100%.

Yes, but they are the same voltage. It is the dang BMS that is confused. I actually did a full calibration cycle last week to see that would improve the estimation, not really as you can see.
 
Yes, but they are the same voltage. It is the dang BMS that is confused. I actually did a full calibration cycle last week to see that would improve the estimation, not really as you can see.
It's a bummer. Interesting that it appears that yours are different opposite of mine. B2 goes into B1 goes into AC300. I was about to conduct an experiment to see if the order might change things... saved me the effort. 😉
 
If you're looking for an alternative, the hassio-bluetti-bt HACS add-on has been working flawlessly nearly flawlessly for me for the last month. You should get on the pre-releases (0.0.22 is the latest).
I don't show bluetti-mqtt or hassio-bluetti-bt works at all with the latest firmware from Bluetti. They did something to block it or changed the way the BLE responds. The only way I've found to get it to work again is to have the latest firmware removed from the Bluetti device.
 
Last edited:
I don't show bluetti-mqtt or hassio-bluetti-bt works at all with the latest firmware from Bluetti. They did something to block it or changed the way the BLE responds. The only way I've found it get it to work again is to have the latest firmware removed from the Bluetti device.
Hmm... no suggestions on that. I got my system to work reasonably well*, and haven't touched the firmware since!

* The BMS's can get wildly out of sync, which is a bummer.
 
Hmm... no suggestions on that. I got my system to work reasonably well*, and haven't touched the firmware since!

* The BMS's can get wildly out of sync, which is a bummer.
Same. I haven't updated my firmware either, nor is it connected to Wifi. However, eventually most of us will need to warranty out our machines and the new/replacement will come with the new firmware, thus leaving us screwed.


The issue appears to be a Bleak isssue when connecting to the Bluetti.
 
Ok, so good news. We were cautious in doing so, but we upgraded the IOT firmeware. IOT version 9041.06 appears to fix the issue and bluetti-mqtt is working on the new/replacement AC500.
9041.03 was the IOT firmware that came with the machine and must have had a bug that prevented bleak from connecting.

@plympton I saw that you are a contributor for "hassio-bluetti-bt". Have you guys discovered more data? I have the original emails from @chromedshark that explains how Bluetti-mqtt works and how he identifies the datasets.
 

diy solar

diy solar
Back
Top