Jump to content

Triggerlinc Programming - Please help my stupid brain :)


csetter911

Recommended Posts

Posted

Hi Guys,

 

I was hoping that since almost all of you seem much smarter than me at this... maybe you can help me with something that I have been having problems with for 2 days now.

 

I am going to try and keep this simple and give you the "quick version".

 

I have an elevator. Inside that elevator you have the floor buttons (1st floor, 2nd floor, and 3rd floor). Each "floor" button is connected to it's own triggerlinc. When you press the "1st floor" button it activates the 1st floor triggerlinc, which in turn turns on the 1st floor lights.

 

So currently the way it is setup, you get in the elevator and press a floor, the lights come on in the floor you are going to. Works awesome!!!

 

Here is the part I am having trouble with. Let's forget about all of the other floors for simplicity sake. I would like to press the "1st floor" button and have the lights come on. But I would also like to press the "1st floor" button for several seconds and have them turn off.

 

Basically making the same button (i.e. the same triggerlinc) have two different commands. Almost like a "on" vs a "fast on".

 

The problem I keep having, is that no matter how I program it in the ISY-99i, I can't get it to work right. It seems like it should be simple, but in practice it isn't (or at least it isn't for me).

 

By pressing the button and holding it in, I have been successful in making the lights turn off, but as soon as I release the button the "light on" command initiates again.

 

So I guess what I am looking for is some type of time-based variable for the triggerlinc???

 

Something that says if the triggerlinc is "triggered" for less than 2 seconds turn on the lights, if it is pressed for more than 2 seconds turn on the lights? Maybe? Thoughts? Please?

Posted
How about:

 

If

Triggerlinc is On

 

Then

Wait 2 seconds

Turn 1st floor lights off

 

Else

No actions

 

That would be great if it works! To this great suggestion, I add that the condition should be based on "status", as in:

 

if

status 'triggerlinc' is on

Posted

no dice.

 

Just that program alone does not turn on the lights. If I run a separate program to turn the lights on when the triggerlinc is triggered (or if I put it in the 'else' command), the lights turn on then immediately turn off again (as that what your code seems to tell it to do).

 

This is the same problem I have been having for 2 days. I can get them to turn on. I can get them to turn off. But I can't get them to work together.

 

A big reason seems to be that you can make it perform a function while holding in the button, but once you release it, the new "released" command seems to override the "pressing in" command.... if that makes sense.

 

Any other thoughts?

 

On a side note, the jumper is still in place on the triggerlinc. So the "Opened" port on the triggerlinc goes from On (button not pressed) to Off (while button is pressed) and back to On (after the button is released).

Posted

You WILL need two programs.

 

One program should turn on the lights; it looks like that one should use an "if Triggerlinc status is OFF" then turn on lights.

 

You would need to change the programs posted "off" as well.

 

The program I posted would need to see the button pressed for a full two seconds before the off command will be issued.

 

Sent from my iPad using Tapatalk HD

Posted

Nope, they still kick on and then off. And if I reverse the status's of the 2 programs around they kick off and then on.

 

The problem is as soon as you release the button it sends the "on command". So while you hold in the button you are golden. But as soon as you release it, the other command will happen. I have even tried separate programs to "disable" the program midway. No such luck.

 

Unless you guys know of a better way around this problem, I was actually thinking maybe I might need to have the button control a lamplinc (that doesn't actually control anything). That way the holding it down would set lamplinc's dim level. Then have a program "read" that dim level (greater or less than xx%) to determine how long the button was held.

 

-

i.e. if button was pressed within the 10 seconds and lamplinc level is less than 50%, turn lights on.

 

if button was pressed within the 10 seconds and lamplinc level is more than 50%, turn lights off.

-

 

But obviously that is a pretty shaky way of programming this thing... I only wanted to try that as a last resort ;)

Posted

Post both Programs. They both require timing checks. Otherwise a press of the button, regardless of how long, will always produce the On result.

Posted
Nope, they still kick on and then off.

 

I would expect this, given your original program. However, if you are trying to turn your lights off, would they not already be on? If so, then would this behaviour matter?

 

If you still feel the need to avoid this, perhaps further program refinement could work.

 

The problem is as soon as you release the button it sends the "on command".

 

This is NOT what I expected (otherwise, I am surprised the suggested program works). Is not the "on" command sent as soon as you PRESS the button? Then, as you release the button, is not an "off" command sent.

 

Knowing the answer to these questions is critical here. Your application strikes me as pretty unusual and it may be best to confirm this in your particular usage.

Posted

Sending an On command when an external NO button is released is the expected result. When the TriggerLinc external connection is shorted together, as would be when a NO button is pressed, an Off command is sent. This is the equivalent to putting the magnet next to the TriggerLinc. When the magnet is removed from proximity of the TriggerLinc it sends an On command to turn something On. This is the same as removing the external connection. Otherwise it would be necessary to make some additional wiring change to the TriggerLinc to isolate the internal magnetic switch when using the external TriggerLinc connection.

 

Of course I don’t know for sure the external floor button is NO but that would produce the results seen. That is, the lights turn On when the button is released.

 

Need to see both Programs to see how they are interacting with each other. The ON Program is doing what is normally does, turn On the lights. The fact that it happens when the button is released was probably not noticed with a momentary press of the NO floor button. It does make a different when the Off logic is being timed and then overridden when the floor button is released. Just need to confirm this so both Programs can be adjusted to work together rather than cross purposes.

Posted

You are exactly right... as I said in the previous post:

 

When I monitor it in the Universal Devices Administrative Console "the "Opened" port on the triggerlinc goes from On (button not pressed) to Off (while button is pressed) and back to On (after the button is released)."

 

Basically, the inverse of what you would expect.

 

Here is what I got:

 

---------------------------------------------------------

 

"Floor 1A" Program:

 

If

Status 'Elevator 1-Opened' is On

 

 

Then

Set Scene 'Basement Scene 1 - Group' Fade Up

 

---------------------------------------------------------

 

 

"Floor 1B" Program:

 

 

If

Status 'Elevator 1-Opened' is Off

 

Then

Wait 2 seconds

Set Scene 'Basement Scene 1 - Group' Fade Down

 

 

----------------------------------------------------------

 

As I said before, I have also tried to switch the "status" of each code around (to match the recommend code). But it still caused the same problem (albeit with the inverse results).

 

Thoughts?

Posted

When the magnet is moved away from the TriggerLinc an On command is sent. When the magnet comes back to the TriggerLinc it sends an Off command. The TriggerLinc On/Off results are what is desired when using a magnetic switch.

 

The external switch is mimicking the results of the magnetic switch. You can either write the Programs to match the operation of the TriggerLinc or use a NC external push button to reverse the commands.

 

EDIT: the Programs are written as though pressing the button one time produces a result which is different from pressing it the next time. As though the first press turns the TriggerLinc On and the next press toggles it Off. It does not. The TriggerLinc sends the same Off/On commands each time button is pressed and released. The Programs have to be changed to recognize that fact.

Posted

csetter911

 

Here is a solution to your problem. Change the Floor 1B program as follows:

 

 

"Floor 1B" Program:

 

If
Control 'Elevator 1-Opened' is Off

Then
Wait 2 seconds
Run Program Floor 1C  (Then Path)

 

"Floor 1C" Program:

 

if

then
  wait 2 seconds
  Set Scene 'Basement Scene 1 - Group' Fade Down

else

 

This way, the off program is isolated from the resent on command by separating the programs and adding another delay. Releasing the button after 2 secs does turn the lights on again but they are already on - who cares.

 

If you press and hold your button for 2 secs but less than 4 secs the lights will turn off and stay off after 4 seconds.

 

 

Hope this helps.

 

-Xathros

Posted

Xathros:

 

Unfortunately, that does not work. Your program turns the lights off perfectly. But when you turn them on with a single button press, they turn on and then immediately turn off.

 

Again, this is because pressing and releasing the button has the opposite effect of a traditional insteon switch.

Posted

Oops. My bad. Change "Control" to "Status" on 1B. That way the Call to 1C is canceled if the button is released within the 2 sec initial delay.

 

-Xathros

Posted

OK...let me take a shot at this. The general logic goes something like:

 

I know that I want to do something (either turn them on or off) with the lights every time I the button is pressed (recieve an "off" command). What I want to do is dependent on the time between the "off" and subsequent "on" commands. If I receive an "off" command, wait a couple of seconds to see if it is still off. If so, turn the lights off. If not, turn the lights on. To do this via ISY:

 

if
Control 'Elevator 1-Opened' is Off

Then
wait 2 seconds
run next program (if path)

else

 

Next program (disabled)

 

if
status 'elevator 1-opened' is off

then
Set Scene 'Basement Scene 1 - Group' Fade Down

else
Set Scene 'Basement Scene 1 - Group' Fade Up

 

You will need to disable the second (next) program so that it does not trigger itself. Of course, you can use any naming conventions that you like.

Posted

Proving once again, there is more than one way to skin a cat. Nice solution.

 

-Xathros

Posted

Xathros: yours worked!!! You are a smart cookie.

 

The only problem is that I was hoping to put a "wait" of 15 seconds before the lights turn on from the button press. This is because it is a glass elevator, and it is pretty sweet to see the lights fade up as you are arriving (it's a slow elevator)

 

Based on your code, if I put that 15 seconds in, I would need to also make there be a "wait" of 15 seconds to see if the lights actually turn off.

 

I am sorry for not mentioning it earlier, but I was trying to keep it simple.

 

oberkc: I will give your code a try as well and report back :)

 

You guys are awesome!!!

Posted

Using oberkc's code as it is cleaner and more elegant than mine, you can modify as follows:

 

if
status 'elevator 1-opened' is off

then
wait 13 seconds
Set Scene 'Basement Scene 1 - Group' Fade Down

else
Set Scene 'Basement Scene 1 - Group' Fade Up

 

I used 13 seconds as there is already a 2 second delay in the initial program. I didn't understand your desire for a 15 second delay on the lights off but you could easily add a wait on the else if needed.

 

-Xathros

Posted
The only problem is that I was hoping to put a "wait" of 15 seconds before the lights turn on from the button press.

If you choose to use my suggested approach, add the delay to the second program:

 

if
status 'elevator 1-opened' is off

then
Set Scene 'Basement Scene 1 - Group' Fade Down

else
wait 15 seconds
Set Scene 'Basement Scene 1 - Group' Fade Up

 

As Xathros suggests, you can modifiy the wiats and delays to suit experience.

Posted
Works awesome!!! I can't believe how quick you guys figured this out!! I owe you guys!!! Pure awesomeness!

 

You know what would rock? You making a video and posting it on YouTube so we all could enjoy the accomplishment! :mrgreen:

 

Teken . . .

Posted

I know I learned a few things today! Makes me want to go get some IOLincs and find interesting uses for them. I have always wanted to install a sensor on the front door and turn on lights when I enter. I just have to figure out how to programatically determine when I am entering versus leaving.

Posted

I looked at the IOLincs, but they got horrible reviews. So we tapped into the elevators existing programmable logic controller:

 

http://www.tri-plc.com/t100md1616.htm

 

But of course it requires learning a little different form of logic.

 

It's amazing the stuff you can do with a programmable logic controller, a bunch of relays, triggerlincs, and the ISY-99i.

 

It was so reliable I got my hands on a second controller just to play with.

 

Because the elevator "call button" is the same thing as the elevator cab "floor button", we had to do some logic to determine whether the elevator was picking someone up or was dropping someone off.

 

One thing that was interesting if anyone ever tries it... if you ever try to hardwire multiple triggerlincs to a permanent power source (instead of the AA battery), they cannot be wired in series. They will not properly distribute power evenly. You will probably have to get a 1.5v power supply and hook them up in parallel.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.4k
×
×
  • Create New...