node-red-contrib-knx-ultimate 1.3.26 → 1.3.27
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,10 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
<p>
|
|
10
|
+
<b>Version 1.3.27</b> - February 2022<br/>
|
|
11
|
+
- Load Control: minor fixes + issue a KNX read of Watt values, in case the GA doesn't automatically send a power value on change.<br/>
|
|
12
|
+
</p>
|
|
9
13
|
<p>
|
|
10
14
|
<b>Version 1.3.26</b> - February 2022<br/>
|
|
11
15
|
- FIX: fix a crash occurring it the KNX Gateway is set to "emulate" (that means, don't write to the bus).<br/>
|
|
Binary file
|
|
@@ -84,7 +84,7 @@ module.exports = function (RED) {
|
|
|
84
84
|
node.handleSend = msg => {
|
|
85
85
|
|
|
86
86
|
// Update the Total Watt?
|
|
87
|
-
if (msg.topic === node.topic) {
|
|
87
|
+
if (msg.topic === node.topic && msg.payload !== "" && msg.payload !== null && msg.payload !== undefined) {
|
|
88
88
|
node.totalWatt = msg.payload;
|
|
89
89
|
// Update current consumption
|
|
90
90
|
node.setLocalStatus({ fill: "blue" });
|
|
@@ -105,7 +105,7 @@ module.exports = function (RED) {
|
|
|
105
105
|
// monitorVal: null
|
|
106
106
|
|
|
107
107
|
var oRow = node.deviceList[i];
|
|
108
|
-
if (msg.topic === oRow.monitorGA) {
|
|
108
|
+
if (msg.topic === oRow.monitorGA && msg.payload !== null && msg.payload !== undefined) {
|
|
109
109
|
oRow.monitorVal = msg.payload;
|
|
110
110
|
//node.setLocalStatus({ fill: "blue", shape: "dot", text: "Updated", payload: oRow.monitorVal, GA: msg.topic, dpt: "", devicename: oRow.monitorName });
|
|
111
111
|
}
|
|
@@ -118,13 +118,16 @@ module.exports = function (RED) {
|
|
|
118
118
|
// 03/02/2022 perform a read on all GA in the list
|
|
119
119
|
node.initialReadAllDevicesInRules = () => {
|
|
120
120
|
if (node.server) {
|
|
121
|
+
// Read status of the Total Power GA
|
|
122
|
+
node.server.writeQueueAdd({ grpaddr: node.topic, payload: "", dpt: "", outputtype: "read", nodecallerid: node.id });
|
|
123
|
+
|
|
121
124
|
for (var i = 0; i < node.deviceList.length; i++) {
|
|
122
125
|
let grpaddr = node.deviceList[i].monitorGA;
|
|
123
|
-
if (grpaddr !== undefined && grpaddr !== "") {
|
|
126
|
+
if (grpaddr !== undefined && grpaddr !== "" && grpaddr !== null) {
|
|
124
127
|
try {
|
|
125
128
|
// Check if it's a group address
|
|
126
129
|
let ret = Address.KNXAddress.createFromString(grpaddr, Address.KNXAddress.TYPE_GROUP);
|
|
127
|
-
node.setLocalStatus({ fill: "grey", shape: "dot", text: "Read Power from BUS" });
|
|
130
|
+
//node.setLocalStatus({ fill: "grey", shape: "dot", text: "Read Power from BUS" });
|
|
128
131
|
node.server.writeQueueAdd({ grpaddr: grpaddr, payload: "", dpt: "", outputtype: "read", nodecallerid: node.id });
|
|
129
132
|
} catch (error) {
|
|
130
133
|
node.setLocalStatus({ fill: "grey", shape: "dot", text: "Not a KNX GA " + error.message });
|
|
@@ -143,16 +146,18 @@ module.exports = function (RED) {
|
|
|
143
146
|
// Increase shedding timer (Switch off devices)
|
|
144
147
|
if (node.timerIncreaseShedding !== null) clearInterval(node.timerIncreaseShedding);
|
|
145
148
|
node.timerIncreaseShedding = setInterval(() => {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
node.
|
|
155
|
-
|
|
149
|
+
if (node.server) {
|
|
150
|
+
// Issue a READ request to the main Watt GA
|
|
151
|
+
// The devices should automatically send a value on change, but... you know....
|
|
152
|
+
if (node.topic !== undefined && node.topic !== null && node.topic !== "") node.server.writeQueueAdd({ grpaddr: node.topic, payload: "", dpt: "", outputtype: "read", nodecallerid: node.id });
|
|
153
|
+
|
|
154
|
+
// Check consumption
|
|
155
|
+
if (node.totalWatt > node.wattLimit) {
|
|
156
|
+
// Start increasing shedding!
|
|
157
|
+
if (node.sheddingStage < node.deviceList.length) {
|
|
158
|
+
node.increaseShedding();
|
|
159
|
+
node.startTimerDecreaseShedding(); // Reset the decreasing timer from beginning
|
|
160
|
+
}
|
|
156
161
|
}
|
|
157
162
|
}
|
|
158
163
|
}, node.sheddingCheckInterval);
|
|
@@ -170,6 +175,7 @@ module.exports = function (RED) {
|
|
|
170
175
|
// Start decreasing shedding!
|
|
171
176
|
if (node.sheddingStage > 0) {
|
|
172
177
|
node.decreaseShedding();
|
|
178
|
+
node.startTimerIncreaseShedding(); // Reset the increasing timer from beginning
|
|
173
179
|
}
|
|
174
180
|
}
|
|
175
181
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-knx-ultimate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.27",
|
|
4
4
|
"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.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"fs": "0.0.1-security",
|