A tool to connect to Zendure's Solarflow hub to retrieve telemetry data
10K+
A tool that talks to a Zendure Solarflow hub over Bluetooth Low Energy to read telemetry and to control which MQTT broker the hub reports to — Zendure's cloud, or one of your own.
Fork of reinhard-brandstaedter/solarflow-bt-manager. See Fork Changes for what differs.
Note
Work in progress. Reconfiguring the hub's network settings over BLE is not a supported operation — use at your own risk.
| Device | SF_PRODUCT_ID |
|---|---|
| Hub 1200 | 73bkTV (default) |
| Hub 2000 | A8yh63 |
| AIO 2400 | yWF7hV |
| ACE 1500 | 8bM93H |
Set SF_PRODUCT_ID for anything other than the Hub 1200.
pip3 install -r src/requirements.txt (bleak, paho-mqtt)The script scans for a Bluetooth device whose name starts with Zen and connects
to the first one it finds. With several Zendure devices in range, which one it
picks is not predictable.
The hub keeps its cloud connection for device data, but live telemetry is collected over Bluetooth by this tool and republished to your own broker. The app keeps working, including schedules.
This needs the tool running permanently as a service on a BLE-capable machine within range. The Bluetooth link can drop and not recover on its own; recovering means dropping the connection on either side.
The hub is reconfigured to talk to your MQTT broker instead of Zendure's. It stays on WiFi but no longer reaches the cloud at all.
Nothing needs to run locally afterwards except the broker. In exchange the app shows no telemetry and cannot control the hub — every setting change has to be made by publishing the right MQTT message.
python3 src/solarflow-bt-manager.py -i
Connects, prints the GATT services, the device ID and the serial number, then exits after a few seconds. Note down the device ID — the disconnect and reconnect steps need it.
python3 src/solarflow-bt-manager.py -i -b <broker-host>:1883
Telemetry is published under solarflow-hub/telemetry.
Note
While the Bluetooth connection is up, the hub reports telemetry **only** over Bluetooth. Nothing goes to the cloud in parallel, so the app shows no data — though it can still control the hub.
The hub's WiFi connection is reinitialised and pointed at a different broker:
export WIFI_PWD="..."
export SF_DEVICE_ID="..."
export SF_PRODUCT_ID="73bkTV"
export MQTT_USER="..."
export MQTT_PWD="..."
python3 src/solarflow-bt-manager.py -d -w <wifi-ssid> -b <broker-host>
Afterwards the hub publishes under /<product-id>/<device-id>/#.
Once the hub is offline it can be driven by solarflow-control and solarflow-statuspage in offline mode.
Notes on this step:
Needed for firmware updates, among other things:
export WIFI_PWD="..."
export SF_DEVICE_ID="..."
export SF_PRODUCT_ID="73bkTV"
python3 src/solarflow-bt-manager.py -c -w <wifi-ssid>
| Option | Purpose |
|---|---|
-i | Print hub information and exit |
-d | Disconnect the hub from the Zendure cloud |
-c | Reconnect the hub to the Zendure cloud |
-b <host[:port]> | Local MQTT broker; port defaults to 1883 |
-w <ssid> | WiFi SSID the hub should join |
-u / -p | MQTT user and password |
-h | Usage |
| Variable | Purpose |
|---|---|
SF_DEVICE_ID | Device ID, from the -i output. Required for -d. |
SF_PRODUCT_ID | Product ID, defaults to 73bkTV |
WIFI_SSID, WIFI_PWD | WiFi credentials for the hub |
MQTT_USER, MQTT_PWD | Broker credentials |
GLOBAL_INFO_POLLING_INTERVAL | Seconds between full status polls, default 60 |
-d refuses to run unless SSID, broker, WiFi password, device ID and product ID
are all present.
src/solarflow-topic-mapper.py subscribes to the hub's native report topic and
republishes it in a flatter, more readable structure.
| Variable | Purpose |
|---|---|
SF_DEVICE_ID, SF_PRODUCT_ID | Identify the topic to subscribe to |
MQTT_HOST, MQTT_PORT | Broker, port defaults to 1883 |
MQTT_USER, MQTT_PWD | Broker credentials |
This is obsolete with current versions of solarflow-control, which reads the native topics directly.
The Dockerfile packages only the topic mapper, not the BT manager — the
manager needs host Bluetooth access and is meant to run outside a container.
Its Python dependencies come from src/topic-mapper-requirements.txt, not from
src/requirements.txt, which also lists bleak for the BT manager.
docker build -t solarflow-topic-mapper .
fabrice.patch records the change carried on top of upstream: for
SF_PRODUCT_ID=A8yh63 (Hub 2000) the product class is zenh1_72 rather than
upstream's zenh. The hardware revision determines the right value; zenh1_76
is the alternative and is kept as a comment in the source.
The product class ends up in the BLE payload that reconfigures the hub. A wrong value means the hub ignores the command.
From the upstream author: if you are happy with the solarflow tools and they help you, donations are welcome — so that destroying the only Solarflow system while hacking on its internals does not end the project.
Content type
Image
Digest
sha256:dd33990c1…
Size
65.1 MB
Last updated
3 days ago
docker pull ricariel/solarflow-topic-mapper