@bldgblocks/node-red-contrib-control 0.1.37 → 0.1.38
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/README.md +10 -0
- package/nodes/alarm-collector.html +11 -0
- package/nodes/alarm-collector.js +13 -0
- package/nodes/alarm-service.js +2 -2
- package/nodes/and-block.js +1 -1
- package/nodes/call-status-block.html +83 -56
- package/nodes/call-status-block.js +335 -248
- package/nodes/changeover-block.html +30 -31
- package/nodes/changeover-block.js +287 -389
- package/nodes/contextual-label-block.js +3 -3
- package/nodes/delay-block.js +74 -13
- package/nodes/global-getter.js +29 -14
- package/nodes/global-setter.js +8 -5
- package/nodes/history-buffer.js +32 -27
- package/nodes/history-collector.js +4 -4
- package/nodes/network-point-read.js +5 -0
- package/nodes/network-service-bridge.js +43 -11
- package/nodes/or-block.js +1 -1
- package/nodes/priority-block.js +1 -1
- package/nodes/tstat-block.html +34 -79
- package/nodes/tstat-block.js +223 -345
- package/nodes/utils.js +1 -1
- package/package.json +90 -75
package/nodes/tstat-block.html
CHANGED
|
@@ -63,6 +63,10 @@
|
|
|
63
63
|
<input type="text" id="node-input-isHeating" style="width: auto; vertical-align: middle;">
|
|
64
64
|
<input type="hidden" id="node-input-isHeatingType">
|
|
65
65
|
</div>
|
|
66
|
+
<div class="form-row">
|
|
67
|
+
<label for="node-input-startupDelay" title="Seconds to suppress heating/cooling calls after deploy (0 = disabled)"><i class="fa fa-hourglass-start"></i> Startup Delay</label>
|
|
68
|
+
<input type="number" id="node-input-startupDelay" placeholder="30" min="0" step="1">
|
|
69
|
+
</div>
|
|
66
70
|
</script>
|
|
67
71
|
|
|
68
72
|
<script type="text/javascript">
|
|
@@ -94,7 +98,8 @@
|
|
|
94
98
|
ignoreAnticipatorCycles: { value: "1" },
|
|
95
99
|
ignoreAnticipatorCyclesType: { value: "num" },
|
|
96
100
|
isHeating: { value: false },
|
|
97
|
-
isHeatingType: { value: "bool" }
|
|
101
|
+
isHeatingType: { value: "bool" },
|
|
102
|
+
startupDelay: { value: 30 }
|
|
98
103
|
},
|
|
99
104
|
inputs: 1,
|
|
100
105
|
outputs: 3,
|
|
@@ -223,100 +228,50 @@
|
|
|
223
228
|
</script>
|
|
224
229
|
|
|
225
230
|
<script type="text/markdown" data-help-name="tstat-block">
|
|
226
|
-
Thermostat controller for heating/cooling with single, split, or specified setpoint operation, hysteresis, and anticipation
|
|
231
|
+
Thermostat controller for heating/cooling with single, split, or specified setpoint operation, hysteresis, and anticipation.
|
|
227
232
|
|
|
228
233
|
### Inputs
|
|
229
|
-
:
|
|
230
|
-
:
|
|
234
|
+
: payload (number) : Temperature reading.
|
|
235
|
+
: isHeating (boolean) : Optional. Overrides the configured heating mode (typically wired from a changeover node).
|
|
231
236
|
|
|
232
237
|
### Outputs
|
|
233
|
-
|
|
234
|
-
:
|
|
235
|
-
:
|
|
236
|
-
: below (boolean) : `true` if input is below heating on threshold.
|
|
237
|
-
: status (object) : Contains detailed runtime information including:
|
|
238
|
-
- `algorithm`: Current algorithm in use
|
|
239
|
-
- `input`: Current temperature input value
|
|
240
|
-
- `isHeating`: Current heating mode
|
|
241
|
-
- `above/below`: Current output states
|
|
242
|
-
- Algorithm-specific setpoints and values
|
|
243
|
-
- `modeChanged`: If mode recently changed
|
|
244
|
-
- `cyclesSinceModeChange`: Count since last mode change
|
|
245
|
-
- `effectiveAnticipator`: Current anticipator value after mode change adjustments
|
|
238
|
+
: isHeating (boolean) : Output 1. Current heating mode. Includes `msg.context = "isHeating"`.
|
|
239
|
+
: above (boolean) : Output 2. `true` when cooling call is active (temperature exceeded cooling threshold).
|
|
240
|
+
: below (boolean) : Output 3. `true` when heating call is active (temperature dropped below heating threshold).
|
|
246
241
|
|
|
247
|
-
|
|
248
|
-
All outputs include comprehensive status information in `msg.status`. Example:
|
|
249
|
-
```json
|
|
250
|
-
{
|
|
251
|
-
"status": {
|
|
252
|
-
"algorithm": "single",
|
|
253
|
-
"input": 68.5,
|
|
254
|
-
"isHeating": true,
|
|
255
|
-
"above": false,
|
|
256
|
-
"below": true,
|
|
257
|
-
"setpoint": 70,
|
|
258
|
-
"diff": 2,
|
|
259
|
-
"anticipator": 0.5,
|
|
260
|
-
"modeChanged": false,
|
|
261
|
-
"cyclesSinceModeChange": 3,
|
|
262
|
-
"effectiveAnticipator": 0.5
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
```
|
|
242
|
+
All outputs include a `msg.status` object with runtime diagnostics: `algorithm`, `input`, `isHeating`, `above`, `below`, `activeSetpoint`, `onThreshold`, `offThreshold`, `diff`, `anticipator`, `effectiveAnticipator`, `modeChanged`, `cyclesSinceModeChange`.
|
|
266
243
|
|
|
267
244
|
### Algorithms
|
|
268
|
-
- **Single Setpoint**:
|
|
269
|
-
- Uses `setpoint`, `diff`, and `anticipator`.
|
|
270
|
-
- Sets `above` if `input > setpoint + diff/2`, clears when `input < setpoint + anticipator`.
|
|
271
|
-
- Sets `below` if `input < setpoint - diff/2`, clears when `input > setpoint - anticipator`.
|
|
272
|
-
- For positive `anticipator`, stops early to prevent overshoot. For negative `anticipator` (testing only), delays turn-off to overshoot setpoint.
|
|
273
|
-
- Example: `setpoint=70`, `diff=2`, `anticipator=-0.5`, `above` if `input > 71`, clears at `< 69.5` (overshoots); `below` if `input < 69`, clears at `> 70.5` (overshoots).
|
|
274
|
-
|
|
275
|
-
- **Split Setpoint**:
|
|
276
|
-
- Uses `heatingSetpoint`, `coolingSetpoint`, `diff`, and `anticipator`.
|
|
277
|
-
- For `isHeating = true`:
|
|
278
|
-
- Sets `below` if `input < heatingSetpoint - diff/2`, clears when `input > heatingSetpoint - anticipator`.
|
|
279
|
-
- `above` is `false`.
|
|
280
|
-
- For `isHeating = false`:
|
|
281
|
-
- Sets `above` if `input > coolingSetpoint + diff/2`, clears when `input < coolingSetpoint + anticipator`.
|
|
282
|
-
- `below` is `false`.
|
|
283
|
-
- Ensures `heatingSetpoint < coolingSetpoint`.
|
|
284
|
-
- For negative `anticipator`, delays turn-off (e.g., heating off above `heatingSetpoint`).
|
|
285
|
-
- Example: `heatingSetpoint=68`, `coolingSetpoint=74`, `diff=2`, `anticipator=-0.5`, heating mode sets `below` if `input < 67`, clears at `> 68.5`; cooling mode sets `above` if `input > 75`, clears at `< 73.5`.
|
|
286
245
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
- Sets `above` if `input > coolingOn`, clears when `input < coolingOff + anticipator`.
|
|
291
|
-
- `below` is `false`.
|
|
292
|
-
- For `isHeating = true`:
|
|
293
|
-
- Sets `below` if `input < heatingOn`, clears when `input > heatingOff - anticipator`.
|
|
294
|
-
- `above` is `false`.
|
|
295
|
-
- Validates `coolingOn >= coolingOff >= heatingOff >= heatingOn`.
|
|
296
|
-
- For negative `anticipator`, delays turn-off (e.g., heating off above `heatingOff`).
|
|
297
|
-
- Example: `coolingOn=74`, `coolingOff=72`, `heatingOff=68`, `heatingOn=66`, `anticipator=-0.5`, cooling mode sets `above` if `input > 74`, clears at `< 71.5`; heating mode sets `below` if `input < 66`, clears at `> 68.5`.
|
|
246
|
+
**Single** — One setpoint with differential hysteresis.
|
|
247
|
+
- Heating: call ON when `temp < setpoint - diff/2`, OFF when `temp > setpoint - anticipator`
|
|
248
|
+
- Cooling: call ON when `temp > setpoint + diff/2`, OFF when `temp < setpoint + anticipator`
|
|
298
249
|
|
|
299
|
-
|
|
300
|
-
|
|
250
|
+
**Split** — Separate heating/cooling setpoints with differential.
|
|
251
|
+
- Heating: call ON when `temp < heatingSetpoint - diff/2`, OFF when `temp > heatingSetpoint - anticipator`
|
|
252
|
+
- Cooling: call ON when `temp > coolingSetpoint + diff/2`, OFF when `temp < coolingSetpoint + anticipator`
|
|
301
253
|
|
|
302
|
-
|
|
254
|
+
**Specified** — Explicit on/off trigger temperatures.
|
|
255
|
+
- Heating: call ON when `temp < heatingOn`, OFF when `temp > heatingOff - anticipator`
|
|
256
|
+
- Cooling: call ON when `temp > coolingOn`, OFF when `temp < coolingOff + anticipator`
|
|
303
257
|
|
|
304
|
-
|
|
305
|
-
|
|
258
|
+
### Anticipator
|
|
259
|
+
Positive values stop early to prevent overshoot. Negative values (≥ -2, testing only) delay turn-off to allow overshoot.
|
|
306
260
|
|
|
307
|
-
The `
|
|
261
|
+
The `ignoreAnticipatorCycles` setting disables the anticipator for N cycles after a mode change to reduce short-cycling.
|
|
308
262
|
|
|
309
|
-
|
|
263
|
+
### Startup Delay
|
|
264
|
+
Configurable delay (default 30s, 0 = disabled) suppresses `above`/`below` calls after deployment. Prevents false calls before upstream mode selection has initialized. During delay, `isHeating` passes through normally and internal state is tracked. Status shows `[startup]` during suppression.
|
|
310
265
|
|
|
311
|
-
|
|
312
|
-
|
|
266
|
+
### Configuration
|
|
267
|
+
All numeric inputs support `num`, `msg`, `flow`, or `global` types via typed inputs. The `isHeating` flag supports `bool`, `msg`, `flow`, or `global`. Algorithm supports dropdown, `msg`, `flow`, or `global`.
|
|
313
268
|
|
|
314
269
|
### Status
|
|
315
|
-
- Green (dot): Configuration
|
|
316
|
-
- Blue (dot):
|
|
317
|
-
- Blue (ring):
|
|
318
|
-
- Red (ring):
|
|
319
|
-
- Yellow (ring):
|
|
270
|
+
- Green (dot): Configuration update
|
|
271
|
+
- Blue (dot): State changed
|
|
272
|
+
- Blue (ring): State unchanged
|
|
273
|
+
- Red (ring): Error
|
|
274
|
+
- Yellow (ring): Warning / startup delay
|
|
320
275
|
|
|
321
276
|
### References
|
|
322
277
|
- [Node-RED Documentation](https://nodered.org/docs/)
|