Skip to content

test(zoo): characterise IKEA ALPSTUGA display-OnOff phantom relay (#64)#65

Merged
simons-plugins merged 1 commit into
mainfrom
zoo/ikea-alpstuga
Jun 13, 2026
Merged

test(zoo): characterise IKEA ALPSTUGA display-OnOff phantom relay (#64)#65
simons-plugins merged 1 commit into
mainfrom
zoo/ikea-alpstuga

Conversation

@simons-plugins

@simons-plugins simons-plugins commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Adds the IKEA ALPSTUGA air-quality sensor to the device zoo as a real-world cluster combination, prompted by assessing IKEA's new Matter-over-Thread range.

ALPSTUGA exposes AirQuality + CO₂ + PM2.5 + temperature + humidity (all supported) plus an OnOff cluster that toggles the front display, not power. Run through the real handler registry, that OnOff becomes a generic matterRelay alongside the five sensors — the issue #64 wrinkle (cousin of #58: an OnOff that's a secondary control of a sensor, not a primary device).

The zoo entry characterises current behaviourmatterRelay is in the expected types deliberately, so the wrinkle is pinned and any future change (likely: don't create a relay when the OnOff advertises the DeadFront feature) updates the expected list in the same change. The at-most-one-actuator invariant still holds (one relay), so this is a phantom-device note, not a duplicate-actuator failure. No plugin behaviour change — characterisation + regression anchor only.

770 tests (5 new = the zoo invariant set over the new entry). Version 2026.2.24 → 2026.2.25 (patch).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Updated plugin version to 2026.2.25
  • Tests

    • Enhanced test coverage for Matter device compatibility, including support for air quality, humidity, and environmental sensors

… relay (#64)

ALPSTUGA (real Matter-over-Thread air-quality sensor: AirQuality + CO2
+ PM2.5 + temp + humidity) also exposes an OnOff cluster that toggles
its front display, not power. Verified against the real registry: that
OnOff becomes a generic matterRelay alongside the five sensors. The zoo
entry pins current behaviour (matterRelay in expected types) so #64 is
documented and any future change is deliberate; the at-most-one-actuator
invariant still holds. No behaviour change — characterisation only.

Refs #64

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Plugin version incremented from 2026.2.24 to 2026.2.25 in the Info.plist manifest. New IKEA ALPSTUGA test device fixture added to the device zoo with multi-sensor capability declarations and matterRelay integration.

Changes

Version 2026.2.25 Release

Layer / File(s) Summary
Version bump to 2026.2.25
indigo-matter.indigoPlugin/Contents/Info.plist
CFBundleVersion incremented from 2026.2.24 to 2026.2.25.
IKEA ALPSTUGA test device entry
tests/test_device_zoo.py
New ikea_alpstuga entry added to ZOO mapping with raw node payload and endpoint device types spanning AirQuality, CO2, humidity, PM2.5, temperature sensors plus matterRelay OnOff display behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

  • simons-plugins/indigo-matter#64: Directly addresses adding the ikea_alpstuga test entry to pin the device's phantom matterRelay behavior in the device zoo harness.

Possibly related PRs

Poem

🐰 A version hops forward, from twenty-four to five,
The IKEA device joins the zoo, sensors alive!
AirQuality whispers, CO₂ sings true,
Temperature dances—the test harness grows anew! 🌱

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a test entry for IKEA ALPSTUGA device with its display-OnOff phantom relay characteristic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch zoo/ikea-alpstuga

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@indigo-matter.indigoPlugin/Contents/Info.plist`:
- Line 23: The PluginVersion value in Info.plist (the <string> element currently
set to 2026.2.25) must be changed to a new, unused version string so
CI/version-check passes; open indigo-matter.indigoPlugin/Contents/Info.plist,
locate the PluginVersion string (line with <string>2026.2.25</string>),
increment or otherwise change it to a fresh version (e.g., 2026.2.26 or whatever
follows your release scheme) that has no existing git tag, commit that change,
and ensure the tag/checker will succeed.

In `@tests/test_device_zoo.py`:
- Around line 159-161: The test fixture _raw(0x99, {1: {...}}) currently only
includes the OnOff attribute "6/0" but omits the DeadFront discriminator, so
update that same dict passed to _raw to include the DeadFront discriminator
attribute used by the detection logic (i.e., add the discriminator key/value
alongside "6/0" in the endpoint 1 payload) so the synthetic node payload will
exercise the DeadFront-specific code path and validate the fix.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6971a3a8-52cb-4d3b-a26c-12a7c71a421c

📥 Commits

Reviewing files that changed from the base of the PR and between c2358ed and 30173fa.

📒 Files selected for processing (2)
  • indigo-matter.indigoPlugin/Contents/Info.plist
  • tests/test_device_zoo.py

<string>1.0.0</string>
<key>PluginVersion</key>
<string>2026.2.24</string>
<string>2026.2.25</string>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use a new, unused plugin version for this release.

Line 23 sets PluginVersion to 2026.2.25, but the version-check job already reports tag v2026.2.25 exists, so this change cannot pass CI/release gates.

Suggested fix
-	<string>2026.2.25</string>
+	<string>2026.2.26</string>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<string>2026.2.25</string>
<string>2026.2.26</string>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@indigo-matter.indigoPlugin/Contents/Info.plist` at line 23, The PluginVersion
value in Info.plist (the <string> element currently set to 2026.2.25) must be
changed to a new, unused version string so CI/version-check passes; open
indigo-matter.indigoPlugin/Contents/Info.plist, locate the PluginVersion string
(line with <string>2026.2.25</string>), increment or otherwise change it to a
fresh version (e.g., 2026.2.26 or whatever follows your release scheme) that has
no existing git tag, commit that change, and ensure the tag/checker will
succeed.

Source: Pipeline failures

Comment thread tests/test_device_zoo.py
Comment on lines +159 to +161
_raw(0x99, {1: {"29/0": [{"0": 44}], "91/0": 1, "1037/0": 600.0,
"1066/0": 8.0, "1026/0": 2150, "1029/0": 4800,
"6/0": False}}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Encode the DeadFront discriminator in the raw fixture, not just OnOff state.

Lines 159-161 only model 6/0 (OnOff value). The comment says this entry characterizes the DeadFront display-control wrinkle for #64, but that discriminator isn’t present in the synthetic node payload, so the fixture can’t reliably validate a DeadFront-specific fix.

Suggested direction
-        _raw(0x99, {1: {"29/0": [{"0": 44}], "91/0": 1, "1037/0": 600.0,
-                        "1066/0": 8.0, "1026/0": 2150, "1029/0": 4800,
-                        "6/0": False}}),
+        _raw(0x99, {1: {"29/0": [{"0": 44}], "91/0": 1, "1037/0": 600.0,
+                        "1066/0": 8.0, "1026/0": 2150, "1029/0": 4800,
+                        "6/0": False,
+                        # add the real OnOff feature discriminator(s) captured
+                        # from matter-server for ALPSTUGA display control
+                        "6/<feature_attr_id>": <captured_value>}}),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_device_zoo.py` around lines 159 - 161, The test fixture _raw(0x99,
{1: {...}}) currently only includes the OnOff attribute "6/0" but omits the
DeadFront discriminator, so update that same dict passed to _raw to include the
DeadFront discriminator attribute used by the detection logic (i.e., add the
discriminator key/value alongside "6/0" in the endpoint 1 payload) so the
synthetic node payload will exercise the DeadFront-specific code path and
validate the fix.

@simons-plugins simons-plugins merged commit a0cb3a0 into main Jun 13, 2026
3 checks passed
@simons-plugins simons-plugins deleted the zoo/ikea-alpstuga branch June 13, 2026 11:06
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