@bldgblocks/node-red-contrib-control 0.1.37 → 0.2.0

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.
@@ -264,50 +264,49 @@
264
264
  </script>
265
265
 
266
266
  <script type="text/markdown" data-help-name="changeover-block">
267
- Manages HVAC mode switching between heating and cooling based on temperature inputs and setpoint configurations.
267
+ Manages HVAC mode switching between heating and cooling based on temperature input and setpoint configuration.
268
268
 
269
269
  ### Inputs
270
- : context (string) : Configuration commands - (`"operationMode"`, `"algorithm"`, `"setpoint"`, `"deadband"`, `"heatingSetpoint"`, `"coolingSetpoint"`, `"extent"`, `"swapTime"`, `"minTempSetpoint"`, `"maxTempSetpoint"`, `"initWindow"`). Unknown values trigger a warning.
271
- : payload (number | string) : Temperature for mode evaluation; configuration value with `msg.context`.
270
+ : payload (number) : Temperature reading for mode evaluation. The property name is configurable via **Input Property**.
272
271
 
273
272
  ### Outputs
274
- : isHeating (boolean) : `true` for heating, `false` for cooling, with `msg.context = "isHeating"`.
275
- : status (object) : `{ mode, isHeating, heatingSetpoint, coolingSetpoint, temperature }`.
273
+ : payload (boolean) : `true` for heating, `false` for cooling.
274
+ : context (string) : Always `"isHeating"`.
275
+ : status (object) : `{ mode, operationMode, isHeating, heatingSetpoint, coolingSetpoint, temperature }`.
276
+
277
+ ### Operation Modes
278
+ All parameters support typed inputs (static value, `msg`, `flow`, or `global`).
279
+
280
+ - **Auto** — switches between heating and cooling based on temperature vs. algorithm thresholds. A mode change requires the condition to persist for `swapTime` seconds (minimum 60s). A countdown is shown in the status (e.g., `pending: cooling in 120s`).
281
+ - **Heat** — locked to heating regardless of temperature.
282
+ - **Cool** — locked to cooling regardless of temperature.
276
283
 
277
284
  ### Algorithms
278
- The node supports two algorithms for determining HVAC mode
279
285
 
280
- - **Single Setpoint**
281
- - Uses a single `setpoint`, `deadband`, and `extent`.
282
- - **Heating** is triggered if the input temperature is below `setpoint - deadband/2 - extent`.
283
- - **Cooling** is triggered if the temperature exceeds `setpoint + deadband/2 + extent`.
284
- - Example With `setpoint=70`, `deadband=2``, heating starts below `70 - 2/2 = 68`, and cooling starts above `70 + 2/2 = 72`.
285
- - The `extent` widens thresholds to prevent nuisance mode changes due to overshoot.
286
+ - **Single Setpoint** — one setpoint with a deadband.
287
+ - Heating threshold: `setpoint - deadband / 2`
288
+ - Cooling threshold: `setpoint + deadband / 2`
289
+ - Example: `setpoint=70`, `deadband=2` heat below 69, cool above 71.
290
+
291
+ - **Split Setpoint** separate heating and cooling setpoints with an extent buffer.
292
+ - Heating threshold: `heatingSetpoint - extent`
293
+ - Cooling threshold: `coolingSetpoint + extent`
294
+ - Example: `heatingSetpoint=68`, `coolingSetpoint=74`, `extent=1` → heat below 67, cool above 75.
286
295
 
287
- - **Split Setpoint**
288
- - Uses separate `heatingSetpoint`, `coolingSetpoint`, and `extent`.
289
- - **Heating** is triggered if the temperature is below `heatingSetpoint - extent`.
290
- - **Cooling** is triggered if the temperature exceeds `coolingSetpoint + extent`.
291
- - Example With `heatingSetpoint=68`, `coolingSetpoint=74`, `extent=1`, heating starts below `68 - 1 = 67`, and cooling starts above `74 + 1 = 75`.
292
- - Ensures `coolingSetpoint >= heatingSetpoint` to avoid overlap.
296
+ - **Specified** — explicit trigger temperatures, no calculation.
297
+ - Heating threshold: `heatingOn`
298
+ - Cooling threshold: `coolingOn`
293
299
 
294
300
  ### Details
295
- Controls HVAC mode (heating or cooling) based on `msg.payload` temperature compared to setpoints.
296
- Utilizes a delay on startup for sensor normalization and caches the last temperature to make an immediate decision after the `initWindow` period.
301
+ On startup, the node waits for `initWindow` seconds to let sensors stabilize before selecting the initial mode. During this period, temperature is cached but no output is sent.
297
302
 
298
- - In **auto** mode, the node switches modes based on the algorithm thresholds, requiring the condition to persist for `swapTime` seconds (minimum 60s). A countdown is shown (e.g., `pending cooling in 120s`).
299
- - In **heat** or **cool** mode, the node locks to heating or cooling, respectively, ignoring temperature inputs.
300
- - The `extent` widens switching thresholds to prevent unnecessary mode changes while allowing sharing of `deadband` with global variables and other nodes.
301
- - Configuration options can be set via the editor or `msg.context`
302
- - Effective setpoints (`effectiveHeatingThreshold`, `effectiveCoolingThreshold`) are always displayed in "Effective Setpoints" for both new and active nodes,
303
- showing the calculated mode-switching thresholds.
303
+ The `extent` parameter (split algorithm) widens the switching thresholds beyond the setpoints. This prevents nuisance mode changes from overshoot and allows sharing the same setpoint values with other nodes while having independent switching buffers.
304
304
 
305
305
  ### Status
306
- - Green (dot): Configuration update
307
- - Blue (dot): State changed
308
- - Blue (ring): State unchanged
309
- - Red (ring): Error
310
- - Yellow (ring): Warning
306
+ - **Yellow (ring)**: Initializing (startup window)
307
+ - **Blue (dot)**: Mode just changed
308
+ - **Blue (ring)**: Normal operation, no change
309
+ - **Red (ring)**: Error (invalid temperature, bad configuration)
311
310
 
312
311
  ### References
313
312
  - [Node-RED Documentation](https://nodered.org/docs/)