ha-ef-ble icon indicating copy to clipboard operation
ha-ef-ble copied to clipboard

Support for EcoFlow powerstream.

Open MansM opened this issue 8 months ago • 15 comments

Would love to see support for the EcoFlow powerstream. As the app ain't all that helpful in setting the strategies I want.

If you need some information, let me know and I will see what I can do to provide it

MansM avatar Apr 01 '25 07:04 MansM

Hi @MansM , sorry but we will need to wait for someone who have the device to prepare the device definition - that's needed for support, because without the device it's quite hard to debug issues.

rabits avatar Apr 03 '25 04:04 rabits

I have it. What do you need?

MansM avatar Apr 03 '25 05:04 MansM

By my previous message I meant "someone with the device to prepare change request and test it thoughtfully to make sure it works properly". To clarify: I would not spend time preparing logic for the device I don't have - because I would not be able to test it if some error happen. That's why I support only SHP2 and DPU definitions (poorly) and the other folks supporting their devices.

rabits avatar Apr 03 '25 15:04 rabits

Hey, I may be able to add the support, but we need someone to verify whether it has the same protocol as newer devices. You can do this using connect.py script from https://github.com/rabits/ef-ble-reverse repo. If this does not connect, we will not be able to add it easily as it uses different protocol that would have to be reverse engineered.

If this script connects and authenticates, we'll need some message samples and identify its structure. I'm not sure if powersteram uses protocol buffers though as I didn't find any matches when looking through ecoflow app, so it may be a little bit harder to identify all fields. I know that all older devices use mostly undocumented json messages and some integrations do handle these, so we may be able to get the inspiration from these if that's the case here.

GnoX avatar May 08 '25 19:05 GnoX

I have powerstream and river 2 max also, so i guess i could run the connect.py on raspberry that has BT, but dont know if anything is required to set or not in the code?

I was hoping the integration would support raw json discovery mode like, how i retrived data form the EF cloud with my python script, similar like i revere engineered Ecoflow cloud integration, to make MQTT bridge for my Openab setup also.

I was chating with Hans_Lree about BLE integration and he mentionded this integration, i also use HomeAssistant lately to see what it can do, so i chimed in here to see what can be done.

I ran into an issue that i dont know how to initiate BT connection to EF devices over BT with like nRF connect. So i would need to recoord BT connection in Wireshark, and i want to see what has already been discovered in this integration build.

MatejsLab avatar May 20 '25 21:05 MatejsLab

I have powerstream and river 2 max also, so i guess i could run the connect.py on raspberry that has BT, but dont know if anything is required to set or not in the code?

You should only need to run the script as python connect.py <user_id> <mac_address> and add first 4 characters to Device.SUPPORTED_DEVICES and probably add it to xor check. You can find your user id following this wiki https://github.com/rabits/ha-ef-ble/wiki or using this script. I modified it in my fork here https://github.com/GnoX/ef-ble-reverse/blob/main/connect.py so its easier to modify. Powerstream SN should already be included there.

If it connects and starts priting 'not processed packet', I'll only need to know local_name from advertisement data and probably some data samples that I'll tell how to retreive once we confirm that it authenticates.

I think there's that River 2 uses different auth scheme so it will probably not authenticate - we only support one auth path while there's many so someone with the device will need to do some reverse engineering.

I was hoping the integration would support raw json discovery mode like, how i retrived data form the EF cloud with my python script, similar like i revere engineered Ecoflow cloud integration, to make MQTT bridge for my Openab setup also.

We currently only support latest gen 3 devices that use protocol buffers for communication while ef cloud integration only supports devices that communicate with jsons. Writing a json adapter should be pretty trivial though.

GnoX avatar May 20 '25 22:05 GnoX

I tried implementing an easier way to verify if it is working and provide most of the info we need to add support - can someone try to install pre-release version v0.16.0-a.1 from my fork, follow this guide and upload diagnostics info here?

GnoX avatar May 25 '25 13:05 GnoX

Hello, we have an update and probably some unfortunate news - https://github.com/GnoX/ha-ef-ble/issues/13#issuecomment-2925956379.

GnoX avatar May 31 '25 23:05 GnoX

To categorize this correctly for me. Do we talk here about incompatibilities for EcoFlow PowerStream, because it is using some newer BLE implementation called "EF BLEv3"? I'm asking because I want to know if the EcoFlow Stream series share this BLE implementation together with the PowerStream.

Clusters avatar Jul 17 '25 07:07 Clusters

@Clusters The v3 refers to their communication protocol, not the BLE itself and we know that only gen 3 devices use it (but not all of them). PowerStream uses previous version of this protocol, but it is likely that latest Stream series devices use latest protocol. You can check if it works by following the same guide I mentioned above.

GnoX avatar Jul 17 '25 11:07 GnoX

@GnoX thanks for the guide. I will look into as soon as I have BLE within Home Assistant (currently I have no BT interface on that device) 👍

Clusters avatar Jul 22 '25 07:07 Clusters

@Clusters Btw new stream devices are compatible with our code and there's already a PR to add support #53.

GnoX avatar Jul 22 '25 08:07 GnoX

@GnoX I got the necessary hardware for BLE in Home Assistant. I checked out your preview featured in PR #53 It discovered my Stream Ultra perfectly! Kudos for that! 🙏🤩

However, it seems that an option is missing. In the app it can be found in "Energy delivery strategy" and the option is labelled "Base load power" and has a 'Watt' unit. This option is used to achieve zero-feed-in and also is configurable if the app is connected via BLE to the Ecoflow Stream.

Can I somehow help regarding this being discovered? I tried to get some logs from the mentioned guide above. But I always get the device sensors, switches and sliders instead of the suggested "Collecting Diagnostics Data" sensor.

This is how my Stream Ultra looks in HA: Image

The "Feed Grid" switch seems not do anything. Or maybe I'm missing something

Clusters avatar Jul 28 '25 18:07 Clusters

What I just stumbled over: The image above is missing an input field, am I right?

Shouldn't there be a Feed Grid Power Max input field as well? The one input field above is the Feed Grid Power Limit field. But the code mentions a Feed Grid Power Max input as well.

feed_grid = pb_field(pb.feed_grid_mode, lambda x: x == 2) feed_grid_pow_limit = pb_field(pb.feed_grid_mode_pow_limit) feed_grid_pow_max = pb_field(pb.feed_grid_mode_pow_max) <---

Clusters avatar Jul 30 '25 07:07 Clusters

@Clusters Sorry, I just rembered that you posted here about stream - can you either make separate issue or continue discussion in https://github.com/GnoX/ha-ef-ble/issues/16? I don't want to pollute this issue as it is about Powerstream.

GnoX avatar Aug 23 '25 21:08 GnoX