Skip to content

Commit 93a187f

Browse files
committed
GH-45: ZPC Poller Fix
1 parent 3b43b68 commit 93a187f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: applications/zpc/components/zpc_rust/src/zwave_poll_manager/zwave_poll_register.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ const ATTRIBUTE_HOME_ID: AttributeTypeId = 0x2;
3838
const ATTRIBUTE_ENDPOINT_ID: AttributeTypeId = 0x4;
3939

4040
//< This represents the Network Status of a node. NodeStateNetworkStatus
41-
const DOTDOT_ATTRIBUTE_ID_STATE_NETWORK_STATUS: AttributeTypeId = 0x000D;
42-
const ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL: u8 = 1;
41+
const DOTDOT_ATTRIBUTE_ID_STATE_NETWORK_STATUS: AttributeTypeId = 0xfd020001;
42+
// This is reported as a u32 in the attribute store
43+
const ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL: u32 = 0;
4344

4445
struct PollRegister {
4546
poll_map: Option<AttributePollMap>,
@@ -83,7 +84,7 @@ impl PollRegister {
8384
event.attribute.type_of() == DOTDOT_ATTRIBUTE_ID_STATE_NETWORK_STATUS
8485
&& event.event_type == AttributeEventType::ATTRIBUTE_UPDATED
8586
&& event.value_state == AttributeValueState::REPORTED_ATTRIBUTE
86-
&& event.attribute.get_reported::<u8>() == Ok(ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL)
87+
&& event.attribute.get_reported::<u32>() == Ok(ZCL_NODE_STATE_NETWORK_STATUS_ONLINE_FUNCTIONAL)
8788
&& is_in_home_id
8889
}
8990

0 commit comments

Comments
 (0)