-
Notifications
You must be signed in to change notification settings - Fork 239
/
Copy pathmodel.js
97 lines (94 loc) · 1.83 KB
/
model.js
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import BIN from "BinaryMessage";
const model = {
VERSION: 0x1001,
home: {
View: "Home",
},
settings: {
View: "Settings",
comments: 'Joining Wi-Fi network and setting timezone allows for automatic time detection',
items: [
{
Item: "SettingItem",
id: "time",
name: 'Time',
View: "SetTime",
title: 'Set Time',
},
{
Item: "SettingItem",
id: "network",
name: 'Network',
View: "Networks",
title: 'Networks',
},
{
Item: "SettingItem",
id: "timezoneName",
name: 'Timezone',
View: "Timezone",
title: 'Timezone',
comments: 'Join Wi-Fi network to automatically get time'
},
{
Item: "DSTSettingItem",
id: "dst",
name: 'Daylight Savings',
},
],
},
internal: {
timezone: { value:3, retention:2 },
dst: { value:0, retention:2 },
},
internalFormat: [
{ type:BIN.Uint16, name:"VERSION" },
{ type:BIN.Uint8, name:"timezone" },
{ type:BIN.Uint8, name:"dst" },
],
internalKey: "IN",
plug: {
schedule: { value:1, retention:2 },
startTime: { value:8 * 3600, retention:2 },
stopTime: { value:17 * 3600, retention:2 },
},
plugFormat: [
{ type:BIN.Uint16, name:"VERSION" },
{ type:BIN.Uint8, name:"schedule" },
{ type:BIN.Int32, name:"startTime" },
{ type:BIN.Int32, name:"stopTime" },
],
plugKeys: [ "P0", "P1" ],
plugNameKeys: [ "N0", "N1" ],
ssidKey: "ID",
passwordKey: "PW",
authenticationKey: "AT",
timeout: 30000,
timezones: [
"Samoa",
"Hawaii",
"Alaska",
"Pacific",
"Mountain",
"Central",
"Eastern",
"Atlantic",
"Uruguay",
"SGSSI",
"Azores",
"Greenwich Mean",
"Central European",
"Eastern European",
"Indian Ocean",
"Arabian",
"Pakistan",
"Bangladesh",
"Thailand",
"China",
"Japan",
"Australian Eastern",
"Vanuatu",
"New Zealand",
]
};
export default Object.freeze(model, true);