-
|
Hi! There are two different methods for creating controllers and commissioning devices in the examples - controller-onoff and controller. Could someone elaborate on the difference between them? It looks like the controller example uses newer APIs? I've been trying to commission my hue bridge (possibly too ambitious?!). Using a I'm able to successfully commission using the So, I have a general question I guess - what's the direction of travel here? Is Great project by the way - lots of exciting possibilities! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
As noted in "control-onoff" example in this will be the new API in the future, but it is still work in progress. So right now this approach is not ready for production usage, but hopefully will be till we officially release 0.16 or 0.17So the current "full featured" way to create a controller is to do it like the Controler example / https://github.com/matter-js/matter.js/blob/main/packages/examples/src/controller/ControllerNode.ts whicl bases on the "legacy" API approach. An "endpoint.stateOf" method exists there too in the recent nightly builds. |
Beta Was this translation helpful? Give feedback.
-
|
Okay great, thanks for clarifying. |
Beta Was this translation helpful? Give feedback.
As noted in "control-onoff" example in
matter.js/packages/examples/src/control-onoff/OnOffController.ts
Line 10 in 4927c58
So the current "full featured" way to create a controller is to do it like the Controler example / https://github.com/matter-js/matter.js/blob/main/packages/examples/src/controller/ControllerNode.ts whicl bases on the "legacy" API approach. An "endpoint.stateOf" method exists there too in t…