![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
node-matter
Advanced tools
Matter protocol for node.js with no native dependencies (and very limited dependencies).
Matter is a new secure / reliable / local / standard protocol for smart devices that will launch at the end of 2022.
It is supported and Google / Apple / Amazon and 200+ other companies and it is supposed to bring a revolution in smart home automation by unifying WiFi / Bluetooth / Zigbee (through Thread) and by making all smart devices inter-compatible and secure (through the standard and secure Matter protocol).
To know more about Matter: https://csa-iot.org/all-solutions/matter/
This package requires Node 16+ for the required Crypto primitives
npm i -g node-matter
matter
This starts a Matter server listening on port 5540.
This first version only includes the OnOff cluster (on/off smart thing, like a plug or a bulb). You can use -on and -off parameter to run a script to control something. For instance, on a Raspberry Pi, this will turn on / off the red LED:
matter -on "echo 255 > /sys/class/leds/led1/brightness" -off "echo 0 > /sys/class/leds/led1/brightness"
Main.ts defines the server behavior. You can add / remove clusters, change default parameters, etc...
new MatterServer()
.addChannel(new UdpChannel(5540))
.addProtocolHandler(Protocol.SECURE_CHANNEL, new SecureChannelHandler(
new PasePairing(20202021, { iteration: 1000, salt: Crypto.getRandomData(32) }),
new CasePairing(),
))
.addProtocolHandler(Protocol.INTERACTION_MODEL, new InteractionProtocol(new Device([
new Endpoint(0x00, "MA-rootdevice", [
new BasicCluster({ vendorName: "node-matter", vendorId: 0xFFF1, productName: "Matter test device", productId: 0X8001 }),
new GeneralCommissioningCluster(),
new OperationalCredentialsCluster(),
]),
new Endpoint(0x01, "MA-OnOff", [
new OnOffCluster(executor("on"), executor("off")),
]),
])))
.start()
It should work with any Matter-compatible home automation app when Matter will be released.
For now, you can control it with Matter test app: https://github.com/project-chip/connectedhomeip/tree/master/src/android/CHIPTest You can find a compiled apk in /matter-test-apk in this repository.
Provisioning the device: click "provision with WiFi" > "Input Device address" > type IP address of the machine running node-matter
Controlling the device: click "Light on/of" and you can control the light
Well, the original codebase is platform dependent, has finicky tool version requirements and is over 8GB with all dependencies. This tool is less than 500kB and works on anything supporting node. Sure, it supports only the barebone Matter protocol for now.
Not yet, but I know how to make it works with a few tricks.
Adding more clusters should be pretty easy now the core protocol is working. Have a look at the implementation of the OnOff cluster: pretty simple, right?
I am planning on adding more clusters, so stay tuned or pinged me to implement first the one you need.
For other questions, you can reach out to: mfucci@gmail.com or post a message on the github forum.
FAQs
Matter protocol for node.js
The npm package node-matter receives a total of 16 weekly downloads. As such, node-matter popularity was classified as not popular.
We found that node-matter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.