Simple Virtual Thermostat Temp updater

See post 62 for most up to date method.
It shows how to do this in rule machine.

Link to post

5 Likes

Good morning,

I found your code and am trying to get it working, thank you have been looking for something like this for awhile. Here is what I have. I have a temp sensor, and a relay to turn on my heat. I have successfully managed to get the temperature into a Virtual Thermostat. What I am not figuring out how to do is link the relay to when the thermostat is calling for heat. At this point when I run the desired temp way above the sensor temp (calling for heat) the thermostat does not change status. What am I missing

I had to do a rule in rule machine. Thermostat state is heating turn on switch.

If the thermostat does not change state that is another issue though. Does it change ok if you manually set the temperature from the device driver page? I know the earlier versions of the virtual stat didn't actually switch anything, but I notice that the current version does. I've just tested it and it switches fine when I change the temperature. You need to have it in heat or auto mode.

No change in state from the driver page. I am at the latest firmware as of a couple of days ago. It is in heat mode.

Can you post a screenshot of the driver page? Or just the current states from the top right of the driver screen.

Well, it does change state when the mode is in Auto and I set it to call for heat, but not in heat only mode. Wierd. Now just to get a switch to operate

These are my settings with temperature set to 19.0 thermostatOperatingState changes to heating:

  • coolingSetpoint : 40
  • heatingSetpoint : 19.5
  • supportedThermostatFanModes : Off,Auto
  • supportedThermostatModes : heat,auto,off
  • temperature : 19.0
  • thermostatFanMode : Off
  • thermostatMode : heat
  • thermostatOperatingState : heating
  • thermostatSetpoint : 19.5

Then when I change the temperature to 22.0 thermostatOperatingState changes to idle:

  • coolingSetpoint : 40
  • heatingSetpoint : 19.5
  • supportedThermostatFanModes : Off,Auto
  • supportedThermostatModes : heat,auto,off
  • temperature : 21
  • thermostatFanMode : Off
  • thermostatMode : heat
  • thermostatOperatingState : idle
  • thermostatSetpoint : 19.5

Current States

  • coolingSetpoint : 83
  • heatingSetpoint : 69
  • supportedThermostatFanModes : [auto, circulate, on]
  • supportedThermostatModes : [auto, cool, emergency heat, heat, off]
  • temperature : 73.4
  • thermostatFanMode : auto
  • thermostatMode : auto
  • thermostatOperatingState : idle
  • thermostatSetpoint : 69

As for the rule. I have a very simple RM rule that has the condition "thermostatOperatingState is heating". If true, it switches my boiler switch on, if not it switches it off. I also have that rules actions run by another rule that runs every 10 minutes rule just in case a mode change gets missed for any reason (eg if I was updating the hub at the time)

Setting up a RM rule now. I guess I leave it in Auto mode and move on. Thanks for the help

Would you mind showing me your rule? I am not doing something right here. I cannot seem to get it to operate the switch.

Mine has now got a bit more complicated but this test rule is what you need:

Thank you . I need to learn the RM

nanalmcsr,

A couple of questions about your Thermostat temp updater code; I have it working for one thermostat but cannot get it to work with a second one. The child finds the devices like it should and there are no errors, but it doesn't update. The second thing is that I find no way to "edit" the existing parent child setup or a way to remove and start over. Any ideas as to what I am missing?

Thank you

I'll take a look when I get home, but 2 things:

  1. Unless you force a refresh of the temp sensor, the thermostat will not update until the sensor does a temp update.
  2. set the logging to need help, and refresh the sensor to force a temperature event and see if the logs have some data to work with.

Craig

Thanks Craig

I'll check it out when I get home as well. Work always gets in the way :grinning:

Does yours have a remove button?

I also get interesting gui issues when I forget to hit done after I install the parent, but before I install a child. That has happened on several apps I have used.

I could have durfed that up. Neither the parent or child show up in the apps list. I can only get to the child is to go to logs and click on info. I think I will remove both and pay better attention to getting them both filled out. I'll let you know

Thanks