Jump to content

Substituting Query in a program to avoid constant querying


Trankilo1

Recommended Posts

Hi some help would be very appreciated....

 

In a closet I have a dimmer and a motion sensor    so far when I turn on the lights manually <status changes to ON> the program that I set turns the lights OFF if the Kids Closet Sensor Dusk.Dawn is not detecting motion after 90 seconds.  When the lights are turned ON by the Motion Detector (not using the dimmer or remotely) though the lights are ON the status stays at OFF likely because the wattage usage is quite LOW (LEDs) So I created a program that works fine EXCEPT that it is continually querying... keeping the system busy... and I can imagine that is not the best option.

 

 

The fact that the system does not update the status when the lights are turned ON by the motion detector I believe is the culprit. I thought querying would solve the issue,because it would give a real status hence the program would do what is supposed to but while doing this I created a never ending loop of queries.

 

Info: 

ISY994i PRO ZW

Firmware v.4.3.26

 

Dimmer 2477D Dual Band

 

 

Sensor Shows permanently ON on both the one called Sensor and the one called Dask.Dawn   The Low Battery shows OFF

 

Jumper 5 is connected

 

Timeout minutes is 1.5

LED Brightness 100

Darkness Sensitivity 128

 

Sensing Mode:

Checked (As motion is sensed)

Unchecked (on/off Commands) so On Commands Only

Checked Night Mode

 

 

Program:

 

If
        (
             Status  'Kid's Closet' is not Off
         And Status  'Kids Closet Sensor-Dusk.Dawn' is not Off
        )
 
Then
        Wait  90 seconds
        Set 'Kid's Closet' Fast Off
        Run Program 'Kids Closet Off' (If)
 
Else
        Set 'Kid's Closet' Query
        Run Program 'Kids Closet Off' (If)

     

The last sentence of ELSE.......makes the program work fine with just one caveat it runs in loops nonstop keeping ISY always busy

 

<><><><>   If I take out the last sentence of ELSE (Run Program 'Kids Closet Off' (If))  if the lights are ON (by action of the motion sensor, which did not change to ON status in ISY ) works but only if I right click on the program, from the program list on the left column and I force to run the (If)  otherwise lights remain ON.

 

I have other controlled lights (LED Accent lights mostly) that consume very little wattage that almost never update the correct status but these are seldom left on by mistake.... while the kids' closet is always ON....

 

I have set twice a day Query all to minimize this issue but that wouldn't fully address the turning off automatically of these and other lights that really should not be ON for hours.

 

Thanks in advance for your help

 

Link to comment

 

 so far when I turn on the lights manually <status changes to ON> the program that I set turns the lights OFF if the Kids Closet Sensor Dusk.Dawn is not detecting motion after 90 seconds.  When the lights are turned ON by the Motion Detector (not using the dimmer or remotely) though the lights are ON the status stays at OFF likely because the wattage usage is quite LOW (LEDs) So I created a program that works fine EXCEPT that it is continually querying... keeping the system busy... and I can imagine that is not the best option.

 

I'm confused :)  Kids Closet Sensor-Dusk.Dawn' is the node for Lux.  If you want to detect motion you need to use "Kids Closet Sensor-Sensor" and use control not status.

 

 

Jon...

Link to comment

An easy way to check your programs is to bring the motion sensor where you're working, open Event Viewer to Level 3 and watch as you activate the sensor by moving your hand in front of the lens.  My version of motion sensor requires "On commands Only" to be checked for On commands only.  There is the setting "Include battery powered devices when automatically writing updates to devices" the allows you to make changes to the motion sensor options and simply wake it by activating motion and updates will be written.  You can also set you programs to a detailed setting (right click program > Status Icons > Detailed) and you can see when the program is true, when it's running then, when it runs else and when it's false.

 

Dusk-Dawn operates off the darkness sensitivity.

 

 

Jon...

Link to comment

Hi Jon:

 

Following your advice, I have grabbed the sensor at hand in order to ease all the testing

I have changed the program slightly as you will be able to see below

I have run a Level 3 report; attached.

 

If
        (
             Control 'Kid's Closet' is not switched Off
         And Status  'Kids Closet Sensor-Sensor' is not switched Off        <<<<<<<   I have tried changing Control instead of Status    <<<<  same result.  Also on the Options of device I have checked On/Off, when before was unchecked for only On
        )
 
Then
        Wait  9 seconds
        Set 'Kid's Closet' Fast Off
        Run Program 'Kids Closet Off' (If)
 
Else
      -  No actions  -  (To add one, press  'Action')
 
As you can see, I have reduced the time to 9 seconds. This is for testing purposes only.
 
With the above program Lights turn ON by sensor or by dimmer.....    even If the sensor is continuously exposed to movement....  lights turn OFF and immediately ON    if sensor is covered (place inside a dark bag) lights remain OFF.  So now I got to accomplish for the lights to remain ON while movement is being sensed by the sensor without first turning OFF.     I guess I need to tell ISY in an effective manner that if the sensor , is sensing movement Do not turn lights Off.   Note <kids Closet Sensor-Sensor current state is always ON>
 
There's got to be a simpler way to make this work.....  I just want the lights to turn off after 90 seconds except if the sensor is sensing movement for which another 90 secs should run.... and so forth   that to take place whether the light was ON due to movement sensing or by pressing the dimmer.... 
Link to comment

Status doesn't change when you have the motion sensor set for "On Commands Only" in that no Off command is ever issued.  You need to set your program to "control is switched" so it will check for On commands coming from motion sensor.

 

 

Jon...

Link to comment

here is the Event viewer,

I can barely make sense of it.

 

To capture trace from Event Viewer click on "copy to clipboard" icon lower toolbar and paste in message post.

Set Event Viewer to Level 3, clear screen then activate motion sensor and copy trace.

 

 

Jon...

Link to comment

Hi Jon,   Issue solved.....  well 95%

 

In hopes that the following will help others here are the findings.

 

Originally I was placing within the program a time frame either 90 seconds or 9 seconds for testing.     When I reduced it to 9 secs for testing this parameter was in direct contradiction to the parameter set in ISY under options which allows you to time in 30 second increments being the least , 30 seconds.

 

Once I started working with 30 seconds I was able (I couldn't before) to see the Kids Closet Sensor-Sensor go to OFF which is a condition for the program to work.    By looking at the original program with a time entry for wait in the (Then).... it was not nullifying what it was set under options on the device. 

 

Now with the most basic program.....   and disregarding if the lights are turned on by triggering the MS or by pressing the dimmer; once the motion sensor , senses movement the 30 second (or whatever you set up under options of the device in multiples of 1/2 minute) it will turn OFF when no more sensing takes pace.  Program below.       The only caveat is in the case that the lights are turned on, no one enters the closet; thus the sensor does not sense anyone......   the lights are remaining on.    I found this a bit odd since the two (if) conditions apply and if I force to run an (if) they do turn Off.....  

 

 If someone spots the reason, please let me know......in the meantime and since the likelihood of the lights being turned on without anyone entering the closet are very slim, i'll just have to feel mostly covered knowing that if the lights are left ON and someone was sensed the lights shortly after will be Off after no more sensing takes place.

 

 

If
        (
             Control 'Kid's Closet' is not switched Off
         And Status  'Kids Closet Sensor-Sensor' is Off
        )
 
Then
        Set 'Kid's Closet' Fast Off
 
Else
   - No Actions - (To add one, press 'Action')
 
Jon thanks a million for your interest in helping
 
Alex
 
P.S.
 Here below is what the Level 3 reads after the above program is in place and I activate the lights manually without allowing the sensor to sense anything. Also notice that after 30 seconds go by... the program has not executed to run (If) and for the lights Off even though both conditions apply Lights being ON and sensor in OFF.    I manually select in ISY to run (if) about 1 minute after I had turned On the light.....  now with the program running it does turn Off the light.    Remember all this time the sensor has been in OFF If at any time during the first 30 seconds would had be in ON (sensed movement).... it would have worked flawlessly activating the program and turning OFF the light:
 
 
 
Thu 02/25/2016 03:26:07 PM : [iNST-TX-I1  ] 02 62 1C 98 1B 0F 11 FF
 
 
Thu 02/25/2016 03:26:07 PM : [iNST-ACK    ] 02 62 1C.98.1B 0F 11 FF 06          LTONRR (FF)
 
 
Thu 02/25/2016 03:26:07 PM : [iNST-SRX    ] 02 50 1C.98.1B 2A.1C.FC 27 11 FF    LTONRR (FF)
 
 
Thu 02/25/2016 03:26:07 PM : [std-Direct Ack] 1C.98.1B-->ISY/PLM Group=0, Max Hops=3, Hops Left=1
 
 
Thu 02/25/2016 03:26:07 PM : [D2D EVENT   ] Event [1C 98 1B 1] [sT] [255] uom=0 prec=-1
 
 
Thu 02/25/2016 03:26:07 PM : [  1C 98 1B 1]       ST 255
 
 
Thu 02/25/2016 03:27:05 PM : [        Time] 15:27:08 0(0)
 
 
Thu 02/25/2016 03:27:05 PM : [iNST-TX-I1  ] 02 62 1C 98 1B 0F 14 00
Thu 02/25/2016 03:27:05 PM : [iNST-ACK    ] 02 62 1C.98.1B 0F 14 00 06          LTOFF-F(00)
 
 
Thu 02/25/2016 03:27:06 PM : [iNST-SRX    ] 02 50 1C.98.1B 2A.1C.FC 2B 14 00    LTOFF-F(00)
 
 
Thu 02/25/2016 03:27:06 PM : [std-Direct Ack] 1C.98.1B-->ISY/PLM Group=0, Max Hops=3, Hops Left=2
 
 
Thu 02/25/2016 03:27:06 PM : [D2D EVENT   ] Event [1C 98 1B 1] [sT] [0] uom=0 prec=-1
 
 
Thu 02/25/2016 03:27:06 PM : [  1C 98 1B 1]       ST   0
 
 
<<<<< Also attached is the image of the OPTIONS for the node "XXXXXXXsensor - sensor"   in this case time shows 1.5  which would be 90 seconds
 

post-1445-0-01531000-1456432499_thumb.jpg

Link to comment

"On commands Only" and "Only after Timeout" would help preserve battery life.

 

Also, "Max Hops=3, Hops Left=1" indicates poor communication so signal from sensor may be unreliable.  You might consider adding another dual-band device nearby in the future.

 

 

Jon...

Link to comment

 

 The only caveat is in the case that the lights are turned on, no one enters the closet; thus the sensor does not sense anyone......   the lights are remaining on.    I found this a bit odd since the two (if) conditions apply and if I force to run an (if) they do turn Off.....  

 

 If someone spots the reason, please let me know......in the meantime and since the likelihood of the lights being turned on without anyone entering the closet are very slim, i'll just have to feel mostly covered knowing that if the lights are left ON and someone was sensed the lights shortly after will be Off after no more sensing takes place.

 

       

         And Status  'Kids Closet Sensor-Sensor' is Off    <<-- Using status conditions for motion sensor is unreliable.  better to use control
 
 
I think I'd write the program
 
If
        (
             Control 'Kid's Closet' is switched On
         And Control  'Kids Closet Sensor-Sensor' is Not On
        )
 
Then
        Wait 15 seconds
        Set 'Kid's Closet' Off
 
 
 
Jon...
 
 
Link to comment

Archived

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


×
×
  • Create New...