Skip to content

fix: graceful error handling for older firmware (tested on fw 4.0)#2

Open
rvweert wants to merge 1 commit into
sebakerckhof:masterfrom
rvweert:fix/firmware-4.0-compatibility
Open

fix: graceful error handling for older firmware (tested on fw 4.0)#2
rvweert wants to merge 1 commit into
sebakerckhof:masterfrom
rvweert:fix/firmware-4.0-compatibility

Conversation

@rvweert
Copy link
Copy Markdown

@rvweert rvweert commented Apr 5, 2026

Summary

Panels running firmware 4.0 (older than the currently tested 4.1+) reject several commands with PANEL_ERROR (0x00), causing the monitor initialization to crash entirely. This PR adds graceful fallbacks so the integration works with these panels.

Firmware 4.0 limitations discovered:

  • getXxxNamesExtended (msg_id 0x19) — not supported
  • getZonesAssignedToAreas — not supported
  • Batch status requests fail when they include non-existent entity IDs
  • Individual status queries return PANEL_ERROR for unconfigured entities

What this PR changes:

  • _get_names(): Falls back from getXxxNamesExtended to standard getXxxNames on PANEL_ERROR
  • get_*_states() (area, output, trigger, door, filter): Falls back to individual queries when a batch request fails, matching the existing get_zone_states() behavior. Non-existent entities are skipped.
  • get_valid_zone_numbers(): Falls back to individual queries when getZonesAssignedToAreas is not supported
  • _initialize(): Each entity type (zones, areas, outputs, etc.) is initialized independently — one failure no longer blocks the rest

No behavioral change for panels that already work (4.1+). All fallbacks only trigger on PANEL_ERROR.

Test plan

  • Tested against ATS1500A-IP panel running firmware MR_4.0.38418
  • Verify no regression on x500 panels with firmware 4.1, 4.8, 4.11
  • Verify no regression on x700 panels

🤖 Generated with Claude Code

Panels running firmware 4.0 reject several commands with PANEL_ERROR,
causing monitor initialization to crash. This adds fallbacks:

- _get_names(): falls back from Extended to standard format on error
- get_*_states(): falls back to individual queries when batch fails
- get_valid_zone_numbers(): handles unsupported getZonesAssignedToAreas
- _initialize(): each entity type initialized independently

No behavioral change for panels that already work (4.1+).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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