Repository navigation
fix(tibber): declare the WebSocket host so Core grants the stream (1.1.3) - #282
Merged
Merged
Conversation
…1.3) A box set up from the UI could not open Tibber's live stream. After the owner entered an API key, the driver logged "Tibber WS dial failed: ws: capability not granted" and never read the meter. Since srcfl/ftw#1822, Core grants a driver's WebSocket only from DRIVER.ws_hosts, for a config that grants HTTP, or from a capabilities.websocket entry in the config. The UI writes no such entry, and tibber declared only http_hosts. It now declares ws_hosts = { "websocket-api.tibber.com" }, as easee_cloud does for its stream. The header comment no longer tells the owner to list the host. drivers/tests/test_ws_hosts.py fails any driver that opens a WebSocket to a wss:// host that its ws_hosts leaves out, read both the way the signed channel writes the header and the way Core reads a bundled file. The generated-header test now covers tibber as well as easee_cloud. Both tibber cases fail on 1.1.2. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
frahlg
added a commit
to srcfl/ftw
that referenced
this pull request
Nov 27, 2026
Moves the driver pin from srcfl/device-drivers b07a409b to 8aeecee3. Only tibber and pixii change: - tibber 1.1.3 (srcfl/device-drivers#282) declares ws_hosts = { "websocket-api.tibber.com" }, so a box set up from the UI opens the live stream (#1822). - pixii 2.1.10 (srcfl/device-drivers#228) reports calibration with host.set_calibrating (#2017). - pixii 2.2.0 (srcfl/device-drivers#281) reports max_soc_fract (#2083). Two Core tests ran the bundled Pixii and expected calibration as a device fault, as pixii 2.1.9 reported it. They now expect Calibrating set, control off, no fault and the driver still online, which is what 2.1.10 reports on a Core with host.set_calibrating. Signed-off-by: Fredrik Ahlgren <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
A box set up from the UI cannot open Tibber's live stream. After the owner
enters an API key, the driver logs
and never reads the meter (user report, 27 November 2026).
Since srcfl/ftw#1822, Core grants a driver's WebSocket only from
DRIVER.ws_hosts, for a config that grants HTTP, or from acapabilities.websocketentry in the config(
go/internal/drivers/registry.go). The UI writes no such entry, andtibber.lua1.1.2 declared onlyhttp_hosts. The driver dialswss://websocket-api.tibber.com/v1-beta/gql/subscriptions.Change
tibber.lua1.1.3 declaresws_hosts = { "websocket-api.tibber.com" },as
easee_clouddoes for its stream. The HTTP grant the UI already writesis now enough. The header comment no longer tells the owner to list the
host, and says that a Core older than feat(drivers): grant a driver's WebSocket from DRIVER.ws_hosts; 5 s dial ftw#1822 still needs
capabilities.websocket.make bump-driver ID=tibber LEVEL=patch, which alsorewrote the manifest,
index.yaml,devices.yamland the support status.drivers/tests/test_ws_hosts.py: every driver that callshost.ws_openmust list eachwss://host it names inws_hosts. Itreads the list the way the signed channel writes the header
(
_lua_top_level_string_list) and the way Core reads a bundled file(
pickListincatalog.go).test_ws_hosts_reach_the_generated_headernow covers tibber as well aseasee_cloud.
Evidence
Both tibber cases fail against 1.1.2 and pass on this branch:
On this branch, run locally:
make test-driver ID=tibber: 34 passed, 9 skippedmake check: 5452 passed, 927 skippedNot yet run against Tibber's servers or on a box.
Next
After merge, an FTW PR moves
drivers/BUNDLED_SOURCE.jsonto the mergecommit so the next beta bundles 1.1.3.
Refs srcfl/ftw#1822
🤖 Generated with Claude Code