feat: multi-device support, active data polling, bundled Grafana dashboard, nginx proxy #82
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds several improvements developed while running the exporter with two EcoFlow DELTA 2 devices on a home setup.
Monitor multiple EcoFlow devices from a single exporter instance using comma-separated environment variables:
DEVICE_SN=SN1,SN2
DEVICE_NAME=delta-kitchen,delta-livingroom
The previous implementation used multiprocessing.Process to handle reconnection. This fails on systems using the "spawn" start method (macOS, and optionally Linux) because Queue contains thread locks that can't be pickled. Replaced with
threading.Thread(daemon=True) which is also simpler and more portable.
EcoFlow devices do not push telemetry data autonomously — they only respond when the mobile app is active. Added periodic publish to /app/{user_id}/{device_sn}/thing/property/get with operateType: latestQuotas every 15 seconds. This keeps
metrics flowing without requiring the official app to be open.
Optional nginx service via Docker Compose profile for hosting behind a domain:
docker compose --profile nginx up -d
Includes configs for both Cloudflare and Let's Encrypt scenarios. Internal services (Prometheus, Alertmanager, exporter) are bound to 127.0.0.1 only.
Note for maintainer: compose.yaml currently has build: .. instead of image: ghcr.io/berezhinskiy/ecoflow_exporter — please revert that line after merging if you publish a new image build.