smart-nodes 0.1.0 → 0.2.0
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
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
The smart nodes was created to control smart home devices like lights, power outlets shutter and some more.
|
|
4
4
|
This controls are designed to work with the [node-red-contrib-knx-ultimate](https://github.com/Supergiovane/node-red-contrib-knx-ultimate) but it could also work with other smart technologies.
|
|
5
5
|
|
|
6
|
+
The knx binary input and output/switching modules should be configured very stupid. Closing a binary input should output 1 and releasing 0.
|
|
7
|
+
Same for the output/switching modules, 1 should turn on and 0 turn out. That makes it easy to count the presses or check for short and long presses.
|
|
8
|
+
Some node has to filter out the binary inputs if they goes to 0 or in other words, if `msg.payload == false`. Please see the internal node documentation then this signals are ignored. As an example sending a toggle topic for closing an input and also for releasing would toggle a light twice.
|
|
9
|
+
|
|
6
10
|
Sometimes one source node should be connected to multiple smart nodes which requires different topics.
|
|
7
11
|
To avoid requiring many change nodes, the smart node are using a special `msg.topic` notation. You can always send topics in the format `name#number`, e.g. `toggle#1`.
|
|
8
12
|
Smart nodes that requires a name are using only the name part. the # and the number are optional. Smart nodes that requries a number will only use the number, the name and # is also optional.
|
|
@@ -122,6 +126,3 @@ This control can send a defined message on defined times.
|
|
|
122
126
|
* The scheduler can be activated or deactivated in runtime.
|
|
123
127
|
* The state can be saved between NodeRed restarts.
|
|
124
128
|
* The last message can automatically be sent 10 seconds after a deployment.
|
|
125
|
-
|
|
126
|
-
# Create node package
|
|
127
|
-
run `node pack` to create a new *.tgz node module.
|
|
@@ -265,6 +265,7 @@
|
|
|
265
265
|
<tr>
|
|
266
266
|
<th>Topic</th>
|
|
267
267
|
<th>Beschreibung</th>
|
|
268
|
+
<th>msg.payload == false wird ignoriert</th>
|
|
268
269
|
</tr>
|
|
269
270
|
</thead>
|
|
270
271
|
<tbody>
|
|
@@ -274,14 +275,17 @@
|
|
|
274
275
|
Gibt über <code>msg.payload = true</code> oder <code>msg.payload = false</code> den aktuellen Status des Ausgangs an.<br/>
|
|
275
276
|
Bei einem Wechsel von ausgeschaltet nach eingeschaltet wird die Zeitmessung für die hinterlegte, bzw. mitgesendete Zeit gestartet, sofern vorhanden.
|
|
276
277
|
</td>
|
|
278
|
+
<td>Nein</td>
|
|
277
279
|
</tr>
|
|
278
280
|
<tr>
|
|
279
281
|
<td><code>on</code></td>
|
|
280
282
|
<td>Schaltet den Ausgang ein und startet die Zeitmessung für die hinterlegte, bzw. mitgesendete Zeit gestartet, sofern vorhanden.</td>
|
|
283
|
+
<td>Ja</td>
|
|
281
284
|
</tr>
|
|
282
285
|
<tr>
|
|
283
286
|
<td><code>off</code></td>
|
|
284
287
|
<td>Schaltet den Ausgang aus.</td>
|
|
288
|
+
<td>Ja</td>
|
|
285
289
|
</tr>
|
|
286
290
|
<tr>
|
|
287
291
|
<td><code>set</code></td>
|
|
@@ -289,6 +293,7 @@
|
|
|
289
293
|
Schaltet den Ausgang bei <code>msg.payload = true</code> ein und bei <code>msg.payload = false</code> aus.<br/>
|
|
290
294
|
Bei einem Wechsel von ausgeschaltet nach eingeschaltet wird die Zeitmessung für die hinterlegte, bzw. mitgesendete Zeit gestartet, sofern vorhanden.
|
|
291
295
|
</td>
|
|
296
|
+
<td>Nein</td>
|
|
292
297
|
</tr>
|
|
293
298
|
<tr>
|
|
294
299
|
<td><code>set_permanent</code></td>
|
|
@@ -296,6 +301,7 @@
|
|
|
296
301
|
Schaltet den Ausgang bei <code>msg.payload = true</code> dauerhaft ein und bei <code>msg.payload = false</code> aus.<br/>
|
|
297
302
|
Es wird dabei keine Zeitmessung gestartet.
|
|
298
303
|
</td>
|
|
304
|
+
<td>Nein</td>
|
|
299
305
|
</tr>
|
|
300
306
|
<tr>
|
|
301
307
|
<td><code>motion</code></td>
|
|
@@ -304,10 +310,12 @@
|
|
|
304
310
|
Bei <code>msg.payload = false</code> wird die Zeitmessung für die hinterlegte, bzw. mitgesendete Zeit gestartet, sofern vorhanden.<br/>
|
|
305
311
|
Ist keine Zeit angegeben oder hinterlegt, schaltet sich der Ausgang sofort aus.
|
|
306
312
|
</td>
|
|
313
|
+
<td>Nein</td>
|
|
307
314
|
</tr>
|
|
308
315
|
<tr>
|
|
309
316
|
<td><code>alarm</code></td>
|
|
310
317
|
<td>Setzt den aktuellen Alarmzustand auf den Wert von <code>msg.payload</code> und löst die entsprechende Aktion aus.</td>
|
|
318
|
+
<td>Nein</td>
|
|
311
319
|
</tr>
|
|
312
320
|
<tr>
|
|
313
321
|
<td><code>toggle</code> (default)</td>
|
|
@@ -315,6 +323,7 @@
|
|
|
315
323
|
Schaltet den Ausgang abwechselnd ein und aus.<br/>
|
|
316
324
|
Bei einem Wechsel von ausgeschaltet nach eingeschaltet wird die Zeitmessung für die hinterlegte, bzw. mitgesendete Zeit gestartet, sofern vorhanden.
|
|
317
325
|
</td>
|
|
326
|
+
<td>Ja</td>
|
|
318
327
|
</tr>
|
|
319
328
|
</tbody>
|
|
320
329
|
</table>
|
|
@@ -62,10 +62,18 @@ module.exports = function (RED)
|
|
|
62
62
|
break;
|
|
63
63
|
|
|
64
64
|
case "off":
|
|
65
|
+
// If button is released, don't handle this message
|
|
66
|
+
if (msg.payload === false)
|
|
67
|
+
return;
|
|
68
|
+
|
|
65
69
|
nodeSettings.last_value = false;
|
|
66
70
|
break;
|
|
67
71
|
|
|
68
72
|
case "on":
|
|
73
|
+
// If button is released, don't handle this message
|
|
74
|
+
if (msg.payload === false)
|
|
75
|
+
return;
|
|
76
|
+
|
|
69
77
|
nodeSettings.last_value = true;
|
|
70
78
|
break;
|
|
71
79
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smart-nodes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Smart Nodes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node-red",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"repository": {
|
|
49
49
|
"type": "git",
|
|
50
|
-
"url": "https://github.com/
|
|
50
|
+
"url": "https://github.com/BergenSoft/smart-nodes"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {},
|
|
53
53
|
"devDependencies": {
|
|
@@ -253,40 +253,54 @@
|
|
|
253
253
|
<tr>
|
|
254
254
|
<th>Topic</th>
|
|
255
255
|
<th>Beschreibung</th>
|
|
256
|
+
<th>msg.payload == false wird ignoriert</th>
|
|
256
257
|
</tr>
|
|
257
258
|
</thead>
|
|
258
259
|
<tbody>
|
|
259
260
|
<tr>
|
|
260
261
|
<td><code>up_stop</code></td>
|
|
261
262
|
<td>Sendet abwechselnd einen Stop- und einen Hochfahrbefehl.</td>
|
|
263
|
+
<td>Ja</td>
|
|
262
264
|
</tr>
|
|
263
265
|
<tr>
|
|
264
|
-
<td><code>
|
|
265
|
-
<td>Sendet einen
|
|
266
|
+
<td><code>up</code></td>
|
|
267
|
+
<td>Sendet einen Hochfahrbefehl, falls der Rollladen nicht bereits nach oben fährt. Ggf. wird vorher noch ein Stop-Befehl gesendet und die eingestellte Zeit gewartet.</td>
|
|
268
|
+
<td>Ja</td>
|
|
266
269
|
</tr>
|
|
267
270
|
<tr>
|
|
268
271
|
<td><code>down_stop</code></td>
|
|
269
272
|
<td>Sendet abwechselnd einen Stop- und einen Runterfahrbefehl.</td>
|
|
273
|
+
<td>Ja</td>
|
|
274
|
+
</tr>
|
|
275
|
+
<tr>
|
|
276
|
+
<td><code>down</code></td>
|
|
277
|
+
<td>Sendet einen Runterfahrbefehl, falls der Rollladen nicht bereits nach unten fährt. Ggf. wird vorher noch ein Stop-Befehl gesendet und die eingestellte Zeit gewartet.</td>
|
|
278
|
+
<td>Ja</td>
|
|
270
279
|
</tr>
|
|
271
280
|
<tr>
|
|
272
281
|
<td><code>up_down</code></td>
|
|
273
282
|
<td>Nimmt einen Befehl von Home Assistant entgegen und leitet die entsprechende Aktion ein.</td>
|
|
283
|
+
<td>Nein</td>
|
|
274
284
|
</tr>
|
|
275
285
|
<tr>
|
|
276
286
|
<td><code>stop</code></td>
|
|
277
287
|
<td>Sendet einen Stopbefehl.</td>
|
|
288
|
+
<td>Ja</td>
|
|
278
289
|
</tr>
|
|
279
290
|
<tr>
|
|
280
291
|
<td><code>position</code></td>
|
|
281
292
|
<td>Sendet einen Positionsbefehl. <code>msg.payload</code> sollte ein Wert zwischen 0 (offen) und 100 (geschlossen) haben.</td>
|
|
293
|
+
<td>Nein</td>
|
|
282
294
|
</tr>
|
|
283
295
|
<tr>
|
|
284
296
|
<td><code>alarm</code></td>
|
|
285
297
|
<td>Setzt den aktuellen Alarmzustand.</td>
|
|
298
|
+
<td>Nein</td>
|
|
286
299
|
</tr>
|
|
287
300
|
<tr>
|
|
288
301
|
<td><code>toggle</code> (default)</td>
|
|
289
302
|
<td>Schaltet den Rollladen abwechselnd auf hoch, stop, runter, stop.</td>
|
|
303
|
+
<td>Ja</td>
|
|
290
304
|
</tr>
|
|
291
305
|
</tbody>
|
|
292
306
|
</table>
|
|
@@ -194,6 +194,7 @@
|
|
|
194
194
|
<tr>
|
|
195
195
|
<th>Topic</th>
|
|
196
196
|
<th>Beschreibung</th>
|
|
197
|
+
<th>msg.payload == false wird ignoriert</th>
|
|
197
198
|
</tr>
|
|
198
199
|
</thead>
|
|
199
200
|
<tbody>
|
|
@@ -211,34 +212,42 @@
|
|
|
211
212
|
Nimmt einen Befehl von Home Assistant entgegen um informiert zu werden ob der Rollladen läuft und in welche Richtung.<br/>
|
|
212
213
|
<strong>Wichtig:</strong> Dieses Topic startet den Rollladen <u>nicht</u>, da die Gruppenadresse direkt mit dem Jalousiemodul verbunden sein muss.
|
|
213
214
|
</td>
|
|
215
|
+
<td>Nein</td>
|
|
214
216
|
</tr>
|
|
215
217
|
<tr>
|
|
216
218
|
<td><code>up</code></td>
|
|
217
219
|
<td>Sendet einen Hochfahrbefehl, falls der Rollladen nicht bereits nach oben fährt. Ggf. wird vorher noch ein Stop-Befehl gesendet.</td>
|
|
220
|
+
<td>Ja</td>
|
|
218
221
|
</tr>
|
|
219
222
|
<tr>
|
|
220
223
|
<td><code>up_stop</code></td>
|
|
221
224
|
<td>Sendet abwechselnd einen Stop- und einen Hochfahrbefehl.</td>
|
|
225
|
+
<td>Ja</td>
|
|
222
226
|
</tr>
|
|
223
227
|
<tr>
|
|
224
228
|
<td><code>down</code></td>
|
|
225
229
|
<td>Sendet einen Runterfahrbefehl, falls der Rollladen nicht bereits nach unten fährt. Ggf. wird vorher noch ein Stop-Befehl gesendet.</td>
|
|
230
|
+
<td>Ja</td>
|
|
226
231
|
</tr>
|
|
227
232
|
<tr>
|
|
228
233
|
<td><code>down_stop</code></td>
|
|
229
234
|
<td>Sendet abwechselnd einen Stop- und einen Runterfahrbefehl.</td>
|
|
235
|
+
<td>Ja</td>
|
|
230
236
|
</tr>
|
|
231
237
|
<tr>
|
|
232
238
|
<td><code>stop</code></td>
|
|
233
239
|
<td>Sendet einen Stopbefehl.</td>
|
|
240
|
+
<td>Ja</td>
|
|
234
241
|
</tr>
|
|
235
242
|
<tr>
|
|
236
243
|
<td><code>position</code></td>
|
|
237
244
|
<td>Sendet einen Positionsbefehl. <code>msg.payload</code> sollte ein Wert zwischen 0 (offen) und 100 (geschlossen) haben.</td>
|
|
245
|
+
<td>Nein</td>
|
|
238
246
|
</tr>
|
|
239
247
|
<tr>
|
|
240
248
|
<td><code>toggle</code> (default)</td>
|
|
241
249
|
<td>Schaltet den Rollladen abwechselnd auf hoch, stop, runter, stop.</td>
|
|
250
|
+
<td>Ja</td>
|
|
242
251
|
</tr>
|
|
243
252
|
</tbody>
|
|
244
253
|
</table>
|