View unanswered posts | View active topics It is currently Fri Sep 10, 2010 7:37 am



Reply to topic  [ 4 posts ] 
 How to get thermostat mode? 
Author Message

Joined: Apr 01, 2003
Posts: 731
Location: Rio Rancho, NM
Post How to get thermostat mode?
I tried
Code: Select all
if hvac mode of device ThermostatName is heatOn then
do A
else
do B
end if

the thermostat will be heatOn but the code is executing "do B". What the propper way to write this?

_________________
Greg In The Desert


Sat Mar 22, 2008 12:25 pm
Profile WWW
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 8077
Location: Texas
Post Re: How to get thermostat mode?
Is your ThermostatName in quotes? And what does the Indigo main window UI show is the mode when you select the Device? Your AppleScript above only inspects what Indigo currently has internally stored as the device state. It does not actually send INSTEON commands to poll out the current status, and thus it may not be in-sync with the actual thermostat mode if you haven't sent a status request message recently.

Regards,
Matt


Sat Mar 22, 2008 12:28 pm
Profile WWW

Joined: Apr 01, 2003
Posts: 731
Location: Rio Rancho, NM
Post 
Yes, thermostat name is in quotes.

I check the status of the thermostat every 30 seconds so I can see in the log that the mode is heatOn and the device status show heatOn.

_________________
Greg In The Desert


Sat Mar 22, 2008 12:32 pm
Profile WWW
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 8077
Location: Texas
Post 
I'm unable to reproduce any problem here. Add this line and tell me what you see in the Event Log:
Code: Select all
log "mode is " & hvac mode of device "YourThermoName"

Are you changing the mode using Indigo or at the thermostat itself? It can take up to a minute or so before the thermostat adapter will report any mode changes at the thermostat itself (even though you are polling it). There is a lag between when the Venstar thermostat changes modes (or setpoints) and when the adapter knows about that change.

But if the Event Log is showing it is heatOn and so is the Event Log, then I'm not sure what is wrong. You should get the same value via AppleScript as shown in Indigo's UI.

Matt


Sat Mar 22, 2008 12:38 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.