[RELEASE] Advanced vThermostat - Virtual Thermostat HVAC control

Hi nclark,

Once again thank. you for helping our community with this useful app and if there is anything that we can assist myself as well please let me know.

Wishing you nice weekend

Not sure if this is the best place for this, but here goes, i want to use this for controlling my spa and pool, i have everything set up and working except that when i set the thermostat to say a 100f for the spa, it shuts down at around 90 and i get an out of range error in the log.

I found the maxtemp settings in the driver code and changed those but i am unable to find where to change the acceptable range, if someone could let me know what i need to do to have this working to about 103 max that would awsome, BTW love what you did and i have a bunch of other application here at the ranch to control various areas.

TIA mh

I'm guessing the driver code you edited is around line 100? Mine is heavily edited, so my line # won't match yours, but it looks like this...

	} else {
		state.currentUnit = "F"
		sendEvent(name: "minCoolTemp", value: 60, unit: "F") // 15.5°C
		sendEvent(name: "minCoolingSetpoint", value: 60, unit: "F") // Google
		sendEvent(name: "maxCoolTemp", value: 95, unit: "F") // 35°C
		sendEvent(name: "maxCoolingSetpoint", value: 95, unit: "F") // Google
		sendEvent(name: "minHeatTemp", value: 35, unit: "F") // 1.5°C
		sendEvent(name: "minHeatingSetpoint", value: 35, unit: "F") // Google
		sendEvent(name: "maxHeatTemp", value: 80, unit: "F") // 26.5°C
		sendEvent(name: "maxHeatingSetpoint", value: 80, unit: "F") // Google
		sendEvent(name: "thermostatThreshold", value: 1.0, unit: "F") // Set by user
		sendEvent(name: "temperature", value: 72, unit: "F") // 22°C
		sendEvent(name: "heatingSetpoint", value: 70, unit: "F") // 21°C
		sendEvent(name: "coolingSetpoint", value: 76, unit: "F") // 24.5°C
		sendEvent(name: "thermostatSetpoint", value: 70, unit: "F") // 21°C
	}

What app/device is listed in the log for the errors? That could help point to the parent app, child app, or device driver.

Here is my edits, i set the maxheat to 105

} else {
state.currentUnit = "F"
sendEvent(name: "minCoolTemp", value: 60, unit: "F") // 15.5°C
sendEvent(name: "minCoolingSetpoint", value: 60, unit: "F") // Google
sendEvent(name: "maxCoolTemp", value: 95, unit: "F") // 35°C
sendEvent(name: "maxCoolingSetpoint", value: 95, unit: "F") // Google
sendEvent(name: "minHeatTemp", value: 35, unit: "F") // 1.5°C
sendEvent(name: "minHeatingSetpoint", value: 35, unit: "F") // Google
sendEvent(name: "maxHeatTemp", value: 105, unit: "F") // 40.5°C
sendEvent(name: "maxHeatingSetpoint", value: 105, unit: "F") // Google
sendEvent(name: "thermostatThreshold", value: 1.0, unit: "F") // Set by user
sendEvent(name: "temperature", value: 72, unit: "F") // 22°C
sendEvent(name: "heatingSetpoint", value: 70, unit: "F") // 21°C
sendEvent(name: "coolingSetpoint", value: 76, unit: "F") // 24.5°C
sendEvent(name: "thermostatSetpoint", value: 70, unit: "F") // 21°C

Here the logs for when i have it set to 102

dev:812023-06-28 20:57:57.721warnsetHeatingSetpoint() is ignoring out of range cooling setpoint (108.0).

dev:812023-06-28 20:57:57.719infoHeating setpoint to close to cooling setpoint, adjusting cooling accordingly

dev:812023-06-28 20:57:57.093warnsetHeatingSetpoint() is ignoring out of range cooling setpoint (109.0).

dev:812023-06-28 20:57:57.092infoHeating setpoint to close to cooling setpoint, adjusting cooling accordingly

Look at lines 292 through 330 of the device driver, specifically lines 308-309. That appears to be where your errors are coming from. There is a similar section below that for the cooling setpoint.

The driver is forcing the cooling setpoint to 5 degrees higher than the heating setpoint. That new value is out of range and causing the error. Try setting your max cooling setpoint to 115 and see what happens.

My dehumidifier recently stopped shutting off when it reaches the desired humidity level in my basement, and rather than going to buy another one, I figured I'd scour the forums to see if there was a solution for a smart plug and temp/humidity sensor to control it. Did this ever take off? I'd love to be able to set a humidity setpoint just like a vThermostat.

Not sure if you want suggestions for the list of possibly compatible 15 amp smart plugs but this one is behaving well within HE.

Sinopé Smart plug SP2600ZB (Zigbee)
reference website

1 Like

hi @nclark as winter comes i'm checking / updating my system and as I was using your awesome thermostat last year, planning to use it this year too. One upgrade I'm about to do is to replace one of my aeotech smartplugs with an aeotec nano-switch 10A for my 2kW electric heater. Do you think it will work without issues with your thermostat?

2000 Watts? At 120v? Dividing the two gives 16.7 amps.

@IrisetH , like Velvetfoot stated, I think there is something wrong here unless you're in Europe somewhere (not stated in your profile). If you are in Europe and it's on 240V, then yes you should not have any problems with the Aeotec nano-switch since you have 20% overhead, I would not say that if this would be a generic AliExpress knock off.

sorry, its 230v so all ok, my question was rather about that will it work with the vthermostat? as I see there is a list of supported sockets in the github repo and its not listed. But I think there's no reason why it wouldn't work. I was reading the code and found no references for socket manufacturers/vendors

Nothing is specific to any manufacturer, I was only stating models that are real 15A rated @ 120V. Usually the max you need in the Americas, some models are actually 10A and will melt when used with a resistive load like a portable heater.

So no worries, as long as you do your research and pick the right one for the job.

1 Like

I have the original version of Advanced vThermostat and want to move up to the V2 to control some spa and pool heaters, my question is do i need to remove all the v1 drivers and start over or can i just replace the parent and child drivers code.

I like how this app actually allows me to configure custom sensors and switching devices to suit my needs, no other thermostat app has done so. I do understand this was created to control electric space heaters and with that in mind safety features are necessary and good.

My use case scenario is somewhat different, I am not controlling electric space heaters but rather triggering a relay to open/close a low voltage hydronic zone valve supplying in-floor heat. The physics of this type of system mean that temperature changes are very slow and subtle. In practice this results in the vThermostat app entering the 'Emergency Stop' mode excessively and un-necessarily.

The battery operated Temperature/Humidity sensor reports when there is a 'change' as any battery operated device should. This reporting occurs when the sensor detects more than 1 degree F change in temp or 1% change in humitity and logs are confirming the humidity changes 2-3 times as often as the temperature. Changing the sensor or modifing the sensor driver/code is not a proper course of action as it just serves to deplete the battery by reporting an un-changed parameter.

My heating system is inherently fail-safe with a max temp of 120F on in-floor elements and I have tested it to run at 100% "ON" state for several days without reaching excessive room temperatures. That said, to facilitate improved functionality of this app, I want to modify the driver code's 'maxInterval' parameters to better reflect the actual observed and recorded operational conditions of my system.

As demonstrated, that interval could be set to Days and not just a few hours and still not present a problem but I don't think that's necessary. Seeing that my room/home can hold temps to less than a 2 degree F change for more than 3 hours in a Minnesota winter shows me that interval could be increased to 12-24 hours before setting the 'Emergency Stop' mode.

This brings me to my question;
Is the safety preset described in line 182 set in line 183? And, can I just modify the '180' paremeter everywhere in lines 882 thru 185 and be good or is/are there more references to the 'maxInterval' I need to address?

As a test I've changed those parameters to 1500 and set 'Max Interval' with in the device to 1440 (1 day) to see how it performs. I'll examine the logs to see if I can or need to dial it back some but we've not yet hit our customary winter low temps yet so that may bring further data to consider.

Hi @t_rosik, glad you like the app, I will give you an answer very soon, don't have access to anything but my phone for a few days. If you search in this thread, this has been explained and I believe the line to change also. Last year I had started a rewrite using the systems virtual thermostat but that did not go as well I I had hoped. So I will be porting some of the code I had written to this version and in these changes, there is an option to change the Emergency Stop all together by setting it to 0 (don't set it to 0 with this code). I'll try to get this going this weekend and will let you know when done.

Thanks for the reply, my test at setting it to 1500 has been working great for a couple days now and will bee looking forward to testing any new versions you come up with!

feature request : Switchable Emergency On/Off option.
This driver is awesome - thank you! I use it only when I'm home (the outlet itself is disabled when mode away and mode sleeping).
It seemed to work great for a few months since I implemented -but I did have original issues with the emergency stop constantly causing it to disable for no reason I could find.
Reading about the value back then, I somehow managed to get it functional and things were good. This week - I reset my HE C7. Since then the problem is back, but seems worse.
I can appreciate the 'safety' of it - but personally, I'd like to turn it off. If an 'Emergency Stop Function" on/off switch in preferences was added it would be fantastic.
Secondarily, adding the ability to the app to have a "external switch" capable of turning on/off the child itself as a whole - would be also very nice to help cut back on some of the rule work to manage this. Here's a snip of my recent logs. I was set at '180' but it wouldn't wait 3 hrs....

I had similar issues when I set this up ages ago as I had the device set to only report on temperature change. As the temp inside rarely changed much the emergency stop would kick in. Changing the device to report on a regular basis (5 minutes for me) solved the problem.

Not sure if this will help you but decided to post in case others may find the info useful.

1 Like

@grizzlebeard Not sure if maybe what you saw was an older version or what - I ended up rewrite a chunk of the driver component - I added an extra mode so I could track the emergency stop, (and be able to pull a notification and display it as a status on my tile) then changed the maxinterval section up a bit to accommodate my desires. I couldn't get around the recovery from an emergency stop repeatedly kicking back in, so just rewrote that portion. I cleaned up a few of the log statements as well. I kept the default 180 but adjusted it to allow and accommodate a 20 hr period if I wanted to go there. (I'm set now to 6 hrs -with a warning to myself!) I think I pulled it direct from github, but maybe I got it from HPM - can't recall. I recall I added versioning and I added a couple switches for debug warn and log enabling.
I decided not to implement adding a enable/disable switch - I opted for 2 quickie rules to make sure its off if Sleeping or Away and tied that to my MC (mode Controller) I wrote. it was a fun little project and it's working and looks amazing in HD+ tiles (see my post there)

I have been using this one for a long time, but had an issue caused by the emergency stop the other day and would now very much like to be able to turn it off. @nclark do you have any news on a newer version with that option?