Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Insteon Formulas Return -2 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
ph-newbie
Newbie
Newbie


Joined: November 26 2007
Online Status: Offline
Posts: 10
Posted: December 02 2007 at 16:04 | IP Logged Quote ph-newbie

I'm having trouble with several of the ph_insteon commands returning -2 which means the "controller does not support Insteon". This happens only to *some* devices when using ph_devicebtn, ph_insteon, etc. The same devices work if you use the raw commands and specify the controller.

I can literally cut and paste different device strings into the formula from the Device tab of the Insteon Explorer and some work and return 0 while others return -2 and don't work. For example:

ph_insteon("OFFICE",ion,255) returns 0

ph_insteon("HALL BATH",ion,255) returns -2

The only difference in the above devices is one is an Icon relay and one is a V2 Relay. Both work fine from the Device tab Control dialog. Both are linked as a responder to the PLC. I have 2 controllers defined in PH. The PLC and my Elk M1G.

As a further clue, the commands that don't work (return -2) do not generate *any* activity in the SDM Log.

Any ideas what could be wrong? Using the raw format is a lot more work and, if I have to swap out a device (which I've been doing all too often as they fail), it would break any formulas using the raw format.
Back to Top View ph-newbie's Profile Search for other posts by ph-newbie
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 03 2007 at 10:57 | IP Logged Quote dhoward

Newbie,

Go to the Devices tab in the Insteon Explorer and check what you've got for the "Controller" column. I think you'll find that you've got a different controller selected (that doesnt support Insteon) for the devices that return - 2.

With the raw functions, you explicitly state the controller ID and the address to send to so it works. With the ph_insteon function, you only state the ID of the device. PowerHome will then look up the controller associated with the device and attempt to send the command using this controller.

HTH,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
ph-newbie
Newbie
Newbie


Joined: November 26 2007
Online Status: Offline
Posts: 10
Posted: December 04 2007 at 02:27 | IP Logged Quote ph-newbie

Thanks Dave. You put me on the right track. The proper controller name doesn't have a space in it, but the devices returning "-2" had a space in their controller name (referencing a non-existant controller). The odd thing is they were working by clicking the "Control" button under the Devices tab.
Back to Top View ph-newbie's Profile Search for other posts by ph-newbie
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 04 2007 at 21:49 | IP Logged Quote dhoward

ph-newbie,

I checked it out and I see why. When the Insteon Explorer is launched, it connects to the first Insteon controller that it finds (which should be only a single Insteon SDM). Thereafter, from within the Insteon Explorer, ALL Insteon communication and control will be issued using this controller and effectively overrides the "Controller" that is assigned to devices.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  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