node-red-contrib-dmx-for-ha 0.2.3 → 0.2.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/nodes/ha-mqtt-button.js
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
// ============================================================
|
|
6
6
|
|
|
7
7
|
module.exports = function (RED) {
|
|
8
|
+
// Package version — read once at module load
|
|
9
|
+
const PKG_VERSION = require('path').join(__dirname, '../package.json');
|
|
10
|
+
const _pkgVer = (() => { try { return require(PKG_VERSION).version; } catch(e) { return '?'; } })();
|
|
11
|
+
|
|
8
12
|
|
|
9
13
|
function HaMqttButtonNode(config) {
|
|
10
14
|
RED.nodes.createNode(this, config);
|
|
@@ -130,7 +134,7 @@ module.exports = function (RED) {
|
|
|
130
134
|
suggested_area: discoveryMode !== 'hidden' ? `${cfg.zone} ${S.area} ${S.subLocation}` : undefined,
|
|
131
135
|
hw_version: `Wall button — ${S.ledColor} LED. Publishes "${S.buttonPayload}" on topic: ${S.subscribeTopic}`,
|
|
132
136
|
serial_number: `(${fixtureId}) Payload: ${S.buttonPayload}`,
|
|
133
|
-
sw_version:
|
|
137
|
+
sw_version: `ha-mqtt-button: ${_pkgVer}`,
|
|
134
138
|
manufacturer: 'DeSwaggy — Discord: @deswaggy',
|
|
135
139
|
},
|
|
136
140
|
};
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
// ============================================================
|
|
9
9
|
|
|
10
10
|
module.exports = function (RED) {
|
|
11
|
+
// Package version — read once at module load
|
|
12
|
+
const PKG_VERSION = require('path').join(__dirname, '../package.json');
|
|
13
|
+
const _pkgVer = (() => { try { return require(PKG_VERSION).version; } catch(e) { return '?'; } })();
|
|
14
|
+
|
|
11
15
|
|
|
12
16
|
function HaMqttDmxGroupNode(config) {
|
|
13
17
|
RED.nodes.createNode(this, config);
|
|
@@ -200,7 +204,7 @@ module.exports = function (RED) {
|
|
|
200
204
|
}
|
|
201
205
|
|
|
202
206
|
const discovery = {
|
|
203
|
-
unique_id:
|
|
207
|
+
unique_id: groupId,
|
|
204
208
|
schema: 'json',
|
|
205
209
|
object_id: objectId,
|
|
206
210
|
optimistic: false,
|
|
@@ -225,7 +229,7 @@ module.exports = function (RED) {
|
|
|
225
229
|
model_id: `referenced on plan as: (${groupId}`,
|
|
226
230
|
suggested_area: discoveryMode !== 'hidden' ? `${cfg.zone} ${S.area} ${S.subLocation}` : undefined,
|
|
227
231
|
hw_version: 'Virtual fixture — exists as a DMX Group Node in Node-RED',
|
|
228
|
-
sw_version: 'ha-mqtt-dmx-group:
|
|
232
|
+
sw_version: 'ha-mqtt-dmx-group: ' + _pkgVer,
|
|
229
233
|
manufacturer: 'DeSwaggy — Discord: @deswaggy',
|
|
230
234
|
},
|
|
231
235
|
};
|
package/nodes/ha-mqtt-dmx.js
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
// ============================================================
|
|
6
6
|
|
|
7
7
|
module.exports = function (RED) {
|
|
8
|
+
// Package version — read once at module load
|
|
9
|
+
const PKG_VERSION = require('path').join(__dirname, '../package.json');
|
|
10
|
+
const _pkgVer = (() => { try { return require(PKG_VERSION).version; } catch(e) { return '?'; } })();
|
|
11
|
+
|
|
8
12
|
|
|
9
13
|
// ── Gamma correction table ────────────────────────────────────
|
|
10
14
|
// Pre-computed CIE 1931 gamma 2.2 lookup — 0..255 → 0..255
|
|
@@ -458,7 +462,7 @@ module.exports = function (RED) {
|
|
|
458
462
|
] : [];
|
|
459
463
|
|
|
460
464
|
const discovery = {
|
|
461
|
-
unique_id:
|
|
465
|
+
unique_id: fixtureId,
|
|
462
466
|
schema: 'json',
|
|
463
467
|
object_id: objectId,
|
|
464
468
|
optimistic: false,
|
|
@@ -484,7 +488,7 @@ module.exports = function (RED) {
|
|
|
484
488
|
suggested_area: discoveryMode !== 'hidden' ? `${cfg.zone} ${S.area} ${S.subLocation}` : undefined,
|
|
485
489
|
hw_version: `DMX Controller in ${cfg.zone}. MQTT: ${dmxTopic}`,
|
|
486
490
|
serial_number: fixtureId,
|
|
487
|
-
sw_version: 'ha-mqtt-dmx:
|
|
491
|
+
sw_version: 'ha-mqtt-dmx: ' + _pkgVer,
|
|
488
492
|
manufacturer: 'DeSwaggy — Discord: @deswaggy',
|
|
489
493
|
},
|
|
490
494
|
};
|
package/nodes/ha-mqtt-pir.js
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
// ============================================================
|
|
6
6
|
|
|
7
7
|
module.exports = function (RED) {
|
|
8
|
+
// Package version — read once at module load
|
|
9
|
+
const PKG_VERSION = require('path').join(__dirname, '../package.json');
|
|
10
|
+
const _pkgVer = (() => { try { return require(PKG_VERSION).version; } catch(e) { return '?'; } })();
|
|
11
|
+
|
|
8
12
|
|
|
9
13
|
function HaMqttPirNode(config) {
|
|
10
14
|
RED.nodes.createNode(this, config);
|
|
@@ -171,7 +175,7 @@ module.exports = function (RED) {
|
|
|
171
175
|
suggested_area: discoveryMode !== 'hidden' ? `${cfg.zone} ${S.area} ${S.subLocation}` : undefined,
|
|
172
176
|
hw_version: `${S.pirType} PIR — ${S.cableColor} Cat5 cable. Publishes "${S.pirPayload}" on topic: ${S.subscribeTopic}`,
|
|
173
177
|
serial_number: `(${fixtureId}) Payload: ${S.pirPayload}`,
|
|
174
|
-
sw_version: `ha-mqtt-pir: ${
|
|
178
|
+
sw_version: `ha-mqtt-pir: ${_pkgVer}`,
|
|
175
179
|
manufacturer: 'DeSwaggy — Discord: @deswaggy',
|
|
176
180
|
},
|
|
177
181
|
};
|
package/nodes/ha-mqtt-relay.js
CHANGED
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
// ============================================================
|
|
9
9
|
|
|
10
10
|
module.exports = function (RED) {
|
|
11
|
+
// Package version — read once at module load
|
|
12
|
+
const PKG_VERSION = require('path').join(__dirname, '../package.json');
|
|
13
|
+
const _pkgVer = (() => { try { return require(PKG_VERSION).version; } catch(e) { return '?'; } })();
|
|
14
|
+
|
|
11
15
|
|
|
12
16
|
function HaMqttRelayNode(config) {
|
|
13
17
|
RED.nodes.createNode(this, config);
|
|
@@ -228,7 +232,7 @@ module.exports = function (RED) {
|
|
|
228
232
|
}
|
|
229
233
|
|
|
230
234
|
const discovery = {
|
|
231
|
-
unique_id:
|
|
235
|
+
unique_id: fixtureId,
|
|
232
236
|
schema: 'json',
|
|
233
237
|
object_id: objectId,
|
|
234
238
|
name: `${S.deviceType} ${S.situation} the ${cfg.zone} ${S.area} ${S.subLocation}`,
|
|
@@ -251,7 +255,7 @@ module.exports = function (RED) {
|
|
|
251
255
|
suggested_area: discoveryMode !== 'hidden' ? `${cfg.zone} ${S.area} ${S.subLocation}` : undefined,
|
|
252
256
|
hw_version: `Relay Controller in ${cfg.zone}. Topic: ${relayTopic}`,
|
|
253
257
|
serial_number: fixtureId,
|
|
254
|
-
sw_version: 'ha-mqtt-relay:
|
|
258
|
+
sw_version: 'ha-mqtt-relay: ' + _pkgVer,
|
|
255
259
|
manufacturer: 'DeSwaggy — Discord: @deswaggy',
|
|
256
260
|
},
|
|
257
261
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-dmx-for-ha",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
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",
|