Jump to content
C4 Forums | Control4

Strange problem with keypad LED


Recommended Posts

So I have a strange issue that I have been experiencing for a long while, but am just know taking the time to try and figure it out.

Garage doors getting left open at my house was a problem. I have it setup so that when one of the garage doors is opened, it starts that respective garage doors timer. When the timer expires, if the garage is open, it closes the garage. For those instances when you want to leave the garage open, you can hold down either the top or bottom button on the switch or two button keypad in the garage. These buttons are bound together in a three way setup. Holding any of these buttons down for two seconds stops the timer.

Okay, so when the timer is running the LED's turn green, so you can tell the timer is running. When the timer is stopped, the LED's turn red to indicate that the garage is open and is not going to close on its own. Once the garage is closed, the LED's go back to normal.

I have attached a screenshot of the code I have setup with the button press. Here is the problem. When I open the garage, the lights turn on, the timer starts, and the LED turns green. Perfect. Then, I want to leave the garage open while I do some yard work. I hold down the top button for two seconds and the LED toggles to red, and timer stops. Perfect. The problem is that 95% of the time when I release the top button, the LED shuts off completely. If I turn the light off and back on, it works and lights up red like it is supposed to.

One part of the code I have not posted (I would be happy to if needed) is what happens on the release of the button. When the button is released, it sets the variable to FALSE.

If anyone has any ideas of why the LED turns off, I would love to hear your suggestions. For some reason, this drives me crazy. Like I said, the LED will turn red and stay red until I release the button, the it just blanks.

I am sure it is something simple I can't figure out, I appreciate your suggestions. If you need any other details please let me know.

Link to comment
Share on other sites


  • Replies 54
  • Created
  • Last Reply

Is the LED set to 'Keypad Managed' on the Properties page?

If so, you're seeing the keypad setting it back to it's 'Off' setting.

If that's not the case, you can probably get around your issue by setting the LED not in the 'press' script, but in the 'release' script. Obviously, your hold script still needs to be in the press, but your setting the LED can be in the 'release'.

RyanE

Link to comment
Share on other sites

Sorry to hijack but thought it would be better than another post. ILoveC4, are you successful a progrmatically changing LED colors? I have never been able to do this 100%. Once the color is set somewhere in programming using the exact same command showing in your script, it is set for good or until I change it in the device properties. I can't, for example, change from one color to another based on state change of a variable. I have managed boxes unchecked and this is on a 6B KP.

Link to comment
Share on other sites

I have always been able to change colors successfully.

Post an example of what isn't working for you and I can see if I can help. If I can't, I am sure someone on here can. I do this successfully in over a dozen different applications.

Link to comment
Share on other sites

pretty simple stuff-

? If Theater>Front Light is ON

>Set 2 LED on the Stairs 6B to YEL

? if Theater>Back Light is ON

>Set 2 LED on the Stairs 6B to RED

>Set 2 LED on the Stairs 6B to OFF (which is "keypad managed" as blue)

Link to comment
Share on other sites

Here is what I would do.

I would go to the theater front light and say:

->When Theater Front Light turns ON

->Set 2 LED on the Stairs 6B to YEL

->When theater Front Light Turns OFF

->Set 2 LED on the Stairs 6B to OFF

Does that make sense? I would make the programming executed by the light you want the 6 button to reflect. When that light turns on or off, change the LED. I would also uncheck "keypad managed". I have that unchecked on mine.

Link to comment
Share on other sites

Yes it does but the actions just plain don't work. It's not about the programming logic. If I just send-off a command to change the color it works that one time. But, if I try subsequent color changes nothing happens- it's locked on the changed color. I must go back to the buttons properties and change it. I am not using KP managed.

So, basically, I am trying to use the same indicator LED to tell me two different things through the use of two distinct colors. Simple but only works 50% to satisfaction.

Link to comment
Share on other sites

No, hadn't thought of doing that. Hmmm, I'll try that. You know, something else is funny about LEDS with me. Once I send the command to change color and the color finally changes (the first time I try this) I will go and change back to the original color using Properties. When I test for that color it will still be stuck on the change until sometime afterwards. I just upgraded to 1.7.2 so no chance of polling issues or is there? So you are saying to do a refresh...

Link to comment
Share on other sites

Typically, what I do is create the script that I want to use. Then I hit execute up on the top of the page to make sure it does what I want. If the programming does what I want then I will hit "refresh" to store the programming. If you are doing a bunch of programming, execute them to make sure they work then after you finish all of the scripts that you needed, refresh.

Link to comment
Share on other sites

Typically, what I do is create the script that I want to use. Then I hit execute up on the top of the page to make sure it does what I want. If the programming does what I want then I will hit "refresh" to store the programming. If you are doing a bunch of programming, execute them to make sure they work then after you finish all of the scripts that you needed, refresh.

I do not think this is how the refresh button works. Refresh tells your instance of Composer running on your PC to go and get any updates from the master controller. If another person is connected to the master controllerand makes changes you will not see them unless you hit refresh.

When you make changes in composer that automatically get sent to the controller.

Edit. Here is the description of refresh from the Composer help file:

Refresh—Refreshes the Composer screen with the current project configuration information from Director.

Refresh Navigators—Refreshes the Navigator screen with the current project configuration information from Director.

Link to comment
Share on other sites

There's no need to 'refresh' to 'store' programming.

As soon as you drag it out, it's in the project. It's active in Director, and should start working immediately on the event being triggered.

The next time the project is saved, it'll save this programming along with the rest of the project.

If you're paranoid about it being saved, save a backup of the project, it'll also make a new /etc/DirectorState.xml file on the controller.

RyanE

Link to comment
Share on other sites

Well, if there is no need to refresh the navigators I guess I will stop refreshing the navigators.

I have just always done it...

What about adding custom buttons and what not. Those won't show up until the refresh will they?

Link to comment
Share on other sites

The reason I didn't think this was true is that you can watch the activity of the director on the bottm of the Composer screen. I just wait until I see Idle and then i can go do a physical test of my handy work.

No, the real reason why my LEDs are not performing is that my system is crippled. LED color changes was just a symptom as is devices dropping out regularly and cover art disappearing. Networking is what I suspect.

Link to comment
Share on other sites

Well, lets see, I have a 4 port D Link in the rack with one HC-300 and other peripherals attached. All that goes back to a Linksys WiFi router and that is pluged into a Verizon Modem. Now, elesewhere I have another HC-300 (Zigbee ON) going through a Netgear 4 port and back down to the rack area where it is plugged into the Linksys. Elswhere on the LAN is a Netgear WAP.

Link to comment
Share on other sites

thecodeman is the network guy you want on this, however I would think to go to the router prior to the D Link switch. That sounds like a DNS nightmare. Of course, that is on my limited knowledge of DNS. I know at one point I was using a VOIP box as a router, which was hooked into my wireless router. The devices hooked up to the VOIP had a different DNS I believe. At any rate, they didn't work until I got a switch and hooked that switch into the router.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.