Announcement

Collapse
No announcement yet.

SDJ-VStat Virtual Thermostat Plug-in Beta CLOSED

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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 26, 2018, 01:46 PM.

    #2
    This looks awesome! Thanks!
    HSPro 3.0.0.458, 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"!

    Comment


      #3
      What relay do you use to control the HVAC? I can't seem to find a z-wave 4 circuit relay.

      Comment


        #4
        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

        Comment


          #5
          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.

          Comment


            #6
            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

            Comment


              #7
              Great work, Steve! is there a way to have ability to "inverse" from heating to cooling (for the summer)?

              Comment


                #8
                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 11, 2018, 05:25 AM.

                Comment


                  #9
                  I do like the idea of 3 setpoints, youncoukd mimic an alarm systems 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 didnt have fan control. I mention it because my HVAC people told me to leave the fan running all the time for circulation,. I dont 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 thats 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 Im not aware of.
                  Last edited by macromark; August 20, 2018, 04:02 PM.

                  Comment


                    #10
                    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 19, 2018, 02:43 AM.

                    Comment


                      #11
                      *EDIT removed attachment and updated the first post of this thread.

                      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 20, 2018, 12:12 PM.

                      Comment


                        #12

                        Comment


                          #13
                          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!

                          Comment


                            #14
                            Thanks for your feedback Mario.

                            Steve

                            Comment


                              #15
                              Originally posted by BME View Post
                              This fixed it.
                              It now displays Celsius.
                              Thank you!
                              That's good. Thanks for the feedback.

                              Steve

                              Comment

                              Working...
                              X