Jump to content

Two Newbe Programing Questions.................


jdbaker

Recommended Posts

Posted

I'm getting ready to port away from my JDS Time Commander system with I/O and IR Expander. I've got two questions on programming conventions.

 

First, I have exterior motion sensors that will be connected to a 6 input interface module and used to control spot lights controled by Insteon wall switches. Once motion is sensed, I want to issue the command to turn the lights on and start a 3 minute timmer. The question is, how do I keep resetting the 3 minute timer each time the motion detector during the timer period?

 

Second, I'm starting to think about porting over all the IR control of the home theater. For devices like the main receiver, I have a 12V power adapter plugged into the switched power outlet on the back of the receiver and that is connected to a IO input. With the current system, I issue the power IR command to the receiver, then I look for the 12v input on the IO module to make sure the receiver powered up. If I don't see the 12v input, I reissue the IR power command. That process loops over and over until I see the 12v input, then I go on to issue all the other IR commands to adjust the volume and select the source. What programming convention would I use to check for the 12v input and reissue the IR command until the receiver powers up?

 

One bonus question, has anyone tried to use a JDS IRExpander to output IR commands from a ISY-99?

 

Thanks!

 

J.D.

Posted

I assume that you are speaking of ISY-99 programming. Correct?

 

The question is, how do I keep resetting the 3 minute timer each time the motion detector during the timer period?

 

Given the nature of the way an ISY program works (evaluating input conditions during a wait statement), typical motion sensor programs will inherently restart each time motion is sensed.

 

For example:

 

if
motion is sensed
then
turn on light
wait three minutes
turn off light
else

 

If motion is sensed during the wait period, the program execution stops what it is doing, turns on the light (which is already on), and restarts the wait period.

 

What programming convention would I use to check for the 12v input and reissue the IR command until the receiver powers up?

 

The ISY-99 has a "repeat" command. I believe it can also restrict the number of repetitions. Repeats also give a program to cease execution if your input conditions change (I would think a finite number of loops would be good mitigation step against the possibility that your reciever never turns on for some reason), so your program logic would look something like:

 

if 
recieve on trigger is recieved
and reciever off trigger is not recieved
and IO Input is not on
then
Send IR signal on
wait a little bit
Repeat a few times
else

 

Please be aware that the actual ISY-99 syntax will vary (I don't have it memorized) but I believe that this program flow would work for you. Hopefully others can confirm and offer other suggestions as necessary.

Posted

jdbaker

 

Welcome to ISY.

 

How are you interfacing the 6 input IO module to Insteon/ISY?

 

A Motion Sensor Program might look like this ...

 

If

Control Motion Sensor is On

Then

Set Flood Light On

Wait 3 (minutes)

Set Flood Light Off

Else

nothing

 

If a new Motion Sensor On command is received during the 3 minute wait the program is restarted from the beginning, skipping the Set Flood Light Off and establishing a new 3 minute wait.

 

Same question about the 12V detection. How are you planning on interfacing the 12V signal to Insteon/ISY.

 

You might want to look at something like a SimpleHomeNet EZIO8SA for interfacing the 12V signal and maybe the Motion Sensors depending on what the Motion Sensor is using to signal motion. A Smarthome I/O Linc can be used for an individual condition. This may require a 12V relay between the 12V source and the I/O Linc Sensor. The I/O Linc has one Sensor input. The EZIO8SA has 7 Inputs. The EZIO8SA is more expensive than an I/O Linc but supports 7 inputs compared to the one input for an I/O Linc.

 

Lee

Posted

Guys

 

Thanks for the quick reply. Yes, I am asking about the programing conventions for my ISY-99.

 

Thanks for the help on the spot light logic, that will work great. As far as the IO interface, I just ordred a 6 Input INSTEON Interface Module (Item# 31280) from SmartHome. I would have loved to use the EZIO8SA but from what I've read here, I didn't think that currently worked correctly with the ISY-99. Did I get that wrong?

 

Also, I'm affraid I'm not quite following what the logic would look like on the confirmation of the IR code activating the receiver based on the 12v input. I understand the potential need for a relay but not sure how the programing would work to look for the 12v input and re-issue the IR command if it didn't occur but stop issuing it (turning the receiver off and on) once the receiver is powered up.

 

Thanks again for your support.

 

J.D,

Posted

I am unsure about the physical interface for the 12V power. I am assuming you have that figured out.

 

Regarding the programming:

 

 

if

recieve on trigger is recieved <<<< insteon command recieved that you use to turn on reciever

and reciever off trigger is not recieved <<<< command you use to turn off reciever

and IO Input is not on <<<

then

Send IR signal on

wait a little bit

Repeat a few times

else

 

This program "if" condition would evaluate as "true" if a combination of ALL THREE conditions were all true. Otherwise, the "if" condition is false. Therefore, at receipt of 12V signal, or receipt of an off command, the "if" condition evaluates as false, forcing execution of the "else" statement, which is empty.

 

Hopefully, I am understanding your problem and questions. At the risk of repeating myself, the syntax is VERY APPROXIMATE, only for the purpose of suggesting the program logic.

Posted

jdbaker

 

I prefer to get my SHN devices directly from SimpleHomeNet. The latest firmware is always sent and they handle the warrantee.

 

The EZIO6I will work. You will need a 5V power supply to use Inputs 5&6 in digital On/Off mode. The EZIO6I provides 12V DC which you can use as input to a 5V well regulated power supply. Inputs 1-4 are opto-isolated which can be used either with dry contact switches/relays or a DC voltage source up to 30V DC.

 

The EZIO8SA will also work. Support for the EZIOxx family of devices (EZIO6I, EZIO8SA, etc) was added at ISY 2.8.1. The EZIO8SA has the same 1-4 opto-isolated inputs as the EZIO6I. Inputs 5&6 require the same 5V as the EZIO6I ( except the EZIO8SA provides the 5V DC rather having to build a power supply - THIS IS WRONG INFORMATION - THE EZIO8SA PROVIDES 12V - IT IS THE EZIO2X4 THAT PROVIDES 5V DC). Also the EZIO8SA has 7 Inputs that can be used in digital mode.

 

As far as using an EZIOxx Input with the IR, an ISY Program can test the Status of an EZIOxx Input which will have some On or Off Status to represent the 12V from the audio equipment. If the expected Input Status does not represent the existence of 12V you would repeat whatever sends the IR command again.

 

Lee

Posted

Lee & Oberkc

 

Thanks SO much for your input.

 

Lee, that's great to know on the EZIO8SA. I think that will be my next IO module after I impliment the EZIO6I.

 

By the way, which ISY version should I upgrade to? 2.8.1 or later? This platform is new to me so I'd like to avoid the beta versions if possible. I'll have enough problems on my own!

 

I'm sure I'll be back with more questions once the EZIO and IRLink Transmitter arrive and I start programing.

 

Thanks again.

 

J.D.

Posted

The latest 2.8.7 RC3 is best (unless there is a later 2.8.x when you start using the SHN device). You will need one of the 2.8.x releases. These are the only images which correctly identify the size of the (internal or external) PLM memory. This information is needed to insure link records are read/written at the correct location.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...