i/o linc output relay configuration buglet / question

Posted on
Sun Sep 26, 2010 2:04 am
dduff617 offline
Posts: 661
Joined: Jul 05, 2006
Location: Massachusetts, USA

i/o linc output relay configuration buglet / question

i'm setting up an i/o linc and i am confused about some of the options indigo provides.

the option in the indigo device setup is a toggle (checkbox) labeled "Momentary mode for output relay (relay will only close for a few seconds)". however the docs for the i/o linc indicate that it actually has four modes: three variants of momentary and one continuous.

when configuring the i/o linc according to the instructions, to select an output mode, you have to cycle through these four modes, and no direct feedback is provided to indicate which mode you are currently in. so i'm trying to tell which of the four modes i'm in currently by sending a command and then listening to the relay. this seems to work, because if i cycle a few times, i can tell when i end up in continuous mode because i can hear that the relay stays on.

i notice that i then open up the "Edit module settings..." dialog and "momentary mode" is still selected and if i hit "upload settings", i have confirmed that it does in fact change the device back to one of the momentary modes. i think (not sure) based on the number of times i have to cycle before arriving back at continuous relay mode, that it puts the device into what the docs refer to as "Momentary A" mode.

so am i understanding this correctly?

if so, i would offer the following suggestions for improvements:

a) since the "momentary mode" mode checkbox merely performs a one-time reset of the device state and does not actually track the current config of the device, i would suggest that the checkbox be removed and replaced by a button in the device setup window (vs. the "device settings..." subdialog) and that it be labeled to match its function, i.e. "Reset output relay to momentary mode ('Momentary A' mode)." to make this behavior more clear, in other words the interface should be similar to that used for configuring default on-level and ramp rates for switches.

the current interface is confusing on two fronts: first, it is ambiguous as to which of several possible momentary modes you are selecting, and second, the checkbox gives the suggestion that it is a reflection of the current state of the device, though it is not.

b) provide access to all four modes (instead of only one or perhaps two in the current interface). maybe extend functionality described above so the user chooses a mode and then hit the "set" button to actually set the device to the selected mode.

c) the momentary duration can be changed from its default of 2 seconds and indigo does not seem to support this, afaik. i suggest that this would be a very useful option for some applications, and in fact the existing manual method of setting it is limiting and cumbersome. this would necessitate a change to the option currently labeled as "Automatically read relay state 4 seconds after it is toggled".

Posted on
Sun Sep 26, 2010 9:42 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: i/o linc output relay configuration buglet / question

Your understanding is correct -- Indigo supports the Continuous and the Momentary A modes. Indigo does not support the other modes, nor does it support changing the momentary duration currently.

UPDATE: Indigo does now support the other momentary modes via the Interfaces→INSTEON/X10 Power Line→Set I/O Linc Momentary Mode... menu item.

Image

Posted on
Tue Apr 03, 2012 9:43 pm
mrcandy offline
Posts: 23
Joined: Nov 13, 2011

Re: i/o linc output relay configuration buglet / question

support wrote:
Your understanding is correct -- Indigo supports the Continuous and the Momentary A modes. Indigo does not support the other modes, nor does it support changing the momentary duration currently.


Matt

Despite how old this thread is, it highlights a problem I currently have - I'd like to operate an i/o-linc in momentary mode C, but couldn't figure out how to do so from the Edit module settings dialog in Indigo.

I assume that mode A is still currently the only one supported? Is there any hope for the additional modes in the near future?

If not, is it possible to get the i/o-linc into mode C by using an Insteon controller and following the standard instructions? Once in mode C will the device respond to commands from Indigo as per mode C operation? i.e. If the status indicates "open" then sending an "open" command will be ignored.

I assume one must not hit upload settings in Indigo, otherwise mode C will be lost.

Posted on
Wed Apr 04, 2012 11:31 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: i/o linc output relay configuration buglet / question

Try the script below via the Indigo shell (Plugins->Open Scripting Shell menu item). Edit the first two lines to specify your I/O-Linc device name and which mode you want, then copy/paste the entire thing into the shell. If it doesn't work, then copy/paste the contents of the shell and Event Log into a reply for us.

You are correct that the UI only allows momentary mode A, so you'll have to re-run the script if you make any changes to the other settings in the UI. To make it easy to execute in the future you can put the script into an embedded action of an Action Group if you want.

I'm not sure exactly how Indigo will interact with it in this mode. The I/O-Linc should behave correctly, but Indigo's UI states might get out-of-sync with the state of the I/O-Linc itself. If that happens, I think sending a status request will get it back in sync.

Let us know how it works. We might put this into an Indigo plugin in the future.

Code: Select all
devName = "Your IOLinc Device Name Here"
momentaryMode = "C"         # Use A, B, C, or None

dev = indigo.devices[devName]
devAddr = dev.address
setFunc = indigo.insteon.sendRaw
if dev.version >= 0x41:      # i2CS firmware requires extended command for settings changes
   setFunc = indigo.insteon.sendRawExtended

reply = indigo.insteon.sendRaw(devAddr, [0x1F, 0x00], waitUntilAck=True)
if reply.cmdSuccess:
   if (reply.ackValue & 0x98) is 0x08:
    indigo.server.log("Original Setting: Momentary A Mode")
   elif (reply.ackValue & 0x98) is 0x18:
    indigo.server.log("Original Setting: Momentary B Mode")
   elif (reply.ackValue & 0x98) is 0x98:
    indigo.server.log("Original Setting: Momentary C Mode")
   else:
    indigo.server.log("Original Setting: Momentary Mode not set")

if momentaryMode is "A":
   setFunc(devAddr, [0x20, 0x06], waitUntilAck=True)
   setFunc(devAddr, [0x20, 0x13], waitUntilAck=True)
   setFunc(devAddr, [0x20, 0x15], waitUntilAck=True)
elif momentaryMode is "B":
   setFunc(devAddr, [0x20, 0x06], waitUntilAck=True)
   setFunc(devAddr, [0x20, 0x12], waitUntilAck=True)
   setFunc(devAddr, [0x20, 0x15], waitUntilAck=True)
elif momentaryMode is "C":
   setFunc(devAddr, [0x20, 0x06], waitUntilAck=True)
   setFunc(devAddr, [0x20, 0x12], waitUntilAck=True)
   setFunc(devAddr, [0x20, 0x14], waitUntilAck=True)
else:
   setFunc(devAddr, [0x20, 0x07], waitUntilAck=True)
   setFunc(devAddr, [0x20, 0x13], waitUntilAck=True)
   setFunc(devAddr, [0x20, 0x15], waitUntilAck=True)

reply = indigo.insteon.sendRaw(devAddr, [0x1F, 0x00], waitUntilAck=True)
if reply.cmdSuccess:
   if (reply.ackValue & 0x98) is 0x08:
    indigo.server.log("New Setting: Momentary A Mode")
   elif (reply.ackValue & 0x98) is 0x18:
    indigo.server.log("New Setting: Momentary B Mode")
   elif (reply.ackValue & 0x98) is 0x98:
    indigo.server.log("New Setting: Momentary C Mode")
   else:
    indigo.server.log("New Setting: Momentary Mode not set")
indigo.server.log("Done.")

Image

Posted on
Sat Apr 14, 2012 11:22 pm
mrcandy offline
Posts: 23
Joined: Nov 13, 2011

Re: i/o linc output relay configuration buglet / question

support wrote:
Try the script below via the Indigo shell (Plugins->Open Scripting Shell menu item).


Hi Matt

Thanks for the code, it did something, but not what I wanted. I did some testing starting from having the IOLinc in either latched or momentary mode A, B, or C to start. If it started in Latched mode, the script indicated 'Original Setting: Momentary Mode not set', however if it started in any of the momentary modes the script always indicated 'Original Setting: Momentary A Mode'. In all cases it behaved as if it was in latched mode after the script had run (i.e. sending an ON turns the output ON and it remains ON until sent an OFF). However, if I use the set button to cycle the IOLinc through its modes, I always had to cycle 3 times to get back to latched mode, which indicates I started in Momentary A. The log for each of these attempts in shown below.
Code: Select all
Starting from Latched:
  Action Group                    Update Momentary mode for Tall
  Sent INSTEON                    "Garage T status / command" raw insteon command (1F 00; ack: 02)
  Script                          Original Setting: Momentary Mode not set
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 07; ack: 07)
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 13; ack: 13)
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 14; ack: 14)
  Sent INSTEON                    "Garage T status / command" raw insteon command (1F 00; ack: 82)
  Script                          New Setting: Momentary C Mode
  Script                          Done.
Behaves as if in Latched mode, but is programmed as if in A mode

Starting from Mode A
  Action Group                    Update Momentary mode for Tall
  Sent INSTEON                    "Garage T status / command" raw insteon command (1F 00; ack: 0A)
  Script                          Original Setting: Momentary A Mode
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 07; ack: 07)
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 13; ack: 13)
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 14; ack: 14)
  Sent INSTEON                    "Garage T status / command" raw insteon command (1F 00; ack: 82)
  Script                          New Setting: Momentary C Mode
  Script                          Done.
Behaves as if in Latched mode, but is programmed as if in A mode

Starting from Mode B
  Action Group                    Update Momentary mode for Tall
  Sent INSTEON                    "Garage T status / command" raw insteon command (1F 00; ack: 1A)
  Script                          Original Setting: Momentary A Mode
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 07; ack: 07)
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 13; ack: 13)
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 14; ack: 14)
  Sent INSTEON                    "Garage T status / command" raw insteon command (1F 00; ack: 82)
  Script                          New Setting: Momentary C Mode
  Script                          Done.
Behaves as if in Latched mode, but is programmed as if in A mode

Starting from Mode C
  Action Group                    Update Momentary mode for Tall
  Sent INSTEON                    "Garage T status / command" raw insteon command (1F 00; ack: 9A)
  Script                          Original Setting: Momentary A Mode
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 07; ack: 07)
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 13; ack: 13)
  Sent INSTEON                    "Garage T status / command" raw insteon command (20 14; ack: 14)
  Sent INSTEON                    "Garage T status / command" raw insteon command (1F 00; ack: 82)
  Script                          New Setting: Momentary C Mode
  Script                          Done.
Behaves as if in Latched mode, but is programmed as if in A mode

The 0x1F command is a request flags and 0x20 is a set flags command. Is there any documentation on what the individual bits mean for the flags to an IOLinc device?

Posted on
Sun Apr 15, 2012 2:19 am
mrcandy offline
Posts: 23
Joined: Nov 13, 2011

Re: i/o linc output relay configuration buglet / question

mrcandy wrote:
The 0x1F command is a request flags and 0x20 is a set flags command. Is there any documentation on what the individual bits mean for the flags to an IOLinc device?


OK, I did some Googling and a bit of reverse engineering and now know the complete status and command set for the flags. Based on the status I see when I manually cycle the IOLinc to mode A, B, or C, it seems that mode A is set by turning on bit 3, mode B by turning on both 3 and 4, and mode C by turning on 3, 4, and 7. To do so the commands for Mode C should be 0x20, 0x06 then 0x20, 0x12, and then 0x20, 0x14. I modified your script with those values and the good news is that the IOLinc now behaves in momentary mode and only takes one manual programming cycle to get back to Latched, which indicates it was in mode C. The bad news is that using an indigo.iodevice.setBinaryOutput() command still acts as if its in Mode A.

After setting the IOLinc to mode C using the modified script I linked a RemoteLinc to it. The ON and OFF buttons of the RemoteLinc act in Mode C. Do you know what command the RemoteLinc would send out and is it different than setBinaryOutput()?

Posted on
Sun Apr 15, 2012 11:26 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: i/o linc output relay configuration buglet / question

I modified my original script snippet posted above to reflect your changes. Can you give it a try?

Whenever you manually link modules it is actually creating an INSTEON scene/group between those modules (even if there is only 1 responding module). Therefore, I think the solution will be to create a PowerLinc scene in Indigo that controls the I/O-Linc output and then execute that scene. That should work the same as your manually created RemoteLinc link, so I would expect it to obey the mode change.

Image

Posted on
Sun Apr 15, 2012 12:22 pm
mrcandy offline
Posts: 23
Joined: Nov 13, 2011

Re: i/o linc output relay configuration buglet / question

support wrote:
I modified my original script snippet posted above to reflect your changes. Can you give it a try?

Whenever you manually link modules it is actually creating an INSTEON scene/group between those modules (even if there is only 1 responding module). Therefore, I think the solution will be to create a PowerLinc scene in Indigo that controls the I/O-Linc output and then execute that scene. That should work the same as your manually created RemoteLinc link, so I would expect it to obey the mode change.


Matt

Thanks a bunch, that was it. When using a scene it now works exactly as documented for mode C. :D

I did make a minor change to your modified script - it wasn't interpreting the status bits correctly. None and A are fine, change B to "... is 0x18", and change C to "... is 0x98". Two places for each for the original and final settings. Otherwise the test for A is always true and it never gets to B and C. I guess the other option would be to test in the reverse order C,B, then A.

Posted on
Sun Apr 15, 2012 1:39 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: i/o linc output relay configuration buglet / question

Oh, right. Script code updated (again). Thanks!

UPDATE: Indigo does now support the other momentary modes via the Interfaces→INSTEON/X10 Power Line→Set I/O Linc Momentary Mode... menu item.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 33 guests