homebridge-smartsystem 6.3.3 → 6.3.4
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/README.md +2 -2
- package/config.json +89 -108
- package/package.json +3 -2
- package/server/smappee.js +8 -3
- package/server/smappee.ts +7 -3
package/README.md
CHANGED
|
@@ -277,10 +277,10 @@ Homebridge UI version
|
|
|
277
277
|
- 6: power: 5% instead of 10% for power rules
|
|
278
278
|
|
|
279
279
|
### v6.3.x - 23-09-2022 - Shelly PM release
|
|
280
|
-
- 1: first test
|
|
280
|
+
- 1: first test Shelly PM - allow address or addresses, example: "192.168.0.95,102.168.0.96"
|
|
281
281
|
- 2: logging now more according to debug true/false in the config file
|
|
282
282
|
- 3: power bindings now when: 5% change < 1000W, 2% change > 1000W
|
|
283
|
-
|
|
283
|
+
- 4: added if in set-plug if smappee not (yet) connected.
|
|
284
284
|
|
|
285
285
|
## Hardware
|
|
286
286
|
A Raspberry Pi that connects to a Duotecno IP Node
|
package/config.json
CHANGED
|
@@ -8,138 +8,104 @@
|
|
|
8
8
|
"type": "sun",
|
|
9
9
|
"channel": "0",
|
|
10
10
|
"low": 30,
|
|
11
|
-
"high":
|
|
11
|
+
"high": 3000,
|
|
12
12
|
"actions": [
|
|
13
13
|
{
|
|
14
|
-
"name": "
|
|
14
|
+
"name": "Lamp-Bottom",
|
|
15
15
|
"value": false,
|
|
16
16
|
"masterAddress": "192.168.0.97",
|
|
17
17
|
"masterPort": 5001,
|
|
18
|
-
"logicalAddress":
|
|
19
|
-
"logicalNodeAddress":
|
|
18
|
+
"logicalAddress": 34,
|
|
19
|
+
"logicalNodeAddress": 3
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
"name": "
|
|
23
|
-
"value":
|
|
22
|
+
"name": "Lamp-Bottom",
|
|
23
|
+
"value": false,
|
|
24
24
|
"masterAddress": "192.168.0.97",
|
|
25
25
|
"masterPort": 5001,
|
|
26
|
-
"logicalAddress":
|
|
27
|
-
"logicalNodeAddress":
|
|
26
|
+
"logicalAddress": 34,
|
|
27
|
+
"logicalNodeAddress": 3
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"name": "
|
|
30
|
+
"name": "Lamp-Bottom",
|
|
31
31
|
"value": true,
|
|
32
32
|
"masterAddress": "192.168.0.97",
|
|
33
33
|
"masterPort": 5001,
|
|
34
|
-
"logicalAddress":
|
|
35
|
-
"logicalNodeAddress":
|
|
34
|
+
"logicalAddress": 34,
|
|
35
|
+
"logicalNodeAddress": 3
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
|
-
"power":
|
|
39
|
-
"current":
|
|
38
|
+
"power": 146,
|
|
39
|
+
"current": 1
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"type": "power",
|
|
43
|
-
"channel": "
|
|
44
|
-
"low":
|
|
45
|
-
"high":
|
|
43
|
+
"channel": "7+8+9",
|
|
44
|
+
"low": 100,
|
|
45
|
+
"high": 10000,
|
|
46
46
|
"actions": [
|
|
47
47
|
{
|
|
48
|
-
"name": "
|
|
48
|
+
"name": "",
|
|
49
49
|
"value": false,
|
|
50
50
|
"masterAddress": "192.168.0.97",
|
|
51
51
|
"masterPort": 5001,
|
|
52
|
-
"logicalAddress":
|
|
53
|
-
"logicalNodeAddress":
|
|
52
|
+
"logicalAddress": 30,
|
|
53
|
+
"logicalNodeAddress": 3
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
|
-
"name": "
|
|
57
|
-
"value":
|
|
56
|
+
"name": "",
|
|
57
|
+
"value": true,
|
|
58
58
|
"masterAddress": "192.168.0.97",
|
|
59
59
|
"masterPort": 5001,
|
|
60
|
-
"logicalAddress":
|
|
61
|
-
"logicalNodeAddress":
|
|
60
|
+
"logicalAddress": 30,
|
|
61
|
+
"logicalNodeAddress": 3
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
"name": "
|
|
64
|
+
"name": "0;0",
|
|
65
65
|
"value": true,
|
|
66
66
|
"masterAddress": "192.168.0.97",
|
|
67
67
|
"masterPort": 5001,
|
|
68
|
-
"logicalAddress":
|
|
69
|
-
"logicalNodeAddress":
|
|
68
|
+
"logicalAddress": 0,
|
|
69
|
+
"logicalNodeAddress": 0
|
|
70
70
|
}
|
|
71
71
|
],
|
|
72
|
-
"power":
|
|
73
|
-
"current":
|
|
72
|
+
"power": 446,
|
|
73
|
+
"current": 1
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"type": "power",
|
|
77
77
|
"channel": "7+8+9",
|
|
78
|
-
"low":
|
|
78
|
+
"low": 400,
|
|
79
79
|
"high": 900,
|
|
80
80
|
"actions": [
|
|
81
81
|
{
|
|
82
|
-
"name": "",
|
|
83
|
-
"value":
|
|
84
|
-
"masterAddress": "192.168.0.97",
|
|
85
|
-
"masterPort": 5001,
|
|
86
|
-
"logicalAddress": 4,
|
|
87
|
-
"logicalNodeAddress": 3
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"name": "",
|
|
91
|
-
"value": -1,
|
|
82
|
+
"name": "Lamp-Top",
|
|
83
|
+
"value": false,
|
|
92
84
|
"masterAddress": "192.168.0.97",
|
|
93
85
|
"masterPort": 5001,
|
|
94
|
-
"logicalAddress":
|
|
86
|
+
"logicalAddress": 33,
|
|
95
87
|
"logicalNodeAddress": 3
|
|
96
88
|
},
|
|
97
89
|
{
|
|
98
|
-
"name": "",
|
|
99
|
-
"value":
|
|
90
|
+
"name": "Lamp-Top",
|
|
91
|
+
"value": true,
|
|
100
92
|
"masterAddress": "192.168.0.97",
|
|
101
93
|
"masterPort": 5001,
|
|
102
|
-
"logicalAddress":
|
|
94
|
+
"logicalAddress": 33,
|
|
103
95
|
"logicalNodeAddress": 3
|
|
104
|
-
}
|
|
105
|
-
]
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"type": "sun",
|
|
109
|
-
"channel": "7",
|
|
110
|
-
"low": 0,
|
|
111
|
-
"high": 0,
|
|
112
|
-
"actions": [
|
|
113
|
-
{
|
|
114
|
-
"name": "Mood C",
|
|
115
|
-
"value": false,
|
|
116
|
-
"masterAddress": "192.168.0.97",
|
|
117
|
-
"masterPort": 5001,
|
|
118
|
-
"logicalAddress": 12,
|
|
119
|
-
"logicalNodeAddress": 252
|
|
120
96
|
},
|
|
121
97
|
{
|
|
122
|
-
"name": "
|
|
123
|
-
"value": 50,
|
|
124
|
-
"masterAddress": "192.168.0.97",
|
|
125
|
-
"masterPort": 5001,
|
|
126
|
-
"logicalAddress": 12,
|
|
127
|
-
"logicalNodeAddress": 252
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"name": "Mood C",
|
|
98
|
+
"name": "--",
|
|
131
99
|
"value": true,
|
|
132
100
|
"masterAddress": "192.168.0.97",
|
|
133
101
|
"masterPort": 5001,
|
|
134
|
-
"logicalAddress":
|
|
135
|
-
"logicalNodeAddress":
|
|
102
|
+
"logicalAddress": 0,
|
|
103
|
+
"logicalNodeAddress": 0
|
|
136
104
|
}
|
|
137
|
-
]
|
|
138
|
-
"power": 3263,
|
|
139
|
-
"current": 2
|
|
105
|
+
]
|
|
140
106
|
}
|
|
141
107
|
],
|
|
142
|
-
"address": "192.168.0.
|
|
108
|
+
"address": "192.168.0.184",
|
|
143
109
|
"uid": "57e3e0d8-bb05-4b04-8662-1a9871998f3f",
|
|
144
110
|
"bindings": [
|
|
145
111
|
{
|
|
@@ -190,40 +156,7 @@
|
|
|
190
156
|
},
|
|
191
157
|
"p1": {
|
|
192
158
|
"debug": false,
|
|
193
|
-
"rules": [
|
|
194
|
-
{
|
|
195
|
-
"type": "power",
|
|
196
|
-
"channel": "3+4+5",
|
|
197
|
-
"low": 30,
|
|
198
|
-
"high": 1500,
|
|
199
|
-
"actions": [
|
|
200
|
-
{
|
|
201
|
-
"name": "--",
|
|
202
|
-
"value": false,
|
|
203
|
-
"masterAddress": "192.168.0.97",
|
|
204
|
-
"masterPort": 5001,
|
|
205
|
-
"logicalAddress": 0,
|
|
206
|
-
"logicalNodeAddress": 0
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
"name": "--",
|
|
210
|
-
"value": 50,
|
|
211
|
-
"masterAddress": "192.168.0.97",
|
|
212
|
-
"masterPort": 5001,
|
|
213
|
-
"logicalAddress": 0,
|
|
214
|
-
"logicalNodeAddress": 0
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
"name": "Alles aan",
|
|
218
|
-
"value": true,
|
|
219
|
-
"masterAddress": "192.168.0.97",
|
|
220
|
-
"masterPort": 5001,
|
|
221
|
-
"logicalAddress": 5,
|
|
222
|
-
"logicalNodeAddress": 3
|
|
223
|
-
}
|
|
224
|
-
]
|
|
225
|
-
}
|
|
226
|
-
],
|
|
159
|
+
"rules": [],
|
|
227
160
|
"bindings": [
|
|
228
161
|
{
|
|
229
162
|
"logicalNodeAddress": 252,
|
|
@@ -428,6 +361,54 @@
|
|
|
428
361
|
"used": "Y",
|
|
429
362
|
"group": 0
|
|
430
363
|
},
|
|
364
|
+
{
|
|
365
|
+
"logicalNodeAddress": 252,
|
|
366
|
+
"logicalAddress": 7,
|
|
367
|
+
"masterAddress": "192.168.0.97",
|
|
368
|
+
"masterPort": 5001,
|
|
369
|
+
"name": "Bottom-Left",
|
|
370
|
+
"displayName": "Bottom-Left",
|
|
371
|
+
"extendedType": 102,
|
|
372
|
+
"active": "Y",
|
|
373
|
+
"used": "Y",
|
|
374
|
+
"group": 0
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"logicalNodeAddress": 3,
|
|
378
|
+
"logicalAddress": 30,
|
|
379
|
+
"masterAddress": "192.168.0.97",
|
|
380
|
+
"masterPort": 5001,
|
|
381
|
+
"name": "Blue LED",
|
|
382
|
+
"displayName": "Blue LED",
|
|
383
|
+
"extendedType": 1,
|
|
384
|
+
"active": "N",
|
|
385
|
+
"used": "Y",
|
|
386
|
+
"group": 0
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"logicalNodeAddress": 3,
|
|
390
|
+
"logicalAddress": 34,
|
|
391
|
+
"masterAddress": "192.168.0.97",
|
|
392
|
+
"masterPort": 5001,
|
|
393
|
+
"name": "Lamp-Bottom",
|
|
394
|
+
"displayName": "Lamp-Bottom",
|
|
395
|
+
"extendedType": 2,
|
|
396
|
+
"active": "N",
|
|
397
|
+
"used": "Y",
|
|
398
|
+
"group": 0
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"logicalNodeAddress": 3,
|
|
402
|
+
"logicalAddress": 33,
|
|
403
|
+
"masterAddress": "192.168.0.97",
|
|
404
|
+
"masterPort": 5001,
|
|
405
|
+
"name": "Lamp-Top",
|
|
406
|
+
"displayName": "Lamp-Top",
|
|
407
|
+
"extendedType": 2,
|
|
408
|
+
"active": "N",
|
|
409
|
+
"used": "Y",
|
|
410
|
+
"group": 0
|
|
411
|
+
},
|
|
431
412
|
{
|
|
432
413
|
"logicalNodeAddress": 3,
|
|
433
414
|
"logicalAddress": 4,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-smartsystem",
|
|
3
3
|
"displayname": "Duotecno Bridge",
|
|
4
|
-
"version": "6.3.
|
|
4
|
+
"version": "6.3.4",
|
|
5
5
|
"description": "SmartServer (Proxy Websockets to TCP sockets, Smappee MQTT, Duotecno IP Nodes, Homekit interface)",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"author": "Johan Coppieters",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "DEBUG=* homebridge -D -P '/Users/johan/Development/duotecno/smartsocket'",
|
|
12
|
-
"watch": "npx tsc --build . --watch"
|
|
12
|
+
"watch": "npx tsc --build . --watch",
|
|
13
|
+
"publish": "npx tsc --build && npm i && npm publish"
|
|
13
14
|
},
|
|
14
15
|
"engines": {
|
|
15
16
|
"node": ">=14.18.1",
|
package/server/smappee.js
CHANGED
|
@@ -280,9 +280,14 @@ class Smappee extends powerbase_1.PowerBase {
|
|
|
280
280
|
if ((typeof currState === "boolean") && (state != currState)) {
|
|
281
281
|
// do we need to do this? do we get an mqtt status message ??
|
|
282
282
|
this.plugs[plugNr].value = currState;
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
if (this.client) {
|
|
284
|
+
const topic = 'servicelocation/' + this.config.uid + '/plug/' + plugNr + '/setstate';
|
|
285
|
+
const payload = '{"value": "' + ((state) ? "ON" : "OFF") + '", "since": "' + (new Date().getTime()) + '"}';
|
|
286
|
+
this.client.publish(topic, payload);
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
(0, logger_1.err)("smappee", "no open connection (yet?) to " + this.config.uid + " on " + this.config.address);
|
|
290
|
+
}
|
|
286
291
|
}
|
|
287
292
|
}
|
|
288
293
|
}
|
package/server/smappee.ts
CHANGED
|
@@ -296,9 +296,13 @@ export class Smappee extends PowerBase {
|
|
|
296
296
|
// do we need to do this? do we get an mqtt status message ??
|
|
297
297
|
this.plugs[plugNr].value = currState;
|
|
298
298
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
299
|
+
if (this.client) {
|
|
300
|
+
const topic = 'servicelocation/' + this.config.uid + '/plug/' + plugNr + '/setstate';
|
|
301
|
+
const payload = '{"value": "' + ((state) ? "ON" : "OFF") + '", "since": "' + (new Date().getTime()) + '"}';
|
|
302
|
+
this.client.publish(topic, payload);
|
|
303
|
+
} else {
|
|
304
|
+
err("smappee", "no open connection (yet?) to " + this.config.uid + " on " + this.config.address);
|
|
305
|
+
}
|
|
302
306
|
}
|
|
303
307
|
}
|
|
304
308
|
|