FYI: Subscribing to node-matter #233
Replies: 5 comments 24 replies
-
Honestly, no idea what that log want to say ;-) But Subscription in node-matter is currently implemented in a buggy way. There is a PR already to adress this which needs to be merged, so will be fixed soon and then subscriptions should be at least as the specs require. I would then recheck that once we have corrected the issue |
Beta Was this translation helpful? Give feedback.
-
@Apollon77 My posting was the use case where a "device" is subscribing to an attribute on node-matter. I'm assuming that the PR (https://github.com/mfucci/node-matter/pull/219) you mention includes functionality for the flip situation where node-matter subscribes to an attribute on another device (among other things). I hope. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Yes. 8.5.Subscribe Interaction ..........page 420 |
Beta Was this translation helpful? Give feedback.
-
I should've been more precise in my question. Correct, able to subscribe to data on node-matter using the chip-tool's subscribe command and getting notifications in chip-tool when toggling the power on/off in node-matter via Alexa. I was just trying to see how to subscribe to another devices' data from node-matter, in general. This is not exposed, e.g., like a subscription command similar to what the chip-tool supports. So it appears I need to consult the PRs and examine the APIs. |
Beta Was this translation helpful? Give feedback.
-
Great! just make sure I get it..., is this ok?
|
Beta Was this translation helpful? Give feedback.
-
Just a FYI...
With this setup:
node-matter/MacOS
Alexa app/Android OS/tablet
Alexa hub/Echo Dot
chip-tool/MacOS
Node-matter ("light") paired with both Alexa and chip-tool.
I sent a subscribe command on OnOff to node-matter from the chip-tool (interactive mode).
So, whenever the "light" state was changed (via Alexa app or Echo Dot), the chip-tool would display in its running log.
Here is an excerpt:
1675965964220] [57919:5515424] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 17
[1675965964220] [57919:5515424] CHIP: [TOO] OnOff: TRUE
[1675965964220] [57919:5515424] CHIP: [DMG] Refresh LivenessCheckTime for 26000 milliseconds with SubscriptionId = 0x00000000 Peer = 01:0000000000000001
[1675965964220] [57919:5515424] CHIP: [EM] Piggybacking Ack for MessageCounter:3688376575 on exchange: 35270r
[1675965964220] [57919:5515424] CHIP: [IN] Prepared secure message 0x7f7e7f80a868 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 35270r with MessageCounter:103011186.
[1675965964220] [57919:5515424] CHIP: [IN] Sending encrypted msg 0x7f7e7f80a868 with MessageCounter:103011186 to 0x0000000000000001 (1) at monotonic time: 0000000037161295 msec
[1675965964221] [57919:5515424] CHIP: [EM] Received message of type 0x10 with protocolId (0, 0) and MessageCounter:3688376576 on exchange 35270r
[1675965964221] [57919:5515424] CHIP: [EM] Found matching exchange: 35270r, Delegate: 0x0
[1675965964221] [57919:5515424] CHIP: [EM] Rxd Ack; Removing MessageCounter:103011186 from Retrans Table on exchange 35270r
[1675965964221] [57919:5515424] CHIP: [EM] Removed CHIP MessageCounter:103011186 from RetransTable on exchange 35270r
Beta Was this translation helpful? Give feedback.
All reactions