We have moved at community.getvera.com

Author Topic: WDSC HVAC Control Plugin (a.k.a If door is opened for 5 minutes...turn off air)  (Read 31097 times)

Offline SOlivas

  • Sr. Member
  • ****
  • Posts: 282
  • Karma: +1/-1
This plugin is a product of the code found in this topic:

http://forum.micasaverde.com/index.php/topic,4327.msg121595.html#msg121595

I've moved the plugin code here to make it easier to people to find.


Files are now available at:  http://code.mios.com/trac/mios_wdsc-hvac

You can also find this in the Apps Store

Updated:  03 October 2013
UI7 Workaround:  15 August 2014
-------------------------------------------------------------------------------------------
See at the end of this for a list of updates/fixes to this code

Ok, I got bored and wanted to try my hand at making the initial code that mcvflorin posted into a plugin, with a few additional features. I know that there is a SmartVirtualThermostat Plugin already in the apps store (I have not tried it), and because of this, I will only post the code here (for now). This plugin does not implement the later modification posted to accommodate motion sensors, but I may try this in a future version.

I call this plugin:   Window, Door, and Sensor Control HVAC (WDSC HVAC) plugin v1.2

Features: 

Will set your thermostat to one of the modes defined in OnMode, OffMode, HighTempMode and LowTempMode.  Depending on how the plugin has been configured will dictate what mode your thermostat will be set to.

OffMode is normally used when a Door or Window sensor is opened for the amount of time defined.  If the plugin catches that a door or window sensor has been tripped, it will then set the thermostat to OffMode.

HighTempMode and LowTempMode are used when the plugin detects that a temperature sensor has tripped.  Depending on if it was a high or low temperature sensor, the thermostats will be set to the mode defined in HighTempMode or LowTempMode.

OnMode is used the conditions defined above have cleared.  Additionally, the plugin will check to see if the thermostats had their modes changed, and reset the mode to what is defined in OnMode.


Here are the variables that the plugin will expose after it initializes:

Sensors = a list of Sensors that will be checked. 
* Format:  Needs to be entered in the format of [sensor id#]="name"
Example:
Code: [Select]
42=UPHall_W, 31=GRFrnt_D, 41=GRLanai_D, 38=UPLBckBR_W, 39=UPRBckBR_W, 36=MastBR_D, 32=LFrtBR_D, 34=LBkBR_D, 35=LwHall_D, 40=LwHall_W
Thermostats = a list of thermostats that will be controlled by this plugin.
* Format:  Needs to be entered in the format of [thermostat id#]="name"
Example:
Code: [Select]
4=GRThermostat, 20=LHThermostat
HighTempSensors = a list of temperature sensors with a high temperature tripping point.  The tripping point is defined as anything that is above the value defined.
* Format: Needs to be entered in the format of [temperature sensor id#]=[tripping point]
Example: 
Code: [Select]
45=80, 78=90
LowTempSensors = a list of temperature sensors with a lowtemperature tripping point.  The tripping point is defined as anything that is below the value defined.
* Format: Needs to be entered in the format of [temperature sensor id#]=[tripping point]
Example: 
Code: [Select]
45=32, 78=65
Note:  To "unset" the high or low temperature sensors, replace the values of the variables with "*undefined*" (without the quotes).  This will "turn off" the checking of the high or low temperature sensors by the plugin.  This can only be done for the temperature sensors, the door/window senors are mandatory and you currently cannot use this plugin to respond to temperature sensors only.

Refresh = number of seconds to wait between checking the sensors and controlling the thermostats.  Default is set to 300 seconds (5 minutes).  Min = 300, Max = 86400.  Anything set/passed outside the min/max range will be ignored, and the default of 300 will be used.  Setting this to 0 will disable the automatic polling.

The following are the temperature modes that you can set.  Note that OnMode and OffMode are mandatory.
OnMode = What mode should thermostats be restored to when sensors are closed (no longer tripped)

OffMode = What mode should thermostats be set to when sensors are open (tripped).  Also can be though of as "Door/Window Sensor" mode, since this is the mode your thermostat will be set to when a Door/Window Sensor is tripped.

HighTempMode = What mode should thermostats be set to when a high temperature sensor has been tripped

LowTempMode = What mode should thermostats be set to when a low temperature sensor has been tripped

Valid modes are:
0  = Off (default for OffMode, 99 for rest)
1  = HeatOn
2  = CoolOn
3  = Energy Savings Mode
4  = Normal mode (turns off Energy Savings Mode)
5  = AutoChangeOver
6  = AuxHeatOn
7  = EconomyHeatOn
8  = EmergencyHeatOn
9  = AuxCoolOn
10 = EconomyCoolOn
11 = BuildingProtection
99 = Do nothing

VerboseDebug - Turns on the logging of additional messages for troubleshooting

0 = Off (default)
1 = On

-- This will dump the contents of the String 2 Table routines as it converts the information in Sensors and Thermostats, useful for troubleshooting if you have entered something wrong  in these variables.

All log messages start with "WDSC HVAC" for easy identification.

StartupCheck - Normally, the plugin will wait 300 seconds (5 minutes) when it starts before doing a check of the sensors.  You can set this variable to run a check right after it has finished initializing.

0 = Off (default)
1 = On

PriorityMode  = Defines if Window/Door or Temperature events have priority for controlling your thermostats

0 = Set to OffMode (default)
1 = Temperature (any)
2 = High temperature
3 = Low temperature

When using PriorityMode, the plugin assumes after the check that if no temperature sensors are tripped, that the system should be placed into OffMode. 

SafeMode = Defines if the more complex checking used when two or more sensors is tripped should be run even when a single sensor has tripped.  When set, if PriorityMode is 0, your system will default to OffMode even if a temperature sensor has been tripped.

0 = Off
1 = On (default)

EnergySavingsMode = Defines how your thermostats should be set to EnergySavingsMode.

0 = Use SwitchPower service only (default)
1 = Use EnergySavingsMode operating mode only

Additionally, two untested functions are exposed:

ForcePoll = Allows for you to call the polling/checking option in your own scripts/scenes

RestartPolling = Allows you to change to interval for polling. Same rules apply as for setting Refresh variable.  You can use this to start or stop polling in your own code/scenes.

Example:

Code: [Select]
luup.call_action("urn:wdsc-hvac-org:serviceId:WDSC_HVAC1", "RestartPolling",{ delay= 0 }, 66)
Note:  How to call the functions in this plugin have changed.  Previously, they were incorrectly defined as urn:wdsc-hvac-org:device:WDSC_HVAC1.  Anyone updating to this code will need to change their LUUP code to reflect this change.

This code would turn off polling for your WDSC device (assuming your plugin is device #66)

See attached files for the code.

Also note the following information that I put into the implementation file:

Code: [Select]
-- ******************************************************
-- Window, Door, and Sensor HVAC Control (WDSC HVAC) plugin v1.2
-- Code originally by mcvflorin and posted to
-- http://forum.micasaverde.com/index.php/topic,4327.45.html
-- Packaged in plugin form by SOlivas, with modifications
--
-- History:
-- 1.0 - Initial version released.
--       mcvflorin's code with modifications to turn thermostats to specified modes (On or Off) during check if
--       door or window sensor is tripped.  Currently does not support internal motion sensors in this
--       version.  May be added in a future release.
-- 1.1 - Implemented urn:upnp-org:serviceId:SwitchPower1 to make it easy to trigger scenes when OnMode and
--       OffMode fire.  Also added icon in .json file.
-- 1.2 - Implemented temperature sensor support.  By defining temperature sensors, a high and low
--       limit and an action to do if each it reached or exceeded, you can control your HVAC system
--       based on climate conditions.  Direct Twilio Plugin support has been removed.
-- Also standardized the values used to control the settings across all modes.
--
--
-- While I do not claim copyright for this plugin, I do feel that the following from the BSD license
-- is appropriate, since this is controlling your thermostat connected to your HVAC equipment and there
-- is always possibility for things to not work in the way in which they were intended.
--
-- ** USE AT YOUR OWN RISK!!  IF YOUR HVAC EQUIPMENT MELTS DOWN, BREAKS, OR CATCHES FIRE/EXPLODES
-- ** YOU HAVE BEEN WARNED! 
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
--WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
--ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
--TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
--HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
--POSSIBILITY OF SUCH DAMAGE.
--
-- Information:
--
-- ** Implements code from the following:
--
-- ** A modified version of the String 2 Lua code found at:
-- **    http://www.gymbyl.com/programming/s2t.html
--
-- Plugin settings:
-- VerboseDebug will toggle the displaying of additional log messages for troubleshooting
-- 0 = Disabled (default)
-- 1 = Enabled
--
-- OnMode, OffMode, HTMode, LTMode can be one of the following:
-- 0  = Off (default for OffMode, 99 for rest)
-- 1  = HeatOn
-- 2  = CoolOn
-- 3  = Energy Savings Mode
-- 4  = Normal mode (turns off Energy Savings Mode)
-- 5  = AutoChangeOver
-- 6  = AuxHeatOn
-- 7  = EconomyHeatOn
-- 8  = EmergencyHeatOn
-- 9  = AuxCoolOn
-- 10 = EconomyCoolOn
-- 11 = BuildingProtection
-- 99 = Do nothing
--
-- PriorityMode defines if Window/Door or Temperature events have priority for controlling your HVAC
-- 0 = Window/Door (default)
-- 1 = Temperature (any)
-- 2 = High temperature
-- 3 = Low temperature
--
-- EnergySavingsMode has the following options:
-- 0 = Use SwitchPower service only (default)
-- 1 = Use EnergySavingsMode operating mode only
--
-- ******************************************************

I hope someone finds this little exercise of mine useful.

Note:

I have not tested this beyond seeing that the code polls successfully every 5 minutes and displays the correct info in my Vera's logs.  This code may contain bugs, some fatal and others not so.  I have also not tested the integration with the Twilio Plugin.  If you find what you think is a genuine bug, please let me know.  I already have the basic version of this code (with the part that turns the thermostat back on) in a scene, and didn't have a chance to mess with this plugin to see how it works.


Updates:   Yes, there are were bugs in the code that prevented it from working correctly.  I am currently using this in my system, and it seems to work fine (although I have not yet tested all the Thermostat modes).

1. Made a fix to the string 2 table code and added in a verbose debug flag for troubleshooting.
 
2.  Fixed an error where device ID number was not being converted to a number, but passed as a string when using luup.call_action and luup.variable_get, causing them to fail. 

3. Fixed the format of what the strings in Sensors and Thermostats should be, before I just re-formatted what was in the old code without realizing the the routine I use to convert won't remove the square brackets around the numbers.

4. There was a piece of code held over from my implementation in a scene, so that if the Thermostat was Off, it would never change to the state specified in OnMode.  This has been fixed.

5.  Added in checks to see what the thermostat is already set at, and if it is the same setting as the target mode for OnMode or OffMode, it skips setting the thermostat again to the same mode.  Shouldn't make a difference, but it is a precaution if your thermostat does something each time it changes into a certain mode.

--- 

Changes in Version 1.1:

- I took suggestion #1 of watou below, and implemented urn:schemas-upnp-org:service:SwitchPower:1 to make it easier to trigger scenes.
- By default, the readVariable messages are now turned off in the logs.  Set VerboseDebug to turn back on.

I have no removed the Twilio part of this code yet, since this version was to mainly implement urn:schemas-upnp-org:service:SwitchPower:1.  Now that I know a bit more on how to use .json files and implement other devices, I will look at what else I can do and remove the Twilio coupling from the plugin in the next release.

Changes in 1.2:

Support was added for external temperature sensors.  You can define multiple sensors as high temp or low temp with a trip point. When the temperature drops below this tripping point, the mode defined in HTMode for high temperature or LTMode for low temperature will trigger.  This will remain valid until the high or low temp mode clears, which will result in the plugin resetting to OnMode.  Currently when OffMode or any of the high or low temp modes trip, it registers as the plugin turning off using the PowerSwitch service.  A future version will implement way to distinguish what exactly caused the plugin to trip (i.e., what mode it is in).

There are numerous changes in this release.  I've re-done some of the code used to control the thermostat, standardizing the values used in the OnMode, OffMode, HTMode, and LTMode settings.

Fixed a problem where the device was incorrectly defined.  It was urn:wdsc-hvac-org:device:WDSC_HVAC1, which is not correct for a Service.  It is now defined as urn:wdsc-hvac-org:serviceId:WDSC_HVAC1, so all calls to the plugin need to be updated to reflect this change.

Direct Twilio support was removed from this version as well.  To use Twilio to send notifications, you will have to setup a trigger and then use LUUP to send the notification. 

--- UI7 Workaround ----
Date:  15 August 2014

A work-around that makes this plugin work with UI7 has been found by user @charettepa.  Once you install the plugin from the app store, you need to manually add the device to your Vera (same as if you downloaded the files from this post and uploaded them manually to your device).

Once you have manually created the device, it will show up in the UI and you can configure it.
« Last Edit: August 16, 2014, 02:29:01 am by SOlivas »
Vera 3 (1.5.622) / 9x GE/Jasco 45609 / 2x GE/Jasco 45612 / 2x GE/Jasco 45614 / 1x MIMO Lite
1x Twine (http://forum.micasaverde.com/index.php/topic,15617.0.html), DSC Security System, Honeywell  YTH8320ZW1007 Thermostat, 1x Fortrezz WWA-01, 1x CA9000 Wireless PIR Sensor

Offline watou

  • Community Beta
  • Hero Member
  • ******
  • Posts: 889
  • Karma: +44/-12
Very cool!  People are going to find this plugin very useful.  I have a couple suggestions for your consideration:
  • Have the plugin implement urn:schemas-upnp-org:service:SwitchPower:1 so that its on/off state is exposed in a standard way for triggering scenes.
  • Or, implement urn:schemas-upnp-org:service:Dimming:1 so that you effectively create a "dimmable" virtual thermostat, so for example, if one window is open, setting load level target to 80 can just set back the heating/cooling a bit, but if two windows are open, switch the heating/cooling off altogether (load level 0).  Let the user choose which actions against the target thermostat will occur at different load levels.  This would be very useful all by itself for direct user interaction, and your plugin thus far is already a long way towards this.
  • Allow the Vera's triggers/scenes to do all the notifications, triggered by events from the standard services mentioned above, and decouple the Twilio plugin from this plugin so users have a choice of what actions to take based on state changes (even though your Twilio plugin is great!).

watou


Offline SOlivas

  • Sr. Member
  • ****
  • Posts: 282
  • Karma: +1/-1
Thanks!

I just tried my hand at actually playing with .json files today, and learned how triggers are defined (kinda, still haven't played with what is defined in the .json file).

I'm going to have to dig around and see if I can figure out how to implement #1, since it will be the easiest for me having never implemented another device to expose a state before.  After I get that, then #2 would probably be a lot easier to try.

I only added the Twilio notification as a test.  I've thought about killing it anyways, since I know that not everyone would use it.  Hmmm, I wonder if it is possible to define a function call in a string, then call it?  It would allow more advanced people a means to substitute their own function calls, if they didn't want to setup a scene.  Might be too much of a hassle to try to mess with.
Vera 3 (1.5.622) / 9x GE/Jasco 45609 / 2x GE/Jasco 45612 / 2x GE/Jasco 45614 / 1x MIMO Lite
1x Twine (http://forum.micasaverde.com/index.php/topic,15617.0.html), DSC Security System, Honeywell  YTH8320ZW1007 Thermostat, 1x Fortrezz WWA-01, 1x CA9000 Wireless PIR Sensor

Offline leo28

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
SOlivas, AWESOME!

Like others looking for this solution, I have renters who set the A/C to 70 and open the sliding glass door to the 95 degree Florida heat and humidity so they can cool the outdoor deck!

I'm new to VeraMios and after a bit of a learning curve this morning figuring out how to upload the files (I found I had to register and be logged in to the forum to even see your files), setup the WDSC HVAC as an added device, and put in the correct addresses (I figured out I had to use the device # and not the altid) and names for my thermostat and door sensor, I finally got it all correct and tested it out.  It worked GREAT.  I'm doing all of this remotely at a condo I own.  It is about 40 miles from my home and it's vacant this weekend so it's a good time for testing.

I set a notification for my thermostat to notify me when it changed to "off" mode.  I changed the "tripped" value (in advanced settings) on my door sensor from a 0 to a 1 so it would think it was tripped (simulating a door opened state) and after 300 seconds the plugin turned the AC to off and I got my "A/C off" notification.   I changed the "tripped" value of my door sensor back to a 0 so it would show a "not tripped" state (as if the door had been closed) and waited 300 seconds again and nothing happened which is the correct action because I set your plugin to do nothing if the door was closed again.  I'm using a Trane t-stat and a Schlage door and window sensor.  For some reason the Schlage door sensor installed as a motion sensor but it still seems to work as a door sensor.  I armed the sensor previously instead of leaving it in bypass - don't know if this would make a difference in the plugin or not.  I might try it again later while it is in bypass.  I manually turned my A/C back to Cool through my Veralite interface and waited another 300 seconds to see what happened.  My door sensor was back in the "not tripped" state and the plugin did nothing which was exactly correct.   

I will do further testing when I'm back at the condo next week. 

I thank you for taking the time with this plugin and so far it works perfectly for what I needed!  Very much appreciated because it would take me forever to learn LUUP code to do this myself. 

Offline SOlivas

  • Sr. Member
  • ****
  • Posts: 282
  • Karma: +1/-1
Thanks.  I'm glad people are finding a use for this.  When I get a chance, I will see about adding the functions watou asked for (never done it, so I'm sure I'll break something my first time around  ::) )

Yes, the device number are required for this, since it passes these device numbers to poll the sensors/thermostats and also to turn the Thermostat On/Off (Energy Savings mode is exposed as a light switch,  Off is energy savings mode, On is Normal mode) and change the Mode Setting.

Let me know if you have a problem with it acting strange or if something breaks (just make sure you've read the warning message first!)   ;D


Vera 3 (1.5.622) / 9x GE/Jasco 45609 / 2x GE/Jasco 45612 / 2x GE/Jasco 45614 / 1x MIMO Lite
1x Twine (http://forum.micasaverde.com/index.php/topic,15617.0.html), DSC Security System, Honeywell  YTH8320ZW1007 Thermostat, 1x Fortrezz WWA-01, 1x CA9000 Wireless PIR Sensor

Offline leo28

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
I tested the plugin with the door sensor in bypass (as opposed to armed mode) and it functioned perfectly.

I did read your warning  ;D

IF YOUR HVAC EQUIPMENT MELTS DOWN, BREAKS, OR CATCHES FIRE OR EXPLODES -- ** YOU HAVE BEEN WARNED! 

I believe my t-stat has a built in feature that will not let the A/C short cycle, but that shouldn't happen anyway as I'm not allowing the plugin to turn the A/C back on.  My A/C could melt down or explode the way the renter was abusing it.  I could tell they were running the A/C full out with the door open because I set it to 74 before their arrival and the indoor temp should have been around 74 when they arrived.  A couple hours after they should have arrived I logged in to VeraMios to see how things were doing and the A/C was in cooling and set to 70 but the indoor temp was 84 - outdoor temp was around 95.  I called a neighbor and asked him to take a look to see if my sliding door was open and, sure nuff, they were air conditioning Florida. 

So many things can go wrong with this scenario.  For one, it's a huge waste of energy and my money for electricity and a lot of wear and tear on my A/C system.  If they run it like this their entire stay, I may have to deal with moldy ductwork and sweating grills getting rusty and dripping condensate on the walls and floors. 

I originally installed the VeraLite so I could add a new door code to the Schlage lockset for the next guest and delete the old door code without driving 45 minutes to do it in person.  Now I'm finding out many more uses for the Vera system.  These nice people have been coming for a few years and I always wondered why the electric bill was so high when they left.  I thought it was because they came in one of the hottest months in Florida, but now I know the real reason.  I want to take care of my investment but I don't want to become Big Brother in the process. 

It's a landlord's dilema, but I'm still very thankful for the plugin you created!!


Offline watou

  • Community Beta
  • Hero Member
  • ******
  • Posts: 889
  • Karma: +44/-12
I want to take care of my investment but I don't want to become Big Brother in the process. 

It's a landlord's dilema, but I'm still very thankful for the plugin you created!!

(I know you didn't ask me but) I would recommend full disclosure to your tenants, but also present it as a positive feature to not waste energy/money/keep costs down but to run the cooling only when it's going to really cool the place.  "Automatic thermostat" == good!

Offline SOlivas

  • Sr. Member
  • ****
  • Posts: 282
  • Karma: +1/-1
I believe my t-stat has a built in feature that will not let the A/C short cycle, but that shouldn't happen anyway as I'm not allowing the plugin to turn the A/C back on. 

I know, mine has it too.  I have a Honeywell YTH8320ZW1007/U Z-Wave Thermostat, which replaced the same series that was not Z-Wave enabled (the look almost exactly the same, just a few minor differences, but the display and controls are mostly the same).  Except for having to hookup the common wire on the Furnace (thanks to my installer for running wire with the extra wires that weren't used, just had to strip the insulation, loosen the screw on the terminal, and double it up with the common wire that is already there for the A/C) and change the back plate to the one that came with the thermostat, it was practically a drop-in replacement.  I just copied all the settings from the old unit, and programmed the new unit for the same.  The new unit had a few extra features in some places, but nothing that would kill anything.

One thing I did notice with it, if you know how to program the unit, you can turn change the amount of time between cycling of your compressor and turn off the wait, effectively killing it. 

The reason for this warning is, there is no telling who has a system in which this setting was misconfigured or simply ignored (turned off), or maybe a cheap one that doesn't work or is broken.  I wanted to make sure people know the dangers of this plugin, especially if they start really playing with it or something doesn't work right. 

Call me paranoid, but I feel that when having a piece of code controlling a complex and expensive system, that you should know in advance what you are getting yourself into.  It is not just "plug and pray play".  Also another reason why you can't set the polling period below 300 seconds, since it should help act as an extra safety, but there is no guarantee.
« Last Edit: August 13, 2013, 09:37:26 am by SOlivas »
Vera 3 (1.5.622) / 9x GE/Jasco 45609 / 2x GE/Jasco 45612 / 2x GE/Jasco 45614 / 1x MIMO Lite
1x Twine (http://forum.micasaverde.com/index.php/topic,15617.0.html), DSC Security System, Honeywell  YTH8320ZW1007 Thermostat, 1x Fortrezz WWA-01, 1x CA9000 Wireless PIR Sensor

Offline YAMS

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Could someone suggest door/window sensors that are tamper-proof? 
I bought the Schlage Door/Window sensors but it looks like they are not "tamper-proof".

This is for a vacation rental unit in Florida.  I just bought the VeraLite hoping it will help deal with the tenants leaving doors and windows open and turning AC down to 72.  I want everyone to be comfortable...but it makes me crazy when they turn AC down to 72, put the thermostat on Vacation Hold so it over rides my schedule and leave the doors or windows open. 

Mind you, my schedule never has the temp higher than 76 in the summer.  Having stayed at the unit myself many times, I know that when the doors are closed, 76 keeps the whole place VERY cool.

Thanks for any help in advance.

Offline SOlivas

  • Sr. Member
  • ****
  • Posts: 282
  • Karma: +1/-1
For my setup, I have a DSC alarm system with magnetic reed sensors on the doors.  Using the DSC alarm plugin with Vera, I can use the alarm panel sensors with this plugin to detect openings, etc.

I'm not saying to go install an alarm system so that you have the recessed magnetic reed sensors on the doors, but if you are truly wanting to protect your rental property, it could be an option.


Vera 3 (1.5.622) / 9x GE/Jasco 45609 / 2x GE/Jasco 45612 / 2x GE/Jasco 45614 / 1x MIMO Lite
1x Twine (http://forum.micasaverde.com/index.php/topic,15617.0.html), DSC Security System, Honeywell  YTH8320ZW1007 Thermostat, 1x Fortrezz WWA-01, 1x CA9000 Wireless PIR Sensor

Offline SOlivas

  • Sr. Member
  • ****
  • Posts: 282
  • Karma: +1/-1
Ok, I have almost completed a new version of this plugin that supports more than just window/door sensors for controlling your HVAC.  I plan on testing this new version this weekend and then, if it seems to run, release it (likely around Sunday time frame in the US).

This new version will support defining temperature sensors and a trip point.  There are two variables that you configure just like the thermostats, high temperature and low temperature sensors.  High temperature sensors will trip when the value goes above that indicated, and low temperature sensors will trip when the values goes below that indicated.

This will allow you to control your HVAC using external temperature probes/sensors.  Should be handy for things like ensuring that your A/C does run when the temperature drops below a preset setting, etc.

I have also changed it now so that the operating modes defined are the same across all four settings.  This will make it easier to set your system without having to remember that the settings for OnMode and different from OffMode, HTMode, and LTMode.

You will also be able to define which type sensor has priority (with the settings from the Door/Window sensors always being the default if nothing is changed or the other sensors have not tripped).

I've implemented the full range of operating modes from the S_HVAC_UserOperatingMode1.xml file.  Here is a listing of what the new operating modes:

-- OnMode, OffMode, HTMode, LTMode can be one of the following:
-- 0  = Off (default for OffMode, 99 for rest)
-- 1  = HeatOn
-- 2  = CoolOn
-- 3  = Energy Savings Mode
-- 4  = Normal mode (turns off Energy Savings Mode)
-- 5  = AutoChangeOver
-- 6  = AuxHeatOn
-- 7  = EconomyHeatOn
-- 8  = EmergencyHeatOn
-- 9  = AuxCoolOn
-- 10 = EconomyCoolOn
-- 11 = BuildingProtection
-- 99 = Do nothing


You can now also change how EnergySavingsMode is set for your thermostat.  In the previous versions, the SwitchPower service of the thermostat was used to control this.  Now, you can define if the SwitchPower or EnergySavingsMode operating mode will be used.

I've done some re-writing of the code as well, cleaning some things up and changing how I get/set variables.

Direct Twilio plugin support has also been removed in this new version. 

When I release this new version, I will modify the first post here and also put it up on code.mios.com as well.  I'm considering actually posting this to the apps store as well, so those who don't like to manually install plugins can use this.
« Last Edit: September 25, 2013, 03:47:11 am by SOlivas »
Vera 3 (1.5.622) / 9x GE/Jasco 45609 / 2x GE/Jasco 45612 / 2x GE/Jasco 45614 / 1x MIMO Lite
1x Twine (http://forum.micasaverde.com/index.php/topic,15617.0.html), DSC Security System, Honeywell  YTH8320ZW1007 Thermostat, 1x Fortrezz WWA-01, 1x CA9000 Wireless PIR Sensor

Offline charettepa

  • Sr. Member
  • ****
  • Posts: 314
  • Karma: +5/-0
hi

id realy liketo use this app but cant figure out how to install it

i have downloaded all 4 files
went to vera
develop apps
uploaded all 4
selected restart luup

but no devices or apps show up

i know i must have done something stupid
or not done something

any help is appreciated
thank you

Offline SOlivas

  • Sr. Member
  • ****
  • Posts: 282
  • Karma: +1/-1
hi

id realy liketo use this app but cant figure out how to install it

i have downloaded all 4 files
went to vera
develop apps
uploaded all 4
selected restart luup

but no devices or apps show up

i know i must have done something stupid
or not done something

any help is appreciated
thank you

To install, you need to go to the Apps -> Develop Apps -> Create Device option.  There, you will enter in the Upnp Device Filename field: D_WDSC_HVACPlugin1.xml and click the Create Device button.  Once done, restart the system at least once and a new device will show up.
Vera 3 (1.5.622) / 9x GE/Jasco 45609 / 2x GE/Jasco 45612 / 2x GE/Jasco 45614 / 1x MIMO Lite
1x Twine (http://forum.micasaverde.com/index.php/topic,15617.0.html), DSC Security System, Honeywell  YTH8320ZW1007 Thermostat, 1x Fortrezz WWA-01, 1x CA9000 Wireless PIR Sensor

Offline charettepa

  • Sr. Member
  • ****
  • Posts: 314
  • Karma: +5/-0
thank you i now have thedevice
and restarted
but now i get startup lua failed

set sensors variable to use

when i go to device settings
there is nothing but configure poll and io
all of them say delivery failed

under advanced 4 items say *undefined*
is something suposed to be put there
if so what

thanks again for your help

Offline SOlivas

  • Sr. Member
  • ****
  • Posts: 282
  • Karma: +1/-1
You need to read the first post above.  By default, items that need to be set are *undefined*.

Items that MUST be set for this to work:

Sensors
Thermostats
OnMode
OffMode
Vera 3 (1.5.622) / 9x GE/Jasco 45609 / 2x GE/Jasco 45612 / 2x GE/Jasco 45614 / 1x MIMO Lite
1x Twine (http://forum.micasaverde.com/index.php/topic,15617.0.html), DSC Security System, Honeywell  YTH8320ZW1007 Thermostat, 1x Fortrezz WWA-01, 1x CA9000 Wireless PIR Sensor