node-red-contrib-alice 2.2.1 → 2.2.3
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/nodes/alice-mode.js +1 -0
- package/nodes/alice-onoff.html +7 -6
- package/nodes/alice-onoff.js +4 -7
- package/nodes/alice-range.js +1 -0
- package/package.json +2 -2
package/nodes/alice-mode.js
CHANGED
package/nodes/alice-onoff.html
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
device: {value:"", type:"alice-device"},
|
|
6
6
|
name: {value:""},
|
|
7
7
|
retrievable: {value:true},
|
|
8
|
-
response:{value:true}
|
|
8
|
+
response:{value:true},
|
|
9
|
+
split: {value:false}
|
|
9
10
|
},
|
|
10
11
|
inputs:1,
|
|
11
12
|
outputs:1,
|
|
@@ -18,8 +19,8 @@
|
|
|
18
19
|
if (this.response === undefined){
|
|
19
20
|
$( "#node-input-response").prop('checked', true);
|
|
20
21
|
};
|
|
21
|
-
if (this.retrievable ===
|
|
22
|
-
$( "#node-input-
|
|
22
|
+
if (this.retrievable === false){
|
|
23
|
+
$( "#node-input-split").prop('checked', true);
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
26
|
oneditsave: function(){
|
|
@@ -36,9 +37,9 @@
|
|
|
36
37
|
<input id="node-input-device">
|
|
37
38
|
</div>
|
|
38
39
|
<div class="form-row">
|
|
39
|
-
<label for="node-input-
|
|
40
|
-
<label for="node-input-
|
|
41
|
-
<input type="checkbox" id="node-input-
|
|
40
|
+
<label for="node-input-split"><i class="fa fa-power-off"></i> <span >Split button</span></label>
|
|
41
|
+
<label for="node-input-split" style="width:70%">
|
|
42
|
+
<input type="checkbox" id="node-input-split" style="display:inline-block; width:22px; vertical-align:baseline;" autocomplete="off"><span>Split On/Off button</span>
|
|
42
43
|
</label>
|
|
43
44
|
</div>
|
|
44
45
|
<div class="form-row">
|
package/nodes/alice-onoff.js
CHANGED
|
@@ -9,8 +9,7 @@ function AliceOnOff(config){
|
|
|
9
9
|
const ctype = 'devices.capabilities.on_off';
|
|
10
10
|
const instance = 'on';
|
|
11
11
|
let response = config.response;
|
|
12
|
-
let
|
|
13
|
-
let split = false;
|
|
12
|
+
let split = config.split;
|
|
14
13
|
let initState = false;
|
|
15
14
|
let curentState = {
|
|
16
15
|
type:ctype,
|
|
@@ -23,10 +22,7 @@ function AliceOnOff(config){
|
|
|
23
22
|
if (config.response === undefined){
|
|
24
23
|
response = true;
|
|
25
24
|
};
|
|
26
|
-
if (config.retrievable
|
|
27
|
-
retrievable = true;
|
|
28
|
-
};
|
|
29
|
-
if (!retrievable){
|
|
25
|
+
if (!config.retrievable){
|
|
30
26
|
split = true;
|
|
31
27
|
};
|
|
32
28
|
|
|
@@ -36,7 +32,8 @@ function AliceOnOff(config){
|
|
|
36
32
|
this.debug("Starting capability initilization ...");
|
|
37
33
|
let capab = {
|
|
38
34
|
type: ctype,
|
|
39
|
-
retrievable:
|
|
35
|
+
retrievable: true,
|
|
36
|
+
reportable: true,
|
|
40
37
|
parameters: {
|
|
41
38
|
instance: instance,
|
|
42
39
|
split: split
|
package/nodes/alice-range.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-alice",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "alice.js",
|
|
6
6
|
"scripts": {
|
|
@@ -43,6 +43,6 @@
|
|
|
43
43
|
"homepage": "https://github.com/efa2000/node-red-contrib-alice#readme",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"axios": "^1.4.0",
|
|
46
|
-
"mqtt": "^4.3.
|
|
46
|
+
"mqtt": "^4.3.8"
|
|
47
47
|
}
|
|
48
48
|
}
|