ecoflow-python
Python library for controlling and monitoring EcoFlow energy devices — batteries, smart plugs, smart meters, and more.
Supported Devices
| Device | Read | Control |
|---|---|---|
| STREAM Ultra | ✅ | ✅ |
| STREAM AC Pro | ✅ | ✅ |
| Smart Plug | ✅ | ✅ |
| Smart Home Meter | ✅ | — |
| Delta Pro / Pro 3 / 2 / 2 Max | ✅ | ✅ |
| River Pro / 2 / 2 Max / 2 Pro | ✅ | ✅ |
| PowerStream (600W / 800W) | ✅ | ✅ |
| Wave 3 AC | ✅ | ✅ |
| Smart Home Panel 2 | ⚠️ partial | — |
Installation
pip install ecoflow-python
# or with uv
uv add ecoflow-python
Quick Start
import asyncio
from ecoflow import EcoFlowClient
async def main():
async with EcoFlowClient(
access_key="your_access_key",
secret_key="your_secret_key",
region="EU", # or "US"
) as client:
# All devices auto-discovered on connect
print(f"Batteries: {client.batteries}")
print(f"Plugs: {client.plugs}")
print(f"Stream units: {client.stream_units}")
print(f"Meter: {client.meters}")
# Read live data
for battery in client.batteries:
status = await battery.refresh()
print(f"{battery.product_name}: {status.batt_soc:.0f}% SOC")
# Events stream (MQTT, real-time)
async for event in client.stream_units[0].events():
print(f"SOC: {event.batt_soc:.0f}%")
asyncio.run(main())
Getting API Keys
- Create an account at ecoflow.com
- Go to the Developer Portal: EU | US
- Apply for Developer Access
- Find your
accessKeyandsecretKeyin the developer console
See the EcoFlow Developer Portal (EU) or developer.ecoflow.com (US) for API key instructions.
Architecture
- Transport: REST (
/iot-open/sign/device/quota/all) + MQTT (/open/{account}/{sn}/quota) - Auth: HMAC-SHA256 signed headers on every REST call
- Events: Real-time MQTT push with automatic reconnection and exponential backoff
- Typing: Fully typed with
py.typedmarker — works with mypy and pyright
Development
git clone https://github.com/colombod/ecoflow-sdk
cd ecoflow-sdk/python
uv sync --all-extras
uv run pytest # unit tests
uv run pytest -m integration # read-only E2E (needs tests/.env)
uv run ruff check . && uv run pyright # lint + types
License
MIT — see LICENSE
Metadata
Release files for ecoflow-python 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ecoflow_python-0.2.0.tar.gz | 48.6 kB | With provenance | Details for ecoflow_python-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ecoflow_python-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for ecoflow_python-0.2.0-py3-none-any.whl |
Total release size: 81.7 kB
Release files / ecoflow_python-0.2.0.tar.gz
| Download URL | ecoflow_python-0.2.0.tar.gz |
|---|---|
| Size | 48.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2adc788702ad9e01616db715f95dda088977f426d01154d4cf923e028d605648
|
|
BLAKE2b-256 checksum How to use checksums |
924829b188bbe6d3e836530c278421e16bfd554829ff0325f91ad207b92d6f70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 29, 2026.
Transparency logRelease files / ecoflow_python-0.2.0-py3-none-any.whl
| Download URL | ecoflow_python-0.2.0-py3-none-any.whl |
|---|---|
| Size | 33.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7496ae2118e4701db402fba18e92266ebc96148491c0d4c1b691c57898778053
|
|
BLAKE2b-256 checksum How to use checksums |
b494354ce262c0c7239df4994e36260d82c6f0c3fefeb743d293b0408354914a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 29, 2026.
Transparency logSecurity for ecoflow-python 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ecoflow_python-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.