Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Hardware
 PowerHome Messageboard : PowerHome Hardware
Subject Topic: INSTEON Thermostat Adapter Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: April 29 2008 at 09:49 | IP Logged Quote nadler

I noticed I could move the temperature set point up and down remotely in the Heat mode, but not when the Tstat is in the Program Heat mode. But, at the Tstat the set point can be moved up and down with the arrow keys manually. This means that you have to remotely change from the Program Heat mode to the Heat mode to remotely change the temperature. Anyone have a work around?

Thanks.
Back to Top View nadler's Profile Search for other posts by nadler
 
martlist
Newbie
Newbie


Joined: January 07 2007
Online Status: Offline
Posts: 31
Posted: April 29 2008 at 11:45 | IP Logged Quote martlist

Thanks for catching the loop. I did a search and replace to change remove
the macros I use to call the Virtual Device implementation that Dave
originally setup.

I basically am running both in parallel which lets me see the thermostat as a
device in the device status but also access the global variables in eHome.

I will correct the original post.
Back to Top View martlist's Profile Search for other posts by martlist
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: July 25 2008 at 11:05 | IP Logged Quote GadgetGuy

martlist wrote:
Great news. Dave VNC'd into my system tonight and was able to work out how to control and read from the thermostat. You can set it up in your existing install by following the instructions below...
Code:

insert into analogio values ('TSTATMODE','Thermostat Mode',0,'VIRT',0,2,'',1,'Heat','','','case([DATA] when 0 then "Off" when 1 then "Heat" when 2 then "Cool" when 3 then "Auto" when 4 then "Fan" when 5 then "Program" when 6 then "Program Heat" when 7 then "Program Cool" else "Unknown")',0,65535,'','2008-03-04 20:34:38.124','','');

Code:

insert into analogio values ('TSTATSPOINT','Thermostat SetPoint',0,'VIRT',0,3,'',68,'68','Degrees','','',0,65535,'' ,'2008-03-04 20:34:39.312','','');

Code:

insert into analogio values ('TSTATTEMP','Thermostat Temp',0,'VIRT',0,1,'',71,'71','Degrees','','',0,65535,'','20 08-03-04 20:34:37.030','','');


(



I just wired in my new Insteon Thermostat and am trying to get it going, but when I attempt to insert the above Virtual IO code I get an SQL error as follows:

Code:

Error Comment:
Invalid Direct SQL Code -193
     SQLSTATE = 23000
[Sybase][ODBC Driver][Adaptive Server Anywhere]Integrity constraint violation: Primary key for table 'analogio' is not unique


I am unable to figure out the cause of this error.

Can anyone advise?

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
jbbtex
Senior Member
Senior Member


Joined: February 15 2007
Location: United States
Online Status: Offline
Posts: 181
Posted: July 25 2008 at 11:32 | IP Logged Quote jbbtex

I think the error message is saying that the code is trying to create an Analog I/O device using a device name that already exists.

__________________
Brady

"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." - Gen. George S. Patton
Back to Top View jbbtex's Profile Search for other posts by jbbtex
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: July 25 2008 at 21:59 | IP Logged Quote GadgetGuy

OK!

Got all SQL imports to work OK and can now control my THERMOSTAT but I cannot get any status from it!

I made sure all of the Global Variables match in name and everything looks OK in the AnalogIO definition, and the macros but my "Device Status" window in PH never changes from Heat Mode, 68d Setpoint, and 71d Temp. Even after running the 'TSTAT_GETTSTAT_GLOBAL' macro, the Device Status never changes.

As the attached screen capture shows, the Global Variables are correct (except for the setpoint) but the Device Status is stuck at some static value.


I've refreshed the window (F5) and re-initialized and even restarted but the Device Status never changes from the above noted, which do NOT match the Thermostat actual values at all.

Ideas?   

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
martlist
Newbie
Newbie


Joined: January 07 2007
Online Status: Offline
Posts: 31
Posted: July 26 2008 at 00:40 | IP Logged Quote martlist

GadgetGuy,

A couple of ideas. Which of my imports did you use? The original post or the alter single macro from April 20th? Or maybe a combo?

One thought is that the original post used Virtual Devices, the second one used Global Variables and I removed the Vritual Devices.

The TSTAT_GET_GLOBAL only updates the global variables. Could be you have the code to add the vritual device and even the code to update it but maybe you are not calling it?

Can you list what TSTAT* macros you now have so I can see if maybe there is something missing?

If you are getting global variables updated then it must be the macros for Vritual Devices that is missing or failing.
Back to Top View martlist's Profile Search for other posts by martlist
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: July 26 2008 at 07:39 | IP Logged Quote GadgetGuy

martlist -

Thanks. I have tried all of the various posts without success, but that said I may well have not cleanly purged the db between efforts. My current config should be clean, but looking back I'm not sure which source it came from. I think your last post, but the easiest way to advise correctly is to send you screen caps and my SQL insert work sheet. Rather than clutter up the Forum with all that, if you send me a Private Message with your email address, I will forward everything directly to you.

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: July 26 2008 at 07:47 | IP Logged Quote GadgetGuy

Woops - I forgot to add to the above, that I do have Virtual Devices as I wanted the STAT settings to show up in the Device Status window.

I modified the Virtual Device variables to match the Global Variable names so that (I thought) TSTAT_GET_GLOBAL would update things correctly.

Maybe seeing my SQL Insert worksheet will answer the questions.2008-07-26_074645_STATmacros.txt

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: July 26 2008 at 08:49 | IP Logged Quote GadgetGuy

martlist -
Your comments insppired me to throw everything out and try again, using Dave's original post and the Virtual Device method.

BUT still the same (non) result    The Device Status window only reflects the original Analog IO "insert into analogio values" settings.

Here is the complete script I copied and pasted into PH's SQL Script Editor.

Do you see anythng wrong with it?

Code:

insert into analogio values ('TSTATMODE','Thermostat Mode',0,'VIRT',0,2,'',1,'Heat','','','case([DATA]
when 0 then "Off"
when 1 then "Heat"
when 2 then "Cool"
when 3 then "Auto"
when 4 then "Fan"
when 5 then "Program"
when 6 then "Program Heat"
when 7 then "Program Cool"
else "Unknown")',0,65535,'','2008-07-26 09:00:00','','');
insert into analogio values ('TSTATSPOINT','Thermostat SetPoint',0,'VIRT',0,3,'',68,'68','Degrees','','',0,65535,'' ,'2008-07-26 09:00:00','','');
insert into analogio values ('TSTATTEMP','Thermostat Temp',0,'VIRT',0,1,'',71,'71','Degrees','','',0,65535,'','20 08-07-26 09:00:00','','');

insert into macroheader values ('GETTSTAT','Get Thermostat Data',0,0,1);
insert into macrodetail values ('GETTSTAT',1,38,'',0,'ph_setotheranalogout("VIRT",0,1,ph_in steonwithret("THERMOSTAT",107,3) / 2)',0,'');
insert into macrodetail values ('GETTSTAT',2,38,'',0,'ph_setotheranalogout("VIRT",0,2,ph_in steonwithret("THERMOSTAT",107,2))',0,'');
insert into macrodetail values ('GETTSTAT',3,38,'',0,'ph_setotheranalogout("VIRT",0,3,ph_in steonwithret("THERMOSTAT",106,32) / 2)',0,'');

insert into timedevents values ('2008-03-04 20:44:34.000',5,0,'GETTSTAT',0,'2008-07-26 09:00:00',0,0);

insert into macroheader values ('SETTSTAT','Set Thermostat',0,0,1);
insert into macrodetail values ('SETTSTAT',1,27,'',NULL,'"[LOCAL1]"',0,'');
insert into macrodetail values ('SETTSTAT',2,39,'',NULL,'',0,'');
insert into macrodetail values ('SETTSTAT',3,26,'',NULL,'SETMODE',0,'');
insert into macrodetail values ('SETTSTAT',4,38,'',0,'ph_insteon("THERMOSTAT",107,case("[LOCAL2]" when "HEAT" then 4 when "COOL" then 5 when "AUTO" then 6))',0,'');
insert into macrodetail values ('SETTSTAT',5,27,'',NULL,'"UPDATE"',0,'');
insert into macrodetail values ('SETTSTAT',6,26,'',NULL,'SETCOOL',0,'');
insert into macrodetail values ('SETTSTAT',7,38,'',0,'ph_insteon("THERMOSTAT",108,[LOCAL2] * 2)',0,'');
insert into macrodetail values ('SETTSTAT',8,27,'',NULL,'"UPDATE"',0,'');
insert into macrodetail values ('SETTSTAT',9,26,'',NULL,'SETHEAT',0,'');
insert into macrodetail values ('SETTSTAT',10,38,'',0,'ph_insteon("THERMOSTAT",109,[LOCAL2] * 2)',0,'');
insert into macrodetail values ('SETTSTAT',11,27,'',NULL,'"UPDATE"',0,'');
insert into macrodetail values ('SETTSTAT',12,26,'',NULL,'UPDATE',0,'');
insert into macrodetail values ('SETTSTAT',13,31,'',NULL,'2',0,'');
insert into macrodetail values ('SETTSTAT',14,1,'GETTSTAT',0,'',0,'');



Thanks

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: July 26 2008 at 11:32 | IP Logged Quote GadgetGuy

GOT IT!

Just proves that if you stick at something long enough, you'll either die or solve it. Fortunately the latter was true this time!

The problem was with the GETSTAT macro. The Forum (%$#@!*^) word wrapped a command and stuck a space in the middle of it, making it non-functional.



As shown above, I've corrected the first one, which initially was clobbered as the 2nd and 3rd lines are! A "ph_in steonwithret()" function just doesn't work!!!

I now have a fullyl functional (read/write) STAT (except I can't turn it's Mode to OFF). There are times when I don't want it in Heat or Cool mode, but just plain OFF. Tried modifying SETSTAT macro by adding a "when "OFF" then 0" entry to line 40, but it didn't work.

Has anyone successfully made this modification?


__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
cmhardwick
Senior Member
Senior Member
Avatar

Joined: July 08 2006
Location: United States
Online Status: Offline
Posts: 290
Posted: July 27 2008 at 10:46 | IP Logged Quote cmhardwick

GadgetGuy, that's the saem issue I ran into when I was first working on my thermostat. gotta HATE that silly code "editing" the forum software does

__________________
Cicero, Enjoying automation!
Back to Top View cmhardwick's Profile Search for other posts by cmhardwick Visit cmhardwick's Homepage
 
martlist
Newbie
Newbie


Joined: January 07 2007
Online Status: Offline
Posts: 31
Posted: July 28 2008 at 21:27 | IP Logged Quote martlist

There must be some way to get around the code clobbering, then I could
fix this for future users and avoid the pain.

For the OFF setting I am using the direct insteon commands from my
second post:

insert into macrodetail values
('TSTAT_ALL_OFF',1,38,'',0,'ph_insteon("THERMOSTAT",107,9)', 0,'');
insert into macroheader values ('TSTAT_FAN_OFF','Turn Off House
Fan',0,0,1);

I thought it worked but I will check again. I have noticed that some of the
commands only work in certain modes, or seem to only work in certain
modes. I have stuck mainly to just changing the temp settings when the
house is vacant and nothing more.

Dave plans to include support for the thermostat as standard in the next
release I believe.
Back to Top View martlist's Profile Search for other posts by martlist
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: July 29 2008 at 07:37 | IP Logged Quote GadgetGuy

Re: code clobbering, I think the best way to get around that is to Post the Code so users can see what is involved, BUT then to attach the code as a File Upload for actual use.

Thanks for the STAT OFF assistance. I was using a "0" in Insteon command byte-2 instead of a "9". Works like a charm now.

Since I am only using the stat in simple mode with HEAT and COOL, the OFF works every time.

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
nick7920
Senior Member
Senior Member


Joined: March 04 2008
Location: United States
Online Status: Offline
Posts: 193
Posted: November 01 2008 at 07:22 | IP Logged Quote nick7920

In version 2.0, Does it support Insteon Thermostat directly and get the status and allow change setting or do I have to import code to make it work.

Wanted to order 2491T1 from smart home which is one day programmable.

Thanks
Back to Top View nick7920's Profile Search for other posts by nick7920
 
nick7920
Senior Member
Senior Member


Joined: March 04 2008
Location: United States
Online Status: Offline
Posts: 193
Posted: November 19 2008 at 21:01 | IP Logged Quote nick7920

I got two insteon thermostat and installed the script (martlist apr-20-2008) except the last line which was time event which gave me error so I took that out for now. One thing I have notice is that now smart home device manager log shows that it is continually getting some data all the time from the adapter.
Adapter one       0E 67 ED
ADAPTER TWO 0E 68 C0

11/19/2008 7:19:23 PM:ackmsg=0E 67 ED 0A A1 56 2B 4A FF
11/19/2008 7:19:25 PM:ackmsg=0E 67 ED 0A A1 56 21 28 FF
11/19/2008 7:19:27 PM:ackmsg=0E 67 ED 0A A1 56 26 2B 00
11/19/2008 7:19:28 PM:ackmsg=0E 67 ED 0A A1 56 26 2B 00
11/19/2008 7:19:40 PM:ackmsg=0E 68 C0 0A A1 56 27 49 FF
11/19/2008 7:19:41 PM:ackmsg=0E 68 C0 0A A1 56 26 28 FF
11/19/2008 7:19:42 PM:ackmsg=0E 68 C0 0A A1 56 26 2B 00

Because of this my PLC flashes all the time.
If I exit from the PH 2.0 and run houselink software from smart home , I get only one ACK message once.

I would appreciate any help

Nick
Back to Top View nick7920's Profile Search for other posts by nick7920
 
demko
Newbie
Newbie


Joined: January 08 2009
Online Status: Offline
Posts: 15
Posted: January 08 2009 at 20:44 | IP Logged Quote demko

Hi all,

I'm very new to powerhome2 and in the process of trialing it, but I'm really liking it so far. Although, I'm having trouble getting this thermostat to work as an analog I/O as described in this post. Below is the code I entered into a sql window.

insert into analogio values ('TSTATMODE','Thermostat Mode',0,'VIRT',0,2,'',1,'Heat','','','case([DATA] when 0 then "Off" when 1 then "Heat" when 2 then "Cool" when 3 then "Auto" when 4 then "Fan" when 5 then "Program" when 6 then "Program Heat" when 7 then "Program Cool" else "Unknown")',0,65535,'','2008-07-26 09:00:00','','');
insert into analogio values ('TSTATSPOINT','Thermostat SetPoint',0,'VIRT',0,3,'',68,'68','Degrees','','',0,65535,'' ,'2008-07-26 09:00:00','','');
insert into analogio values ('TSTATTEMP','Thermostat Temp',0,'VIRT',0,1,'',71,'71','Degrees','','',0,65535,'','20 08-07-26 09:00:00','','');
insert into macroheader values ('GETTSTAT','Get Thermostat Data',0,0,1);
insert into macrodetail values ('GETTSTAT',1,38,'',0,'ph_setotheranalogout("VIRT",0,1,ph_in steonwithret("THERMOSTAT",107,3) / 2)',0,'');
insert into macrodetail values ('GETTSTAT',2,38,'',0,'ph_setotheranalogout("VIRT",0,2,ph_in steonwithret("THERMOSTAT",107,2))',0,'');
insert into macrodetail values ('GETTSTAT',3,38,'',0,'ph_setotheranalogout("VIRT",0,3,ph_in steonwithret("THERMOSTAT",106,32) / 2)',0,'');


It seems to work and the the proper devices show up in the device status and it builds the macro, but when I run the macro I get a syntax error referring to the last line listed above.

Any ideas?

Thanks!
Pat


Edited by demko - January 08 2009 at 20:48
Back to Top View demko's Profile Search for other posts by demko
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: January 08 2009 at 22:10 | IP Logged Quote GadgetGuy

Pat -

The definition for the set is:
--Syntax
ph_setotheranalogout ( controller, type, unit, point,
value )
--Argument Description
controller: The ID of the controller.
type: The type of the Analog Point. Use 0 for inputs, 1
for outputs, 2 for Multi-State, 3 for Temperature, 4 for
Arm Status, and 5 for Alarm State.
unit: The address of the unit.
point: The analog output point you wish to set the
value of.
value: The value you wish to write to the analog
output.

Your strings seem to be missing the third argument.
Whereas your string is:
ph_setotheranalogout("VIRT",0,3,ph_in
steonwithret("THERMOSTAT",106,32) / 2)

Mine is:
ph_setotheranalogout("VIRT",0,0,3,ph_insteonwithret("TH
ERMOSTAT",106,32) / 2)

That is I have an extra "0" before the "3" following the
"VIRT" parameter.

Since my STAT works OK, I think it may be that all of
your analogout efforts are missing a "0" as the third parameter.

Try that and see if it helps.



__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
demko
Newbie
Newbie


Joined: January 08 2009
Online Status: Offline
Posts: 15
Posted: January 09 2009 at 22:31 | IP Logged Quote demko

Thanks for the help. I tried it, but it's still not working. Notice anything else?
Back to Top View demko's Profile Search for other posts by demko
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: January 10 2009 at 08:53 | IP Logged Quote GadgetGuy

Pat - looking over your posted code again and comparing
it to my original efforts, yours indeed looks OK, which
leads me to suspect you may be experiencing the same
problem I did when I initially tried to enter code (see
my post dated July 26).

Attempting to import the code from the forum, as it
appears you are doing, I found that the forum word-wraps
text strings at arbitrary places and subsequently can
put a space in the middle of a macro function name(which
of course mades it invalid). It was hard to spot
because looking at it in the Macros window of PH, the
word wrap break occurred at the end of the field window
and so looked natural.

Open the PowerHome Explorer and open Macros and then
your 'faulty' macro. Then expand the window to get the
"Send Keys/TTS/Dim/Formula" column as wide as possible.
This will usually cause an inappropriately broken line
to show clearly. Any line breaks in a Macro string can
only happen at a comma or in a text string, but not in
the middle of a ph function name. If you find one,
remove the space.

Hopefully this is your problem.

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
williammanda
Groupie
Groupie


Joined: December 03 2008
Location: United States
Online Status: Offline
Posts: 84
Posted: January 24 2009 at 17:36 | IP Logged Quote williammanda

Does the latest version of PH have all the macros that Martlist installed manually? Or do I need to add it? I have setup the thermostat and it seems to be working in PH. Please advise.
Thanks
Back to Top View williammanda's Profile Search for other posts by williammanda
 

<< Prev Page of 4 Next >>
  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum