@matter/examples 0.13.0-alpha.0-20250415-475996bb5 → 0.13.0-alpha.0-20250418-8cfc0b832
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/dist/esm/controller/ControllerNode.js +3 -2
- package/dist/esm/controller/ControllerNode.js.map +1 -1
- package/dist/esm/device-air-quality-sensor/AirQualitySensorDeviceNode.js +68 -0
- package/dist/esm/device-air-quality-sensor/AirQualitySensorDeviceNode.js.map +6 -0
- package/dist/esm/device-onoff-advanced/DeviceNodeFull.js +1 -0
- package/dist/esm/device-onoff-advanced/DeviceNodeFull.js.map +1 -1
- package/dist/esm/device-robotic-vacuum-cleaner/RoboticVacuumCleanerDevice.js +138 -0
- package/dist/esm/device-robotic-vacuum-cleaner/RoboticVacuumCleanerDevice.js.map +6 -0
- package/dist/esm/device-robotic-vacuum-cleaner/RvcDeviceLogic.js +368 -0
- package/dist/esm/device-robotic-vacuum-cleaner/RvcDeviceLogic.js.map +6 -0
- package/dist/esm/device-robotic-vacuum-cleaner/behaviors/CustomRvcCleanModeServer.js +35 -0
- package/dist/esm/device-robotic-vacuum-cleaner/behaviors/CustomRvcCleanModeServer.js.map +6 -0
- package/dist/esm/device-robotic-vacuum-cleaner/behaviors/CustomRvcOperationalStateServer.js +60 -0
- package/dist/esm/device-robotic-vacuum-cleaner/behaviors/CustomRvcOperationalStateServer.js.map +6 -0
- package/dist/esm/device-robotic-vacuum-cleaner/behaviors/CustomRvcRunModeServer.js +34 -0
- package/dist/esm/device-robotic-vacuum-cleaner/behaviors/CustomRvcRunModeServer.js.map +6 -0
- package/dist/esm/device-smoke-co-alarm/SmokeCOAlarmDeviceNode.js +41 -0
- package/dist/esm/device-smoke-co-alarm/SmokeCOAlarmDeviceNode.js.map +6 -0
- package/package.json +9 -5
- package/src/controller/ControllerNode.ts +3 -2
- package/src/controller/README.md +3 -3
- package/src/device-air-quality-sensor/AirQualitySensorDeviceNode.ts +87 -0
- package/src/device-air-quality-sensor/README.md +14 -0
- package/src/device-onoff-advanced/DeviceNodeFull.ts +2 -1
- package/src/device-robotic-vacuum-cleaner/README.md +22 -0
- package/src/device-robotic-vacuum-cleaner/RoboticVacuumCleanerDevice.ts +158 -0
- package/src/device-robotic-vacuum-cleaner/RvcDeviceLogic.ts +421 -0
- package/src/device-robotic-vacuum-cleaner/behaviors/CustomRvcCleanModeServer.ts +39 -0
- package/src/device-robotic-vacuum-cleaner/behaviors/CustomRvcOperationalStateServer.ts +79 -0
- package/src/device-robotic-vacuum-cleaner/behaviors/CustomRvcRunModeServer.ts +39 -0
- package/src/device-smoke-co-alarm/README.md +14 -0
- package/src/device-smoke-co-alarm/SmokeCOAlarmDeviceNode.ts +60 -0
- package/src/tsconfig.json +3 -0
|
@@ -28,6 +28,7 @@ if (environment.vars.get("ble")) {
|
|
|
28
28
|
Ble.get = singleton(
|
|
29
29
|
() =>
|
|
30
30
|
new NodeJsBle({
|
|
31
|
+
environment,
|
|
31
32
|
hciId: environment.vars.number("ble.hci.id"),
|
|
32
33
|
}),
|
|
33
34
|
);
|
|
@@ -84,11 +85,11 @@ class ControllerNode {
|
|
|
84
85
|
environment.vars.number("longDiscriminator") ??
|
|
85
86
|
(await controllerStorage.get("longDiscriminator", 3840));
|
|
86
87
|
if (longDiscriminator > 4095) throw new Error("Discriminator value must be less than 4096");
|
|
87
|
-
setupPin = environment.vars.number("
|
|
88
|
+
setupPin = environment.vars.number("passcode") ?? (await controllerStorage.get("passcode", 20202021));
|
|
88
89
|
}
|
|
89
90
|
if ((shortDiscriminator === undefined && longDiscriminator === undefined) || setupPin === undefined) {
|
|
90
91
|
throw new Error(
|
|
91
|
-
"Please specify the longDiscriminator of the device to commission with -longDiscriminator or provide a valid passcode with
|
|
92
|
+
"Please specify the longDiscriminator of the device to commission with -longDiscriminator or provide a valid passcode with --passcode=xxxxxx",
|
|
92
93
|
);
|
|
93
94
|
}
|
|
94
95
|
|
package/src/controller/README.md
CHANGED
|
@@ -28,12 +28,12 @@ This will commission a MatterServer device (for debugging/capability showing pur
|
|
|
28
28
|
The following parameters are available and used to initially commission a device (they can be omitted after this):
|
|
29
29
|
* --fabriclabel: the fabric label to use for commissioning (default: "matter.js Controller")
|
|
30
30
|
* If the IP and Port of the device is known (should be only the case in testing cases) you can use the following parameters:
|
|
31
|
-
* --ip: the IP address of the device to commission (can be used but discovery via pairingcode or discriminator or also just
|
|
31
|
+
* --ip: the IP address of the device to commission (can be used but discovery via pairingcode or discriminator or also just passcode is most likely better)
|
|
32
32
|
* --port the port of the device to commission (default: 5540)
|
|
33
33
|
* Device identification options:
|
|
34
|
-
* --pairingcode: code to use for pairing (-longDiscriminator and -
|
|
34
|
+
* --pairingcode: code to use for pairing (-longDiscriminator and -passcode will be ignored) - usually the code below the QR Code on the device or displayed in the app!
|
|
35
35
|
* --longDiscriminator: the discriminator to use for pairing (default: 3840, value between 0 and 4095)
|
|
36
|
-
* --
|
|
36
|
+
* --passcode: the passcode to use for pairing (default: 20202021)
|
|
37
37
|
* When the device to commission is not already in the IP network and also not an Ethernet device commission can be done via ble. In this case the following parameters are used:
|
|
38
38
|
* --ble: enable BLE support (default: false) If this is enabled the controller will try to connect via BLE first (15s timeout) and then via IP if not commissioned yet!
|
|
39
39
|
* --ble-hci-id: Optionally, HCI ID to use (Linux only, default 0)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* This example shows how to create a Air Quality Sensor Matter device with temperature, humidity, PMx and TVOC
|
|
10
|
+
* measurements. It just defines initial static values, so it won't change over time.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { Endpoint, ServerNode } from "@matter/main";
|
|
14
|
+
import { Pm1ConcentrationMeasurementServer } from "@matter/main/behaviors/pm1-concentration-measurement";
|
|
15
|
+
import { Pm10ConcentrationMeasurementServer } from "@matter/main/behaviors/pm10-concentration-measurement";
|
|
16
|
+
import { Pm25ConcentrationMeasurementServer } from "@matter/main/behaviors/pm25-concentration-measurement";
|
|
17
|
+
import { RelativeHumidityMeasurementServer } from "@matter/main/behaviors/relative-humidity-measurement";
|
|
18
|
+
import { TemperatureMeasurementServer } from "@matter/main/behaviors/temperature-measurement";
|
|
19
|
+
import { TotalVolatileOrganicCompoundsConcentrationMeasurementServer } from "@matter/main/behaviors/total-volatile-organic-compounds-concentration-measurement";
|
|
20
|
+
import { AirQuality } from "@matter/main/clusters/air-quality";
|
|
21
|
+
import { ConcentrationMeasurement } from "@matter/main/clusters/concentration-measurement";
|
|
22
|
+
import { AirQualitySensorDevice } from "@matter/main/devices/air-quality-sensor";
|
|
23
|
+
|
|
24
|
+
// Define the endpoint for the device. This is the "thing/device" that will appear on the network.
|
|
25
|
+
const airQualityEndpoint = new Endpoint(
|
|
26
|
+
AirQualitySensorDevice.with(
|
|
27
|
+
TemperatureMeasurementServer,
|
|
28
|
+
RelativeHumidityMeasurementServer,
|
|
29
|
+
Pm1ConcentrationMeasurementServer.with(ConcentrationMeasurement.Feature.NumericMeasurement),
|
|
30
|
+
Pm25ConcentrationMeasurementServer.with(ConcentrationMeasurement.Feature.NumericMeasurement),
|
|
31
|
+
Pm10ConcentrationMeasurementServer.with(ConcentrationMeasurement.Feature.NumericMeasurement),
|
|
32
|
+
TotalVolatileOrganicCompoundsConcentrationMeasurementServer.with(
|
|
33
|
+
ConcentrationMeasurement.Feature.NumericMeasurement,
|
|
34
|
+
),
|
|
35
|
+
),
|
|
36
|
+
{
|
|
37
|
+
id: "airQuality",
|
|
38
|
+
airQuality: {
|
|
39
|
+
airQuality: AirQuality.AirQualityEnum.Poor,
|
|
40
|
+
},
|
|
41
|
+
relativeHumidityMeasurement: {
|
|
42
|
+
tolerance: 0,
|
|
43
|
+
minMeasuredValue: 0,
|
|
44
|
+
maxMeasuredValue: 100,
|
|
45
|
+
},
|
|
46
|
+
temperatureMeasurement: {
|
|
47
|
+
tolerance: 0,
|
|
48
|
+
minMeasuredValue: 0,
|
|
49
|
+
maxMeasuredValue: 100,
|
|
50
|
+
},
|
|
51
|
+
pm1ConcentrationMeasurement: {
|
|
52
|
+
measuredValue: 12.34,
|
|
53
|
+
measurementUnit: ConcentrationMeasurement.MeasurementUnit.Ppm,
|
|
54
|
+
measurementMedium: ConcentrationMeasurement.MeasurementMedium.Air,
|
|
55
|
+
},
|
|
56
|
+
pm10ConcentrationMeasurement: {
|
|
57
|
+
measuredValue: 12.34,
|
|
58
|
+
measurementUnit: ConcentrationMeasurement.MeasurementUnit.Ppm,
|
|
59
|
+
measurementMedium: ConcentrationMeasurement.MeasurementMedium.Air,
|
|
60
|
+
},
|
|
61
|
+
pm25ConcentrationMeasurement: {
|
|
62
|
+
measuredValue: 12.34,
|
|
63
|
+
measurementUnit: ConcentrationMeasurement.MeasurementUnit.Ppm,
|
|
64
|
+
measurementMedium: ConcentrationMeasurement.MeasurementMedium.Air,
|
|
65
|
+
},
|
|
66
|
+
totalVolatileOrganicCompoundsConcentrationMeasurement: {
|
|
67
|
+
measuredValue: 12.34,
|
|
68
|
+
measurementUnit: ConcentrationMeasurement.MeasurementUnit.Ppm,
|
|
69
|
+
measurementMedium: ConcentrationMeasurement.MeasurementMedium.Air,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
// Physical devices appear as "nodes" on a Matter network. As a device implementer you use a NodeServer to bring a
|
|
75
|
+
// device online.
|
|
76
|
+
//
|
|
77
|
+
// Note there are a large number of options to NodeServer that we are allowing to take default values here. See
|
|
78
|
+
// IlluminatedRollerShade.ts for a more detailed example.
|
|
79
|
+
const node = await ServerNode.create();
|
|
80
|
+
|
|
81
|
+
// Nodes are a composition of endpoints. Add a single endpoint to the node, our example socket device.
|
|
82
|
+
await node.add(airQualityEndpoint);
|
|
83
|
+
// Our device is now built, so we can bring the node online.
|
|
84
|
+
//
|
|
85
|
+
// Note that you may serve multiple nodes from a single process. We only have one, however, so we can use the run()
|
|
86
|
+
// method of the node.
|
|
87
|
+
await node.run();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Air quality sensor example
|
|
2
|
+
|
|
3
|
+
This example shows how to build a simple Air quality Sensor device with temperature, humidity, PMx and TVOC measurements.
|
|
4
|
+
It just defines initial static values, so it won't change over time.
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
For general documentation about the CLI parameters or environment variables that can be used for matter.js please refer to the [Examples README](../../../examples/README.md#cli-usage).
|
|
9
|
+
|
|
10
|
+
Execute the following command in the examples root directory
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm run matter-air-quality-sensor
|
|
14
|
+
```
|
|
@@ -74,6 +74,7 @@ if (environment.vars.get("ble.enable")) {
|
|
|
74
74
|
Ble.get = singleton(
|
|
75
75
|
() =>
|
|
76
76
|
new NodeJsBle({
|
|
77
|
+
environment,
|
|
77
78
|
hciId: environment.vars.number("ble.hciId"),
|
|
78
79
|
}),
|
|
79
80
|
);
|
|
@@ -381,7 +382,7 @@ logEndpoint(EndpointServer.forEndpoint(server));
|
|
|
381
382
|
/**
|
|
382
383
|
* In order to start the node and announce it into the network we start the node. This method resolves when the Matter
|
|
383
384
|
* node enters his online state. Alternatively, we could also use `await server.run()` which
|
|
384
|
-
* resolves when the node goes offline again, but we want to execute code
|
|
385
|
+
* resolves when the node goes offline again, but we want to execute code afterward, so we use start() here
|
|
385
386
|
*/
|
|
386
387
|
await server.start();
|
|
387
388
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Robotic Vacuum Cleaner Example
|
|
2
|
+
|
|
3
|
+
This example shows how to run a Robot Vacuum Cleaning device. This is a bit more complex and implements the following
|
|
4
|
+
(fictional) features and state engine:
|
|
5
|
+
* Supports Run Modes: Idle, Quick-Clean (one cleaning round), Auto-Clean (3 rounds for one cycle and does cleaning again after 3h)
|
|
6
|
+
* Supports Cleaning Modes: Vacuuming and Mopping
|
|
7
|
+
* Supports Cleaning Areas: Living Room, Kitchen, Bedroom, Bathroom
|
|
8
|
+
* State Engine:
|
|
9
|
+
* One cleaning/mapping round takes 10 minutes
|
|
10
|
+
* Returning to the charger (after Cleaning/Mapping) takes 30s
|
|
11
|
+
* Recharging takes 2 Minutes (always happening when device reached charger)
|
|
12
|
+
* In Auto Mode the RVC is repeating the cleaning after 3h
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
For general documentation about the CLI parameters or environment variables that can be used for matter.js please refer to the [Examples README](../../../examples/README.md#cli-usage).
|
|
17
|
+
|
|
18
|
+
Execute the following command in the examples root directory
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm run matter-rvc
|
|
22
|
+
```
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// This demonstrates bringing a "Robotic Vacuum Cleaner" device online with matter.js.
|
|
9
|
+
|
|
10
|
+
import { AreaNamespaceTag, ServerNode } from "@matter/main";
|
|
11
|
+
import { ServiceAreaServer } from "@matter/main/behaviors/service-area";
|
|
12
|
+
import { ModeBase } from "@matter/main/clusters/mode-base";
|
|
13
|
+
import { RvcCleanMode } from "@matter/main/clusters/rvc-clean-mode";
|
|
14
|
+
import { RvcOperationalState } from "@matter/main/clusters/rvc-operational-state";
|
|
15
|
+
import { RvcRunMode } from "@matter/main/clusters/rvc-run-mode";
|
|
16
|
+
import { RoboticVacuumCleanerDevice } from "@matter/main/devices/robotic-vacuum-cleaner";
|
|
17
|
+
import { CleaningAreas, RvcDeviceCleanMode, RvcDeviceLogic, RvcDeviceRunModes } from "./RvcDeviceLogic.js";
|
|
18
|
+
import { CustomRvcCleanModeServer } from "./behaviors/CustomRvcCleanModeServer.js";
|
|
19
|
+
import { CustomRvcOperationalStateServer } from "./behaviors/CustomRvcOperationalStateServer.js";
|
|
20
|
+
import { CustomRvcRunModeServer } from "./behaviors/CustomRvcRunModeServer.js";
|
|
21
|
+
|
|
22
|
+
// Physical devices appear as "nodes" on a Matter network. As a device implementer you use a NodeServer to bring a
|
|
23
|
+
// device online.
|
|
24
|
+
//
|
|
25
|
+
// Note there are a large number of options to NodeServer that we are allowing to take default values here. See
|
|
26
|
+
// IlluminatedRollerShade.ts for a more detailed example.
|
|
27
|
+
const node = await ServerNode.create();
|
|
28
|
+
|
|
29
|
+
// Nodes are a composition of endpoints. Add a single endpoint to the node, our example RoboticVacuumCleanerDevice.
|
|
30
|
+
// THe RVC device has some requirements where multiple clusters need to work together. We are using own Cluster logic
|
|
31
|
+
// for this - please see in the respective Behavior files.
|
|
32
|
+
// The below options also show the available Run Modes, Operational States and Service Areas that the device exposes
|
|
33
|
+
// and their data structures.
|
|
34
|
+
|
|
35
|
+
await node.add(
|
|
36
|
+
RoboticVacuumCleanerDevice.with(
|
|
37
|
+
CustomRvcCleanModeServer,
|
|
38
|
+
CustomRvcOperationalStateServer,
|
|
39
|
+
CustomRvcRunModeServer,
|
|
40
|
+
ServiceAreaServer,
|
|
41
|
+
RvcDeviceLogic,
|
|
42
|
+
),
|
|
43
|
+
{
|
|
44
|
+
id: "robotic-vacuum-cleaner",
|
|
45
|
+
rvcCleanMode: {
|
|
46
|
+
supportedModes: [
|
|
47
|
+
{
|
|
48
|
+
label: "Vacuuming",
|
|
49
|
+
mode: RvcDeviceCleanMode.Vacuuming,
|
|
50
|
+
modeTags: [{ value: RvcCleanMode.ModeTag.Vacuum }],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: "Mopping",
|
|
54
|
+
mode: RvcDeviceCleanMode.Mopping,
|
|
55
|
+
modeTags: [{ value: RvcCleanMode.ModeTag.Mop }],
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
// We start with this mode. It will be persisted
|
|
59
|
+
currentMode: RvcDeviceCleanMode.Vacuuming,
|
|
60
|
+
},
|
|
61
|
+
rvcRunMode: {
|
|
62
|
+
supportedModes: [
|
|
63
|
+
{
|
|
64
|
+
label: "Auto-Cleaning",
|
|
65
|
+
mode: RvcDeviceRunModes.AutoCleaning,
|
|
66
|
+
modeTags: [{ value: RvcRunMode.ModeTag.Cleaning }, { value: ModeBase.ModeTag.Auto }],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: "Quick-Cleaning",
|
|
70
|
+
mode: RvcDeviceRunModes.QuickCleaning,
|
|
71
|
+
modeTags: [{ value: RvcRunMode.ModeTag.Cleaning }, { value: ModeBase.ModeTag.Quick }],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: "Mapping",
|
|
75
|
+
mode: RvcDeviceRunModes.Mapping,
|
|
76
|
+
modeTags: [{ value: RvcRunMode.ModeTag.Mapping }],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: "Idle",
|
|
80
|
+
mode: RvcDeviceRunModes.Idle,
|
|
81
|
+
modeTags: [{ value: RvcRunMode.ModeTag.Idle }],
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
// We start with this mode. It will be persisted
|
|
85
|
+
currentMode: RvcDeviceRunModes.Idle,
|
|
86
|
+
},
|
|
87
|
+
rvcOperationalState: {
|
|
88
|
+
operationalStateList: [
|
|
89
|
+
{ operationalStateId: RvcOperationalState.OperationalState.Running },
|
|
90
|
+
{ operationalStateId: RvcOperationalState.OperationalState.Paused },
|
|
91
|
+
{ operationalStateId: RvcOperationalState.OperationalState.Error },
|
|
92
|
+
{ operationalStateId: RvcOperationalState.OperationalState.SeekingCharger },
|
|
93
|
+
{ operationalStateId: RvcOperationalState.OperationalState.Charging },
|
|
94
|
+
{ operationalStateId: RvcOperationalState.OperationalState.Docked },
|
|
95
|
+
],
|
|
96
|
+
operationalState: RvcOperationalState.OperationalState.Docked,
|
|
97
|
+
},
|
|
98
|
+
serviceArea: {
|
|
99
|
+
supportedAreas: [
|
|
100
|
+
{
|
|
101
|
+
areaId: CleaningAreas.Kitchen,
|
|
102
|
+
mapId: null,
|
|
103
|
+
areaInfo: {
|
|
104
|
+
locationInfo: {
|
|
105
|
+
locationName: "Kitchen",
|
|
106
|
+
floorNumber: 0,
|
|
107
|
+
areaType: AreaNamespaceTag.Kitchen.tag,
|
|
108
|
+
},
|
|
109
|
+
landmarkInfo: null,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
areaId: CleaningAreas.LivingRoom,
|
|
114
|
+
mapId: null,
|
|
115
|
+
areaInfo: {
|
|
116
|
+
locationInfo: {
|
|
117
|
+
locationName: "Living Room",
|
|
118
|
+
floorNumber: 0,
|
|
119
|
+
areaType: AreaNamespaceTag.LivingRoom.tag,
|
|
120
|
+
},
|
|
121
|
+
landmarkInfo: null,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
areaId: CleaningAreas.Bathroom,
|
|
126
|
+
mapId: null,
|
|
127
|
+
areaInfo: {
|
|
128
|
+
locationInfo: {
|
|
129
|
+
locationName: "Bathroom",
|
|
130
|
+
floorNumber: 0,
|
|
131
|
+
areaType: AreaNamespaceTag.Bathroom.tag,
|
|
132
|
+
},
|
|
133
|
+
landmarkInfo: null,
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
areaId: CleaningAreas.Bedroom,
|
|
138
|
+
mapId: null,
|
|
139
|
+
areaInfo: {
|
|
140
|
+
locationInfo: {
|
|
141
|
+
locationName: "Bedroom",
|
|
142
|
+
floorNumber: 0,
|
|
143
|
+
areaType: AreaNamespaceTag.Bedroom.tag,
|
|
144
|
+
},
|
|
145
|
+
landmarkInfo: null,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
currentArea: null,
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
// Our device is now built, so we can bring the node online.
|
|
155
|
+
//
|
|
156
|
+
// Note that you may serve multiple nodes from a single process. We only have one, however, so we can use the run()
|
|
157
|
+
// method of the node.
|
|
158
|
+
await node.run();
|