[RELEASE] Advanced vThermostat - Virtual Thermostat HVAC control

Advanced vThermostat is a Hubitat Device Type Handler that will help create a proper virtual thermostat device. It is meant for use with dumb space heaters / air conditioners and make them controllable via Hubitat just like a regular electronic Thermostat would.

It is based on vThermostat by Josh208 that seems to be MIA from the Hubitat community.
Originally ported from the SmartThings-VirtualThermostat-WithDTH.

This device handler allows the creation of a new Device that shows as a thermostat, using the temperature from selected temperature sensor(s), and on/off outlet(s) for heating and/or cooling. When using multiple temperature sensors, it will average out all active sensors to get a better reading in a room.

vThermostats can be used via Dashboard, Alexa, Google, etc. just like any other thermostat, it can also be used with Thermostat Scheduler to make it a programmable Thermostat.

Safety measures are built in, if any temperature sensor stops reporting for 65 minutes (max of 3 hours) while it is heating or cooling, it will stop all activity and place the vThermostat in Emergency Stop mode.

Installation

Advanced vThermostat can be installed via HPM (recommended)

or by following these steps...

  • Import the Parent and Child apps (in that order) in the <> Apps Code section of your Hubitat Hub
  • Import the Device driver in the <> Drivers Code section of your Hubitat Hub
  • Go to the Apps Section and use the + Add User App button in the top right corner to add the vThermostat Manager, then click DONE
  • Go back in the Advanced vThermostat Manager, create a new vThermostat and select your devices and settings, then click DONE
  • A child app is created so you can change the devices used at any time for that vThermostat, a new device is also created where you can set it up like any other thermostat

Configuration

  • Add the custom app and hit DONE, then go back in to add a new vThermostat
  • Name your vThermostat
  • Select Temp sensor(s)
  • Select the switch/outlets to use for heating and/or cooling
  • Select set points
  • Select logging level and time to revert to "info" level (great for debugging)
  • Hit DONE

Now you have created a working vThermostat, add controls to your dashboard and/or program it with Thermostat Scheduler and forget about it.

Please Note, even if vThermostat has been tested and uses builtin safety measures to keep everything working as safe as possible, the author will not be held responsible for any damage resulting in a failure of the hub, sensors, smart plugs or others. I recommend setting the temperatures on your space heaters at a few degrees higher than what you are programming it in vThermostat, so if a failure does occur, this will limit any possible danger or damage.

15 Likes

Compatible 15 amp (1800W) smart plugs

  • ZOOZ ZEN15 Z-WAVE PLUS POWER SWITCH
  • Aeotec Smart Switch 6 Z-Wave Plus Plug
  • Aeotec Smart Switch 7 Z-Wave Plus 700 series Plug
  • Ikea Zigbee smart plug (no power reporting if you need that)
  • TP-Link Kasa HS110 Smart Wi-Fi Plug (community driver)
  • Enbrighten 55256 Z-Wave Plus Smart Wall Receptacle
  • Enerwave ZW15SM-PLUS Z-Wave Plus Wall Switch (Neutral Wire Required)
  • Evolve LOM-15TR Z-Wave Wall Receptacle
  • Fibaro Wall Plug Z-Wave Plus w Power Monitoring

This will be updated as new plugs will be pointed out to me and verified.

3 Likes

Place holder

Interesting :slight_smile:

How does the vT deal with "anticipation"?

In a future version, this will be implemented, just wanted to get this out before the cold weather really sits in. I have looked at several ways and I want to make sure that it will be adaptive from day to day depending on how fast the room heats up or cools down, this is very dependent on what is going on outside but with no feedback from outside.

1 Like

You can add the Fibaro Wall Plugs to the supported list. This is what I have been using and works well with this thermostat: Wall Plug - smart outlet with power metering | FIBARO

1 Like

Added to the list, thanks!

Thank you for taking this over as I have not been in a position to maintain. Looks like you've put in some great work already and I look forward to upgrading myself! I have updated the README on my repo marking vThermostat as deprecated and pointing people to Advanced vThermostat. When I do get some time to play, I hope to make a simple esp32 based physical controller/display for(Advanced) vThermostat. I thought it would be useful, fun, and even a bit ironic. Hopefully this winter. I'll let you know if/when I make some progress.

1 Like

@josh208, did not even realize you were still active on Hubitat. If you have ideas like that ESP32 display and more, that would be great, Pull Requests will be welcomed to make this even better.

I use it mostly for my garage heating this year but will also use it for an oil filled space heater (and this one will most likely need to have adaptive shoot over / under code to anticipate when to start or stop the heater).

Just tried your thermostat this morning. I had been using a HE virtual thermostat with my own rule to control it but I thought I would give this a try. One less rule, right? I have three other places I would like to use it as well.

Had a bit of an issue with it this morning. When I turned on the thermostat it kicked on the emergency stop after a minute or so. From the pic below it was at 6:07am. The themostat said it's last temp report was at 4:05am, although the time was 5:05am. I am using a Zooz sensor and according to it's log it had last reported the temp at 5:01am. I had the Zooz sensor set to only report temp changes of more than 1 degree F. I have since changed that to .1, so that may help.

So either way 4:05 or 5:05 it should have had at least another hour to report in yes? If I understood your description correctly you said three hours. After it kicked off the first time I tried it again and it ran for a minute and it did it again. I was in bed, it's the heater for the bathroom. I heard it kick off again and I then looked at my dashboard for the bathroom and that couple of minutes of the heat running triggered a temp change. So I started the thermostat again and then it worked fine. So it was waiting for a temp update. Looks like there may be a flaw in the emergency stop logic?

Actually, it's a max of 180 minutes, but by default it is set at 65 minutes and can be changed on the device driver page. Yes having it at .1 degrees will help but usually drains batteries a lot faster.

Of course when first install/starting it up, there is no way to know if the temp sensor is working or not (at least for the logic of the E-Stop) but I'll look into maybe give a grace period when first installed, but after this first 65 min, if the sensor still did not send an update, it will have to go to E-Stop mode for safety. Thanks for the report, it's on the todo list!

Ok I looked to see if there was a setting but max update interval didn’t jump out at me. I see it now.

The temp in the bathroom can go for sometime without changing. So I think maybe the time should not start until the thermostat has been on for a bit. It will get turned on and off and will not stay on all the time.

If the temp sensor does not report for some time even days and the thermostat is idle, no problem it will just wait, only time it goes in Emergency-Stop mode is if it is either heating or cooling for obvious reasons. When the battery dies in the sensor, you will be very happy it did this! :slight_smile:

I agree it’s a great feature. I just upped the max interval to 180. I’ll see how that does.

Thanks for the help.

1 Like

I was looking into replacing the rest of my thermostats with this one, but ran into some things which I would like to mention.

  1. In a room in my holiday home I have 2 temp probes that together average a heat. One is at the top of the ceiling, and one midway in another part of the room. Together they read a crazy average and to keep temps to a comfortable level. I need to set the temp higher than 26 degrees C, but it seems the thermostat is locked at max 26.5 without a way to change it ?

Here is a screenshot:

Summary

image

  1. When I arrived at my holiday home a room that I did NOT have on this vThermostat had not reported temp, so the heater limiter had kicked in but the room was quite warm. Thinking about it, it could have been the other way around, so no heat at all. To avoid this, if I would implement your thermostat, it would go into emergency stop, but would it turn off the outlets ? If so, would it be possible to have a choice of what it does if temps are not reported ? I was thinking, turn on outlets every x hours for x minutes. This way you would always have some heat being generated.

You could create your own RM rule to do this. I imagine it would be quite an undertaking in the groovy code to consider all possibilities of scenarios.

1 Like

I was considering the RM route, but wouldn´t the thermostat then just turn off the outlets again ? i.e. override what I am doing in RM ?

Yes, this is hard coded in the device, if you look at line 61 in the device code, you can change it there, but before changing it there I would start by looking at your sensors, obviously there is a problem with the reporting. Most all devices drivers have a way to adjust to the correct temp (by using a known good reference like a mercury thermometer).

Screen Shots

OR

This will be the better route for sure.

Yes it would but only if it was heating/cooling, if it's at idle it won't go to emergency stop because this could only indicate that temps are not varying enough.

I don't think this would be a good idea and it's just not the way a regular thermostat would work either, if a regular electronic thermostat can't read the temp anymore for any reason, it will shut down.

When in Emergency stop, all outlets are turned off but will not recheck to see if something else has turned them on, so this could work but again, not sure this is a good idea either. If you do decide to go this route, I would like to suggest that the space heater has a regular mechanical thermostat on it that will stop it from heating the room to 40C :wink:

Thank you for the insights. I do think that indeed fixing the current sensors or adding a new temp sensor would make more sense, and it is planned, but I am waiting on the order. The current temp is more relative than anything else.

I think I can work with 26.5 for now, it was just something I noticed this morning. I guess 26.5 is 80 fahrenheit ?

Good to hear about the emergency stop. i will consider RM then. I do indeed have all the heaters set to a maximum of 27c, but of course the plug needs to be running for them to reach that.

1 Like

I just downloaded this and started testing it. If I don't find any issues, I will add it to my list of thermostats that work with my HVAC software when I next release a list.

One things I have noticed so far is that the fan mode is unknown and I don't seem to be able to change it.