From 67577b027128a4941d8d4adef93c9c7a0c73d171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Labb=C3=A9?= Date: Thu, 2 May 2024 13:15:25 +0200 Subject: [PATCH] GH-45: ZPC Poller Fix Forwarded: https://github.com/SiliconLabs/UnifySDK/pull/45 Bug-SiliconLabs: UIC-2964 Bug-Github: https://github.com/SiliconLabs/UnifySDK/pull/45 --- .../zpc_rust/src/zwave_poll_manager/zwave_poll_register.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/applications/zpc/components/zpc_rust/src/zwave_poll_manager/zwave_poll_register.rs b/applications/zpc/components/zpc_rust/src/zwave_poll_manager/zwave_poll_register.rs index 8a150a40bf..583b485466 100644 --- a/applications/zpc/components/zpc_rust/src/zwave_poll_manager/zwave_poll_register.rs +++ b/applications/zpc/components/zpc_rust/src/zwave_poll_manager/zwave_poll_register.rs @@ -38,8 +38,9 @@ const ATTRIBUTE_HOME_ID: AttributeTypeId = 0x2; const ATTRIBUTE_ENDPOINT_ID: AttributeTypeId = 0x4; //< This represents the Network Status of a node. NodeStateNetworkStatus -const DOTDOT_ATTRIBUTE_ID_STATE_NETWORK_STATUS: AttributeTypeId = 0x000D; -const ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL: u8 = 1; +const DOTDOT_ATTRIBUTE_ID_STATE_NETWORK_STATUS: AttributeTypeId = 0xfd020001; +// This is reported as a u32 in the attribute store +const ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL: u32 = 0; struct PollRegister { poll_map: Option, @@ -83,7 +84,7 @@ impl PollRegister { event.attribute.type_of() == DOTDOT_ATTRIBUTE_ID_STATE_NETWORK_STATUS && event.event_type == AttributeEventType::ATTRIBUTE_UPDATED && event.value_state == AttributeValueState::REPORTED_ATTRIBUTE - && event.attribute.get_reported::() == Ok(ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL) + && event.attribute.get_reported::() == Ok(ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL) && is_in_home_id }