No Description

Gareth 4847c25ed7 Delete 'package.json.orig' 6 years ago
ramp-thermostat 7d6487f57f Merge remote-tracking branch 'drweaver/master' 6 years ago
.gitignore aa006a8e0d Initial Upload 7 years ago
LICENSE b3839e5abb Initial commit 7 years ago
README.md 7d6487f57f Merge remote-tracking branch 'drweaver/master' 6 years ago
package.json cf03cc712b moved ramp_max to editable field named hysterialeft 6 years ago

README.md

ramp-thermostat

NPM version

A Node-RED contrib-node that emulates a thermostat.

The ramp-thermostat controls an actuator depending on the current input temperature and the target temperature (setpoint).

Installation

Run the following command in your Node-RED user directory - typically ~/.node-red

$ npm install node-red-contrib-ramp-thermostat

Configuration

The target temperature is defined by a profile that provides the value depending on the current time 00:00-24:00. The profile consists of several points whose connections build a sequence of lines. The switching moment can be optimized by defining a gradient line like a ramp.

A profile has at least 2 points and should typically start at 00:00 and end at 24:00.

The hysteresis is used to prevent osciliation. The [+] value is added to the target and the [-] (absolute) value is subtracted from the target. Within this neutral zone no action accurs.

The ramp limit defines the maximum time prior to a point to apply the gradient for calculating the thermostat value. Prior to this time, the thermostat will stay constant, thus avoiding need to add extra points.
For example, 2 points 06:00 [10 degrees] - 14:00 [21 degrees] with no ramp limit will gradually increase thermostate over the 8 hour period. Setting the ramp limit to 60 minutes will keep the thermostat at 10 degrees until 13:00 and then will increase only over the last hour. Set to 1440 or leave empty to disable this feature.

Usage

This node expects a numeric msg.payload containing the current temperature (number). The msg.topic should be set to setCurrent. It will calculate the target temperature depending on msg.payload at the current time and output 3 values:

  • state (boolean)
  • current temperature (number)
  • target temperature (number)

The state (true/false) is used to control an actuator. The current and target temperature outputs can be wired e.g. into an ui_chart node.

Runtime settings

setTarget

msg.topic: setTarget
msg.payload: nn.n (number)

The target will be valid until a new target or a profile is set again or until node-red is restarted.

setHysteresisPlus

msg.topic: setHysteresisPlus
msg.payload: nn.n (number)

The Hydteresis will be valid until a new hysteresis is set again or until node-red is restated.

setHysteresisMinus

msg.topic: setHysteresisMinus
msg.payload: nn.n (number)

The Hydteresis will be valid until a new hysteresis is set again or until node-red is restated.

setProfile

msg.topic: setProfile
msg.payload: profile-name

The profile-name is one of the existing profiles that are configured in the ramp-thermostat node.

You can even define an input profile (JSON):

msg.topic: setProfile
msg.payload: {"name":"myGreatProfile","points":{"00:00":16.0,"08:00":20.0,"20:00":20.0,"24:00":16.0}}

Examples

ramp-thermostat2

ramp-thermostat1

The profile is defined using 6 points:

"time" : temp

"00:00": 18.0
"03:00": 18.0
"06:00": 20.5
"18:00": 20.5
"20:00": 18.0
"24:00": 18.0