Giter Club home page Giter Club logo

node-red-contrib-thermostat-scheduler's Introduction

The Ultimate Node-RED Thermostat for Home Assistant

NEST style thermostat with: temperature week scheduler, countdown and manual mode

Original projects

This project is an integration of these:

Demo

DemoEN gif 01

Features

This widget allows you to control the climate element of the Home Assistant, expanding its functionality.

  • Three different options for setting up the thermostat:
    • Week Scheduler (with Away mode)
    • Countdown
    • Manual
  • State report through a NEST style thermostat:
    • OFF
    • ON
      • Idle
      • Heat
      • Away mode (that limits the maximum temperature)
  • Chart

Screenshots

Home:

Screenshot home 01

Week Scheduler:

Screenshot scheduler 01

Screenshot scheduler 02

Countdown:

Screenshot countdown 01

Screenshot countdown 02

Manual:

Screenshot manual 01

State report:

Off:

Screenshot state 01

On:

Screenshot state 02

Heat:

Screenshot state 03

Away:

Screenshot state 04

Chart:

Screenshot chart 01

How to install

  1. Install node-red-contrib-mytimeout & node-red-contrib-moment

  2. Download the flow, then go to your node-red application and press import > cliboard and finally select the file downloaded. Two versions available:

  3. Modify the Properties Server (ex: Home Assistant) and Entity Id (ex: climate.termostato) of the following nodes:

    • Climate
    • Away from Alarm
    • svc: climate:set_temperature
    • svc: climate:turn_off
    • svc: climate:turn_on

    These nodes are highlighted in the flow by the comment "Set this" (set_this image).

  4. Deploy and enjoy!

Known Bugs

(!!!) There is a UI bug in the node-red/node-red-dashboard 2.27.0 (Node-RED Home Assistant Addon v8.0.1): UI dropdown - Unable to set a preselected option --> Fixed in node-red/node-red-dashboard 2.28.0 (Node-RED Home Assistant Addon v8.1.2)

Refer to the issues section and please report any issues you have.

Changelog

v3.4

  • Use "let" instead of "var" to work with Node-Red 2.2

v3.3

  • Fix "Messy graphic" in the first startup (#3)
  • Align the time zone settings used in the nodes (#13)
  • Fix a minor countdown bug

v3.2

  • Fix "change state" in countdown

v3.1

  • Fix countdown_followed_by

v3.0

  • Improve the user interface
  • Add Countdown mode
  • Add Manual mode
  • Add Chart
  • Implement 0.1 degree steps in the NEST style thermostat

v1.0

Initial commit

Potential future improvements

  • Schedule mode with 0.1 degree steps
  • Improve the graphics component (currently: only horizontal and no-resizing)

node-red-contrib-thermostat-scheduler's People

Contributors

giuseppeg88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-thermostat-scheduler's Issues

How to use other temperature sensors?

Any idea how to use other temperature sensors in place of the Nest thermostat temp? I have motion sensors around the house with temp capability and would like to use this integration but use average temp device to work as a whole house heating rather than use the Thermostat temp

Nothing loading

Hi i've set this up and altered all the nodes to suit my setup and i'm getting the correct data appearing under the nodes with the temp etc.
But when i go to http://192.168.1.25:1880/endpoint/ui/ it's not loading is there any other way to confirm things are set up correctly?
Thanks

More than one Thermostat possible? How?

Hi! How is it possible to control more than one thermostat with it?
The instructions say:
"Modify the Properties Server (ex: Home Assistant) and Entity Id (ex: climate.termostato) of the following nodes:"

I named my thermostats like this: thermostat.eg.wz, or thermostat.og.bad.

Do I then have to enter "thermostat." in the Entity Field?

Thank you in advance for the help!

Question about timezone

I see that you localized every string as italian so I wonder why you chose the rimezone ETC/GMT instead of Europe/Rome

Add to Lovelace

So I have this deployed in my Node-Red instance but how is it supposed to show up in the Lovelace UI.

New to Node red so I haven't made one of these before.

TypeError: Cannot read properties of undefined (reading 'selector')

Hi

Thank you for this great integration in Node-Red. When I open up the dashboard I get the following error in my console:

TypeError: Cannot read properties of undefined (reading 'selector')
at :57:37
at m.$digest (app.min.js:174)
at m.$apply (app.min.js:177)
at app.min.js:589
at Socket.t (app.min.js:590)
at Socket../node_modules/component-emitter/index.js.Emitter.emit (index.js:145)
at Socket.emit (typed-events.js:46)
at Socket.emitEvent (socket.js:258)
at Socket.onevent (socket.js:245)
at Socket.onpacket (socket.js:209)

From what I can read it should be related to this code on the settings page:

function selec(val,sta)
{
var w="#td"+val+ID;
if (sta) $(w).css('background-color','#4CAF50'); else $(w).css('background-color','#FFC107');
}

(function(scope){
    scope.ID = ID;
    scope.send({payload: '29'})
    scope.$watch('msg', function(msg) {
        selec(last,0); last=msg.selector; selec(last,1);
        for (var x=0; x<24; x++) 
            { 
                var w="#t"+x+ID; bar(w,msg.timing[((msg.days-1)*24)+x].toFixed(1)); 
                var v="#v"+x+ID; $(v).text(msg.timing[((msg.days-1)*24)+x].toFixed(1)+"°")
            } 
        for (var x=0; x<2; x++) { var w="#s"+x+ID; $(w).text(msg.timing[168+x].toFixed(1)+"°"); }
         $("#d0"+ID).text(thedays[msg.days-1]);
         if ((last>4) &&(last<29))
             $("#current"+ID).text(msg.timing[((msg.days-1)*24)+last-5].toFixed(1) + "°");
         else
             $("#current"+ID).text("-");
             
        if (msg.foryou!="") { stat(msg.foryou);  }
        
         
    });

})(scope);

Any clues what might go wrong?

Multiple thermostats or multiple zones?

As for others here asking how to do multiple thermostats, maybe it would be better to be able to do multiple zones.
Have people when they setup the flow for the first time configure the zone they want it to be in and then you can use the zonename in the savefile so that way you make unique savefiles for the schedule. Also you maybe could use the zonename for the dashboard.

If the want multiple zones, they just have to add a new flow with a new zonename. I am a noob to node red and programming so sadly I don't know how to add it to the flow.

problemi con la dashboard

bellissimo lavoro funziona tutta la logica ma le icone sono bianch,e, mancano le scritte sui bottoni e le label GIORNO TEMPERATURA ALLARME.
cosa puo essere?

Bug | Can’t see icons

image

Got the problem that I can't see the icons in the widget (installed it with iframe card).
I use AVM 301 climates.
It doesn't matter, if I create 1 or 3 flows in node red.

Missing file

The first time I tried to run your flow I got Error: ENOENT: no such file or directory, open '/share/thermo_scheduler.save' from the Resotre node because there is no such file.

It works fine but you should check fi the file exists before trying to read it.

No widget

I followed the instructions and the red-node flow seems to be running with no errors but even though I have rebooted Home Assistant twice, I do not see a widget card for this flow.
I re-read the documentation but do not see how to enable this card. If I add a standard thermostat card, I just get the same basic one I have been using.

Support for MQTT climate devices

Hi

As you've developed a thermostat scheduler which leans heavily on my original coding (my stat is in full time use) - I thought I'd take a look - with a view to using yours if it is better than what I'm using....

I grabbed the needed mytimeout - and pulled in your English flow...

and

Imported unrecognised types:

api-call-service
server-state-changed
server
Imported:

Ideas?

Pete

Home assistant integration

Hello,

This might be more of a question than an issue ( because of me not understanding something)
But where or how do I find these controls in HA?
I've loaded the node red flow and all as explained in the readme, but I can't find anything back in the HA front end.
Do I need to install something additional in HA?

Thanks, Chris.

Multiple istances

Hello, how to do if i want to control two or more climate entities?
It seems that we can't just import a second flow and point it to the right entity. What i'm missing?

I'm missing a "Summer mode"

Or a Winter mode. But they should give the same end result. I like the away mode, it sets the temperature to a certain amunt of degrees for when you're not home. I don't have an alarm but it was easy enough to configure the settings to use my away boolean from home assistant.

Now what I'd like and I am a noob to node red and programming so sadly I don't know how to add it to the flow: To have something simular to the away mode: A Summer mode. If Summer mode is on (device = off), you can change settings in the thermostat all you want, but the unit won't go on because no heating is needed in summer. If you switch Summer off, all will work as set.
I know there's an on and off switch, but with a Summermode you could set it for all devices at once.
If a Home Assitant boolean is used for it, you could even use it in an automation (use date or outside temperature)

refactor needed

Hi,
I'm looking at your flow to change it from depending on a file to using a persistent context but I noticed that you use context in an undocumented way and I'm not sure what are you trying to achieve.
eg.

context.days
context.selector
context.saving

It looks like you are trying to have those properties persisted in a context (the flow one?) but it doesn't look the right way to do it https://nodered.org/docs/user-guide/writing-functions#context

I'm going to refactor it, are you interested in a PR?

Messy graphic

The first time opening the dashboard it show everything at the same time
image
After clicking on all the "torna alla home" it begin to works as intended.

Window opening sensor(s)

Hi,
first of all thank you for your work, very useful and interesting for a novice like me.
Can I suggest to add a function to "suspend" the heating when a certain window opens and stay open for more than "x" time? (and restart with programmed heating when window is closed again).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.