Official Insteon/Venstar Thermostat How To Thread
| Author |
Message |
|
arobase
Joined: Oct 06, 2011 Posts: 21
|
 Re: Official Insteon/Venstar Thermostat How To Thread
I too am adding my question/issue to this list.
Have 6 thermostats in a house and most communications are working fine. Every once in a while a cool or heat set point will show up in indigo as 1 degree. Somewhat similar to the above posts. See screenshot. Also the actual temps displayed are not accurate. For example the temp on thermostat will be 67 and Indigo will display 70. Very strange. These are all 1 day programmable integrated thermos running FW 93.
Other then resetting them is there any thing else I can try. I have already reset them a couple of times but would gladly try again. I turned polling off per instructions on this forum as I was told the new thermos broadcast changes in temp as they happen.
Thanks in advance.
Attachments:
photo.PNG [ 156.59 KiB | Viewed 445 times ]
|
| Mon Dec 19, 2011 12:36 pm |
|
 |
|
arobase
Joined: Oct 06, 2011 Posts: 21
|
 Re: Official Insteon/Venstar Thermostat How To Thread
Update on thermostat issues. I have factory reset and relinked all 7 thermostats. I am continuing to see the thermostats not broadcast status to Indigo. Example: Temp on thermostat changes from 70 degrees to 71 degrees. Wait the 2+ minutes documented and no change appears in indigo. Still reads 70 degrees. Now the thermostat owners manual states:
NOTES: Thermostat will only report readings to the last device it was Linked to, using the instructions below. For example, to change the controller or interface to which you'd like readings to be reported, simply follow the 'enable' instructions, with the new controller or interface as the Responder. While Thermostat will report to any automation controller or interface you Link, check with the manufacturer’s documentation to confirm support of this feature.
Is there another linking procedure I have to perform in indigo besides the initial linking to make this work. Should I reinstate polling times? Any help would be greatly appreciated. Thanks.
Merry Christmas!
|
| Fri Dec 23, 2011 9:23 am |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11689 Location: Texas
|
 Re: Official Insteon/Venstar Thermostat How To Thread
Regarding the thermostats that are not broadcasting out changes -- do they ever broadcast changes?
Indigo, when you do the Define and Sync procedure, automatically writes the appropriate links into the adapter to make them broadcast back to the PowerLinc. Try performing a factory reset with one that doesn't work, then do the Define and Sync procedure from the Device dialog in Indigo and copy/paste the contents of the Event Log so I can see what is written into the device.
_________________
|
| Fri Dec 23, 2011 5:43 pm |
|
 |
|
arobase
Joined: Oct 06, 2011 Posts: 21
|
 Re: Official Insteon/Venstar Thermostat How To Thread
Here is the log from when I factory reset "Lachlan" thermostat this morning and then relinked it.
Thanks again.
Merry Christmas!
Attachments:
Screen Shot 2011-12-23 at 7.14.53 PM.png [ 143.15 KiB | Viewed 413 times ]
|
| Fri Dec 23, 2011 6:16 pm |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11689 Location: Texas
|
 Re: Official Insteon/Venstar Thermostat How To Thread
That looks good.
Does it ever broadcast out changes ?
_________________
|
| Fri Dec 23, 2011 6:22 pm |
|
 |
|
arobase
Joined: Oct 06, 2011 Posts: 21
|
 Re: Official Insteon/Venstar Thermostat How To Thread
Not that I can see in the logs no. I have written a script to refresh status on all therms every 30 minutes between 5am and 12midnight. The values are now right but the cool and heat set points get reported incorrectly couple of times a day on any number of the therms. Thinking of contacting smart home (where I bought them) to see what they suggest or will replace with the older ones that are not integrated. From what I can tell others have had issues with the integrated ones as well. Have you guys heard of these issues? Thanks
And apologies for the delayed reply....holiday madness. Happy New Year!
|
| Wed Dec 28, 2011 7:56 pm |
|
 |
|
mrgoat
Joined: Jan 03, 2012 Posts: 4
|
 Re: Official Insteon/Venstar Thermostat How To Thread
I have 2 t1700's working and I am looking for a way to trigger them to go into program mode when a variable changes. I have setup an "Occupied" variable that i am manually switching now, that triggers an applescript to turn the thermostat to program mode. Is there a better way to do this? Actually i haven't found a way other that applescript to trigger program mode from Indigo.
|
| Tue Jan 03, 2012 2:02 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6655 Location: Austin, Texas
|
 Re: Official Insteon/Venstar Thermostat How To Thread
Scripting is currently the only way - either Python or AppleScript.
_________________ Jay (Indigo Support)
|
| Tue Jan 03, 2012 2:59 pm |
|
 |
|
mrgoat
Joined: Jan 03, 2012 Posts: 4
|
 Re: Official Insteon/Venstar Thermostat How To Thread
That is what i figured. Thanks
|
| Tue Jan 03, 2012 3:01 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6655 Location: Austin, Texas
|
 Re: Official Insteon/Venstar Thermostat How To Thread
Apparently my brain isn't really functioning today. You can do it in the Action UI: Type: Control Thermostat, Action: Set Mode, Mode: Run Auto/Heat Program.
_________________ Jay (Indigo Support)
|
| Tue Jan 03, 2012 3:11 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Setting the setpoint from a keypadLinc
A friend wanted to use his KPL to control the thermostat heat setpoint. He created a simple trigger to raise of lower the set point by 1 degree on each key press (One key was "up" another was "down"). This more-or-less worked unless someone pressed the buttons too quickly in succession, in which case the thermostat failed to make the change. I came up with the following scheme for him, and thought others might benefit from it. The basic idea is to wait until the user is done raising or lowering the set point (I.e. stops pressing a KPL button) and then set the set point. A) Create 2 variables: theSetPoint and tempChangeLock. Set the value of theSetPoint to the current set point and set tempChangeLock to falseB) Create two triggers. One increments theSetPoint when the up key is pressed, the other decrements theSetPoint when the down key is pressed. C) Create a third trigger. This trigger looks for any change in theSetPoint and has the condition that tempChangeLock must be false. The trigger action is an external script. This condition check is to keep from having multiple instances of the script running at the same time. The script also checks tempChangeLock just to be safe. For Indigo 5 and later, here is the script in Python: - Code: Select all
delayTime = 15 tempOld = int(indigo.variables['theSetPoint'].value)
if indigo.variables['tempChangeLock'].value == 'false': indigo.variable.updateValue('tempChangeLock', "true") loopAgain = True while loopAgain: indigo.activePlugin.sleep(delayTime) tempNew = int(indigo.variables['theSetPoint'].value) if tempNew == tempOld: loopAgain = False tempOld = tempNew indigo.thermostat.setHeatSetpoint(123, value=tempNew) indigo.variable.updateValue('tempChangeLock', "false")
This could probably be done a bit better, but I am still familiarizing myself with Python scripting for Indigo. In particular, It would be nice to read the Indigo variable as a boolean. For Indigo 4.x and earlier, here is the same logic in an AppleScript: - Code: Select all
set the value of delayTime to 15
tell application "IndigoServer" set tempOld to the value of variable "theSetPoint" as number set tempChangeLock to the value of variable "tempChangeLock" as boolean if not tempChangeLock then set the value of variable "tempChangeLock" to true set loopAgain to true repeat while loopAgain delay delayTime set tempNew to the value of variable "theSetPoint" as number if tempNew is equal to tempOld then set loopAgain to false set tempOld to tempNew end repeat end if set heat setpoint of device "Thermostat" to tempNew set the value of variable "tempChangeLock" to false end tell
Both scripts should probably have some logging, especially at the end. Comments? EDITED to fix variable name errors noted by Jay
Last edited by berkinet on Wed Jan 04, 2012 5:49 pm, edited 2 times in total.
|
| Wed Jan 04, 2012 3:12 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6655 Location: Austin, Texas
|
 Re: Official Insteon/Venstar Thermostat How To Thread
Your Python script is kinda broken - wrong Indigo variable name (fooBar) and a python variable that never seems to get set (countOld) but I think I get what you're trying to do. Some comments: - getting an Indigo variable can throw (if the name/id doesn't exist) so you should catch that
- using a name as the index into indigo.variables is a Bad Idea™ - you should use the ID which can't be changed by the user
- casting (using int(), etc.) can throw if the value can't be converted so you should catch that
Interesting that you should mention converting an Indigo variable to a boolean (and that your example converts to ints). For 5.0.3 we're tightening up how true and false are determined when it comes to Indigo variables. We've also decided that it would be really nice to ask the server to return a variable value in one of several Python native types (str (default), bool, int, etc.) - so the logic that the Indigo server uses to convert values to other types is available to scripters as well. So, we're going to add a method to variables that will allow you to specify the type you'd like the value returned as and a default value if the value can't be successfully converted. Watch for the 5.0.3 release notes (when we ship it) for details.
_________________ Jay (Indigo Support)
|
| Wed Jan 04, 2012 4:10 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Official Insteon/Venstar Thermostat How To Thread
jay wrote:... - getting an Indigo variable can throw (if the name/id doesn't exist) so you should catch that
- using a name as the index into indigo.variables is a Bad Idea™ - you should use the ID which can't be changed by the user
- casting (using int(), etc.) can throw if the value can't be converted so you should catch that
My error on the first item. After testing, I decided to change the variable names to make them more representative of their use. I didn't retest. I had left out the error trapping to make the script easier to read, and in any case Pythom will throw the error into the Indigo log. But, I agree: Script Error Change setpoint encountered an error reading the setpoint from the Indigo variable: theSetPointis a lot easier to understand than: Script Error Error in plugin execution executeFile:
Traceback (most recent call last): File "plugin.py", line 175, in executeFile File "plugin.py", line 143, in _compileExecuteSource File "<string>", line 18, in _dynamicFunc File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.py", line 253, in __call__ <type 'exceptions.SystemExit'>: NoneFinally, using names in place of ID numbers. I think the benefit of using names is that the example is a bit clearer and easier to implement for those users who find this kind of stuff confusing. But, it is subject to the problems noted. OTOH, we survived those problems for 4 versions of Indigo when using AppleScript. Also, if someone accidentally deletes a variable and then re-creates it with the old name, the ID reference will not work, but the name reference would. In any case, here is the script updated (and tested  ) to reflect Jay's comments in a way that should still leave this easy to understand: - Code: Select all
# Set theSetPoint to the Indigo variable number containing the current setpoint theSetPoint = 123 # Set tempChangeLock to the Indigo variable number containing the change lock tempChangeLock = 456 # Set thermostat to the Indigo device number of your Venstar thermostat thermostat = 789 # set delayTime to the timeout for waiting for another keypress (input change) delayTime = 15
errorMsg = "Change setpoint encountered an error reading the setpoint from the Indigo variable: " + indigo.variables[theSetPoint].name try: tempOld = int(indigo.variables[theSetPoint].value) except: indigo.server.log(errorMsg, isError=True) return(False) if indigo.variables[tempChangeLock].value == 'false': indigo.variable.updateValue(tempChangeLock, "true") loopAgain = True while loopAgain: indigo.activePlugin.sleep(delayTime) try: tempNew = int(indigo.variables[theSetPoint].value) except: indigo.server.log(errorMsg, isError=True) return(False) if tempNew == tempOld: loopAgain = False tempOld = tempNew indigo.thermostat.setHeatSetpoint(thermostat, value=tempNew) indigo.variable.updateValue(tempChangeLock, "false")
|
| Wed Jan 04, 2012 6:02 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6655 Location: Austin, Texas
|
 Re: Official Insteon/Venstar Thermostat How To Thread
Yep - that's a good way to make it easier to read for more complex examples - set the ID to a python variable then use the variable. Readable and safe.  One more little optimization: you use the name and value of the "theSetPoint" variable right off the bat - rather than call indigo.variables[theSetPoint] twice (two round-trips) you could just call it once and use the name and value: - Code: Select all
setPointVar = indigo.variables[theSetPoint] setPointVar.name setPointVar.value setPointVar.refreshFromServer()
And, later when you need to get the latest value just call refreshFromServer() on the variable and it'll update whatever has changed in the interim. That would also alleviate the problem of using the ID - setPointVar would be used everywhere else rather than the more cumbersome indigo.variables[theSetPoint].
_________________ Jay (Indigo Support)
|
| Wed Jan 04, 2012 6:23 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Official Insteon/Venstar Thermostat How To Thread
jay wrote:...One more little optimization: you use the name and value of the "theSetPoint" variable right off the bat...
Thanks for the pointer. Now, if I can also do: theLockVar = indigo.devices[theChangeLock] theLockVal = theLockVar.value If I could only do... theLockVar.update(False)  instead of indigo.variable.updateValue(tempChangeLock, "false")For those that are interested in this, here is the script with the latest changes suggested by Jay: - Code: Select all
# Set theSetPoint to the Indigo variable number containing the current setpoint theSetPoint = 123 # Set tempChangeLock to the Indigo variable number containing the change lock tempChangeLock = 456 # Set thermostat to the Indigo device number of your Venstar thermostat thermostat = 789 # set delayTime to the timeout for waiting for another keypress (input change) delayTime = 15
setPointVar = indigo.variables[theSetPoint] setPointVarName = setPointVar.name
errorMsg = "Change setpoint encountered an error reading the setpoint from the Indigo variable: " + setPointVarName try: tempOld = int(setPointVar.value) except: indigo.server.log(errorMsg, isError=True) return(False) if indigo.variables[tempChangeLock].value == 'false': indigo.variable.updateValue(tempChangeLock, "true") loopAgain = True while loopAgain: indigo.activePlugin.sleep(delayTime) setPointVar.refreshFromServer() try: tempNew = int(setPointVar.value) except: indigo.server.log(errorMsg, isError=True) return(False) if tempNew == tempOld: loopAgain = False tempOld = tempNew indigo.thermostat.setHeatSetpoint(thermostat, value=tempNew) indigo.variable.updateValue(tempChangeLock, "false")
|
| Wed Jan 04, 2012 6:54 pm |
|
|
Who is online |
Users browsing this forum: Google Feedfetcher and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|