Skip to content

Channel slots: full backupConfig grid, EEPROM sync, hide inactive (v1.5.2) - #22

Open
markminnoye wants to merge 2 commits into
mainfrom
cursor/include-all-channel-slots-5668
Open

markminnoye wants to merge 2 commits into
mainfrom
cursor/include-all-channel-slots-5668

Conversation

@markminnoye

Copy link
Copy Markdown
Owner

Summary

Implements the channel-slots follow-up (fixes 1–4) on top of the initial discovery change.

Fix 1 — Relay startup sweep

  • sweep_relay_states skips active: false channels (faster startup, less UDP traffic)

Fix 2 — EEPROM active on re-sync

  • sync_channels_from_wire follows wire active from backupConfig (empty slot → inactive; named slot → active)
  • Operator name/room still preserved when set

Fix 3 — Hide inactive channels upstream

  • New add-on option expose_inactive_channels (default false)
  • REST/WS omit inactive relay/dimmer channels unless enabled or ?include_inactive=true
  • Web UI always fetches with include_inactive=true

Fix 4 — Refresh syncs channels

  • POST /api/v1/modules/refresh and per-module refresh fetch backupConfig and merge into devices.json (same pattern as pushbuttons via getButtons)

Also (initial commit on branch)

  • Discovery emits all hardware slots from backupConfig; empty slots get active: false
  • Forced discovery appends missing slots via sync_channels_from_wire

Version: 1.5.2

Test plan

  • pytest tests/test_state_poll.py tests/test_device_config.py tests/test_discovery.py tests/test_gateway_api_modules.py tests/test_gateway_api_devices_patch.py tests/test_gateway_error_responses.py — 154 passed
Open in Web Open in Cursor 

cursoragent and others added 2 commits July 15, 2026 04:23
Discovery now emits every relay/dimmer slot from backupConfig (24/8),
marking empty descr+gr slots as active:false. Forced discovery merges
missing slots into existing devices.json via sync_channels_from_wire,
preserving operator name/room/active overrides (same pattern as pushbuttons).

Co-authored-by: Mark Minnoye <mark.minnoye@gmail.com>
…backup

- Skip inactive relay channels in UDP startup status sweep
- sync_channels_from_wire follows backupConfig active on re-sync
- expose_inactive_channels add-on option (default false); Web UI uses include_inactive
- POST /api/v1/modules/refresh merges backupConfig channel slots into devices.json
- Bump add-on to v1.5.2

Co-authored-by: Mark Minnoye <mark.minnoye@gmail.com>
@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@markminnoye
markminnoye marked this pull request as ready for review July 15, 2026 18:52
@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

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.

2 participants