Skip to content

Activity Log: format 'Failed to ping' warnings into structured fields #93

@tashda

Description

@tashda

Description

In the Activity Log detail view, warnings like `Failed to ping 'device' (...)` are currently rendered as a single raw blob of text. Other log types are parsed into grouped/formed sections, with a `{ }` toggle in the toolbar for users who want the raw payload — these warnings should follow the same pattern.

Example

Current rendering (one big text block):

Failed to ping 'living_room_lamp_1' (attempt 1/1, ZCL command 0x70ac08fffee3afd3/1 genBasic.read(["zclVersion"]), {"timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false,"sendPolicy":"immediate"}) failed (Delivery failed for '1455'.))

This payload has clear structure that maps cleanly onto formatted rows.

Expected

Parse the warning into a tidy summary plus structured fields, e.g.:

  • Message — `Failed to ping 'living_room_lamp_1'`
  • Attempt — `1 / 1`
  • ZCL command — `0x70ac08fffee3afd3/1 genBasic.read(["zclVersion"])`
  • Reason — `Delivery failed for '1455'`
  • Options — group: `timeout 10000`, `disableResponse false`, `disableRecovery true`, `disableDefaultResponse true`, `direction 0`, `reservedBits 0`, `writeUndiv false`, `sendPolicy immediate`

The raw text remains accessible via the existing `{ }` toolbar toggle.

Notes

  • Same treatment should apply to other recurring z2m warning shapes, not just "Failed to ping". A small parser/formatter registry keyed on message prefix would scale.
  • If parsing fails for a variant we haven't seen, fall back to the current raw rendering rather than dropping content.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions