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.
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.
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:
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.
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
};
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')
Check example: flow_fahrenheit.json
Check example: flow_round_to_0.1.json
Every time you push new vaue to widged values are stored in global context of node-red.
Use the GitHub issues log for raising issues or contributing suggestions and enhancements. GITHUB