Comments (12)
Yes, we are currently about to finalize the new Devices High level API which will have full support for this ... I will leave open and poke once we have a nightly to try it
from matter.js.
All right ... I will also try to simplify the examples code wise a bit to have better focus on the relevant stuff :-)
Main difference is that some examples really work as "cli tools" and so there is more code needed
from matter.js.
It clearly shows how to use the API by putting the CLI stuff at the end.
Nice work!
The CLI stuff feels a bit repetitive, maybe something like
getNumberVar(key, default).{
return environment.vars.number(key) ?? deviceStorage.get(key, default);
}
const passcode = getNumberVar("passcode", 20202021);
const discriminator = getNumberVar("discriminator", 3840) ;
could help ;-)
from matter.js.
PS: If you need it faster then check out what the current device classes do and adopt it for WC ... in fact all clusters are there, just implementation needed.
from matter.js.
Thanks for the quick reply !
I have time, so I'll wait for the nightly :-)
KInd regards,
Hans
from matter.js.
If you like a "pre look" ...will look like that https://github.com/project-chip/matter.js/blob/device-gen/packages/matter-node.js-examples/src/examples/IlluminatedRollerShade.ts
from matter.js.
Thanks, it looks less complex than the current interface.
from matter.js.
compared to what? Ok the other examples have a lot of "boiler plate code" to make anything configurable ... this is completely missing in the example link I sent you ... because this adapter just logs stuff :-) The other examples can be used as CLI tool directly. Or what you mean?
from matter.js.
When I compare:
matter.js/packages/matter-node.js-examples/src/examples/DeviceNode.ts
Lines 151 to 238 in dfc6d1e
to:
The latter looks more simple, but maybe that is just visual due to the comments sections and the BLE inclusion.
Once I really start coding with it I'll probably have a better feel for it ;-)
from matter.js.
I also tried to simplify the examples a bit (beside DevicesFull because it's goal is to show all the fancieness) ... by trying still to show a bit whats possible in practice.
WDYT?
from matter.js.
Thank you, Because the storage key and variable key is not always the same I think I leave it as is ... it was moved "out of sigth" to show that config needs to code from somewhere :-)
If it has the effect for the rest I planned the all fine :-)
from matter.js.
0.8 landed also first nightly is available on npm using @dev ... so have fun
from matter.js.
Related Issues (20)
- DeviceNode example, pairing works but lightswitch stays offline HOT 26
- Uncaught exception in MdnsServer HOT 2
- Wifi Credentials with spaces in the SSID HOT 1
- Manual DNS-SD device announcement is picked up by the Apple Home app, but no UDP communication attempts are made
- Cannot find module '@abandonware/noble' or its corresponding type declarations HOT 4
- Update attribute value validation
- Crash on apple hub upgrade
- Window Covering Cluster issue on the persist of attributes TargetPositionLiftPercent100ths and TargetPositionTiltPercent100ths HOT 4
- Shutdown Error "index was destroyed"
- Fabrics are not reported as changed when commissioning second device
- When OperationalCredentials are initialized/Changed on init node crashes
- OnOffLightSwitchDevice generated with IdentifyBehavior instead IdentifyServer
- Bridged Devices not found HOT 10
- DoorLockDevice probably not fully implemented HOT 6
- SubscriptionHandler not sending received events from bridged device added after matter server start and is connected HOT 1
- GeneralDiagnosticsCluster NetworkInterfaces attribute in CommissioningServer HOT 1
- npm shell <nodenum> does not work HOT 4
- matter-device cli error in ubuntu 20.04 HOT 6
- Backward compatibility for ACL logic failing on Google Home HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matter.js.