homeos/app/Livewire
HomeOS Bootstrap 71b3028a8e fix: harden MQTT sharing + input roles + dedup (adversarial review)
Multi-agent review (5 confirmed) + Codex found real issues in the rework:

- [P1 security] Shared `shelly` ACL had readwrite +/rpc, so a compromised
  device could inject Switch.Set into ANY other device's <prefix>/rpc. Now
  read-only on +/rpc (receive own commands) + write only homeos/rpc (reply).
  Broker-verified: a shelly publish to victim/rpc is denied; laravel's is not.
- [P2 security] `+` wildcard reaches reserved homeos/ring namespaces → bogus
  device. Ingest now rejects RESERVED_PREFIXES (homeos/ring/$SYS).
- [P2 security] Unbounded auto-onboarding = DB-exhaustion DoS. Added a device
  cap (homeos.mqtt.max_devices, default 250).
- [P2 correctness] Every Shelly `input` became a phantom window contact (wall
  switches shown as windows, possibly inverted). `input` is now a generic
  sensor; the user PROMOTES specific inputs to window/door contacts on the
  device page (invert-aware), stored in config->input_roles and applied in the
  ingest — this is the "assign contacts" flow the user asked for.
- [P3 ux] Motion pill read `active`; producer writes `on`. Now reads both.
- [P1 migrations] Dedup computed survivor keys once; 3+ duplicates could
  collide on unique(device_id,key). Re-query per duplicate (ring + mqtt_prefix).

+9 tests (reserved prefix, cap, input generic/promoted/inverted, demo echo).
Live-verified: input published → onboarded as input → assigned window contact
via UI → appears on Fenster page, persists across messages. Suite 57 green,
12/12 tabs clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 08:59:12 +02:00
..
Addons feat(addons): installable integrations framework + Ring connect UI 2026-07-18 01:47:02 +02:00
Auth Phase 1: bootstrap — Docker stack, Laravel 13, design system, auth 2026-07-17 21:06:20 +02:00
Automations All sidebar tabs are real pages (zero console errors) 2026-07-18 00:16:16 +02:00
Concerns feat(ui): card layout replaces flat lists across the app 2026-07-18 08:32:01 +02:00
Devices fix: harden MQTT sharing + input roles + dedup (adversarial review) 2026-07-18 08:59:12 +02:00
Discovery All sidebar tabs are real pages (zero console errors) 2026-07-18 00:16:16 +02:00
Modals feat(mqtt): Home-Assistant-style onboarding — shared account + auto-create 2026-07-18 08:20:57 +02:00
Persons All sidebar tabs are real pages (zero console errors) 2026-07-18 00:16:16 +02:00
Rooms Rooms pages: index (per-room status) + show (devices with live control) 2026-07-18 00:05:30 +02:00
Settings feat(mqtt): Home-Assistant-style onboarding — shared account + auto-create 2026-07-18 08:20:57 +02:00
Access.php All sidebar tabs are real pages (zero console errors) 2026-07-18 00:16:16 +02:00
Dashboard.php feat(ui): card layout replaces flat lists across the app 2026-07-18 08:32:01 +02:00
Host.php Charts: Chart.js MQTT + host traffic on the Host page 2026-07-18 00:40:32 +02:00
Panel.php feat(panel): make tiles actually control + entity naming + reorder feedback 2026-07-18 08:37:17 +02:00
Windows.php Fenster & Türen page: contact/motion sensor overview 2026-07-18 00:07:44 +02:00