node-red-contrib-dmx-for-ha 0.1.6 → 0.1.8
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/ha-mqtt-button.html +2 -0
- package/nodes/ha-mqtt-button.js +8 -3
- package/nodes/ha-mqtt-dmx-group.html +2 -10
- package/nodes/ha-mqtt-dmx-group.js +7 -2
- package/nodes/ha-mqtt-dmx.js +7 -2
- package/nodes/ha-mqtt-pir.html +2 -0
- package/nodes/ha-mqtt-pir.js +7 -2
- package/nodes/ha-mqtt-relay.html +2 -0
- package/nodes/ha-mqtt-relay.js +7 -2
- package/package.json +1 -1
package/nodes/ha-mqtt-button.js
CHANGED
|
@@ -30,9 +30,14 @@ module.exports = function (RED) {
|
|
|
30
30
|
// Small delay to allow broker connection to stabilise
|
|
31
31
|
setTimeout(function () {
|
|
32
32
|
handleDeviceAdd();
|
|
33
|
-
},
|
|
33
|
+
}, 1500);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
// Auto-discover if broker already connected on deploy
|
|
37
|
+
if (broker.connected) {
|
|
38
|
+
autoDiscover();
|
|
39
|
+
}
|
|
40
|
+
// Or wait for broker to connect
|
|
36
41
|
broker.on('connect', function () {
|
|
37
42
|
autoDiscover();
|
|
38
43
|
});
|
|
@@ -96,7 +101,7 @@ module.exports = function (RED) {
|
|
|
96
101
|
name: `${S.buttonPosition} button ${S.situation} the ${cfg.zone} ${S.area} ${S.subLocation}`,
|
|
97
102
|
stat_t: statTopic,
|
|
98
103
|
off_delay: S.holdTime,
|
|
99
|
-
enabled_by_default:
|
|
104
|
+
enabled_by_default: (discoveryMode !== 'hidden'),
|
|
100
105
|
icon: S.haIcon,
|
|
101
106
|
device: {
|
|
102
107
|
identifiers: `binary_sensor-${fixtureId}`,
|
|
@@ -118,7 +123,7 @@ module.exports = function (RED) {
|
|
|
118
123
|
name: `${S.buttonPosition} (UI) ${S.situation} the ${cfg.zone} ${S.area} ${S.subLocation}`,
|
|
119
124
|
cmd_t: uiBtnCmdTopic,
|
|
120
125
|
payload_press: 'PRESS',
|
|
121
|
-
enabled_by_default:
|
|
126
|
+
enabled_by_default: (discoveryMode !== 'hidden'),
|
|
122
127
|
icon: S.haIcon,
|
|
123
128
|
device: { identifiers: `binary_sensor-${fixtureId}` },
|
|
124
129
|
};
|
|
@@ -163,14 +163,7 @@
|
|
|
163
163
|
</div>
|
|
164
164
|
|
|
165
165
|
<!-- CONFIG -->
|
|
166
|
-
|
|
167
|
-
<label for="node-input-config">
|
|
168
|
-
<i class="fa fa-cog"></i> Config
|
|
169
|
-
</label>
|
|
170
|
-
<input type="text" id="node-input-config" />
|
|
171
|
-
</div>
|
|
172
|
-
|
|
173
|
-
<!-- Discovery Mode -->
|
|
166
|
+
<!-- Discovery Mode -->
|
|
174
167
|
<div class="form-row">
|
|
175
168
|
<label for="node-input-discoveryMode">
|
|
176
169
|
<i class="fa fa-toggle-on"></i> Discovery Mode
|
|
@@ -186,7 +179,6 @@
|
|
|
186
179
|
</div>
|
|
187
180
|
</div>
|
|
188
181
|
|
|
189
|
-
|
|
190
182
|
<hr/>
|
|
191
183
|
|
|
192
184
|
<!-- ── GROUP (* Required) ────────────────────────────────── -->
|
|
@@ -277,6 +269,7 @@
|
|
|
277
269
|
</div>
|
|
278
270
|
|
|
279
271
|
<!-- CONFIG -->
|
|
272
|
+
<!-- Area -->
|
|
280
273
|
<div class="form-row">
|
|
281
274
|
<label for="node-input-config">
|
|
282
275
|
<i class="fa fa-cog"></i> Config
|
|
@@ -284,7 +277,6 @@
|
|
|
284
277
|
<input type="text" id="node-input-config" />
|
|
285
278
|
</div>
|
|
286
279
|
|
|
287
|
-
<!-- Area -->
|
|
288
280
|
<div class="form-row">
|
|
289
281
|
<label for="node-input-area">
|
|
290
282
|
<i class="fa fa-map-marker"></i> Area
|
|
@@ -33,9 +33,14 @@ module.exports = function (RED) {
|
|
|
33
33
|
// Small delay to allow broker connection to stabilise
|
|
34
34
|
setTimeout(function () {
|
|
35
35
|
handleDeviceAdd();
|
|
36
|
-
},
|
|
36
|
+
}, 1500);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
// Auto-discover if broker already connected on deploy
|
|
40
|
+
if (broker.connected) {
|
|
41
|
+
autoDiscover();
|
|
42
|
+
}
|
|
43
|
+
// Or wait for broker to connect
|
|
39
44
|
broker.on('connect', function () {
|
|
40
45
|
autoDiscover();
|
|
41
46
|
});
|
|
@@ -180,7 +185,7 @@ module.exports = function (RED) {
|
|
|
180
185
|
schema: 'json',
|
|
181
186
|
object_id: objectId,
|
|
182
187
|
optimistic: false,
|
|
183
|
-
enabled_by_default:
|
|
188
|
+
enabled_by_default: (discoveryMode !== 'hidden'),
|
|
184
189
|
icon: S.haIcon,
|
|
185
190
|
supported_color_modes: [S.colorMode],
|
|
186
191
|
brightness: true,
|
package/nodes/ha-mqtt-dmx.js
CHANGED
|
@@ -40,9 +40,14 @@ module.exports = function (RED) {
|
|
|
40
40
|
// Small delay to allow broker connection to stabilise
|
|
41
41
|
setTimeout(function () {
|
|
42
42
|
handleDeviceAdd();
|
|
43
|
-
},
|
|
43
|
+
}, 1500);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
// Auto-discover if broker already connected on deploy
|
|
47
|
+
if (broker.connected) {
|
|
48
|
+
autoDiscover();
|
|
49
|
+
}
|
|
50
|
+
// Or wait for broker to connect
|
|
46
51
|
broker.on('connect', function () {
|
|
47
52
|
autoDiscover();
|
|
48
53
|
});
|
|
@@ -438,7 +443,7 @@ module.exports = function (RED) {
|
|
|
438
443
|
schema: 'json',
|
|
439
444
|
object_id: objectId,
|
|
440
445
|
optimistic: false,
|
|
441
|
-
enabled_by_default:
|
|
446
|
+
enabled_by_default: (discoveryMode !== 'hidden'),
|
|
442
447
|
icon: S.haIcon,
|
|
443
448
|
supported_color_modes: [S.colorMode],
|
|
444
449
|
brightness: true,
|
package/nodes/ha-mqtt-pir.html
CHANGED
package/nodes/ha-mqtt-pir.js
CHANGED
|
@@ -30,9 +30,14 @@ module.exports = function (RED) {
|
|
|
30
30
|
// Small delay to allow broker connection to stabilise
|
|
31
31
|
setTimeout(function () {
|
|
32
32
|
handleDeviceAdd();
|
|
33
|
-
},
|
|
33
|
+
}, 1500);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
// Auto-discover if broker already connected on deploy
|
|
37
|
+
if (broker.connected) {
|
|
38
|
+
autoDiscover();
|
|
39
|
+
}
|
|
40
|
+
// Or wait for broker to connect
|
|
36
41
|
broker.on('connect', function () {
|
|
37
42
|
autoDiscover();
|
|
38
43
|
});
|
|
@@ -137,7 +142,7 @@ module.exports = function (RED) {
|
|
|
137
142
|
payload_not_available: 'offline',
|
|
138
143
|
off_delay: S.holdTime,
|
|
139
144
|
device_class: 'motion',
|
|
140
|
-
enabled_by_default:
|
|
145
|
+
enabled_by_default: (discoveryMode !== 'hidden'),
|
|
141
146
|
icon: S.haIcon,
|
|
142
147
|
device: {
|
|
143
148
|
identifiers: `binary_sensor-${fixtureId}`,
|
package/nodes/ha-mqtt-relay.html
CHANGED
package/nodes/ha-mqtt-relay.js
CHANGED
|
@@ -33,9 +33,14 @@ module.exports = function (RED) {
|
|
|
33
33
|
// Small delay to allow broker connection to stabilise
|
|
34
34
|
setTimeout(function () {
|
|
35
35
|
handleDeviceAdd();
|
|
36
|
-
},
|
|
36
|
+
}, 1500);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
// Auto-discover if broker already connected on deploy
|
|
40
|
+
if (broker.connected) {
|
|
41
|
+
autoDiscover();
|
|
42
|
+
}
|
|
43
|
+
// Or wait for broker to connect
|
|
39
44
|
broker.on('connect', function () {
|
|
40
45
|
autoDiscover();
|
|
41
46
|
});
|
|
@@ -211,7 +216,7 @@ module.exports = function (RED) {
|
|
|
211
216
|
cmd_t: cmdTopic,
|
|
212
217
|
stat_t: statTopic,
|
|
213
218
|
optimistic: false,
|
|
214
|
-
enabled_by_default:
|
|
219
|
+
enabled_by_default: (discoveryMode !== 'hidden'),
|
|
215
220
|
icon: S.haIcon,
|
|
216
221
|
supported_color_modes: ['onoff'],
|
|
217
222
|
brightness: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-dmx-for-ha",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "DMX lighting control for Home Assistant via Node-RED and MQTT. Place a node, fill in the settings, deploy. Full HA device registry integration with RGBW/RGBWW/CCT/brightness colour modes, transitions, effects, and group control.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node-red",
|