shannong Posted December 12, 2013 Posted December 12, 2013 Greetings. I'm new to HA in general and just got my ISY994i yesterday. So far I've installed about 20 Insteon switches and plugs and am in process to install another 30 or so including door sensors, motion detectors, leak detectors, etc. One of the first things I'd like to get setup is thermostat control. I have the Insteon Thermostat (2441TH) and wireless thermostat 2441ZTH. I also have a damper installed on each of the two vents in the bedroom connected to IOLincs to establish zone control. (Well, almost. Still need to run an electrical wires to them this weekend.) The goal is to monitor the master bedroom temp at night using the wireless thermostat mounted in there to make HVAC control decisions and also decide when to close the dampers. I plan to create a "Dream" scene to turn off lights, set security alarm settings, establish thermostat set point, etc. This drives to me two questions: 1. Can I check the status of scene as a condition? This means I could make HVAC decisions based on my actual activities vs a schedule. I don't have a usual bedtime during the week or weekend so having an IF statement based on a time schedule won't work well. If I use the "Dream" scene each night when I go to bed, that's more effective and accurate. 2. How do I perform math between two conditions and/or variables and compare the result? When heating/cooling is active, I'd like to compare the current bedroom temp with the set point of the wireless thermostat. For example, when within one degree then close one of the vent dampers. When it reaches the set point+1 I'd like to have them both closed. If I simply turned on/off the HVAC based on the temp of the master bedroom only and didn't use dampers, the bedroom would stay warm and the main house would get very cold because it warms up so quickly in the bedroom with the door closed. I want to keep the house partially heated through the night so as not to drop below say 64F or so. That means also using the temp of the wired thermostat to turn on the HVAC probably resulting the dampers closing a lot during the night. Thanks for your help and any other helpful suggestions.
Michel Kohanim Posted December 12, 2013 Posted December 12, 2013 Hi shannong, 1. Can I check the status of scene as a condition? This means I could make HVAC decisions based on my actual activities vs a schedule. I don't have a usual bedtime during the week or weekend so having an IF statement based on a time schedule won't work well. If I use the "Dream" scene each night when I go to bed, that's more effective and accurate. Short answer, yes of course. Long answer: http://wiki.universal-devices.com/index ... e#Programs Another great source of information is the User Guide: http://www.universal-devices.com/docs/p ... 5%20v2.pdf 2. How do I perform math between two conditions and/or variables and compare the result? When heating/cooling is active, I'd like to compare the current bedroom temp with the set point of the wireless thermostat. For example, when within one degree then close one of the vent dampers. When it reaches the set point+1 I'd like to have them both closed. If I simply turned on/off the HVAC based on the temp of the master bedroom only and didn't use dampers, the bedroom would stay warm and the main house would get very cold because it warms up so quickly in the bedroom with the door closed. I want to keep the house partially heated through the night so as not to drop below say 64F or so. That means also using the temp of the wired thermostat to turn on the HVAC probably resulting the dampers closing a lot during the night. Thanks for your help and any other helpful suggestions. Unfortunately you cannot yet set variables to status of devices. This is coming very early next year. With kind regards, Michel
shannong Posted December 12, 2013 Author Posted December 12, 2013 Short answer, yes of course. Long answer: http://wiki.universal-devices.com/index ... e#Programs Another great source of information is the User Guide: http://www.universal-devices.com/docs/p ... 5%20v2.pdf I've read a good portion of the Programs Wiki and of course tried the obvious of trying to find "Scenes" in the Programs UI on the ISY. Under "Conditions" with the "Status" option, only devices show up in the drop down. No scenes are showing up. Same thing for "Control", only devices are available in the drop down and no scenes. I guess I could create a variable and change the value between 0 and 1 when a scene is turned on and off to determine if a scene is active but there should be a more direct route it seems. Unfortunately you cannot yet set variables to status of devices. This is coming very early next year. Ouch. This will really limit some of the ideas I had. Any suggestions how I would accomplish what I'm trying to do concerning multiple thermostats and the dampers? I now fear I went the wrong route in buying the ISY.
Michel Kohanim Posted December 12, 2013 Posted December 12, 2013 Hi shannong, Sincere apologies, I didn't understand the question. Scenes in ISY do not have a status. We have had long and fruitless debates as far as what constitutes the status of a scene and never arrived at a solution that satisfied everyone. Of course you can And the status of each device in the scene as a condition. This said, it seems that you are just looking at temperature, no? If not, what's the status of the scene? As far as the second question, if this is an urgent requirement for you, then - and as you suggested - I am afraid ISY is not going to meet them. If not urgent and can wait 3 months, then we will have that feature (already designed, working, and being tested in the lab). What you can do in the interim is pretty ugly: basically setting a variable for each discrete temp. With kind regards, Michel
shannong Posted December 14, 2013 Author Posted December 14, 2013 Hi shannong, Scenes in ISY do not have a status. We have had long and fruitless debates as far as what constitutes the status of a scene and never arrived at a solution that satisfied everyone. In this context, I'm looking at scenes as a State or an Activity, if you well. My overarching strategy would always have my house in some state. Home, Away, Sleep, Movie, etc that are activated by a combination of schedules and/or manual engagement (pushing a button on a KPL). Each of those would be scenes with particular devices and settings of each. Therefore, each state would be discrete and a definite "On/Active" or "Off/Inactive" state would be valid. In this sense, just because I happen to turn a few lights on that match the "Movie" scene does not mean that scene should be considered "on" when testing the conditional logic of other programs. Perhaps the opportunity for that to happen is very minimal if testing the very specific state of several devices but it seems cumbersome and inexact for me to take that approach across so many conditions of logic that will end up occurring. So for my thermostat issue that started the discussion, adjusting the baffles, fan, temp etc of the HVAC system would be dependent on the active "Scene" which is meant to represent the state of "Sleep" or "Away" or whatever. Also, I don't want the programming to evaluate the set point for the thermostat against current room temps to be driven by a static value but instead relative. (e.g. two degrees below current set point). Doing so allows family members who are home to adjust the temp up or down a few degrees to suit their particular taste but still allow the logic that controls the baffles and HVAC to work effectively. In this case, it wouldn't be effective to have programs written to test absolute values based on hard-coded values of the set point driven by a schedule or scene activation. Now that I know Scenes for the ISY do not have a state, I'll have to think more about how to implement this. Using scenes to set a collection of devices with particular settings is handy but probably won't help me accomplish my original strategy. Or perhaps I need to rethink my strategy. I completely knew to HA in general and the ISY specifically. As mentioned earlier, I guess one approach might to be to use a combination of scenes and creating variables to track the "state" of my house. When I leave the house and press the "Away" scene controller button on the KPL, I could set the value to "1" and then other programs could check the value of that variable (and the other state variables such as "Sleep") when evaluating IF logic conditions.
shannong Posted December 14, 2013 Author Posted December 14, 2013 Hi shannong, As far as the second question, if this is an urgent requirement for you, then - and as you suggested - I am afraid ISY is not going to meet them. If not urgent and can wait 3 months, then we will have that feature (already designed, working, and being tested in the lab). I wouldn't say it's urgent but I am impatient. I have only installed about half of my HA gear in the house and add a few more each weekend from the treasure chest waiting for me in my office. Since I haven't even installed all the components, it would be difficult to say my needs are urgent. However, tackling this HVAC and damper problem for better heating during the winter months was on my priority list of things to accomplish. Easy to do with traditional HVAC gear via zoning but I really wanted it to be part of a more inclusive HA system. Thus, I chose the Insteon thermostat and IOLinc controlled dampers. I've looked at many solutions and have decided either HS3 or ISY are my best options. I almost bought HS3 but passed since it's so new and lacks support for many plugins that I would need. I had a slight preference for HS3 over ISY because it provided integration for more protocols and platforms, particularly Zwave, and you have the ability to write an external script using a variety of languages since it runs on top of a Windows OS and I already have a central home server for it to run on. Basically I bought the ISY because it seemed mature and currently able to accomplish what I needed now as all my current devices are Insteon. Also, I saw ISY had Zwave in beta so I thought I might just be able to stick with ISY in the long run. I saw that one of the HomeSeer contributors wrote a plugin to allow full integration of HomeSeer with an ISY, but it isn't yet available for HS3. That led me to my current belief that I'll eventually end up with an HS3 installation along with my ISY. It'll be interesting to see the new programming abilities available in the new ISY code release in a few months. Perhaps I'll be able to save a few bucks and keep my setup more simplified with everything running through my ISY.
MaddBomber83 Posted December 16, 2013 Posted December 16, 2013 Hey, just something to help you with that urgency.... No you can not read the state and such directly to a variable, and no you can not write the states and setpoints directly from a variable. BUT!!! It can still be done, and I do it. As background, I am building my HVAC control off of INSTEON/ISY. I have 4 controlled 'zones' in my house. Each room and a bunch of other places of temperature probes. It is still a work in progress (setting up the Dampers later this month), but I don't want you to think the programming is something you have to wait for the developer to get to. This is what I do now with ISY: [*:3kq31rsp]Read the temperature, humidity, cooling setpoint, heating setpoint and status of the wired insteon thermostat.[*:3kq31rsp]Write all these values to variables that I then do math on.[*:3kq31rsp]Transfer them back (as mode changes or heating/cooling SP changes). This 'loop' is best expressed in your desire for family members to be able to relatively set the temperature. The loop looks like this: If Status 'Thermostat- Main' is 61° (Cool Setpoint) Then $Thermostat_Setpoint_Cooling_Integer = 61 $Thermostat_Setpoint_Cooling_Integer Init To 61 $Thermostat_Setpoint_Cooling_State = 61 $Thermostat_Setpoint_Cooling_State Init To 61 You run that program for every degree and every variable in the Thermostat that you care about. My family cares about 60-80 degree F so I have 22 programs for each variable type that we care about (Heating SP, Cooling SP, Temperature). Anything outside of that band I'll set to 59 or 81. Our safety program takes action if anything is outside a value that we think is very wrong (disables other programs, sets things right, sends off emails and such). It has only ran once when I adjusted a program to keep increasing the temperature of the house... Now we know the temperatures, humidity, cooling / heating setpoints that we care about. Now we can do all the math that we want: [*:3kq31rsp]Are any of my rooms above the heating/cooling setpoint? If they are turn on the whole house fan.[*:3kq31rsp]What temperature am I going to use to control ducts off? (if the fan is running, I'll use suction supply temperature, if not the halway temperature under the suction, I may use the discharge line temperature as well.[*:3kq31rsp]If the room hits the low (heating) point, I will prevent it from getting colder if I am in cooling mode by shutting the dampener.[*:3kq31rsp]If the air conditioner is not occupied, lets see if I can use the whole house fan with or without outside air to warm the room.[*:3kq31rsp]If I can't (they are cold too) or it is taking to long (they have been trying for 10 minutes) or it is already 2 degree below the SP, then I turn on the heating. Air recirculation: [*:3kq31rsp]I keep the fan in ON for 10 minutes after any heating/cooling.[*:3kq31rsp]I then cycle the fan for 5 minutes every 30 minutes.[*:3kq31rsp]The fan will stay on if any of the rooms need it.[*:3kq31rsp]We have a program (and will add a physical button later) that we can hit to keep the fan running for an hour, and then resume its normal operation. Back to the example program: [*:3kq31rsp]We have layers to control things.[*:3kq31rsp]We already know what the Thermostat's Setpoint is.[*:3kq31rsp]Next we keep track of what the scheduled Setpoint should be ($SP_Cooling).[*:3kq31rsp]And we keep track of what the brains is going to change the actual Setpoint to ($Thermostat_Set_Cooling): If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then $SP_Cooling = $SP_Evening_Cooling_Temp $SP_Cooling Init To $SP_Cooling $Thermostat_Set_Cooling = $SP_Cooling $Thermostat_Set_Cooling Init To $SP_Cooling Enable Program 'New Cooling Time' Wait 2 seconds Run Program 'Set Cooling Update' (Then Path) Wait 1 minute Run Program 'New Cooling Time' (If) [*:3kq31rsp]($SP_Evening_Cooling_Temp is just a set value of 71. I use a variable here so I only have to change it in my variable list if we decide to adjust our evening cooling setpoint)[*:3kq31rsp]This program is ran on a schedule (adjusted by a timer)[*:3kq31rsp]You can ignore those Cooling Timers (I use them to adjust when I start cooling the house based on how long it takes to cool the house so it reaches a SP at a specific time, ish)[*:3kq31rsp]Long story short, we are ready to set the Thermostat's Cooling Setpoint based on a variable: If $Thermostat_Set_Cooling is 71 Then Set 'Thermostat- Main' 71° (Cool Setpoint) [*:3kq31rsp]And we control when we write the new variables by using an Integer and running an Update Set Point program when we actually want to change the temperature: If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Run Program 'Set Cooling 60' (If) Run Program 'Set Cooling 61' (If) Run Program 'Set Cooling 62' (If) Run Program 'Set Cooling 63' (If) Run Program 'Set Cooling 64' (If) Run Program 'Set Cooling 65' (If) Run Program 'Set Cooling 66' (If) Run Program 'Set Cooling 67' (If) Run Program 'Set Cooling 68' (If) Run Program 'Set Cooling 69' (If) Run Program 'Set Cooling 70' (If) Run Program 'Set Cooling 71' (If) Run Program 'Set Cooling 72' (If) Run Program 'Set Cooling 73' (If) Run Program 'Set Cooling 74' (If) Run Program 'Set Cooling 75' (If) Run Program 'Set Cooling 76' (If) Run Program 'Set Cooling 77' (If) Run Program 'Set Cooling 78' (If) Run Program 'Set Cooling 79' (If) Run Program 'Set Cooling 80' (If) [*:3kq31rsp]Ok, so I still have not gotten to the temporary house temperature changes in this 'loop'. But we have shown how to get the Thermostat Values into Variables. Manipulate those variables and then write them back into the Thermostat. Lets do real math on it now.[*:3kq31rsp]House feels warm even though it is not (dang wife).[*:3kq31rsp]She drops the house cooling setpoint that is on a schedule down a few degrees (either at the unit, or on her phone).[*:3kq31rsp]ISY recognizes this and fixes it, over time: If $SP_Cooling > $Thermostat_Setpoint_Cooling_State Then $Thermostat_Set_Cooling = $Thermostat_Setpoint_Cooling_State $Thermostat_Set_Cooling += 1 $Thermostat_Set_Cooling Init To $Thermostat_Set_Cooling Wait 1 hour Run Program 'Set Cooling Update' (Then Path) [*:3kq31rsp]So after an hour, it will walk the SP up a degree. Typically she hits it twice, so 2-3 hours later the SP is back on schedule. Conclusion: [*:3kq31rsp]This was a use scenario for you to look at.[*:3kq31rsp]There is a work around to get most of the info from the Thermostat, into variables, and to write variables, into the Thermostat.[*:3kq31rsp]You can now compare off the Setpoint on the Thermostat (to say, adjust dampeners at SP + 1 or keep a room at SP - 2.[*:3kq31rsp]In this way, everything outside of the schedule can be relative.
MaddBomber83 Posted December 16, 2013 Posted December 16, 2013 As a note, this is something I've considered writing a proper wiki guide for, but the bulk of this becomes no longer necessary with the variable update (indicated for early next year in this thread). Please let me know if you run into an area that needs adjustment. So far I've found that the ISY (from a programming perspective) has a way to accomplish any situation I've put it through. Now to see adding more modules! (like energy readings from Z-Wave please!)
Michel Kohanim Posted December 17, 2013 Posted December 17, 2013 Hello maddbomber83, Thanks so very much! And, we are on it as we speak. With kind regards, Michel
shannong Posted December 17, 2013 Author Posted December 17, 2013 Thanks, Bomber for the suggestions with detail. I have several other things to get setup and working that I'll tackle first. If 5.x is still far away at that point, I'll implement the methodology you shared.
shannong Posted January 16, 2014 Author Posted January 16, 2014 So I've decided to start tackling this now, at least for heat. That means really I only need to worry about a scope of 6 degrees. Hopefully by the time I need A/C v5.x will be out. One problem I've run into is that ISY only provides integers in programs. So when the current temp is at a .5 increment, I can't set the current temp variable. If for any reason there is a temperature change that skips from a .5 to another .5 then things could get weird. How oftern might that occur? Dunno. Any way to deal with this currently? Since we can't make use of the floating points in any programs or features of ISY (that I've seen so far), it would seem more useful if the temp displayed and used by ISY was rounded up to integers like the Tstats do themselves and other controllers. Will v5.x with expanded capabilities for variables introduce floating points? I'd actually like to use the half degree resolution of the Tstats for zone control.
shannong Posted January 16, 2014 Author Posted January 16, 2014 One problem I've run into is that ISY only provides integers in programs. So when the current temp is at a .5 increment, I can't set the current temp variable. If for any reason there is a temperature change that skips from a .5 to another .5 then things could get weird. How often might that occur? Dunno. I just discovered something that might make this more likely to be an issue. The 2441ZTH RF thermostats only send updates once a minute even when connected to an external power supply. Also, the temp sensor on the unit is very sensitive registering changes quickly. When I blow in the side vents very lightly it changes by several degrees immediately and falls back down within a few seconds. Those two things combined might make it slip from one half degree increment to another during the quiet window thus not registering a full 1 degree change in ambient temperature in my variables. One degree is the difference between the HVAC system being active and not active when hovering around the set point in a home that's been conditioned already to the desired temp.
larryllix Posted February 3, 2014 Posted February 3, 2014 Industrial control systems (SCADA) that I dealt with almost always sent raw binary data for analogue values. It was up to the HMI (human machine interface) to convert the data to engineering units to be viewed by humans. This way no raw sensor resolution accuracy was ever lost other than a rounded off bit (digital bobble) at times. This was a huge Insteon mistake attempting to send data in the same format as viewed on the HMI LCD screen. It would be a simple job in the ISY to multiply the raw binary temperatures by a scaling factor and add a zero offset, as needed (what about Kelvin scales?). Keeping temps as one decimal place as a x10 value is something ISY could easily do and just as easily convert it back to raw binary to send back to the tstat for settings. Dealing with truncated scales inside a computer is another ridiculous design flaw. This forum is starting to save me money!
shannong Posted February 3, 2014 Author Posted February 3, 2014 Industrial control systems (SCADA) that I dealt with almost always sent raw binary data for analogue values. It was up to the HMI (human machine interface) to convert the data to engineering units to be viewed by humans. This way no raw sensor resolution accuracy was ever lost other than a rounded off bit (digital bobble) at times. This was a huge Insteon mistake attempting to send data in the same format as viewed on the HMI LCD screen. It would be a simple job in the ISY to multiply the raw binary temperatures by a scaling factor and add a zero offset, as needed (what about Kelvin scales?). Keeping temps as one decimal place as a x10 value is something ISY could easily do and just as easily convert it back to raw binary to send back to the tstat for settings. Dealing with truncated scales inside a computer is another ridiculous design flaw. This forum is starting to save me money! The Insteon thermostat presents a rounded integer to the display and not the actual decimal value. So 70.5F is presented as 70F. When sending updates it uses an 8bit field and represents the number as a whole integer between 0-255, which is the actual value times 2. So 70F is sent as 140. 70.5F would be sent as 141. The ISY would present that as 70F and 70.5F, respectively.
larryllix Posted February 3, 2014 Posted February 3, 2014 The Insteon thermostat presents a rounded integer to the display and not the actual decimal value. So 70.5F is presented as 70F. When sending updates it uses an 8bit field and represents the number as a whole integer between 0-255, which is the actual value times 2. So 70F is sent as 140. 70.5F would be sent as 141. The ISY would present that as 70F and 70.5F, respectively. So the tstat is sending it's raw data, but the IST is prescaling it and since it can't handle fractions it can't put out the same resolution it takes in? I assume you can do math with the 0.5 values though.
Recommended Posts