www.homeseer.com    
 

Go Back   HomeSeer Message Board > Thermostat / HVAC Plug-ins > Thermostat / HVAC Discussion > SDJ-VStat (3P)

SDJ-VStat (3P) Discussions related to the SDJ-VStat plugin by Spud.

Reply
 
Thread Tools Display Modes
  #1  
Old January 7th, 2018, 01:27 PM
SteveMSJ SteveMSJ is offline
Seer Master
 
Join Date: Jan 2012
Location: UK
Posts: 783
SDJ-VStat Virtual Thermostat Plug-in Beta CLOSED

** UPDATE **SDJ-VStat is now in the updater and has its own sub forum so I have removed the attachments and closed this thread.

** UPDATE Version 3.0.8.2 added. I think I have cured an issue with the OpenWindow device not setting back the target temperature in certain circumstances, mainly a restart. Also tidied up some redundant code for efficiency, hopefully without introducing new bugs. Only the main exe file has changed if you are updating.
** UPDATE Version 3.0.8.1 added. Minor update to include devices with 'weather' in their Device Type [String] to lists of sensors **
** UPDATE Version 3.0.8.0 added. Now has Cooling as well as Heating VStats **
I don't have any AC so testing has been a bit limited for the Cooling VStats. Treat as a beta. I have left the previous version attached for now just in case of problems. In addition to Cooling VStats some more configurable options added like editable mode names.
There are some additional image files so, to update, close the plugin and make sure you copy all the files as for a new installation.
The new features are described in the updated 'SDJ-VStat Quick Guide 3-0-8-0.pdf'

** UPDATE Version 3.0.7.1 added. Corrected bug see message #11 **

I wrote a Virtual Thermostat plug-in some time ago for my own use which I have been running for a couple of years now. Recently a number of users expressed interest in trying out the plug-in so I released versions privately for testing. A number of revisions and additions have been made to the plug-in following feedback, and so far nobody has reported any significant issues.

I have been getting more and more requests to try out the plug-in so decided it is worth opening it up to wider testing by posting it on the forum. I am busy at work at the moment so support may be sporadic but I will do what I can. Also note that this plug-in is very much designed to work the way I want it to and therefor may not suit every bodies needs.

If you want to use the plug-in it is totally at your own risk and I cannot accept responsibility for any consequences. The current version is beta software so you are advised to fully backup HS3 before installing. The attached Quick Guide gives brief details of setting up and using the plug-in so I suggest you read through that document first before proceeding.

General Description
• A Virtual Thermostat plug-in for HS3.
• A number of VStats (current max 20) can be setup, within the single plug-in, which can theoretically use any temperature sensor devices for input and control any On/Off switching devices.
• Each VStat can be configured to operate for Heating or Cooling.
• Each VStat has Day, Night and Away SetPoints.
• Each VStat has a 7 day schedule to automatically switch between Day and Night SetPoints at 15 minute resolution.
• The target temperature can be temporarily raised or lowered manually as well as toggled between Day/Night SetPoints.
• Away mode will interrupt the schedules and set the target temperature to the Away setpoint until Auto is reselected.
• Boost mode will force the controlled device on for a period of time in 15 minute increments.
• There is a separate (windows only) program for quickly creating and editing 7 day schedules for the VStats although they can also use schedules created and edited in the excellent EasyTrigger plug-in.
Comparison with Real Thermostats

An important point to consider when using virtual thermostats is that they are totally dependent on HS3 being in operation and the plug-in running. Conversely most physical thermostats will continue to operate even if HS3 becomes unavailable, for instance due to a computer crash. Depending on what you are using the VStats for, you need to ensure that the implications of losing control are not serious.

My approach with a heating system is as follows:
To protect my system against freezing if HS3 was to fail whilst I was away from home, I have cheap mechanical froststats hardwired in parallel for critical circuits. Most modern boilers have frost protection built in.

To avoid excessive overheating in the event of an HS3 failure, I use one of two alternative approaches. Some switching devices (e.g. Qubino) can be set using parameters to automatically turn off after a pre-set period of time if they don’t receive an On command. The VStats can be set to repeat On commands at least every 15 minutes when active to prevent the device turning off. If HS3 goes down the devices will turn themselves off after the pre-set period. Alternatively in some situations I have a cheap mechanical room thermostat set to a relatively high temperature hardwired in series for critical circuits.
Of course real thermostats aren’t 100% reliable either.

Installation and Upgrading

The SDJ-VStat plug-in runs on windows or linux. The scheduler program, VStat_Scheduler.exe, is a windows only program that has to be run on a windows PC but can interface with SDJ-VStat running on linux over a network connection. The scheduler is optional as there are other ways of creating and editing schedules discussed in the guide. The scheduler is only used to edit schedules, the schedules themselves run within the plug-in.

The plug-in is not currently in the HS3 updater so installation and upgrading has to be carried out manually. The downloaded zip file contains the following:
HSPI_VStat.exe File
VStat_Schedule.exe File
html/images/SDJ-VStat Folder
To install copy:
‘HSPI_VStat.exe’ file to your root HS3 folder
‘html’ folder to your root HS3 folder – This should add the SDJ-VStat folder with the icon files to the existing ‘//html/images/’ path.
If you want to use the ‘VStat_Scheduler.exe’ this needs to either be copied to the HS3 root folder on a windows PC or alternatively it can be run from its own folder on the same PC or a remote PC with network access to your HS3 installation. If not in the HS3 root folder then you need to copy the following HS3 library files to the same folder as VStat_Scheduler.exe:
HomeSeerAPI.dll
HSCF.dll
Scheduller.dll
Enable the Plug-in from the ‘Plug-In>Manage’ page of the web interface. You may need to restart HS3 if the Plug-in is not in the list ready to be enabled.

Configuration and Use

I haven’t written a full guide to this plug-in but there is a Quick Guide which explains the setup and basic use of VStats.

Steve

Last edited by SteveMSJ; April 26th, 2018 at 02:46 PM.
Reply With Quote
  #2  
Old January 7th, 2018, 03:22 PM
Moskus's Avatar
Moskus Moskus is offline
OverSeer
 
Join Date: Aug 2007
Location: Norway
Posts: 3,782
This looks awesome! Thanks!
__________________
HSPro 3.0.0.435, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
Running on Windows 10 (64) virtualized
on ESXi (Fujitsu Primergy TX150 S8).
WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!
Reply With Quote
  #3  
Old January 7th, 2018, 11:19 PM
tome10 tome10 is offline
Seer Master
 
Join Date: Sep 2016
Location: AR
Posts: 712
What relay do you use to control the HVAC? I can't seem to find a z-wave 4 circuit relay.
Reply With Quote
  #4  
Old January 8th, 2018, 08:25 AM
SteveMSJ SteveMSJ is offline
Seer Master
 
Join Date: Jan 2012
Location: UK
Posts: 783
Quote:
Originally Posted by tome10 View Post
What relay do you use to control the HVAC? I can't seem to find a z-wave 4 circuit relay.
I only use single and double switches, Fibaro and Qubino. I'm not aware of any Z-Wave devices with more than 2 switches.
To switch 4 circuits I would just use multiple switches.

Just to be clear this plug-in simulates heating thermostats, there are no cooling or fan controls.

Steve
Reply With Quote
  #5  
Old January 8th, 2018, 11:13 PM
IlyZislin IlyZislin is offline
Viewer
 
Join Date: Jan 2018
Location: NYC
Posts: 2
Works well so far

Got installed on HSPi. Works well so far. Only "issue" is that I had to reload the Devices page in order for VStat devices to show up.
Reply With Quote
  #6  
Old January 9th, 2018, 06:00 AM
SteveMSJ SteveMSJ is offline
Seer Master
 
Join Date: Jan 2012
Location: UK
Posts: 783
Quote:
Originally Posted by IlyZislin View Post
Got installed on HSPi. Works well so far. Only "issue" is that I had to reload the Devices page in order for VStat devices to show up.
Glad it's working.

Whenever you create a new device in HS3, if Location1(Room) or Location2(Floor) are set to a new value the devices are filtered out on the Device Management page. As you have found you need to select them from the filter drop downs or click on Show All. I've often thought it would be best if the HS3 default was that new types were ticked by default. Many times I have created a virtual device and then struggled to find it. When you have hundreds of devices selecting 'Show All' isn't particularly helpful.

For SDJ-VStat the default Location1 is VSTAT and the default Location2 is the name you have given the VStat. If you select just VSTAT in the Location1 filter and Check All in the Location2 filter it will show all your VStat root and child devices grouped appropriately.

By the way you can edit the names and locations to whatever you want without upsetting the plug-in.

Steve
Reply With Quote
  #7  
Old January 10th, 2018, 11:49 PM
IlyZislin IlyZislin is offline
Viewer
 
Join Date: Jan 2018
Location: NYC
Posts: 2
Great work, Steve! is there a way to have ability to "inverse" from heating to cooling (for the summer)?
Reply With Quote
  #8  
Old January 11th, 2018, 05:18 AM
SteveMSJ SteveMSJ is offline
Seer Master
 
Join Date: Jan 2012
Location: UK
Posts: 783
Quote:
Originally Posted by IlyZislin View Post
Great work, Steve! is there a way to have ability to "inverse" from heating to cooling (for the summer)?
Summer for us in Northern England is a time of the year when we might get a few days when the heating doesn't come on! We like nothing more than to talk(moan) about the weather. Cooling(AC) is pretty rare in domestic properties in the UK. So, my initial reaction was no. It isn't something I would ever have a need for and it would be a lot of work to implement. However, I like a challenge so perhaps it might be something I could look at implementing in the future if I have some time on my hands.

Not being familiar with the use of thermostats in a cooling situation I need to think through the way it would work. Exploring the concept a little, for the pi to be adapted to have cooling as well as heating VStats, they would need to operate in the same manner as the current VStats. At the moment I have 3 setpoints which I call High, Low and Frost, with the VStat switching between High and Low controlled by the schedule. Some similar thermostats might refer to these as:
High -> Day
Low -> Night
Frost -> Away
I suppose if I was to rename them Day, Night and Away they could apply in a Cooling as well as Heating mode. Or, do you have other suggestions for the SetPoint naming in a Cooling mode?

Presumably in a Cooling mode the Day setpoint would be the lowest temp with Night set slightly higher and Away set at some high value so that the AC would only come on in extreme circumstances whilst away.

I'm presuming also that I would configure it so that for a particular zone you would have one VStat configured for heating and one VStat configured for cooling and switch between them seasonally. They would be controlling different Devices and have different setpoint temperatures but probably use the same temperature sensors.

A VStat in cooling operation would follow the same concept as the current VStats, i.e. Auto mode switching between Day and Night setpoints according to the schedule, but turning the Controlled Device On when the temperature is above the setpoint and Off when below. Boost would operate normally, i.e. turn the Control Device On for a period of time. Open Windows could work the same way, i.e. temporarily turn your AC Off if you open windows. Weather compensation could also work in a similar manner e.g. advancing the time of a change from Night to Day if it is particularly hot outside. Other features such as raising and lowering target temperatures would be the same whether in Heating or Cooling mode.

Does this make sense?

Steve

Last edited by SteveMSJ; January 11th, 2018 at 06:25 AM.
Reply With Quote
  #9  
Old January 11th, 2018, 11:46 AM
tome10 tome10 is offline
Seer Master
 
Join Date: Sep 2016
Location: AR
Posts: 712
I do like the idea of 3 setpoints, youncoukd mimic an alarm systemís naming ie Stay, Away, Night. The wife likes it cold at night, and the ability prioritize the bedroom sensor only at night would be a treat.
You mentioned earlier that the Plugin didnít have fan control. I mention it because my HVAC people told me to leave the fan running all the time for circulation,. I donít have controllable tstats yet, but I assume I could just leave the fan control at the thermostat. Though eventually, I may get comfortable with replacing the thermostat altogether in lieu of relays, but thatís on down the road ĎI thinkí. I mean once you have multiple temp sensors in other locations, the z-wavel thermostat is only acting as a relay at this point. Although, there could be some kind of programming in the thermostats that Iím not aware of.
Reply With Quote
  #10  
Old January 17th, 2018, 06:03 PM
BME BME is offline
Seer
 
Join Date: Jan 2018
Location: Norway
Posts: 7
Temperature Scale

Installed the plugin on my Linux system (HomeTroller).

The temperature scale is set to Fahrenheit, but my system value is Celsius.
The config says that the scale is from Global setting in HS3. Isn't this setting the one from the setup menu under Tools?

Is it possible to change this manually?

Last edited by BME; January 19th, 2018 at 03:43 AM.
Reply With Quote
  #11  
Old January 19th, 2018, 09:45 AM
SteveMSJ SteveMSJ is offline
Seer Master
 
Join Date: Jan 2012
Location: UK
Posts: 783
*EDIT removed attachment and updated the first post of this thread.

Quote:
Originally Posted by BME View Post
Installed the plugin on my Linux system (HomeTroller).

The temperature scale is set to Fahrenheit, but my system value is Celsius.
The config says that the scale is from Global setting in HS3. Isn't this setting the one from the setup menu under Tools?

Is it possible to change this manually?
The plugin looks for 'gGlobalTempScaleF' in the HS3 'settings.ini' file to determine whether HS3 is configured for Fahrenheit or Celsius. Unfortunately I spelled 'Settings.ini' with a capital S Not a problem on Windows, which I am running, but on linux it doesn't find the file.

The pi used to default to Celsius unless it found that gGlobalTempScaleF=True. However, I recently discovered that HS3 doesn't add the parameter to the ini file unless you change HS3 from the default of F to C. I changed the pi to default to Fahrenheit if it didn't find the setting. The consequence you have found is that because of the erroneous capital letter it defaults to F on linux whatever.

Can you try the attached 3.0.7.1 and see if it corrects the error. Disable the plug-in and copy the new HSPI_SDJ_VStat.exe over the existing and re-enable the plug-in. If you have already configured some VStats the temperature ranges will be set wrong in the status pairs of the devices. You should be able to correct them by clicking the 'Rebuild VStat' buttons for each VStat on the Config page. You will probably want to change the various global settings as well because they will have been configured for Fahrenheit.

Let me know how you get on and I will update the version attached to the first post.

Steve

Last edited by SteveMSJ; January 20th, 2018 at 01:12 PM.
Reply With Quote
  #12  
Old January 20th, 2018, 04:19 AM
Mario from Spain Mario from Spain is offline
Seer Deluxe
 
Join Date: Nov 2002
Location: Madrid, SPAIN
Posts: 319
SDJ-VStat Virtual Thermostat Plug-in Beta

Hi.

Just an update to say you that Iím using the plugin for two weeks with two virtual thermostats and itís working fantastic.

Thank you Steve!
Reply With Quote
  #13  
Old January 20th, 2018, 01:00 PM
BME BME is offline
Seer
 
Join Date: Jan 2018
Location: Norway
Posts: 7
Quote:
Originally Posted by SteveMSJ View Post
The plugin looks for 'gGlobalTempScaleF' in the HS3 'settings.ini' file to determine whether HS3 is configured for Fahrenheit or Celsius. Unfortunately I spelled 'Settings.ini' with a capital S Not a problem on Windows, which I am running, but on linux it doesn't find the file.

The pi used to default to Celsius unless it found that gGlobalTempScaleF=True. However, I recently discovered that HS3 doesn't add the parameter to the ini file unless you change HS3 from the default of F to C. I changed the pi to default to Fahrenheit if it didn't find the setting. The consequence you have found is that because of the erroneous capital letter it defaults to F on linux whatever.

Can you try the attached 3.0.7.1 and see if it corrects the error. Disable the plug-in and copy the new HSPI_SDJ_VStat.exe over the existing and re-enable the plug-in. If you have already configured some VStats the temperature ranges will be set wrong in the status pairs of the devices. You should be able to correct them by clicking the 'Rebuild VStat' buttons for each VStat on the Config page. You will probably want to change the various global settings as well because they will have been configured for Fahrenheit.

Let me know how you get on and I will update the version attached to the first post.

Steve
This fixed it.
It now displays Celsius.
Thank you!
Reply With Quote
  #14  
Old January 20th, 2018, 01:09 PM
SteveMSJ SteveMSJ is offline
Seer Master
 
Join Date: Jan 2012
Location: UK
Posts: 783
Quote:
Originally Posted by Mario from Spain View Post
Hi.

Just an update to say you that Iím using the plugin for two weeks with two virtual thermostats and itís working fantastic.

Thank you Steve!
Thanks for your feedback Mario.

Steve
Reply With Quote
  #15  
Old January 20th, 2018, 01:18 PM
SteveMSJ SteveMSJ is offline
Seer Master
 
Join Date: Jan 2012
Location: UK
Posts: 783
Quote:
Originally Posted by BME View Post
This fixed it.
It now displays Celsius.
Thank you!
That's good. Thanks for the feedback.

Steve
Reply With Quote
  #16  
Old January 20th, 2018, 01:20 PM
SteveMSJ SteveMSJ is offline
Seer Master
 
Join Date: Jan 2012
Location: UK
Posts: 783
Attachment to 1st post of this thread updated to Version 3.0.7.1.
Bug corrected for Linux systems using Celsius scale.

Steve
Reply With Quote
  #17  
Old January 22nd, 2018, 03:23 PM
BME BME is offline
Seer
 
Join Date: Jan 2018
Location: Norway
Posts: 7
Looks good after 24 hours use...
Just a few questions and comments

What is the logic within the thermostat?
When do you turn on the heat controller in regards to target temp?
And when do you turn it off again?
Is the any form of PWM involved?

I have some issues with the heater turning off, but I suspect it's with the controller.


For the target reduction when open window (using Celsius), the default setting is to reduce target by 10 degrees, not lower than 40 C (104 F).
No big issue, but it's a bit high.
Reply With Quote
  #18  
Old January 23rd, 2018, 12:43 AM
SteveMSJ SteveMSJ is offline
Seer Master
 
Join Date: Jan 2012
Location: UK
Posts: 783
Quote:
Originally Posted by BME View Post
What is the logic within the thermostat?
When do you turn on the heat controller in regards to target temp?
And when do you turn it off again?
Is the any form of PWM involved?
The controlled device is turned ON when the Current Temperature drops to the Target Temperature or below. It is turned OFF when the Current Temperature rises above the Target Temperature + Temperature Swing value. The Temperature Swing value can be set differently for High, Low, Frost and Hold on the Config Page.
So, for example if:
Mode is High
High Swing is 0.49C
Target Temperature is 20C
The Control will turn ON when the temp drops to 20C and turn OFF when it rises to 20.5C. When the temp is <=20 it will always be ON, when >=20.5 it will always be OFF, when between 20 and 20.5 it will not change.
I hope that makes sense.


Quote:
Originally Posted by BME View Post
For the target reduction when open window (using Celsius), the default setting is to reduce target by 10 degrees, not lower than 40 C (104 F).
No big issue, but it's a bit high.
With the HS3 scale set to Celsius the default values for the Target Reduction should be 5C and Not Lower than 5C. Yours has picked up the Fahrenheit defaults of 10F and 40F due to the bug in 3.0.7.0. affecting Linux and Celsius only. Because your SDJ-VStat.ini file was created in 3.0.7.0. the defaults are set wrong. You can of course edit these values but each time you create a new VStat it will start with the defaults. You could correct this either by deleting the SDJ-VStat.ini file with the pi disabled so it creates a new one, or by editing the following parameters in the SDJ-VStat.ini file:
DefaultTempReduction=5
DefaultMinTemp=5
The SDJ-VStat.ini file is in the /Config directory of HS3. Deleting it so a new one is recreated will set all settings to the defaults. If you use Jon00's INI editor you can edit the ini file from the HS3 web interface.

Steve
Reply With Quote
  #19  
Old January 23rd, 2018, 01:11 AM
tome10 tome10 is offline
Seer Master
 
Join Date: Sep 2016
Location: AR
Posts: 712
Quote:
The controlled device is turned ON when the Current Temperature drops to the Target Temperature or below. It is turned OFF when the Current Temperature rises above the Target Temperature + Temperature Swing value. The Temperature Swing value can be set differently for High, Low, Frost and Hold on the Config Page.
So, for example if:
Mode is High
High Swing is 0.49C
Target Temperature is 20C
The Control will turn ON when the temp drops to 20C and turn OFF when it rises to 20.5C. When the temp is <=20 it will always be ON, when >=20.5 it will always be OFF, when between 20 and 20.5 it will not change.
I hope that makes sense.
I didn't follow, but it's probably because i'm Celsius ignorant. The 'High Swing' of 49C (I assume 0.49 is a typo) is a long ways from 20C. I don't understand. sorry.
Can I get an example in Fahrenheit with the target at 71F, High would be 72F, and the low would be 70F.
Reply With Quote
  #20  
Old January 23rd, 2018, 04:34 AM
SteveMSJ SteveMSJ is offline
Seer Master
 
Join Date: Jan 2012
Location: UK
Posts: 783
Quote:
Originally Posted by tome10 View Post
I didn't follow, but it's probably because i'm Celsius ignorant. The 'High Swing' of 49C (I assume 0.49 is a typo) is a long ways from 20C. I don't understand. sorry.
Can I get an example in Fahrenheit with the target at 71F, High would be 72F, and the low would be 70F.
The 0.49C isn't a typo it's just under half a degree.

For your example in Fahrenheit you would use a SetPoint of 70F and a temperature swing of 1.9F.
The Target Temperature would be 70F.
The Control would turn ON when the temp dropped to 70F and turn OFF when it reached 72F then back on again when it dropped back to 70F.

The temperature swing is basically the overshoot you want on your SetPoints. How large you make it depends on personal choice and the response time of your heating system. If you have a system with a long lag you might want to set it to zero. But, if the heating responds very quickly it would be constantly turning ON and OFF if you didn't have a reasonable swing set.

You can set different Temperature Swings for the different types of SetPoints if so desired.

Steve
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My garage closed--- but virtual device should have prevented it MJackson HS3 Event Clinic 5 June 4th, 2017 07:01 PM
Heatmiser NEO Thermostat Plug-In Beta NicolaiL Script & Plug-In Library 0 October 27th, 2014 10:48 AM
CLOSED --- IMPORTANT: Z-Wave Lock Information Needed for the plug-in Blade BLLock (3P) 22 September 8th, 2013 01:19 PM
Closed Beta Forum Too Soon, Too Many Unanswered Questions. Gogs HS2 / HSPRO 11 August 15th, 2005 02:29 PM
Version 3.0.0 just about ready - in closed beta test right now bmms Hauppauge Capture (3P) 8 January 29th, 2004 11:21 AM


All times are GMT -4. The time now is 10:25 PM.


Copyright HomeSeer Technologies, LLC