Skip to content

MQTT device identifiers unstable when panel model included (MG5050+) #592

@5mssnhk977

Description

@5mssnhk977

Alarm system

Panel: Magellan MG5050+
Panel firmware: 1.30 build 2

Connection method: IP150+

MQTT enabled with Home Assistant autodiscovery.

Environment
• Home Assistant OS
• Running via Home Assistant Add-on
• Python version inside container (standard addon runtime)

Git branch

Tested with dev branch.

Describe the bug

The panel model string appears to contain padding bytes which are not sanitized before being used in MQTT Home Assistant discovery.

The model string reported by PAI appears as:

MG505+\u0000\u00aa

This value is then used when generating the MQTT discovery payload:

{
  "device": {
    "manufacturer": "Paradox",
    "model": "MG505+\u0000\u00aa",
    "identifiers": ["Paradox_MG505+\u0000\u00aa_XXXXXXXX"],
    "name": "MG505+\u0000\u00aa",
    "sw_version": "1.30 build 2"
  }
}

Because the model string is embedded inside device.identifiers, Home Assistant has created duplicate devices.

Example identifiers that could be generated:
Paradox_MG505+_XXXXXXXX
Paradox_MG505+ª_XXXXXXXX

Even though they refer to the same panel.

Relevant code

The MQTT discovery payload is generated in:
paradox/interfaces/mqtt/entities/device.py

Current code:
identifiers=[f"Paradox_{self.model}_{self.serial_number}"]

Since self.model may contain padding bytes (\x00, \xaa), this creates unstable device identifiers.

Suggested fix

Use only the panel serial number for device.identifiers and sanitize the model string for display.

Example:
identifiers=[f"Paradox_{self.serial_number}"]

This ensures a stable device identity while keeping the model available as informational metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingto be confirmedReported but not yet confirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions