Ecoflow Python API
Python library for communicating with Ecoflow power stations over BLE, based on bleak.
Supported features
Delta 2 device is the only supported for now. Extending support is planned
| Feature \ Device | Delta 2 | River 2 |
|---|---|---|
| Output circuit control - AC | + | pending |
| Output circuit control - DC | + | pending |
| Output circuit control - USB | + | pending |
| Reading output circuits state | + | pending |
| Reading charge level | + | pending |
| Reading configured charging speed | + | pending |
| Reading configured min/max charging speed thresholds | + | pending |
| Reading realtime charging speed - AC input | + | pending |
| Reading realtime charging speed - Solar input | - | pending |
Usage
import asyncio
import bleak
from ecoflow import Delta2, OutputCircuit
async def main():
mac = "00:00:00:00:00:01"
ble_client = bleak.BleakClient(mac, timeout=15)
async with Delta2(ble_client) as dev:
await dev.turn_on_circuit(OutputCircuit.USB)
await dev.turn_off_circuit(OutputCircuit.AC)
await dev.start_state_stream(print_state)
await asyncio.sleep(40)
await dev.stop_state_stream()
async def print_state(data):
print("state update...")
for k, v in data.items():
print(f"{k} = {v}")
print("-"*20)
asyncio.run(main())
Note to understand the example completely one may need to refer to:
- bleak https://github.com/hbldh/bleak
- Python asyncio https://realpython.com/async-io-python/
Metadata
Release files for ecoflow 0.2
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-0.2.tar.gz | 5.7 kB | Without provenance | Details for ecoflow-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ecoflow-0.2-py3-none-any.whl | Python 3 | none | any | Details for ecoflow-0.2-py3-none-any.whl |
Total release size: 10.7 kB
Release files / ecoflow-0.2.tar.gz
| Download URL | ecoflow-0.2.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e227e653195b21855322f5d1717ef879cfe0c52c5a936e24d7846d2d897365a4
|
|
BLAKE2b-256 checksum How to use checksums |
e91e415c81bcc11949c59d9816557a7b25d36a2a05802b16d6e27813acd6bc77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.31.0
|
Release files / ecoflow-0.2-py3-none-any.whl
| Download URL | ecoflow-0.2-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24fe56ece9d50402e9ceb9aee230d471407eb7eedfd826c9385ca79c022e7f75
|
|
BLAKE2b-256 checksum How to use checksums |
0a53ff5ec403fe877e49fbe533381396abe9c7a47df5b79d50b33c18931b241e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.31.0
|
Security for ecoflow 0.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.