-
-
Notifications
You must be signed in to change notification settings - Fork 623
/
server_config.cjs
58 lines (56 loc) · 1.33 KB
/
server_config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// @ts-check
const { CommandClasses, ConfigValueFormat, SupervisionStatus } = require(
"@zwave-js/core",
);
const { ccCaps, MockZWaveFrameType, createMockZWaveRequestFrame } = require(
"@zwave-js/testing",
);
const { wait } = require("alcalzone-shared/async");
const {
SupervisionCCGet,
SupervisionCCReport,
ConfigurationCCSet,
SwitchType,
} = require(
"zwave-js",
);
/** @type {import("zwave-js/Testing").MockServerOptions["config"]} */
module.exports.default = {
nodes: [
{
id: 2,
capabilities: {
commandClasses: [
CommandClasses.Version,
// CommandClasses.Supervision,
ccCaps({
ccId: CommandClasses["Multilevel Switch"],
isSupported: true,
version: 4,
defaultValue: 0,
primarySwitchType: SwitchType["Down/Up"],
}),
],
},
// behaviors: [
// {
// async handleCC(controller, self, receivedCC) {
// if (
// receivedCC instanceof SupervisionCCGet
// && receivedCC.encapsulated
// instanceof ConfigurationCCSet
// ) {
// const cc = new SupervisionCCReport({
// nodeId: controller.ownNodeId,
// sessionId: receivedCC.sessionId,
// moreUpdatesFollow: false,
// status: SupervisionStatus.Fail,
// });
// return { action: "sendCC", cc };
// }
// },
// },
// ],
},
],
};