Repository navigation
v0.4.0
Arm Modes, Area Troubles, Triggered Alarms, Keepalive Stats (0.4.0)
-
Breaking (#102):
AreaState.troubleis removed. Read the documented
troublesstring from the newAreaState.trouble_statusinstead. -
Breaking (#100): vacation now counts as armed.
ARMED_VACATIONmaps to
the newArmMode.ARMED_VACATIONinstead ofNone, so integrations
that treatedNoneas disarmed now see the area as armed. -
Triggered alarms (#98):
AreaState.alarm_activeis now set from the
alarmsandalrm_sndfields ofarea.get_status(stored on the
newAreaState.alarmsandAreaState.alrm_snd), so an armed area in
alarm reports triggered.FIRE TROUBLEandCO TROUBLEare
supervisory troubles and do not set it. The legacyalarm_statefield
is still read whenalarms/alrm_snddo not indicate an alarm;
legacy"none"or empty there no longer counts as active. The
alarmsstring is not special-cased (alarms="none"still sets
active).alarm_activeclears when the panel reports no alarm. -
Docs (#108): private reference pointers in
PERMISSIONS.mdand
ADR-0107are replaced with the generic name. -
Arm state mapping (#100, S1):
arm_statestrings are matched exactly
against the documentedarea_get_statusvalues.ARMED_VACATIONis the
newArmMode.ARMED_VACATION(it wasNone, which HA showed as
disarmed);ARMED_STAY_INSTisARMED_STAY.ALARM_MEMis not an arm
mode and givesarm_mode=None; it and the documentedalarm_memfield
set the newAreaState.alarm_memory. Any other value logs one warning
and staysNone; it is never treated as disarmed. Bare substrings such
as"stay"or"away"no longer match. -
Area troubles (#102, S2):
area.get_statusnow reads the documented
troublesstring into the newAreaState.trouble_status(state and V2
snapshot). The undocumentedtroublebool key is no longer read. -
Barrier typing (#87):
PanelState.barriersis now an explicit
BarrierStateMap(dict[int, BarrierState]), with public API
regression tests for complete-inventory rejection, kernel barrier map
storage, andclient.barriersexposing kernelBarrierState
instances. Behavior unchanged. -
Keepalive rescue (#88): a keepalive probe is rescued only by traffic
received after that probe's own send time. A forced probe queued behind an
in-flight command no longer uses the command's earlier send time, which
fixestest_o14_keepalive_traffic_rescueon Python 3.11. -
Keepalive observability (#81): new public read-only
E27Kernel.keepalive_statsreturns a copy of the newKeepaliveStats
dataclass (probes_sent,replies,rescued,misses,
consecutive_missed,last_round_trip_s,max_round_trip_s),
counted since the kernel was created. New DEBUG lines:E27 keepalive armed(interval, timeout, max_missed),E27 keepalive probe sent,
E27 keepalive round-trip ok(withreplies,max=and
timeout),E27 keepalive missedand a rescued-by-later-traffic
line; counts and timings only, no identifiers. Keepalive timing and the
miss budget (keepalive_max_missed = 1) are unchanged. -
Keepalive test seam (#79):
E27Kernelaccepts optional
KeepaliveTestHooks(injectable sleep and keepalive reply-timeout
scheduling) so offline connection statechart cases O10-O15 run
deterministically without wall-clock waits. Production keepalive timing is
unchanged when hooks are unset. -
E27Kernel.connect()(#50): setpanel.connectedbefore
start_auto_receive()so a disconnect reported by the receive thread
during connect setup runs the normal link-loss path (abort in-flight work
and emitconnected=False) instead of the pre-connect early return; if
the session drops in that window,connect()raises (wrapped like other
transport connect failures soasync_connectsurfaces
Elke27ConnectionError) and does not emitconnected=Trueon a dead
session. -
Connection events (#80): when HELLO fails for a reason other than a panel
refusal, the kernel no longer emits an unflaggedConnectionStateChanged
withconnected=Falseif the session never reachedconnected=True(same
pair invariant as a TCP connect failure). Panel HELLO refusals still emit
connected=Falsewithhello_refused=True. -
When a command that carried a user code is refused with panel error 11004,
11008, or 11037, the library now raises the new public
Elke27CodeRejectedError(a subclass ofElke27PanelErrorwith the
samepanel_error_codeandreason). Panel 11037 is always mapped to
that type; 11004 and 11008 only when the request included a user code
(session auth failures without a code stayElke27PanelError). Other
panel error codes are unchanged (#76).