Code Monkey home page Code Monkey logo

Comments (26)

warhammerkid avatar warhammerkid commented on June 26, 2024 1

The next steps for EP600 support are to use the bluetti-logger data to reverse engineer specific fields.

For most of our needs there are four different kinds of fields and the process for reverse engineering varies for each type:

  • Numeric fields
  • Boolean fields (on/off or yes/no)
  • Enum fields (options or modes)
  • String fields (like a device type or password)

For numeric fields like the battery percent or solar input, the process is to run the logger and write down the values you see in the app over wifi, and the time when you saw those values. For rapidly changing values a range can be noted down. For slowly changing values it may be necessary to collect multiple logs at various values to make it easier to figure out where the field is. You can write down multiple values at a given time so that you don't need to run the logger for as long.

For boolean and enum fields, the process is to run the logger and to change the field in the app, noting down the value and the time when you changed it. You should wait at least a minute between changes, and for boolean fields it can help with identification to change the value several times.

I'm pretty sure I identified all the string fields but if there's a specific field you're looking for please let me know and I can help look for it.


A faster option is to use a bluetooth packet logger (like an ESP32 flashed with nRF connect app or the Android / iOS developer tools) instead of bluetti-logger, and to use a mobile device to connect directly to the EP600 over Bluetooth. I am not a lawyer so before you do this you should check that this is legal in the country you reside in. With this method you don't need to wait a whole minute after changing a settable field - simply note down the time when the value was changed and wait a few seconds before changing it again. This method usually helps speed up the search for sensor values as well, since the app only loads the data it needs for the specific screen you are on, narrowing down the range where that value could be located.

from bluetti_mqtt.

Patrick762 avatar Patrick762 commented on June 26, 2024 1

In theory you could install it by running the following commands (this will overwrite the existing installation):

git clone https://github.com/KM011092/bluetti_mqtt.git
cd bluetti_mqtt/
pip install .

from bluetti_mqtt.

Patrick762 avatar Patrick762 commented on June 26, 2024 1

@smai86 you can use the integration it with an eshome bt proxy

from bluetti_mqtt.

lkm220929 avatar lkm220929 commented on June 26, 2024

Hi,

I am also very interested in the ability to connect to an EP600.

Kind regards
Martin

from bluetti_mqtt.

gedongi avatar gedongi commented on June 26, 2024

Hallo Alex, Martin I could give you some support. I already grabing some datas from the EP600.

from bluetti_mqtt.

LX1974 avatar LX1974 commented on June 26, 2024

from bluetti_mqtt.

lkm220929 avatar lkm220929 commented on June 26, 2024

from bluetti_mqtt.

LX1974 avatar LX1974 commented on June 26, 2024

from bluetti_mqtt.

gedongi avatar gedongi commented on June 26, 2024

Here's a link to another Github user I've been active with. There I wrote a PR and made comments. Please read first. If you have any questions after that, please comment.
I'm also looking for people which are interested in finding out grab more datas from the EP600. If you are interested please leave a comment...may be we could join together for testing...

mariolukas/Bluetti_ESP32_Bridge#40

Cheers

from bluetti_mqtt.

lkm220929 avatar lkm220929 commented on June 26, 2024

from bluetti_mqtt.

warhammerkid avatar warhammerkid commented on June 26, 2024

The EP600 is completely different from all their other devices. I have added the bluetti-discovery command to the latest version to help start the process of adding support. Please run the command and attach the resulting log file. If you have solar panels hooked up and an AC load then noting down those values and including them with the resulting log file will help me to figure out the correct way to parse those out. From there it's just the slow process of figuring it all out - this is what that looks like for the AC300 for example.

For supporting new devices, the bluetti-discovery command is provided. It will scan from 0x0000 to 0x30ff assuming MODBUS-over-Bluetooth. This will take a while and requires that the scanned device be in close Bluetooth range for optimal performance.

$ bluetti-discovery --scan
Found AC3001234567890123: address 00:11:22:33:44:55
$ bluetti-discovery --log the-log-file.log 00:11:22:33:44:55

from bluetti_mqtt.

lkm220929 avatar lkm220929 commented on June 26, 2024

Do you still require the result of the discovery scan ? If yes I can pull one from my device. Is there a way to send the results directly to you ? Not sure if I want to make it publicly available.

from bluetti_mqtt.

warhammerkid avatar warhammerkid commented on June 26, 2024

@lkm220929 You're welcome to email it to me at [email protected].

@LX1974 I deleted your comment because it looks like it probably has data in it that shouldn't be public. I should have provided an email earlier.

from bluetti_mqtt.

warhammerkid avatar warhammerkid commented on June 26, 2024

The first step of the discovery process is to figure out where data can be requested, and the result of that using the data @LX1974 provided is something like this. I have removed your wifi access point and password, as well as changing your serial number. I think that should be everything that needs to be removed.

This is a static snapshot of the data at the time you ran the discovery. The next step is to add basic support for logging data from the EP600 so we can start changing things and seeing what changes in the data. Some things are easy enough to figure out from a static snapshot (like the device type or serial number), but on/off switch settings are almost impossible to figure out that way. However, with the dynamic log if you change a specific setting at a specific time, then we should be able to figure out what address corresponds to that setting based on what changes at that time.

from bluetti_mqtt.

lkm220929 avatar lkm220929 commented on June 26, 2024

@warhammerkid: I have sent you some information via email. Can you confirm that you have received it ?

from bluetti_mqtt.

warhammerkid avatar warhammerkid commented on June 26, 2024

@lkm220929 I saw your email but haven’t yet had a chance to review it.

from bluetti_mqtt.

lkm220929 avatar lkm220929 commented on June 26, 2024

from bluetti_mqtt.

lkm220929 avatar lkm220929 commented on June 26, 2024

Hi warhammekid,

just wanted to check if you had the chance to look into the EP600 integration yet ?

from bluetti_mqtt.

Patrick762 avatar Patrick762 commented on June 26, 2024

Here are some new fields I found in my discovery data (I deleted my previous comments because they contained wrong information):

self.struct.add_decimal_field("adl400_ac_input_voltage_phase1", 1229, 1)
self.struct.add_decimal_field("adl400_ac_input_voltage_phase2", 1237, 1)
self.struct.add_decimal_field("adl400_ac_input_voltage_phase3", 1245, 1)
self.struct.add_decimal_field("ac_input_frequency", 1300, 1)
self.struct.add_decimal_field("ac_input_voltage_phase1", 1314, 1)
self.struct.add_decimal_field("ac_input_voltage_phase2", 1320, 1)
self.struct.add_decimal_field("ac_input_voltage_phase3", 1326, 1)
self.struct.add_decimal_field("ac_output_frequency", 1500, 1)
self.struct.add_decimal_field("ac_output_voltage_phase1", 1511, 1)
self.struct.add_decimal_field("ac_output_voltage_phase2", 1518, 1)
self.struct.add_decimal_field("ac_output_voltage_phase3", 1525, 1)

from bluetti_mqtt.

StefanMoellenhoff avatar StefanMoellenhoff commented on June 26, 2024

Hey, I'm very interested in this as well, unfortunately I'm rather new to HA, but I have an EP600 and am happy to try out things and deliver data!

from bluetti_mqtt.

Patrick762 avatar Patrick762 commented on June 26, 2024

There's now a PR (#87) for this issue thanks to @KM011092

from bluetti_mqtt.

andrewagner86 avatar andrewagner86 commented on June 26, 2024

@warhammerkid maybe you can merge the PR for EP600?

from bluetti_mqtt.

smai86 avatar smai86 commented on June 26, 2024

@warhammerkid maybe you can merge the PR for EP600?

Yeah that would be awesome! Is it possible to install the Version from @KM011092 without merging from @warhammerkid ?

from bluetti_mqtt.

andrewagner86 avatar andrewagner86 commented on June 26, 2024

i dont know how you are trying to use it, but of course you can use the version from @KM011092 standalone. but there are some obvious bugs in it, so its not the 100% solution for ep600

from bluetti_mqtt.

smai86 avatar smai86 commented on June 26, 2024

In theory you could install it by running the following commands (this will overwrite the existing installation):

git clone https://github.com/KM011092/bluetti_mqtt.git
cd bluetti_mqtt/
pip install .

Thanks @Patrick762 I think I would try this tomorrow! I also saw your HA intregration. Can u tell me if it would work with an ESP32 as BT Proxy (over ESP Home)? My HA server is to far away from my EP600 to get a BT connection with a BT dongle. So I saw the possibility with a BT Proxy over ESP32. That would be the easiest way for me to get the data from my EP600

from bluetti_mqtt.

Patrick762 avatar Patrick762 commented on June 26, 2024

@smai86 you can use the integration it with an eshome bt proxy

@Patrick762 Yes I tested it today and it worked like a charme! Thanks a lot!!!
But i got one little problem and maybe you got a solution for me. The BT connects and disconnect every 20 sec. So I got the data only updated every 20 sec...

You can see it here in my log file. Maybe you got a solution for me, that the BT connection keeps connected that the data gets updated faster...

09:50:31][I][bluetooth_proxy:282]: [0] [B4:8A:0A:5B:AB:A5] Connecting v3 without cache
[09:50:31][D][esp32_ble_tracker:215]: Pausing scan to make connection...
[09:50:31][I][esp32_ble_client:069]: [0] [B4:8A:0A:5B:AB:A5] 0x00 Attempting BLE connection
[09:50:31][I][esp32_ble_client:201]: [0] [B4:8A:0A:5B:AB:A5] Connected
[09:50:31][D][esp32_ble_tracker:266]: Starting scan...
[09:50:32][I][esp32_ble_client:086]: [0] [B4:8A:0A:5B:AB:A5] Disconnecting.
[09:50:32][D][esp-idf:000]: W (32718) BT_HCI: hci cmd send: disconnect: hdl 0x0, rsn:0x13

[09:50:32][D][esp-idf:000]: W (32725) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x16

[09:50:32][D][esp-idf:000]: W (32728) BT_APPL: gattc_conn_cb: if=4 st=0 id=4 rsn=0x16

[09:50:32][D][esp-idf:000]: W (32731) BT_APPL: gattc_conn_cb: if=5 st=0 id=5 rsn=0x16

[09:50:32][D][esp-idf:000]: W (32770) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x16

[09:50:52][I][bluetooth_proxy:282]: [0] [B4:8A:0A:5B:AB:A5] Connecting v3 without cache
[09:50:52][D][esp32_ble_tracker:215]: Pausing scan to make connection...
[09:50:52][I][esp32_ble_client:069]: [0] [B4:8A:0A:5B:AB:A5] 0x00 Attempting BLE connection
[09:50:53][I][esp32_ble_client:201]: [0] [B4:8A:0A:5B:AB:A5] Connected
[09:50:53][D][esp32_ble_tracker:266]: Starting scan...
[09:50:53][I][esp32_ble_client:086]: [0] [B4:8A:0A:5B:AB:A5] Disconnecting.
[09:50:53][D][esp-idf:000]: W (53798) BT_HCI: hci cmd send: disconnect: hdl 0x0, rsn:0x13

[09:50:53][D][esp-idf:000]: W (53805) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x16

[09:50:53][D][esp-idf:000]: W (53808) BT_APPL: gattc_conn_cb: if=4 st=0 id=4 rsn=0x16

[09:50:53][D][esp-idf:000]: W (53812) BT_APPL: gattc_conn_cb: if=5 st=0 id=5 rsn=0x16

[09:50:53][D][esp-idf:000]: W (53845) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x16

[09:51:13][I][bluetooth_proxy:282]: [0] [B4:8A:0A:5B:AB:A5] Connecting v3 without cache
[09:51:13][D][esp32_ble_tracker:215]: Pausing scan to make connection...
[09:51:13][I][esp32_ble_client:069]: [0] [B4:8A:0A:5B:AB:A5] 0x00 Attempting BLE connection
[09:51:14][I][esp32_ble_client:201]: [0] [B4:8A:0A:5B:AB:A5] Connected
[09:51:14][D][esp32_ble_tracker:266]: Starting scan...
[09:51:15][I][esp32_ble_client:086]: [0] [B4:8A:0A:5B:AB:A5] Disconnecting.

Can we move this issue to the integration repository (open an issue if possible)? It's not relevant for the users in this repository

from bluetti_mqtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.