[ANSWERED]Conditions not working

Posted on
Sat Apr 19, 2014 9:51 am
BruceP offline
Posts: 285
Joined: Sep 06, 2004

[ANSWERED]Conditions not working

I have an Insteon motion detector in the garage. It fires a trigger to an I/O Link to sound a door chime when motion is detected. By itself, no conditions, it works as it should.
I have added the condition that "if device" "garage Light" on/off state "is off" However no matter what state the garage light is set the chime still chimes.

What am I missing?

Thanks

Posted on
Sat Apr 19, 2014 11:49 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Conditions not working

how do you test?
It took me some time to realize that the test button ignores the conditions and goes all the way through.

Posted on
Sat Apr 19, 2014 12:29 pm
BruceP offline
Posts: 285
Joined: Sep 06, 2004

Re: Conditions not working

Doing it the hard way. Walk in the garage with the light on and again with the light off. All the same. Chime sounds

Posted on
Sat Apr 19, 2014 12:30 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Conditions not working

could you post a screen shot and the log file. sometimes another set of eyes see the problem..

Posted on
Sat Apr 19, 2014 12:40 pm
BruceP offline
Posts: 285
Joined: Sep 06, 2004

Re: Conditions not working

Gladly, but I cannot for the life of me figure how to insert it into this forum

Posted on
Sat Apr 19, 2014 2:02 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Conditions not working

take a screen shot, then see this screenshot: do "choose file", "add the file"


here is how I would test it:
create a variable with value 0
test this variable if = 1, see if the trigger fires.
Attachments
Untitled.tiff
Untitled.tiff (87.06 KiB) Viewed 5559 times

Posted on
Sat Apr 19, 2014 2:25 pm
BruceP offline
Posts: 285
Joined: Sep 06, 2004

Re: Conditions not working

Here it is
Attachments
Screen Shot 2014-04-19 at 4.23.49 PM.png
Screen Shot 2014-04-19 at 4.23.49 PM.png (40.67 KiB) Viewed 5557 times

Posted on
Sat Apr 19, 2014 2:34 pm
BruceP offline
Posts: 285
Joined: Sep 06, 2004

Re: Conditions not working

OK did the following:
Set variable static to 1
Set condition to trigger if variable = 1 - it fired
reset condition variable 2 while leaving variable at 1-trigger did not fire.
Here is a work around, but still does not explain why it will not work the original way.

Posted on
Sat Apr 19, 2014 3:16 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Conditions not working

I guess then the Garage Light is not off

Here is how you can try to find out the state(s):
- click on Plugins/ Open shell script
- type or copy paste
indigo.devices["Garage Light"].states["onOffState"] and hit (enter)

you will see what sets it comes back with (switch lights and run again)

I guess it will be False or True, which should be on or off.

May be you have a dimmer then it returns the % on

Karl

Posted on
Sat Apr 19, 2014 3:30 pm
BruceP offline
Posts: 285
Joined: Sep 06, 2004

Re: Conditions not working

It is off according to Indigo in the device list.

Ran script - light off reports false. Light on reports True

Switch is not a dimmer.

The plot thickens and I am at least getting my exercise. :)

Posted on
Sat Apr 19, 2014 3:35 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Conditions not working

in the action section add another action step:server action/ execute script enter
indigo.server.log(str( indigo.devices["Garage Light"].states["onOffState"] ))

this will put the true/false into your log file while executing the trigger.

if thats still is ok you will need to ask the experts..

Karl

[EDIT] you can also click on "insert into event log window"..

may be try if ALL of the conditions are met.

forgot the str() in the script..
Last edited by kw123 on Sat Apr 19, 2014 3:48 pm, edited 2 times in total.

Posted on
Sat Apr 19, 2014 3:45 pm
BruceP offline
Posts: 285
Joined: Sep 06, 2004

Re: Conditions not working

First off I got a script error, at least that is what it says, but this stuff is way above me.

However now it seems to be working. Cannot say why, but it did. Will be checking on this more tomorrow. SO is getting a bit upset with chimes and my running around.

Thanks mush for the help and will reply back here my findings tomorrow.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests