Comments (20)
I don't have access to mine at the moment, I don't remember but I know the app could not be open while I scanned.
Will check again in a week.
from bluetti_mqtt.
@tonyk2023 I don't have mine fully set up, but can you set up bluetti_mqtt (see the instructions in this repo) and run bluetti-discovery --log log-file.log E9:10:3D:EF:EC:44
Then attach that log file to this issue.
I can supply a log, but only with a DC load attached.
from bluetti_mqtt.
@voltagex Set up a fresh install using debian, docker + HA so I could run the command with the following output.
BluettiHomeAssistant2.txt
BluettiHomeAssistant3.txt
from bluetti_mqtt.
I've started a fork and have started working on AC180 support. I am very much "learning as I go", but I have my instance talking with my AC180. I'm planning on using the logger soon to try to get the AC180 file updated. I will post here with more soon.
from bluetti_mqtt.
@Pr3cis1on any updates?
from bluetti_mqtt.
@Pr3cis1on I'm not sure if it's your additional code or a problem in the original but in 4 minutes the script had sent almost 10 000 MQTT messages.
from bluetti_mqtt.
@Pr3cis1on any updates?
I'm also interested in having my new brand AC180 power station integrated in my HA installation. In HA bluetti2mqtt configuration tab I've set the AC180 Bluetooth MAC Address (E2:E2:69:B0:02:1E) and I can effectively connect with the AC180 but after the connection the integration crashed and the Bluetti2mqtt service stops.
Hereafter the log showing the connection and the resulting error
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
Add-on: Bluetti to MQTT
MQTT bridge between Bluetti and Home Assistant
Add-on version: 1.4.1
You are running the latest version of this add-on.
System: Home Assistant OS 10.5 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2023.9.1
Home Assistant Supervisor: 2023.09.2
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[09:21:46] INFO: Reading configuration settings...
[09:21:48] INFO: Starting bluetti-mqtt...
2023-09-23 09:21:51 INFO Connecting to MQTT broker...
2023-09-23 09:21:51 INFO Starting to poll clients...
2023-09-23 09:21:51 INFO Connecting to clients: ['E2:E2:69:B0:02:1E']
2023-09-23 09:21:51 INFO Connected to MQTT broker
2023-09-23 09:21:51 WARNING filtered_messages() is deprecated and will be removed in a future version. Use messages() together with Topic.matches() instead.
2023-09-23 09:28:35 INFO Connected to device: E2:E2:69:B0:02:1E
2023-09-23 09:28:35 INFO Device E2:E2:69:B0:02:1E has name: AC1802313002068649
2023-09-23 09:28:35 ERROR Crashing with uncaught exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/device_handler.py", line 31, in run
await asyncio.gather(*(polling_tasks + pack_polling_tasks + [manager_task]))
File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/device_handler.py", line 45, in _poll
device = self._get_device(address)
File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/device_handler.py", line 103, in _get_device
self.devices[address] = build_device(address, name)
File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/bluetooth/init.py", line 28, in build_device
if match[1] == 'AC200M':
TypeError: 'NoneType' object is not subscriptable
2023-09-23 09:28:35 INFO Shutting down...
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
from bluetti_mqtt.
If it helps I have a very crude hack to get the AC180 battery percentage to Homeassistant.
I have a Ubunto 22.04 running bluetti-mqtti 0.15
I copied the ep600.py file to ac180.py changed the init.py file to import ac180.py It got past the exception at least. It does send a discovery to homeassistant and the battery percentage is useable. It also sends a zero power generation and a zero battery minimum and maximum, so those are not useable. So some of the ep600.py is close to the ac180.
Sep 25 11:07:24 storage.home.lan systemd[1]: Started Bluetti MQTT.
Sep 25 11:07:24 storage.home.lan bluetti-mqtt[45739]: We renamed asyncio-mqtt to aiomqtt and released a version 1.0.0 in the process. This is the last release under the asy>
Sep 25 11:07:24 storage.home.lan bluetti-mqtt[45739]: 2023-09-25 11:07:24 INFO Connecting to MQTT broker...
Sep 25 11:07:24 storage.home.lan bluetti-mqtt[45739]: 2023-09-25 11:07:24 INFO Starting to poll clients...
Sep 25 11:07:24 storage.home.lan bluetti-mqtt[45739]: 2023-09-25 11:07:24 INFO Connecting to clients: ['F6:XX:XX---']
Sep 25 11:07:24 storage.home.lan bluetti-mqtt[45739]: 2023-09-25 11:07:24 INFO Connected to MQTT broker
Sep 25 11:07:24 storage.home.lan bluetti-mqtt[45739]: 2023-09-25 11:07:24 WARNING filtered_messages() is deprecated and will be removed in a future version. Use messages()>
Sep 25 11:07:30 storage.home.lan bluetti-mqtt[45739]: 2023-09-25 11:07:30 INFO Connected to device: F6:XX:XX:---
Sep 25 11:07:30 storage.home.lan bluetti-mqtt[45739]: 2023-09-25 11:07:30 INFO Device F6:XX:XX:--- has name: AC18023280000XXX
Sep 25 11:07:30 storage.home.lan bluetti-mqtt[45739]: 2023-09-25 11:07:30 INFO Sent discovery message of AC180-23280000XXXX to Home Assistant
from bluetti_mqtt.
So looking at the discovery output, how do you convert this into usable structures/data ?
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMAAAABhAo="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMAAQAB1co="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMAAgABJco="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMAAwABdAo="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMABAABxcs="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMABQABlAs="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMABgABZAs="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMABwABNcs="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMACAABBcg="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMACQABVAg="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMACgABpAg="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMACwAB9cg="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMADAABRAk="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMADQABFck="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMADgAB5ck="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMADwABtAk="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCB9I6KQ==", "command": "AQMAEAABhc8="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMAEQAB1A8="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMAEgABJA8="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMAEwABdc8="}
{"type": "client", "time": "2023-06-30 00:08:33 +1000", "data": "AQMCAAC4RA==", "command": "AQMAFAABxA4="}
I assume you can ignore the MODBUS Exception ReadHoldingRegisters ?
from bluetti_mqtt.
I am using Ubuntu 22.04 so your directory my be different.
I have a ac180.py file that will stop the exceptions and provide a serial number and battery percentage. (its a modified ep600.py file). Rename the file ac180.py and place it in the /usr/local/lib/python3.10/dist-packages/bluetti_mqtt/core/devices directory
Also it will send a homeassistant discovery, and again only provide the serial number and battery percentage.
You also need to modify these file so that it will load the ac180.py file.
pwd
/usr/local/lib/python3.10/dist-packages/bluetti_mqtt
grep -i -R ac180
bluetooth/init.py:from bluetti_mqtt.core import BluettiDevice, AC180, AC200M, AC300, AC500, AC60, EP500, EP500P, EP600, EB3A
bluetooth/init.py:DEVICE_NAME_RE = re.compile(r'^(AC180|AC200M|AC300|AC500|AC60|EP500P|EP500|EP600|EB3A)(\d+)$')
bluetooth/init.py: if match[1] == 'AC180':
bluetooth/init.py: return AC180(address, match[2])
So /bluetti-logger will give something like the following.
Waiting for connection...
Waiting for connection...
{'total_battery_percent': 65, 'device_type': 'AC180', 'serial_number': 23280000XXXX, 'power_generation': Decimal('0')}
{}
{}
{'device_type': 'AC180', 'serial_number': 23280000XXXXX}
{'power_generation': Decimal('0')}
{}
{}
{}
{'battery_range_start': 0, 'battery_range_end': 0}
{'max_ac_input_power': 0, 'max_ac_input_current': 0, 'max_ac_output_power': 0, 'max_ac_output_current': 0}
{}
{}
{}
As for other fields the only idea I have is to change the holding register and see if you get valid data. Just trial and error I guess.
from bluetti_mqtt.
Just chiming in to see if there's anything I can do to help move this forward and get it into a working release?
from bluetti_mqtt.
I am able to use a modified ep600.py file as a ac180.py and got as far as the device type, serial number, and battery percent being sent home assistant. Just trial and error I tried each .py file one at a time until I saw a discovery being sent.
From there I can take the output of bluetti-logger decode it from base64 but I don't know how to pull out the other fields. So any hints would be appreciated.
from bluetti_mqtt.
Interesting, I also have an AC180 and HA. So far couldn't get this to work together.
For bluetti_mqtt I have the issue that I have no idea where I find the device's MAC Address. I use the iPhone Bluetti app but it does not show this address anywhere...
from bluetti_mqtt.
@bliekp scan from your HA device
from bluetti_mqtt.
I did. Nothing.
from bluetti_mqtt.
@bliekp Sorry, I meant from the command line, with the phone app disconnected from the device.
from bluetti_mqtt.
Does not work. Also, tried it on a seperate Raspberry Pi and this also didn't find the device. Do I need to completely remove the device from the Phone app?
from bluetti_mqtt.
Related Issues (20)
- DON'T UPDATE YOUR STATIONS! HOT 21
- Errors when connecting (EP500Pro) on Raspberry Pi HOT 6
- Support of Bluetti Balcony System
- Suport for AC200L HOT 12
- The bluetti_mqtt does not work over the ESPHome bluetooth proxy HOT 3
- Timeout Received after iOS Bluetti Update for AC200Max HOT 2
- Constant timeout errors with the mqtt client HOT 2
- Software caused connection abort HOT 2
- PB home assistant + bluettitomqtt HOT 1
- Error retrieving device name on MacOS HOT 12
- Connecting to AC200M HOT 3
- Support for EP760
- bluetti-mqtt: error: TypeError: 'NoneType' object is not subscriptable 2023-11-20 14:47:38 INFO Shutting down... HOT 1
- Error connecting to device - HA+Bluetti2MQTT+AC200M HOT 1
- Simple Command Example Request HOT 2
- bluetti-mqtt HAOS add-on no longer working after latest upgrade HOT 1
- Support of Bluetti Balcony System HOT 1
- AC200M connectivity to B230 HOT 1
- What would be involved to add support for EP800? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluetti_mqtt.