Optional Anker MQTT connection

Version 0.7.7 adds MQTT for Solarbank 1/2/3/4 temperature readings and standalone Solarbank 2 output limits. It supplements the existing Cloud HTTP API. Hardware validation is still required before release.

Enable MQTT

  1. Install app version 0.7.7 or newer on Homey and open the Solarbank's device settings.
  2. Enable Enable Anker MQTT and save. The default is off, including for existing devices.
  3. Wait for Anker MQTT connected to become true and for a temperature packet to arrive.
  4. Repeat for other supported Solarbanks if needed. One connection is shared per Anker account and region.

No separate broker, MQTT username or certificate upload is required. The app requests connection details from the authenticated Anker account and connects to Anker's broker over TLS on TCP port 8883. Certificates and private keys stay in memory and are not written to logs or files. TLS server verification remains enabled.

Supported functions

Model MQTT temperature AC output limit
Solarbank 2 Pro / Plus (A17C1/A17C3) Yes MQTT, standalone installations only.
Solarbank 2 AC (A17C2) Yes MQTT, standalone installations only.
Solarbank 3 (A17C5) Yes Existing Cloud HTTP command; does not require MQTT.
Solarbank 1 (A17C0) Yes, through periodic status requests Existing Cloud schedule control; no MQTT AC-limit action.
Solarbank 4 E5000 Pro (AE103) Yes Existing compatible Cloud HTTP command.
Solarbank Max / Max AC Not implemented in this MQTT port Existing compatible Cloud HTTP command.
X1, PowerDock and other families Not implemented in this MQTT port Existing model-specific support is unchanged.

This integration reads the temperature of the main device. It does not add separate expansion-battery temperature entities or MQTT control for accessories.

Other model families

“Not implemented” describes this Homey MQTT integration, rather than a device limitation. Solarbank 1 (A17C0) and Solarbank 4 (AE103) temperature fields from the linked reference revision are now ported. X1 (A5101/A5102/A5103) uses separate JSON messages, and PowerDocks (AE100/AX170) have dedicated messages; these families still require their own port and validation. That revision has no dedicated MQTT model mapping for Solarbank Max (AE111) or Max AC (A17E2), so the Solarbank 4 mapping is not applied to them.

Existing Cloud support is independent of this. PowerDocks are still not separately pairable Homey devices; MQTT control for parallel/dock installations is not implemented.

Temperature and Flows

Open the Solarbank device to find Battery Temperature, displayed in °C among its readings. Existing paired devices gain the display automatically on their next successful refresh; no re-pairing is needed. Without a reading it remains unknown. For Solarbank 1/2/3/4 without a Cloud temperature, enable MQTT as described above.

Fresh MQTT temperature takes precedence over an optional Cloud HTTP reading. Temperatures remain in Celsius, including when the Anker app displays Fahrenheit. Zero and negative temperatures are valid readings.

The existing Temperature changed trigger supplies the numeric temperature tag. It fires for the first valid reading and each subsequent value change, including changes smaller than 1 °C. Unchanged values do not generate repeated events.

On disconnect or after six minutes without a fresh temperature, the app falls back to a Cloud temperature if one exists. Otherwise the temperature is cleared. Missing values do not generate a fabricated temperature event. Temperature conditions report unavailable when no current reading exists.

Solarbank 1 uses a status request at connection and every 60 seconds, as recommended by the reference because its realtime trigger only works in certain device states. Solarbank 2/3/4 use the realtime trigger.

MQTT updates are handled independently of Cloud polling, so a fresh temperature need not wait for the next polling interval. Incoming retained, old, malformed and incorrectly addressed messages are rejected. One Solarbank's data is never copied to another.

Solarbank 2 output limit

Enable MQTT, then use the existing Set AC output limit Flow action. The action becomes available for Solarbank 2 after model discovery and MQTT opt-in. The separate Set output power schedule action keeps its existing role.

Only Anker-reported wattages supported by the reference command are accepted. Pro/Plus options are restricted to 350/600/800/1000 W; AC also supports 1200 W when Anker offers it. Unverified displayed-to-real-limit mappings are rejected.

The first port supports only sites reported as Single, without a PowerDock. Parallel/dock commands use a different protocol and are deliberately not sent. Temperature subscriptions can still be used for multiple supported batteries.

The app sends the device command and waits up to 15 seconds for new device telemetry containing the requested limit. A broker publish callback or command acknowledgement alone does not count as confirmation. Commands are not automatically retried. After device confirmation, the app synchronizes the Cloud display through the reference device-attribute endpoint.

An error can therefore mean:

  • Not confirmed: no matching device telemetry arrived. The command might still have reached the device; check Anker before retrying.
  • Device confirmed, Cloud display synchronization failed: the device reported the new limit, but the HTTP update failed. Check the Anker app; do not assume the physical command failed.

Connection problems

  • Check account/region, normal Cloud access and outbound TCP 8883 on Homey's network.
  • Check that the model is supported and MQTT is enabled on that device.
  • MQTT reconnects with fresh account certificates and increasing delays. HTTP polling remains active if MQTT is unavailable.
  • Check Homey's clock if packets are rejected as old or from the future.
  • Do not include login details, certificates or private keys in bug reports.

Connected without temperature

Anker MQTT connected confirms the broker connection, not temperature reception. From version 0.7.8, enable Debug in the device settings, wait at least two minutes and inspect [DEBUG] MQTT: lines in the app log:

  • enabled / registered / connected: opt-in, device registration and broker connection.
  • requests / lastRequestAgeSeconds: sent requests and their age; sending a request does not confirm a device reply.
  • received / decoded / lastMessageType: messages on the device topic, successfully decoded binary packets and last message type.
  • temperatureReadings / temperatureAvailable / lastTemperatureAgeSeconds: temperature reception, current availability and age.
  • rejected: rejection reasons such as stale_timestamp, future_timestamp, identity_mismatch, unsupported_encoding or malformed_frame.

received: 0 despite sent requests means that no messages have arrived on the subscribed device topic. Other fields distinguish packets without temperature from rejected packets. The summary contains no credentials, serial numbers or raw MQTT payloads. Share only these diagnostic lines in bug reports; other debug lines can contain site identifiers.

Reference and validation

Based on ha-anker-solix's MQTT protocol. The Solarbank 1 status request (0x0040), realtime trigger (0x0057) and Solarbank 2 output-limit command (0x0080), including model-specific telemetry decoding, are ported to JavaScript. This is a focused protocol port; the Python SDK and its full command set are not bundled. Regression fixtures compare the generated commands byte for byte and use its serializer and command generator with synthetic identifiers. Tests cover decoding, confirmation, device identity, expiration, opt-in and connection lifecycle. The actual MQTT.js client has also been checked against a local broker with mutual TLS; no live Anker installation was used.