Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Trigger when turned ON, FAST ON, or DIM Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
tbeckman
Senior Member
Senior Member


Joined: December 30 2007
Location: United States
Online Status: Offline
Posts: 149
Posted: October 22 2008 at 22:45 | IP Logged Quote tbeckman

Currently I have triggers that trigger when a light turns on... but I would like to have them trigger anytime the light is FAST ON or DIMMED ON as well. Do I have to make seperate triggers for each method of turning the light on or is their another option? Thank you.
Back to Top View tbeckman's Profile Search for other posts by tbeckman
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: October 23 2008 at 07:29 | IP Logged Quote TonyNo

I think you could use an Insteon Device Chg trigger to call a macro that checks the TEMP9 variable (contains the CMD1 sent) and handle the three variants of an On.

On = 17, Fast On = 18, Brighten = 21
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
jbbtex
Senior Member
Senior Member


Joined: February 15 2007
Location: United States
Online Status: Offline
Posts: 181
Posted: October 23 2008 at 09:41 | IP Logged Quote jbbtex

Could you do something in the trigger's boolean field with TEMP9? Maybe a CASE statement?

__________________
Brady

"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." - Gen. George S. Patton
Back to Top View jbbtex's Profile Search for other posts by jbbtex
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: October 23 2008 at 10:11 | IP Logged Quote BeachBum

You could do an IF statement but don’t forget yes is a 1 if condition is met otherwise trigger won’t fire.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
tbeckman
Senior Member
Senior Member


Joined: December 30 2007
Location: United States
Online Status: Offline
Posts: 149
Posted: October 23 2008 at 10:59 | IP Logged Quote tbeckman

Wow... thank you... but I think all of you give me more credit than is deserved... I was thinking of putting this in the boolean of a trigger, but I am unsure the correct syntax to make this work for each of the three ON scenerios. Can someone give me a CASE or IF statement that would work in the Boolean field? Thanks again for your help.
Back to Top View tbeckman's Profile Search for other posts by tbeckman
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: October 23 2008 at 12:51 | IP Logged Quote grif091

You can do it with a case or if statement

case([TEMP9] when 17,18,21,22,23 then 1 else 0)

if([TEMP9]=17 or [TEMP9]=18 or [TEMP9]=21,1,0)

Just check for whatever cmd1 values you want to process.

EDIT:
The Event Log shows inbound Insteon messages, including the cmd1 value. If there is a condition, Fast On, Dim, Brighten, etc that is not being covered by the case or if statement, simply look at the cmd1 value of the inbound message that did not cause the trigger to fire and add that cmd1 value to the list of values being checked.

Edited by grif091 - October 24 2008 at 05:40


__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 

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