Skip to content

Fix Flexpartner.Energy connect and rename from Energy Speedometer#1213

Open
gskjold wants to merge 2 commits into
mainfrom
feat/flexpartner-energy
Open

Fix Flexpartner.Energy connect and rename from Energy Speedometer#1213
gskjold wants to merge 2 commits into
mainfrom
feat/flexpartner-energy

Conversation

@gskjold

@gskjold gskjold commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

Two related changes to the optional ESP32 cloud connector previously called "Energy Speedometer".

1. Fix the connect failure

energySpeedometerConfig only initialized 9 of MqttConfig's 15 fields, leaving timeout and keepalive at 0. mqtt.setTimeout(0) aborted the CONNECT before the TLS+MQTT handshake could finish, so the connector never connected — despite a valid host, credentials, and TLS endpoint. The remaining fields are now initialized (timeout 1000ms, keepalive 60s) to match customMqttConfig, with per-field comments so future MqttConfig additions don't silently fall off this literal again.

2. Rename to Flexpartner.Energy (fixed brand)

The user-facing label is renamed to Flexpartner.Energy and hardcoded in the services tile and configuration page, bypassing the translation lookup so no language can override the brand name. The conf.cloud.es and status.services.mqtt_es entries are removed from the Localazy source, and ui/dist is rebuilt.

Scope is intentionally limited to display name + connect fix — internal code identifiers, build flags (ENERGY_SPEEDOMETER_*), and the broker host are unchanged.

Verification

  • Confirmed broker reachable and credentials valid (authenticated TLS CONNACK = accepted).
  • Connect fix verified working on-device by the author.
  • ui/dist rebuilt; fresh bundle contains only "Flexpartner.Energy".

Follow-up (not in this PR)

  • After merge, push the updated English source to Localazy per CLAUDE.md. Already-translated conf.cloud.es / status.services.mqtt_es values become unused; purge separately via a one-time deprecateMissing temp config if desired.
  • The broker's TLS cert (*.sandtime.energy) expired 2026-03-22; harmless today because the connector sets setCaVerification(false), but worth renewing server-side.

🤖 Generated with Claude Code

The energySpeedometerConfig literal only initialized 9 of MqttConfig's 15
fields, so timeout and keepalive defaulted to 0. setTimeout(0) made the
MQTT client abort the CONNECT before the TLS+MQTT handshake could complete,
so the connector never connected despite valid host, credentials and TLS.

Initialize the remaining fields (timeout 1000ms, keepalive 60s) to match
customMqttConfig, with per-field comments so future MqttConfig additions
are visible here too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gskjold gskjold force-pushed the feat/flexpartner-energy branch from d0703e4 to a8bb08f Compare June 18, 2026 13:29
…nslated)

Hardcode the "Flexpartner.Energy" brand name in the services tile and the
configuration page, bypassing the translation lookup so no language can
override it, and remove the conf.cloud.es / status.services.mqtt_es entries
from the Localazy source. Rebuilt ui/dist accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gskjold gskjold force-pushed the feat/flexpartner-energy branch from a8bb08f to 12bba95 Compare June 18, 2026 13:32
@github-actions

Copy link
Copy Markdown

🔧 PR Build Artifacts

Version: 12bba95

All environments built successfully. Download the zip files:

Artifacts expire after 7 days. View workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant