Jump to content

Program wait/stop for photosensor


backinthelab

Recommended Posts

A quick question, as I'm too lazy to sift through the search results....

 

I have a photosensor going across my front porch (wired to an IO Linc) and one program set up to have the ELK speak "Front Porch Motion" and another to send me a text message whenever the beam is broken.

 

My issue is that if someone stands in the path of the sensor, my phone blows up with continual texts and the Elk just keeps repeating over an over. I've tried the "wait" command to no avail and I'm unsure if I should use a "stop" or not. I'd like to have a 10-20 second pause before it acts again. I'm sure this is easier than I'm making it, can anyone help me out?

Link to comment

Seems to me if the beam is broken the iolinc will send an "on" (or off, however it is wired) just once. When the beam is restored the iolinc sends off. Once the beam is broken and stays broken the program should not retrigger until the beam is restored.

It might be best to post the program in question.

Link to comment

Sure, here are the two programs. I separated them as I'm constantly disabling the voice when I'm home. If the beam remains broken (like when UPS lays a package in it's path) it keeps triggering over and over. As you can see, I've added "wait" and "stop" at random in an effort to make it wait or stop. :-)

 

Text Program:

If

Control 'My Sensors / Front Porch-Sensor' is switched On

 

Then

Send Notification to 'Text' content 'Front Porch Motion'

Wait 20 seconds

 

Else

- No Actions - (To add one, press 'Action')

 

ELK Speak Program:

If

Control 'My Sensors / Front Porch-Sensor' is switched On

 

Then

Set Elk Speak Phrase 'Front Door'

Set Elk Speak Word 'Motion'

Stop program 'Front Porch Speak'

Wait 10 seconds

 

Else

- No Actions - (To add one, press 'Action')

 

 

Ahhh, just thought of something, could it have anything to do with the settings on the IO LInc?

Link to comment

Momentary just has to do with the relay and shouldn't have anything to do with the sensor status. Is it possible the sensor isn't being held low fully? Check the event viewer on level 3 and block the beam and see if there are multiple occurrences in the viewer.

 

Also the wait placed where it is in the first program is not do anything. In settings is the sensor trigger reversed?

Link to comment

As TJF1960 has said this has nothing to do with the I/O Linc Relay mode (latching versus momentary) as you are not using the Relay part of the I/O Linc nor any of the other I/O Linc options. For the I/O Linc to be sending repetitive Sensor On commands the photo sensor is cycling its power to the I/O Linc Sensor input such that the I/O Linc Sensor is turning On and Off. Watch the Green LED on the I/O Linc where the wire connections are made.

 

What photo sensor is being used? Manufacturer, model, how is the photo sensor connected to the I/O Linc Sensor input and how is the photo sensor powered? The problem is with the photo sensor chosen or how it is connected to the I/O Linc Sensor input.

Link to comment

I agree with TJF1960 that your "wait" statement is not effective as used.

 

I think, too, that a few experiments around the house may help isolate this. Open an event viewer and have someone walk around the porch. Do you see lots of ON commands from your IOLinc? If so, this tends to suggest that the beam/IOLinc configuration is extremely sensitive for some reason.

 

Also if so, I believe your were on the right track (if not the right solution) with the approach of introducing a time delay in an attempt to solve this problem programmatically. Perhaps an alternaitve approach, with an additional program would work.

 

New program:

if
then
wait 20 seconds
run this program (else path)
else

One could use this program as an indicator of whether it is in the 20-second wait period (program status is TRUE) or not (program status is FALSE). If easier to comprehend, one could even create a variable as indication, rather than using program status.

 

Once created, an update to your current program would be necessary:

 

If
Control 'My Sensors / Front Porch-Sensor' is switched On
and status of new program is false (indicating not in wait period)

Then
Send Notification to 'Text' content 'Front Porch Motion'
run new program (then path) (initiates wait period)
Else
- No Actions - (To add one, press 'Action')

Hopefully, you recognize that the program I suggested is conceptual only. The exact program language would be different.

 

There may be a benefit to using a variable, rather than a progam, in retrospect. Such an approach may offer a benefit of reduced program activity in the background. This is probably not a practical concern, but some may percieve this as having value.

Link to comment

Sorry for the delayed reply, it's been a busy couple days. The sensor is Seco-larm, it's the same one that Smarthome sells in the kit (http://www.smarthome.com/70414/I-O-Linc ... Kit/p.aspx). I just purchased it separately since I already had a few IO Lincs laying around. It's wired to the Ground and Sense terminals and powered via it's own cord to an outlet.

 

I will try the suggested program revisions, thank you. I've always had a difficult time comprehending correct use and placement of the "wait" commands. I'll also see if the sensitivity dial on the photosensor itself changes anything.

Link to comment

Archived

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


×
×
  • Create New...