ECS-L Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
Re: [ECS] Re: Yet another 'newbie'!
Ingo Dean
Wed, 13 Jan 1999 21:32:18 -0500

Even better, create custom types.  You do this by editing the file "itpcst.def".
Just be careful of the formatting.

Mine looks like:

|TYPE: IR-Signal-Type
| Hitachi PIP  0
| Hitachi Vol Up  1
| Hitachi Vol Dn  2
| Hitachi Chnl Up  3
| Hitachi Chnl Dn  4
| Hitachi PIP Swap  5
| Hitachi Video Input 6
| Hitachi PIP Shift  7
| Hitachi 0   8
| Hitachi 1   9
| Hitachi 2   10
...there's more...

The only drawback with custom types is that ECS seems to only read the file on
startup.  But once you understand how to use them, they really are fantastic!
(Way to go, Mark!  The more I learn, the more I love it!)

To use it, you can create a State-Holder, which you should think of as a variable
to hold values of certain types, where I use the new custom type I created.  My
"IR Send" state-holder then makes it easy to refer to IR Signals by real names
when I want to send one in the "IR Sender" event, and my "IR Received"
state-holder makes it easy to refer to received IR commands by name in the "IR
Handler" event:

|Item:IR Send                   Type:State-Holder               Acc:User/User
| Initial State:None                                      Backup:No
| Sub-Type     :IR-Signal-Type

|Item:IR Received               Type:State-Holder               Acc:User/User
| Initial State:None                                      Backup:No
| Sub-Type     :IR-Signal-Type

|Item:IR Signal                 Type:IR-Signal-J                Acc:User/User
| Initial State:(None)                                    Backup:No
| Station #    :0
| Zone(s)      :1 2 3 4 5 6 7 8

|Event: IR Handler                      Called ?:No
|
|         This event handles IR signals
|         --------------------------------------------------------------
|
|       If      IR Signal               Is              Idle
|       Then    Event-Exit              Set             True
|         ______________________________________________________________
|         Make it human readable:
|       Do      IR Received             Set             IR Signal
|         ______________________________________________________________
|
|       If      IR Received             Is              FR Light Dim
|       Then    Number-A                Set             Family Room Lamp
|       Then    Event-Call              Set             CalculateDim
|       Then    Family Room Lamp        Set             Number-A
|       Then    Event-Exit              Set             True
|
|       If      IR Received             Is              FR Light Brighten
|       Then    Family Room Lamp        Set             On
|       Then    Event-Exit              Set             True
|
|       If      IR Received             Is GE           Hitachi 0
|       And     IR Received             Is LE           Hitachi 9
|       Or      IR Received             Is              Hitachi Chnl Up
|       Or      IR Received             Is              Hitachi Chnl Dn
|       Then    TV Input                Set             0
|       Then    Event-Exit              Set             True
|
|       If      IR Received             Is              Watch a Movie
|       Then    MovieTime Flag          Invert          MovieTime Flag
|       Then    Event-Exit              Set             True
|
|         ______________________________________________________________
|         If it falls through to here, log it so I can add
|         support for it later...
|
|       If      IR Signal               Is              Unknown
|       Then    Event-Exit              Set             True
|
|       Do      Text-A                  T1<-T1          Msg: Unknown
|       Do      Text-A                  Set             <Space>
|       Do      Text-A                  T1/A<-T1        Msg: IR Signal
|       Do      Text-A                  Set             <Space>
|       Do      Text-A                  T1/A<-Stt       IR Received
|       Do      LOG: IR                 Set             Text-A
|
|
|       End


|Event: IR Sender                       Called ?:No
|
|         This event handles IR signals
|         --------------------------------------------------------------
|
|         ___________________________
|         Do we need to send a signal
|       If      IR Send                 Is Not          None
|       Then    IR Signal               Set             IR Send
|       Then    IR Send                 Set             None
|
|
|
|
|       End


> > Next one. How do I capture any infra red commands that HV picks up from my
> > remote and then 'do' something? I've read the IR-signal-J bit but there are
> > gaps.
>
>         If IR-Signal-J Is 1
>         Then ...
>
> where "1" would be the ID of a particular signal,
> as learned via the HV software. Note that instead of "1",
> you could define a number Item whose name is say "TV:ON",
> and whose initial state would be 1.
> Your event-line would then read:
>         If IR-Signal-J Is TV:ON
> This would make your events easier to follow.
>


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.