Ecoflow API library
Project description
Ecoflow_API
Python module to get and set parameters for Ecoflow Delta 2 Max and Ecoflow E2000
Supported Python Versions
This library supports the following Python implementations:
- Python 3.10
- Python 3.11
Lower versions did not checked.
Installation
Install from PyPi using pip, a package manager for Python.
pip3 install ecoflow-api
Usage
API Credentials
The Ecoflow client needs your Ecoflow API credentials. You can obtain access_key and secret_key on the page https://developer-eu.ecoflow.com/us/security and then pass these directly to the constructor. Serial number - you can get from Ecoflow device package.
Make a Call
#For Ecoflow E2000
from ecoflow_api.ecoflow_e2000 import EcoflowAPI
#For Ecoflow Delta2 Max
from ecoflow_api.ecoflow_delta2_max import EcoflowAPI
access_key = "*********"
secret_Key = "*********"
DEVICE_SN = "*********"
#Disable/enable logs (0 - disable, 1 - enable)
log_lvl = "1"
request_data_get = {"sn": DEVICE_SN,
"params": {
"quotas": ["pd.soc",
"inv.SlowChgWatts",
"bms_bmsStatus.cycSoh",
"bms_bmsInfo.soh",
"inv.inputWatts",
"pd.invOutWatts",
"pd.chgDsgState",
"bms_emsStatus.chgRemainTime",
"bms_emsStatus.dsgRemainTime"
]
}
}
request_data_set = {"id": 123,
"version": "1.0",
"sn": DEVICE_SN,
"moduleType": 3,
"operateType": "acChgCfg",
"params": {"fastChgWatts": 2400,
"slowChgWatts": 500,
"chgPauseFlag": 0}
}
api = EcoflowAPI(sn=DEVICE_SN, access_key=access_key, secret_key=secret_Key, log_lvl=log_lvl)
#Get all device parameters (request_data=None)
resp_get_all_device_quotas = api.get_all_device_quotas(request_data=None)
print(resp_get_all_device_quotas)
#Get some device device parameters from dict request_data_get
resp_get_device_quotas = api.get_device_quotas(request_data=request_data_get)
print(resp_get_device_quotas)
#Set parameters on the device (change input power in example)
resp_set_device_quota = api.set_device_quota(request_data=request_data_set)
print(resp_set_device_quota)
Donation
You can support the developer with a donation:
PayPal - oleksii.hudyma@gmail.com
Monobank - 4441 1144 1446 0376
Feedback
If you have any feedback, please reach out to us at oleksii.hudyma@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ecoflow_api-0.2.5.tar.gz.
File metadata
- Download URL: ecoflow_api-0.2.5.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
deca558ec4be92411f9500f47b360b3fec47893c09674a19ec84b1bdd8f63d5c
|
|
| MD5 |
7e4d15840623418b024cd7b431a26da2
|
|
| BLAKE2b-256 |
618259072c06cbf59a98e45c117e2534ab6d5b8a69050f5a78cfed763f658cdc
|
File details
Details for the file ecoflow_api-0.2.5-py3-none-any.whl.
File metadata
- Download URL: ecoflow_api-0.2.5-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
086158e44b49b7197b73271ce1f46b4813200c734d6cdc55121f2a8af854009d
|
|
| MD5 |
ff0c1b9811b7df80dc253feb2f254822
|
|
| BLAKE2b-256 |
22000046bc59f217184d6f39c253e9f99237beff6f5232f63e975fe9c1d9aac3
|