npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-ramp-thermostat

v0.8.3

Published

A Node-RED node that emulates a programmable thermostat.

Downloads

332

Readme

ramp-thermostat

NPM version

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

Wikipedia Source: A programmable thermostat is a thermostat which is designed to adjust the temperature according to a series of programmed settings that take effect at different times of the day. Programmable thermostats may also be called clock thermostats.

The ramp-thermostat controls an actuator depending on the current input temperature and the target temperature (setpoint). The target temperature is defined by a profile for a day period (00:00-23:59). A weekly or holiday setting can be achieved using several profiles.

Configuration

The target temperature is defined by a profile that provides the value depending on the current time 00:00-23:59. 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 must start at 00:00 and end at 23:59.

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.

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.

getProfile

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

The profile object is sent to the output 3:

msg.topic: getProfile
msg.payload: {
  "name": "profile-name",
  "points": [{
    "00:00": 18
  }, {
    "04:00": 18
  }, {
    "08:00": 20.5
  }, {
    "12:00": 20.5
  }, {
    "12:00": 19
  }, {
    "12:30": 19
  }, {
    "13:30": 20.5
  }, {
    "19:00": 20.5
  }, {
    "19:00": 18
  }, {
    "23:59": 18
  }]
}

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 object) with more than 10 points:

msg.topic: setProfile
msg.payload: {
    "name": "dining room",
    "points": [
        {"00:00": 18},
        {"03:00": 18},
        {"06:00": 18.5},
        {"08:00": 20},
        {"10:00": 20},
        {"11:00": 20.5},
        {"12:30": 20.5},
        {"12:30": 19.5},
        {"15:00": 19.5},
        {"17:00": 20.5},
        {"19:00": 20.5},
        {"19:00": 20},
        {"21:30": 20},
        {"21:30": 18},
        {"23:59": 18}
    ]
}

Examples

rt-office3

The profile is defined using 6 points:

"time" : temp

"00:00": 18.0
"03:00": 18.0
"06:00": 20.0
"19:00": 20.0
"20:00": 18.0
"23:59": 18.0