First page Back Continue Last page Overview Graphics
Macro code (Perl)
- # LRicon is actually a LampLinc V2
- # manually turned on - sends out E4EON ($LR_ON)
- # manually turned off - sends out E4EOFF
- # ($LR_OFF)
- if(state_now $LR_ON) {
- Timer->new->set(1, sub{ $LRiLamp->set(ON)};
- Timer->new->set(1, sub{ $LRicon->set(ON)};
- }
- if(state_now $LR_OFF) {
- Timer->new->set(1, sub{ $LRiLamp->set(OFF)};
- Timer->new->set(1, sub{ $LRicon->set(OFF)};
- }
Notes:
- This is my macro for my living room lights.
- It takes advantage of a side effect of Insteon devices setup with X10 addresses
- The side effect is that if I manual turn on such a lamp. the module will send it's address with the on command
- I use this to turn on the other lamps in the room.
- The other lamps are on Insteon and X10 modules.
- the same holds true for when I turn off the lamp module.