Skip to content
Node-red dashboard Nest thermostat ui_template
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Aug 13, 2019
README.md Update README.md Aug 13, 2019
widget.js

README.md

NEST style thermostat Dashboard widget for Node-red

If you have made heating or cooling controls on Node-red you will need nice thermostat widget to display and control your device via Node-red dashboard.

Nest html widget

Fully responsive design. Touch enabled set-point makes it even more cool. Press and hold finger or mouse and it will activate the set point sliding function.

Also it has several display modes like heating, cooling and away. It makes it more interactable and user intuitive. For ECO friendly folks there is possible to turn on and off that little green leaf.

Don't forget you have to program your own logics for thermostat functions.

Nest html widget Nest html widget Nest html widget

How to install:

Open and copy all text from widget.js then go to your node-red application and press import > cliboard paste the text and your done.

After import you should see somthing like this: Nest html widget

What data can I push to witget

  • ambient_temperature your temperature readings numeric payloads.
  • target_temperature your thermostat setpoint numeric payloads.
  • hvac_state string (off, heating, cooling) payload.
  • has_leave boolean (true, false) payloads.
  • away boolean (true, false) payloads.

If you are familiar with CSS and JAVASSCRIPT there there are more stuff to customize, colors, ranges etc.

Some options in the script:

options = {
       diameter: options.diameter || 400,
       minValue: options.minValue || 10, //Minimum value for target temperature
       maxValue: options.maxValue || 30, //Maximum value for target temperature
       numTicks: options.numTicks || 200, //Number of tick lines to display around the dial
       onSetTargetTemperature: options.onSetTargetTemperature || function() {}, // Function called when new target temperature set by the dial
};

What if I want several widgets on one page?

import several widget just make sure you edit uniq ID in these 2 lines inside the UI_Template block and function block that have global variables.

<div id="Mythermostat1"></div>

var nest = new thermostatDial(document.getElementById('Mythermostat1')

Data persistance:

Every time you push new vaue to witged values are stored in global context of node-red.

You can’t perform that action at this time.