node-red-contrib-knx-ultimate 2.1.16 → 2.1.18

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/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@
6
6
 
7
7
  # CHANGELOG
8
8
 
9
+ <p>
10
+ <b>Version 2.1.18</b> - July 2023<br/>
11
+ - Quick fix for MDT and Wienzler interfaces.<br/>
12
+ - HUE light: added "invert" option to the Day/Night sensor.<br/>
13
+ - More verbose status for all nodes.<br/>
14
+ </p>
15
+ <p>
16
+ <b>Version 2.1.17</b> - July 2023<br/>
17
+ - Revamped UI of KNX-Ultimate device node.<br/>
18
+ - HUE light: added "invert" option to the Day/Night sensor.<br/>
19
+ - More verbose status for all nodes.<br/>
20
+ </p>
9
21
  <p>
10
22
  <b>Version 2.1.16</b> - June 2023<br/>
11
23
  - NEW: Hue scene. You can now call a HUE scene.<br/>
@@ -15,6 +27,7 @@
15
27
  - Enabled compatibility with KNX Virtual (BETA).<br/>
16
28
  - Continue migrating the Help from gitHub to the standard Node-Red help box. You could find some discrepancies in help text. Sorry for that.<br/>
17
29
  - **BREAKING CHANGE*** removed the emulation capability, because it's a complicated thing to mantain. If you don't know what it is, just don't care about that.<br/>
30
+ </p>
18
31
  <p>
19
32
  <b>Version 2.1.15</b> - June 2023<br/>
20
33
  - Fix an issue with auto discovery of not registered HUE bridges. Now you must first set the IP, then click CONNECT.<br/>
@@ -6,6 +6,10 @@
6
6
 
7
7
  # CHANGELOG
8
8
 
9
+ <p>
10
+ <b>Version 1.0.42</b> - July 2023<br/>
11
+ - Quick fix for MDT and Wienzler interfaces.<br/>
12
+ </p>
9
13
  <p>
10
14
  <b>Version 1.0.41</b> - July 2023<br/>
11
15
  - Enabled compatibility with KNX Virtual software (BETA).<br/>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "knxultimate",
3
3
  "description": "KNX IP protocol implementation for Node. This is the ENGINE of Node-Red KNX-Ultimate node.",
4
- "version": "1.0.41",
4
+ "version": "1.0.42",
5
5
  "engines": {
6
6
  "node": ">=14"
7
7
  },
@@ -1001,33 +1001,33 @@ class KNXClient extends EventEmitter {
1001
1001
  }
1002
1002
 
1003
1003
  _sendConnectRequestMessage(cri) {
1004
- try {
1005
- const oHPAI = new HPAI.HPAI(this._options.localSocketAddress.address, this._options.localSocketAddress.port, this._options.hostProtocol === 'TunnelTCP' ? KNXConstants.KNX_CONSTANTS.IPV4_TCP : KNXConstants.KNX_CONSTANTS.IPV4_UDP)
1006
- this.send(KNXProtocol.KNXProtocol.newKNXConnectRequest(cri, oHPAI, oHPAI))
1007
- } catch (error) {
1008
- this.send(KNXProtocol.KNXProtocol.newKNXConnectRequest(cri))
1009
- }
1010
- // this.send(KNXProtocol.KNXProtocol.newKNXConnectRequest(cri))
1004
+ // try {
1005
+ // const oHPAI = new HPAI.HPAI(this._options.localSocketAddress.address, this._options.localSocketAddress.port, this._options.hostProtocol === 'TunnelTCP' ? KNXConstants.KNX_CONSTANTS.IPV4_TCP : KNXConstants.KNX_CONSTANTS.IPV4_UDP)
1006
+ // this.send(KNXProtocol.KNXProtocol.newKNXConnectRequest(cri, oHPAI, oHPAI))
1007
+ // } catch (error) {
1008
+ // this.send(KNXProtocol.KNXProtocol.newKNXConnectRequest(cri))
1009
+ // }
1010
+ this.send(KNXProtocol.KNXProtocol.newKNXConnectRequest(cri))
1011
1011
  }
1012
1012
 
1013
1013
  _sendConnectionStateRequestMessage(channelID) {
1014
- try {
1015
- const oHPAI = new HPAI.HPAI(this._options.localSocketAddress.address, this._options.localSocketAddress.port, this._options.hostProtocol === 'TunnelTCP' ? KNXConstants.KNX_CONSTANTS.IPV4_TCP : KNXConstants.KNX_CONSTANTS.IPV4_UDP)
1016
- this.send(KNXProtocol.KNXProtocol.newKNXConnectionStateRequest(channelID, oHPAI))
1017
- } catch (error) {
1018
- this.send(KNXProtocol.KNXProtocol.newKNXConnectionStateRequest(channelID))
1019
- }
1020
- //this.send(KNXProtocol.KNXProtocol.newKNXConnectionStateRequest(channelID))
1014
+ // try {
1015
+ // const oHPAI = new HPAI.HPAI(this._options.localSocketAddress.address, this._options.localSocketAddress.port, this._options.hostProtocol === 'TunnelTCP' ? KNXConstants.KNX_CONSTANTS.IPV4_TCP : KNXConstants.KNX_CONSTANTS.IPV4_UDP)
1016
+ // this.send(KNXProtocol.KNXProtocol.newKNXConnectionStateRequest(channelID, oHPAI))
1017
+ // } catch (error) {
1018
+ // this.send(KNXProtocol.KNXProtocol.newKNXConnectionStateRequest(channelID))
1019
+ // }
1020
+ this.send(KNXProtocol.KNXProtocol.newKNXConnectionStateRequest(channelID))
1021
1021
  }
1022
1022
 
1023
1023
  _sendDisconnectRequestMessage(channelID) {
1024
- try {
1025
- const oHPAI = new HPAI.HPAI(this._options.localSocketAddress.address, this._options.localSocketAddress.port, this._options.hostProtocol === 'TunnelTCP' ? KNXConstants.KNX_CONSTANTS.IPV4_TCP : KNXConstants.KNX_CONSTANTS.IPV4_UDP)
1026
- this.send(KNXProtocol.KNXProtocol.newKNXDisconnectRequest(channelID, oHPAI))
1027
- } catch (error) {
1028
- this.send(KNXProtocol.KNXProtocol.newKNXDisconnectRequest(channelID))
1029
- }
1030
- //this.send(KNXProtocol.KNXProtocol.newKNXDisconnectRequest(channelID))
1024
+ // try {
1025
+ // const oHPAI = new HPAI.HPAI(this._options.localSocketAddress.address, this._options.localSocketAddress.port, this._options.hostProtocol === 'TunnelTCP' ? KNXConstants.KNX_CONSTANTS.IPV4_TCP : KNXConstants.KNX_CONSTANTS.IPV4_UDP)
1026
+ // this.send(KNXProtocol.KNXProtocol.newKNXDisconnectRequest(channelID, oHPAI))
1027
+ // } catch (error) {
1028
+ // this.send(KNXProtocol.KNXProtocol.newKNXDisconnectRequest(channelID))
1029
+ // }
1030
+ this.send(KNXProtocol.KNXProtocol.newKNXDisconnectRequest(channelID))
1031
1031
  }
1032
1032
 
1033
1033
  _sendDisconnectResponseMessage(channelID, status = KNXConstants.ConnectionStatus.E_NO_ERROR) {
@@ -458,9 +458,8 @@
458
458
  </dt>
459
459
  </div>
460
460
  <div class="form-row" id="divNode-input-initialread">
461
- &nbsp;&nbsp;<label style="width:70%" for="node-input-initialread">
462
- <i class="fa fa-question-circle-o"></i>
463
- <span data-i18n="knxUltimate.properties.node-input-initialread"></span>
461
+ &nbsp;&nbsp;<label style="width:50%" for="node-input-initialread">
462
+ <i class="fa fa-question-circle-o"></i> Read status upon connection
464
463
  </label>
465
464
  <select style="width:100px" id="node-input-initialread">
466
465
  <option value=0 data-i18n="knxUltimate.properties.node-input-initialread0"></option>
@@ -610,12 +609,12 @@
610
609
  | Input msg passthrough | If set, you can pass the input mgs to the output msg. |
611
610
  | Output Type | *write* to send write telegram (usually, you want that), otherwise you can choose the telegram's type to react to. |
612
611
  | Send payload to BUS only if changed (RBE filter) | *Report by change* filter. If set, only the msg input (from the Flow) having different values each time, will be sent to the KNX bus. If you intend to send everytime the same value, turn it off. |
613
- | Send a GrpValue read once on connection/reconnect | This sends a *read* request to the selected group address, every time Node-Red starts and at every reconnection to the KNX Gateway. The node stores all group address values to a file, so you can choose wether to read from it or from the KNX bus. |
612
+ | Read status upon connection | Read group address status, every time Node-Red starts and at every reconnection to the KNX Gateway. The node stores all group address values to a file, so you can choose wether to read from file or from the KNX bus. |
614
613
  | React only if payload from BUS is changed (RBE filter) | *Report by change* filter. If set, only the msg output (to KNX bus) having different values each time, will be sent to the msg output's flow. If you intend to send everytime the same value, leave it off. |
615
614
  | React to event GroupValue write | The node will react (will send a msg to the flow) each time it receives a *write* telegram from the KNX bus. Usually, you want that. |
616
615
  | React to event GroupValue response | The node will react (will send a msg to the flow) each time it receives a *response* telegram from the KNX bus. Usually, you want that for particular scenarios. |
617
616
  | React to event GroupValue read | The node will react (will send a msg to the flow) each time it receives a *read* telegram from the KNX bus. Usually, you want that if you're want to send a custom value to the KNX BUS. |
618
- | Format INPUT (datagram coming from the KNX BUS) | Allow you to format numeric values received from the KNX Bus. |
617
+ | Format input | Allow you to format numeric values received from the KNX Bus. |
619
618
 
620
619
  <br/>
621
620
 
@@ -32,8 +32,9 @@ module.exports = function (RED) {
32
32
 
33
33
  }
34
34
  // Used to call the status update from the HUE config node.
35
- node.setNodeStatusHue = ({ fill, shape, text }) => {
35
+ node.setNodeStatusHue = ({ fill, shape, text, payload }) => {
36
36
  const dDate = new Date()
37
+ payload = typeof payload === 'object' ? JSON.stringify(payload) : payload
37
38
  node.status({ fill, shape, text: text + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' })
38
39
  }
39
40
 
@@ -48,6 +49,7 @@ module.exports = function (RED) {
48
49
  setTimeout(() => {
49
50
  node.status({ fill: 'blue', shape: 'dot', text: 'Updated Switch ' + msg.knx.destination + ' ' + JSON.stringify(msg.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
50
51
  }, 500)
52
+ node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: 'KNX->HUE', payload: msg.payload })
51
53
  break
52
54
  case config.GArepeatStatus:
53
55
  msg.payload = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.dptrepeat))
@@ -55,6 +57,7 @@ module.exports = function (RED) {
55
57
  setTimeout(() => {
56
58
  node.status({ fill: 'blue', shape: 'dot', text: 'Updated Dim ' + msg.knx.destination + ' ' + JSON.stringify(msg.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
57
59
  }, 500)
60
+ node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: 'KNX->HUE', payload: msg.payload })
58
61
  break
59
62
  default:
60
63
  break
@@ -126,6 +129,7 @@ module.exports = function (RED) {
126
129
  flowMsg.rawEvent = _event
127
130
  flowMsg.payload = flowMsgPayload
128
131
  node.send(flowMsg)
132
+ node.setNodeStatusHue({ fill: 'blue', shape: 'ring', text: 'HUE->KNX', payload: flowMsg.payload })
129
133
  }
130
134
  } catch (error) {
131
135
  node.status({ fill: 'red', shape: 'dot', text: 'HUE->KNX error ' + error.message + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
@@ -54,6 +54,7 @@
54
54
 
55
55
  colorAtSwitchOnDayTime: { value: '{"red":255, "green":255, "blue":255}' },
56
56
  colorAtSwitchOnNightTime: { value: '{"red":23, "green":4, "blue":0}' },
57
+ invertDayNight: { value: false },
57
58
 
58
59
  nameDaylightSensor: { value: "" },
59
60
  GADaylightSensor: { value: "" },
@@ -794,6 +795,12 @@
794
795
  <label for="node-input-nameDaylightSensor" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="knxUltimateHueLight.node-input-name"></span></label>
795
796
  <input type="text" id="node-input-nameDaylightSensor" style="width:200px;margin-left: 5px; text-align: left;">
796
797
  </div>
798
+ <div class="form-row">
799
+ <label for="node-input-invertDayNight">
800
+ </label>
801
+ <input type="checkbox" id="node-input-invertDayNight" style="display:inline-block; width:auto; vertical-align:top;" />
802
+ <i class="fa fa-moon-o"></i> Invert day/night
803
+ </div>
797
804
 
798
805
  <div class="form-row">
799
806
  <label for="node-input-colorAtSwitchOnDayTime" style="width:200px">
@@ -959,22 +966,49 @@
959
966
  Here you can choose the KNX addresses to be linked to the avaiable HUE light commands/states.<br/>
960
967
  Start typing in the GA field, the name or group address of your KNX device, the avaiable devices start showing up while you're typing.
961
968
 
969
+ **Switching**
962
970
  |Property|Description|
963
971
  |--|--|
964
972
  | Switch | This GA is used to turn on/off the HUE light via a boolean KNX value true/false|
965
973
  | Switch Status| Link this to the light's switch status group address|
974
+ | Day/Night | *true* if daytime, *false* if nighttime. This GA is used to change some behaviours at day or night. |
975
+ | Invert day/night | Invert the status of *Day/Night* group address. |
976
+ | Switch on color at Daytime | You can choose the color/brightness of your light, at switch on, on night time. Set it as JSON object, like { "red": 255, "green": 255, "blue": 255 } |
977
+ | Switch on color at Nighttime | You can choose the color/brightness of your light, at switch on, on night time. Set it as JSON object, like { "red": 100, "green": 0, "blue": 0 } |
978
+
979
+ <br/>
980
+
981
+ **Dimming/Brightness**
982
+ |Property|Description|
983
+ |--|--|
966
984
  | Dimming | Relative DIM the HUE light |
967
- | Color | This command is used to change the HUE light's color. Accepted datapoint is RGB triplet (r,g,b). The node handles the gamut color correction. As soon as you send a color KNX telegran, the light turns on and sets color and brightness, derived from the brightness human perception. As soon as you send a KNX telegram with r,g,b set to zero, the light turns off |
968
- | Color Status | Link this to the light's color status group address. Accepted datapoint is RGB triplet (r,g,b)|
969
- | Tunable white | This command is used to change the HUE light's white temperature. Datapoint is 3.007 dimming. |
970
- | Tunable white Status | Link this to the light temperature status group address. Datapoint is 5.001 absolute value|
971
985
  | Brightness | This command is used to change the absolute HUE light's brightness |
972
986
  | Brightness Status| Link this to the light's brightness status group address |
987
+
988
+ <br/>
989
+
990
+ **Tunable white**
991
+ |Property|Description|
992
+ |--|--|
993
+ | Tunable white | This command is used to change the HUE light's white temperature. Datapoint is 3.007 dimming. |
994
+ | Tunable white Status | Link this to the light temperature status group address. Datapoint is 5.001 absolute value|
995
+
996
+ <br/>
997
+
998
+ **Colors**
999
+ |Property|Description|
1000
+ |--|--|
1001
+ | Color | This command is used to change the HUE light's color. Accepted datapoint is RGB triplet (r,g,b). The node handles the gamut color correction. As soon as you send a color KNX telegran, the light turns on and sets color and brightness, derived from the brightness human perception. As soon as you send a KNX telegram with r,g,b set to zero, the light turns off |
1002
+ | Color Status | Link this to the light's color status group address. Accepted datapoint is RGB triplet (r,g,b)|
1003
+
1004
+ <br/>
1005
+
1006
+ **Effects**
1007
+ |Property|Description|
1008
+ |--|--|
973
1009
  | Blink| *true* Blink the light, *false* Stop blinking. Blinks the light on and off. Useful for signalling. Works with all HUE lights. |
974
1010
  | Color Cycle| *true* start cycle, *false* Stop cycle. Randomly changes the HUE light's color at regular interval. Works with all HUE lights having color capabilities. |
975
- | Day/Night | *true* if daytime, *false* if nighttime. This GA is used to change some behaviours at day or night. |
976
- | Switch on color at Daytime | You can choose the color/brightness of your light, at switch on, on night time. Set it as JSON object, like { "red": 255, "green": 255, "blue": 255 } |
977
- | Switch on color at Nighttime | You can choose the color/brightness of your light, at switch on, on night time. Set it as JSON object, like { "red": 100, "green": 0, "blue": 0 } |
1011
+
978
1012
  <br/>
979
1013
 
980
1014
  [Find it useful?](https://www.paypal.me/techtoday)
@@ -34,9 +34,10 @@ module.exports = function (RED) {
34
34
 
35
35
  }
36
36
  // Used to call the status update from the HUE config node.
37
- node.setNodeStatusHue = ({ fill, shape, text }) => {
37
+ node.setNodeStatusHue = ({ fill, shape, text, payload }) => {
38
38
  const dDate = new Date()
39
- node.status({ fill, shape, text: text + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' })
39
+ payload = typeof payload === 'object' ? JSON.stringify(payload) : payload
40
+ node.status({ fill, shape, text: text + ' ' + payload + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' })
40
41
  }
41
42
 
42
43
  // This function is called by the knx-hue
@@ -61,6 +62,7 @@ module.exports = function (RED) {
61
62
  state = { on: { on: false } }
62
63
  }
63
64
  node.serverHue.hueManager.writeHueQueueAdd(config.hueDevice, state, 'setLight')
65
+ node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: 'KNX->HUE', payload: state })
64
66
  break
65
67
  case config.GALightDIM:
66
68
  // { decr_incr: 1, data: 1 } : Start increasing until { decr_incr: 0, data: 0 } is received.
@@ -72,9 +74,12 @@ module.exports = function (RED) {
72
74
  } else {
73
75
  node.startDimStopper('stop')
74
76
  }
77
+ node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: 'KNX->HUE', payload: msg.payload })
75
78
  break
76
79
  case config.GADaylightSensor:
77
80
  node.DayTime = Boolean(dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.dptDaylightSensor)))
81
+ if (config.invertDayNight !== undefined && config.invertDayNight === true) node.DayTime = !node.DayTime
82
+ node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: 'KNX->HUE Daytime', payload: node.DayTime })
78
83
  break
79
84
  case config.GALightHSV:
80
85
  if (config.dptLightHSV === '3.007') {
@@ -89,11 +94,13 @@ module.exports = function (RED) {
89
94
  node.startDimStopperTunableWhite('stop')
90
95
  }
91
96
  }
97
+ node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: 'KNX->HUE', payload: msg.payload })
92
98
  break
93
99
  case config.GALightBrightness:
94
100
  msg.payload = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.dptLightBrightness))
95
101
  state = { dimming: { brightness: msg.payload } }
96
102
  node.serverHue.hueManager.writeHueQueueAdd(config.hueDevice, state, 'setLight')
103
+ node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: 'KNX->HUE', payload: state })
97
104
  break
98
105
  case config.GALightColor:
99
106
  // Behavior like ISE HUE CONNECT, by setting the brightness and on/off as well
@@ -103,6 +110,7 @@ module.exports = function (RED) {
103
110
  const bright = hueColorConverter.ColorConverter.getBrightnessFromRGB(msg.payload.red, msg.payload.green, msg.payload.blue)
104
111
  state = bright > 0 ? { on: { on: true }, dimming: { brightness: bright }, color: { xy: retXY } } : { on: { on: false } }
105
112
  node.serverHue.hueManager.writeHueQueueAdd(config.hueDevice, state, 'setLight')
113
+ node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: 'KNX->HUE', payload: state })
106
114
  break
107
115
  case config.GALightBlink:
108
116
  const gaVal = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.dptLightSwitch))
@@ -120,6 +128,7 @@ module.exports = function (RED) {
120
128
  if (node.timerBlink !== undefined) clearInterval(node.timerBlink)
121
129
  node.serverHue.hueManager.writeHueQueueAdd(config.hueDevice, { on: { on: false } }, 'setLight')
122
130
  }
131
+ node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: 'KNX->HUE', payload: gaVal })
123
132
  break
124
133
  case config.GALightColorCycle:
125
134
  const gaValColorCycle = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.dptLightSwitch))
@@ -148,6 +157,7 @@ module.exports = function (RED) {
148
157
  if (node.timerColorCycle !== undefined) clearInterval(node.timerColorCycle)
149
158
  node.serverHue.hueManager.writeHueQueueAdd(config.hueDevice, { on: { on: false } }, 'setLight')
150
159
  }
160
+ node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: 'KNX->HUE', payload: gaValColorCycle })
151
161
  break
152
162
  default:
153
163
  break
@@ -252,7 +262,7 @@ module.exports = function (RED) {
252
262
  // Send to KNX bus
253
263
  if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) node.server.writeQueueAdd({ grpaddr: knxMsgPayload.topic, payload: knxMsgPayload.payload, dpt: knxMsgPayload.dpt, outputtype: 'write', nodecallerid: node.id })
254
264
  }
255
- node.status({ fill: 'green', shape: 'dot', text: 'HUE->KNX State ' + JSON.stringify(knxMsgPayload.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
265
+ node.setNodeStatusHue({ fill: 'blue', shape: 'ring', text: 'HUE->KNX State', payload: knxMsgPayload.payload })
256
266
  }
257
267
  } catch (error) {
258
268
  node.status({ fill: 'red', shape: 'dot', text: 'HUE->KNX error ' + knxMsgPayload.topic + ' ' + error.message || '' + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
@@ -1,5 +1,5 @@
1
1
  module.exports = function (RED) {
2
- function knxUltimateHueLightSensor (config) {
2
+ function knxUltimateHueLightSensor(config) {
3
3
  RED.nodes.createNode(this, config)
4
4
  const node = this
5
5
  node.server = RED.nodes.getNode(config.server)
@@ -28,8 +28,9 @@ module.exports = function (RED) {
28
28
 
29
29
  }
30
30
  // Used to call the status update from the HUE config node.
31
- node.setNodeStatusHue = ({ fill, shape, text }) => {
31
+ node.setNodeStatusHue = ({ fill, shape, text, payload }) => {
32
32
  const dDate = new Date()
33
+ payload = typeof payload === 'object' ? JSON.stringify(payload) : payload
33
34
  node.status({ fill, shape, text: text + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' })
34
35
  }
35
36
 
@@ -57,6 +58,7 @@ module.exports = function (RED) {
57
58
  // Send payload
58
59
  knxMsgPayload.rawEvent = _event
59
60
  node.send(knxMsgPayload)
61
+ node.setNodeStatusHue({ fill: 'blue', shape: 'ring', text: 'HUE->KNX', payload: knxMsgPayload.payload })
60
62
  }
61
63
  }
62
64
  } catch (error) {
@@ -28,8 +28,9 @@ module.exports = function (RED) {
28
28
 
29
29
  }
30
30
  // Used to call the status update from the HUE config node.
31
- node.setNodeStatusHue = ({ fill, shape, text }) => {
31
+ node.setNodeStatusHue = ({ fill, shape, text, payload }) => {
32
32
  const dDate = new Date()
33
+ payload = typeof payload === 'object' ? JSON.stringify(payload) : payload
33
34
  node.status({ fill, shape, text: text + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' })
34
35
  }
35
36
 
@@ -57,6 +58,7 @@ module.exports = function (RED) {
57
58
  // Send payload
58
59
  knxMsgPayload.rawEvent = _event
59
60
  node.send(knxMsgPayload)
61
+ node.setNodeStatusHue({ fill: 'blue', shape: 'ring', text: 'HUE->KNX', payload: knxMsgPayload.payload })
60
62
  }
61
63
  }
62
64
  } catch (error) {
@@ -30,8 +30,9 @@ module.exports = function (RED) {
30
30
 
31
31
  }
32
32
  // Used to call the status update from the HUE config node.
33
- node.setNodeStatusHue = ({ fill, shape, text }) => {
33
+ node.setNodeStatusHue = ({ fill, shape, text, payload }) => {
34
34
  const dDate = new Date()
35
+ payload = typeof payload === 'object' ? JSON.stringify(payload) : payload
35
36
  node.status({ fill, shape, text: text + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' })
36
37
  }
37
38
 
@@ -55,6 +56,7 @@ module.exports = function (RED) {
55
56
  }
56
57
  })()
57
58
  }
59
+ node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: 'KNX->HUE', payload: msg.payload })
58
60
  break
59
61
  default:
60
62
  break
@@ -30,8 +30,9 @@ module.exports = function (RED) {
30
30
 
31
31
  }
32
32
  // Used to call the status update from the HUE config node.
33
- node.setNodeStatusHue = ({ fill, shape, text }) => {
33
+ node.setNodeStatusHue = ({ fill, shape, text, payload }) => {
34
34
  const dDate = new Date()
35
+ payload = typeof payload === 'object' ? JSON.stringify(payload) : payload
35
36
  node.status({ fill, shape, text: text + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' })
36
37
  }
37
38
 
@@ -101,6 +102,7 @@ module.exports = function (RED) {
101
102
  knxMsgPayload.event = 'rotation ' + _event.relative_rotary.last_event.rotation.direction
102
103
  knxMsgPayload.payload = _event
103
104
  node.send(knxMsgPayload)
105
+ node.setNodeStatusHue({ fill: 'blue', shape: 'rong', text: 'HUE->KNX', payload: knxMsgPayload.payload })
104
106
  }
105
107
  } catch (error) {
106
108
  node.status({ fill: 'red', shape: 'dot', text: 'HUE->KNX error ' + error.message + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
@@ -28,8 +28,9 @@ module.exports = function (RED) {
28
28
 
29
29
  }
30
30
  // Used to call the status update from the HUE config node.
31
- node.setNodeStatusHue = ({ fill, shape, text }) => {
31
+ node.setNodeStatusHue = ({ fill, shape, text, payload }) => {
32
32
  const dDate = new Date()
33
+ payload = typeof payload === 'object' ? JSON.stringify(payload) : payload
33
34
  node.status({ fill, shape, text: text + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' })
34
35
  }
35
36
 
@@ -57,6 +58,7 @@ module.exports = function (RED) {
57
58
  // Send payload
58
59
  knxMsgPayload.rawEvent = _event
59
60
  node.send(knxMsgPayload)
61
+ node.setNodeStatusHue({ fill: 'blue', shape: 'rong', text: 'HUE->KNX', payload: knxMsgPayload.payload })
60
62
  }
61
63
  }
62
64
  } catch (error) {
@@ -8,7 +8,7 @@
8
8
  "node-input-topic": "Group Addr.",
9
9
  "node-input-outputtopic": "Topic",
10
10
  "node-input-dpt": "Datapoint",
11
- "node-input-initialread": "Send a GrpValue read once on connection/reconnect",
11
+ "node-input-initialread": "Read status upon connection",
12
12
  "node-input-initialread0": "No",
13
13
  "node-input-initialread1": "Read from KNX BUS (to receive the response from BUS, enable also -React to event GroupValue response-)",
14
14
  "node-input-initialread2": "Read the last value saved to file prior to disconnection",
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=16.0.0"
5
5
  },
6
- "version": "2.1.16",
6
+ "version": "2.1.18",
7
7
  "description": "Control your KNX intallation via Node-Red! Single Node KNX IN/OUT with optional ETS group address importer. Easy to use and highly configurable. With integrated Philips HUE devices handling.",
8
8
  "dependencies": {
9
9
  "mkdirp": "3.0.1",