Skip to main content

Ecoflow Python API

Test

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:

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)

Source distribution for ecoflow 0.2
File Size Uploaded
ecoflow-0.2.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ecoflow 0.2
File Interpreter ABI Platform
ecoflow-0.2-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page