@matter/examples 0.12.0-alpha.0-20241231-14ac774ba → 0.12.0-alpha.0-20250101-22e7c1044

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matter/examples",
3
- "version": "0.12.0-alpha.0-20241231-14ac774ba",
3
+ "version": "0.12.0-alpha.0-20250101-22e7c1044",
4
4
  "description": "Matter.js examples and reference implementations",
5
5
  "keywords": [
6
6
  "iot",
@@ -52,13 +52,13 @@
52
52
  "matter-controller": "dist/esm/controller/ControllerNode.js"
53
53
  },
54
54
  "dependencies": {
55
- "@matter/main": "0.12.0-alpha.0-20241231-14ac774ba",
56
- "@matter/nodejs": "0.12.0-alpha.0-20241231-14ac774ba",
57
- "@matter/tools": "0.12.0-alpha.0-20241231-14ac774ba",
55
+ "@matter/main": "0.12.0-alpha.0-20250101-22e7c1044",
56
+ "@matter/nodejs": "0.12.0-alpha.0-20250101-22e7c1044",
57
+ "@matter/tools": "0.12.0-alpha.0-20250101-22e7c1044",
58
58
  "esbuild": "^0.24.2"
59
59
  },
60
60
  "optionalDependencies": {
61
- "@matter/nodejs-ble": "0.12.0-alpha.0-20241231-14ac774ba"
61
+ "@matter/nodejs-ble": "0.12.0-alpha.0-20250101-22e7c1044"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">=18.0.0"
@@ -45,17 +45,11 @@ The following parameters are available:
45
45
  * --uniqueid: a unique ID for this device to be used in naming and to store structure information (default: ms time now)
46
46
  * --type: the device type to use for pairing (default: light, alternative value is "socket")
47
47
  * --netinterface: limit mdns announcements and scanning to the provided network interface, e.g. "en0" (default: all interfaces available)
48
- * --ble: enable BLE support (default: false) If this is enabled the device will announce itself _only_ via BLE if not commissioned and also presents a "Wifi only" device for commissioning to show this feature!
49
- * --ble-hci-id: Optionally, HCI ID to use (Linux only, default 0)
50
48
  * --port: the port to listen on for the device (default: 5540)
51
49
  * --store: the storage location (directory) to use for storing the pairing information (default: .device-node). Ideally use names starting with a ".". Delete the directory or provide an alternative name to reset the device
52
50
  * --on: the command to run when the device is turned on (see example above)
53
51
  * --off: the command to run when the device is turned off (see example above)
54
52
 
55
- Additionally, there are some Testing parameters:
56
- * --ble-wifi-scan-ssid: The Wi-Fi SSID returned by the "ScanNetworks" call of the Wifi Network commissioning cluster used when using BLE commissioning (default: "TestSSID"). Ideally use a really existing SSID that also the commissioner (Apple, Alexa, ...) knows to make it easier to commission. Else you could get errors while commissioning.
57
- * --ble-wifi-scan-bssid: The Wi-Fi BSSID returned by the "ScanNetworks" call of the Wifi Network commissioning cluster used when using BLE commissioning (default: "00:00:00:00:00:00").
58
-
59
53
  ## Bundling
60
54
 
61
55
  For production environments where space and/or CPU is at a premium, you might consider using a bundler to distribute your application. This project includes an example demonstrating how to create such a bundle using [esbuild](https://esbuild.github.io/).
@@ -11,10 +11,34 @@ This example shows how to build a simple Device node with just one socket or lig
11
11
 
12
12
  For general documentation about the CLI parameters or environment variables that can be used for matter.js please refer to the [Examples README](../../../README.md#cli-usage).
13
13
 
14
- The CLI parameter are else documented at the [Device Node Readme](../device-onoff-cli/README.md).
14
+ The CLI parameter are else documented at the [Device Node Readme](../device-onoff/README.md).
15
15
 
16
16
  This example is not exposed as npm script so starting requires to run the ts file or the build file.
17
17
 
18
18
  ```bash
19
19
  node .dist/examples/device-onoff-advanced-cli/DeviceNodeFull.js
20
20
  ```
21
+
22
+ ## How to test BLE commissioning
23
+ For this to work you first of all need to enable BLE by using `--ble-enable` to enable the BLE only commissioning. The device simulates that it is not on any IP network for the start.
24
+ Please also make sure you follow the [BLE enablement steps for your operating system](../../../nodejs-ble/README.md#prerequisites-and-limitations).
25
+
26
+ The following parameters are available:
27
+ * --ble: enable BLE support (default: false) If this is enabled the device will announce itself _only_ via BLE if not commissioned and also presents a "Wifi only" device for commissioning to show this feature!
28
+ * --ble-hci-id: Optionally, HCI ID to use (Linux only, default 0)
29
+
30
+ Additionally, you need to choose if the device should simulate a Thread or a Wifi enabled device. This can be done by adding `--ble-fake-wifi` or `--ble-fake-thread` to the command line. Then a dummy WifiNetworkCommissioning or ThreadNetworkCommissioning cluster is added to the device node.
31
+
32
+ Depending on the method you chose you probably need to also add additional parameters for either Wifi or thread which are returned when the device is asked to scn for available networks.
33
+
34
+ For Wifi the parameters to use are:
35
+ * --ble-wifi-scan-ssid: The Wi-Fi SSID returned by the "ScanNetworks" call of the Wifi Network commissioning cluster used when using BLE commissioning (default: "TestSSID"). Ideally use a really existing SSID that also the commissioner (Apple, Alexa, ...) knows to make it easier to commission. Else you could get errors while commissioning.
36
+ * --ble-wifi-scan-bssid: The Wi-Fi BSSID returned by the "ScanNetworks" call of the Wifi Network commissioning cluster used when using BLE commissioning (default: "00:00:00:00:00:00").
37
+
38
+ For Thread the parameters to use are:
39
+ * --ble.thread.pan-id: The PAN ID to use for the Thread network
40
+ * --ble.thread.extended-pan-id: The extended PAN ID to use for the Thread network
41
+ * --ble.thread.network-name: The network name to use for the Thread network
42
+ * --ble.thread.channel: The channel to use for the Thread network
43
+ * --ble.thread.address: The address to use for the Thread network
44
+ Thread parameters are as of now only needed when commissioning with Amazon because the others are currently not scanning for Thread networks.