Rev 482 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 482 | Rev 518 | ||
|---|---|---|---|
| Line 8... | Line 8... | ||
| 8 | 8 | ||
| 9 | #for printing timestamps on printed messages: set to 1, else set to 0 |
9 | #for printing timestamps on printed messages: set to 1, else set to 0 |
| 10 | $timestamp = 1; |
10 | $timestamp = 1; |
| 11 | 11 | ||
| 12 | #define filters for id of messages, passed messages will be printed on stdout |
12 | #define filters for id of messages, passed messages will be printed on stdout |
| 13 | @acceptmask_ones = (0x00080000, 0x00240000, 0x00040000); |
13 | @acceptmask_ones = (0x00080000, 0x00240000, 0x00040000, 0x00280000); |
| 14 | @acceptmask_zeros = (0xfff70000, 0xffdb0000, 0xfffb0000); |
14 | @acceptmask_zeros = (0xfff70000, 0xffdb0000, 0xfffb0000, 0xffd70000); |
| 15 | @denymask_ones = (); |
15 | @denymask_ones = (); |
| 16 | @denymask_zeros = (); |
16 | @denymask_zeros = (); |
| - | 17 | ||
| - | 18 | @input = (); |
|
| - | 19 | @output = (); |
|
| 17 | 20 | ||
| 18 | #define makros, when an input sting is sent on can this perl-script will send the corresponding output string |
21 | #define makros, when an input sting is sent on can this perl-script will send the corresponding output string |
| 19 | @input = ("PKT 04000005 1 0 00 00 05 01"); |
- | |
| 20 | @output = ("PKT 0a100601 1 0 03" ); |
- | |
| 21 | 22 | ||
| - | 23 | # Remote button 1 => desktoplamp toggle |
|
| - | 24 | push(@input , "PKT 0409000a 1 0 00 00 05 01"); |
|
| - | 25 | push(@output, "PKT 08008c00 1 0 03"); |
|
| - | 26 | ||
| - | 27 | # Remote button 4 down => blinds darker |
|
| - | 28 | push(@input , "PKT 0409000a 1 0 00 00 05 04"); |
|
| - | 29 | push(@output, "PKT 08010200 1 0 00 03"); |
|
| - | 30 | ||
| - | 31 | # Remote button 4 up => blinds stop |
|
| - | 32 | push(@input , "PKT 0409000a 1 0 0f 00 05 04"); |
|
| - | 33 | push(@output, "PKT 08010200 1 0 00 04"); |
|
| - | 34 | ||
| - | 35 | # Remote button 6 down => blinds lighter |
|
| - | 36 | push(@input , "PKT 0409000a 1 0 00 00 05 06"); |
|
| - | 37 | push(@output, "PKT 08010200 1 0 80 03"); |
|
| - | 38 | ||
| - | 39 | # Remote button 6 up => blinds stop |
|
| - | 40 | push(@input , "PKT 0409000a 1 0 0f 00 05 06"); |
|
| - | 41 | push(@output, "PKT 08010200 1 0 00 04"); |
|
| 22 | 42 | ||
| 23 | 43 | ||
| 24 | $remote = IO::Socket::INET->new( |
44 | $remote = IO::Socket::INET->new( |
| 25 | Proto => "tcp", |
45 | Proto => "tcp", |
| 26 | PeerAddr => "localhost", |
46 | PeerAddr => "localhost", |