custom_components/omni_pca/coordinator.py — full rewrite:
- Long-lived OmniClient for entry lifetime
- One-shot discovery: system info + zone/unit/area/thermostat/button names
via list_*_names + per-index get_object_properties
- Periodic poll (30s default): get_extended_status for zones/units/thermostats,
get_object_status for areas, skip empty discoveries
- Background _run_event_listener task consuming client.events(), patches
state in-place and async_set_updated_data on push:
ZoneStateChanged -> patch zone_status raw byte
UnitStateChanged -> patch unit_status state, preserve brightness
ArmingChanged -> patch area_status mode + last_user
AlarmActivated/Cleared -> trigger refresh
AcLost/Restored, BatteryLow/Restored -> recorded for sensors
- InvalidEncryptionKeyError/HandshakeError -> ConfigEntryAuthFailed (HA reauth)
- OmniConnectionError/RequestTimeoutError -> UpdateFailed + drop client
- Event task cancelled in async_shutdown
custom_components/omni_pca/binary_sensor.py — full rewrite:
- OmniZoneBinarySensor per discovered zone (device class from zone type:
smoke/water/freeze use latched-alarm bit; doors/motion use current condition)
- OmniZoneBypassedBinarySensor per zone (DIAGNOSTIC, PROBLEM)
- OmniSystemAcBinarySensor (POWER, prefers AcLost/AcRestored push)
- OmniSystemBatteryBinarySensor (BATTERY)
- OmniSystemTroubleBinarySensor (PROBLEM)
custom_components/omni_pca/helpers.py — pure functions extracted for testing:
- device_class_for_zone_type, is_binary_zone_type, use_latched_alarm_for_zone,
prettify_name. 61 unit tests in tests/test_ha_helpers.py.
docs/JOURNEY.md — 4383-word raw chronological retrospective of the whole
arc from binary archive to working library. 18 dated sections including
the 2191-byte magic-number header validation moment, the two non-public
protocol quirks, the offline-panel comedy. Source material for future
writeups (intentionally raw, not polished).
264 tests pass (was 203, +61 helper tests). Ruff clean across all dirs.
HAI / Leviton Omni Panel — Home Assistant Integration
Native HA integration that talks Omni-Link II directly to your Omni Pro II / Omni IIe / Omni LTe / Lumina controller over TCP. No middleware — HA opens an encrypted session straight to the panel and listens for unsolicited push messages.
This integration is the HA-facing wrapper around the
omni-pca Python library; the library
handles the wire protocol, this component surfaces it as HA entities.
Install
HACS (recommended once published)
- HACS → Integrations → custom repository → add
https://github.com/rsp2k/omni-pca, category Integration. - Install HAI / Leviton Omni Panel, then restart Home Assistant.
Manual
Copy the custom_components/omni_pca/ directory into your HA
config/custom_components/ directory and restart HA.
Configure
- Settings → Devices & Services → Add Integration → search for HAI/Leviton Omni Panel.
- Enter:
- Host — IP or hostname of the panel (e.g.
192.168.1.50) - Port — defaults to
4369(HAI's reserved port) - Controller Key — 32 hex characters, the panel's NVRAM key
- Host — IP or hostname of the panel (e.g.
- Save. The panel's model and firmware appear as a single device, with one
binary_sensorper defined zone.
Where do I get the Controller Key?
If you have a .pca configuration export from PC Access, the included CLI
extracts the key for you:
uvx omni-pca decode-pca '/path/to/My House.pca' --field controller_key
Otherwise, find it in PC Access under the panel's Setup → Misc → Network page (HAI labels it "Encryption Key 1").
What you get
- One device per panel — model + firmware reported in the UI.
- One
binary_sensorper defined zone, named from the panel's own zone-name field.OPENINGdevice class for door/window contacts,MOTIONfor interior PIRs,SMOKEfor fire zones, etc., chosen by zone type when the panel reports one. - Push updates: zone state changes propagate within a single round-trip thanks to unsolicited-message subscription. The 30-second poll is just a safety net.
Roadmap
- Areas →
alarm_control_panelentities - Units →
light/switchentities - Thermostats →
climate - Aux sensors →
sensor
See the parent README for protocol / library details.