mariolukas / Bluetti_ESP32_Bridge

Bluetti Power Station ESP32 Bluetooth to MQTT Bridge
GNU General Public License v3.0
89 stars 30 forks source link

Trying to get it running for EB3A #20

Closed giovanne123 closed 1 year ago

giovanne123 commented 1 year ago

Hi, I'm trying to get it running for a EB3A.

But BL is not connecting: The Bluetti Bluetooth ID is the "EB3A2249........", right?

C:\Users\Max>bluetti-mqtt --scan
Scanning....
Found EB3A22490xxxxxxxxxx: address DD:E8:6C:xx:xx:xx

WebUI: image Serial-Output (some text replaced with XXXXXX):

*wm:STA IP Address: 192.168.0.13

IP address: 
192.168.0.13
MDNS responder started
HTTP server started
BLE Advertised Device found: Name: EB3A2249XXXXXXXXXX, Address: dd:e8:6c:xx:xx:xx, manufacturer data: 424c424c554xxxxxx, serviceUUID: 0000ff00-0000-1000-8000-00805f9b34fb, rssi: -64
...
rssi: -75, serviceData: ���a���¢-�r
>89
Connecting to MQTT at: 192.168.0.111:1883
Connected to MQTT Server... 

Mqtt: image

- Is there someone already using it with EB3A? Have you done changes?

giovanne123 commented 1 year ago

Hm, flashed the fork: https://github.com/Seb0815/Bluetti_ESP32_Bridge And this is directly working with EB3A @Seb0815, Home Assistant Auto Discovery would be fine ;-)

image

image

Edit: I think I forgot that I have added following in BTooth.cpp (maybe with this the original is also working, need to check it): if (advertisedDevice.haveServiceUUID() && advertisedDevice.isAdvertisingService(serviceUUID) && (strcmp(advertisedDevice.getName().c_str(),settings.bluetti_device_id)==0) )

giovanne123 commented 1 year ago

Update: Connect to the EB3A with original from Mario is also working, when modifying the BTooth.cpp: Line 50: from: if (advertisedDevice.haveServiceUUID() && advertisedDevice.isAdvertisingService(serviceUUID) && advertisedDevice.getName().compare(settings.bluetti_device_id)) { to: if (advertisedDevice.haveServiceUUID() && advertisedDevice.isAdvertisingService(serviceUUID) && (strcmp(advertisedDevice.getName().c_str(),settings.bluetti_device_id)==0) ) {

image

@mariolukas, can you please update this to support these devices? (maybe test before if still working for your device) @Seb0815, can you also update this in your fork? Maybe I will use this because of the nice WebUI ;-)

Edit 19012023 modified: DEVICE_EB3A.h https://github.com/mariolukas/Bluetti_ESP32_Bridge/blob/main/Bluetti_ESP32/DEVICE_EB3A.h from:

#ifndef DEVICE_AC300_H
#define DEVICE_AC300_H

To:

#ifndef DEVICE_EB3A_H
#define DEVICE_EB3A_H

@mariolukas, can you please update this to support these devices for future relevat changes (at the moment the files seems identical)?

Now, I think details are missing in MQTT, see pictures for comparison with bluetti_mqtt:

additional nice features:

ESP32-Bridge: image

bluetti_mqtt (python): image

mariolukas commented 1 year ago

I will merge all open PR's this week, this will bring a new Webserver interface. Additionally i will fix the device definition in the header for the EB3A.

giovanne123 commented 1 year ago

I will merge all open PR's this week, this will bring a new Webserver interface. Additionally i will fix the device definition in the header for the EB3A.

Can you please also modify the BTooth.cpp: line 50 See above.

mariolukas commented 1 year ago

Yes i will review this.

Seb0815 commented 1 year ago

@giovanne123 WLAN reconnect is already in my latest fork. I will create a PR as soon as @mariolukas merged all other PR's

giovanne123 commented 1 year ago

Yes i will review this.

👍

giovanne123 commented 1 year ago

@giovanne123 WLAN reconnect is already in my latest fork. I will create a PR as soon as @mariolukas merged all other PR's

👍

areyoufserious commented 1 year ago

i edited BTooth.cpp and DEVICE_EB3A_h as suggested but stiil no connectiion

@giovanne123 asked

The Bluetti Bluetooth ID is the "EB3A2249........", right?

i also would like to know

giovanne123 commented 1 year ago

i edited BTooth.cpp and DEVICE_EB3A_h as suggested but stiil no connectiion

@giovanne123 asked

The Bluetti Bluetooth ID is the "EB3A2249........", right?

i also would like to know

Starting with the EB3A... would be right. With this it is connecting for me (see above screengrabs)

mariolukas commented 1 year ago

I am closing this because the initial issues should be fixed now. Reopen it if you have further issues related to this topic, otherwise create a new issue.

thanks !

giovanne123 commented 1 year ago

Is ok. I will/have create/created new issues. Was more collection for me what I will have to look for ;-)

giovanne123 commented 1 year ago

@giovanne123 WLAN reconnect is already in my latest fork. I will create a PR as soon as @mariolukas merged all other PR's

@Seb0815, I think you can create your PR regards to WLAN retry if not connected after first try on boot/reset, because it isn't working https://github.com/mariolukas/Bluetti_ESP32_Bridge/issues/26 after Mario has merged the PRs.