paauto Posted April 23, 2013 Posted April 23, 2013 I have set up one of the buttons on a KeyPadLinc to initiate an irrigation program on my ISY. I'd like the light on the key to turn off after the program runs. What line of code should I use in the program to make this happen?
LeeG Posted April 23, 2013 Posted April 23, 2013 Assuming the KeypadLinc button is a Secondary button, Secondary KeypadLinc buttons cannot be turned On/Off with Direct commands. Define an ISY Scene with the Secondary KeypadLinc button as a Responder. When the Program completes its logic have it issue Set Scene 'xxxxx' Off where xxxxx is the Scene with the Secondary KeypadLinc as Responder.
paauto Posted April 24, 2013 Author Posted April 24, 2013 Thanks. I set it up that way and it is working, but have a follow up question. In the IF statement of a program, is it possible to use the status of a scene to start the THEN? Specifically, I set up a scene called "Irrigation Program" and linked (as a controller and responder) Key 8 on a KeyPadLinc to that scene. I then set up a program that runs when Key 8 on the KeyPadLinc is set to ON. At the end of the THEN statement in the program, I have it set scene Irrigation Program to OFF, which turns of the Key 8. Just curious, but is there a way to invoke the program using the status of scene Irrigation Program and not device Key 8?
LeeG Posted April 24, 2013 Posted April 24, 2013 Not at this time. There is discussion about introducing some basic Scene Status but none exists today. Insteon has no concept of Scene Status so it has to be developed by the ISY if introduced.
PurdueGuy Posted October 7, 2013 Posted October 7, 2013 Assuming the KeypadLinc button is a Secondary button, Secondary KeypadLinc buttons cannot be turned On/Off with Direct commands. Define an ISY Scene with the Secondary KeypadLinc button as a Responder. When the Program completes its logic have it issue Set Scene 'xxxxx' Off where xxxxx is the Scene with the Secondary KeypadLinc as Responder. First time poster, been lurking for a while. I just picked up an ISY994i to bridge the gap from my Vera to Insteon. I'm curious why the ISY won't direct LEDs? It can be done, although they have to be set as a group. You can't target an individual LED without targeting all of them. You can get the state of all buttons on the KPL, change the desired ones, and then set the new values again. Granted, that can be slow. If ISY is a responder to all buttons and programmed all the links, it should know the current at any given time. It could keep that in memory, and use that to set the new bitmap of buttons (it is not foolproof, however, since they might change and ISY misses the update). I can totally understand if the reasoning is "it needs to work all the time and be fast, not 95% of the time or sometimes slow" but I am just curious.
Michel Kohanim Posted October 7, 2013 Posted October 7, 2013 Hi PurdueGuy, Welcome to our world! I am not entirely certain what you are referring to. You can set the status of individual LEDs if they are inside a group. Furthermore, you can create mutual exclusive and other group combinations between the buttons inside the group and ISY will provide you with the correct status for each. Every time you query a KPL, ISY does actually query the status of those LEDs as well. If the question is why we do not set the LED backlight using direct commands, the reasons are: 1. Used lease common denominator between different KPL versions, engines, and compatibility 2. Backlight buttons signify a scene regardless 3. Within a scene, there's a consistent manner in which ISY handles mutual exclusive groups and other group combinations 4. As a rule (and unless we are forced such as for the case of iMeter Solo), we do NOT like to query devices frequently just to get their status. As a matter of fact, you can remove our 3AM query and everything should still work With kind regards, Michel
PurdueGuy Posted October 7, 2013 Posted October 7, 2013 Thanks Michel! My question was more basic. Being a new user to ISY, I had no issue creating scenes that would set a given button for a KPL on or off as desired. Then when I created a program to do that, while I could add something to the program like "set EntryKPL-B ON" nothing would happen. I read that I needed to make a scene that did that, and call that scene from the program. I did that, and that's fine, but that takes up links (right now, I have around 30 Insteon devices, so I am not concerned with the number of links). However, I bought the developer kit when I was updating some open-source Insteon code to add the capability to set a given button either on or off, and this didn't require links. It did require knowing the current state of the buttons, and adjusting things accordingly. It used an Extended Command, cmd1=0x2e, cmd2=00. You can search the documentation for "Set LED State for Button" to find out more. Unfortunately, the docs are a bit misleading, as this takes all 6/8 buttons as a single entry (the local load button(s) cannot be controlled). Setting to 0xFF sets them all to on, setting to 0x00 sets them all to off, and something like 0xAA (10101010 in binary) sets buttons B/D/E/H on. The highest bit is button H, down to bit 0 which is A (even though that is always the local load and can't be manipulated in this way). Sorry, that's clear as mud!
Michel Kohanim Posted October 7, 2013 Posted October 7, 2013 Hi PurdueGuy, You are correct and the reason we chose not to do it that way is in the list I outlined. In short, for the sake of consistency (and not having to query things all the time). With kind regards, Michel
PurdueGuy Posted October 7, 2013 Posted October 7, 2013 Hi PurdueGuy, You are correct and the reason we chose not to do it that way is in the list I outlined. In short, for the sake of consistency (and not having to query things all the time). With kind regards, Michel Ok, that's what I thought. I was confused when you said "...not set the LED backlight using direct commands" - but the backlight works ok, just the individual button LEDs (which is also a backlight, but I was thinking the overall backlight, not individual).
Recommended Posts