HR12A RF remote

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

HR12A RF remote

Tim Sailer-2
I'm having trouble thinking through logic for controlling things with this
remote. I have the buttons defined like:

X10I,           C1,     button1
X10I,           C2,     button2
X10I,           C3,     button3
X10I,           C4,     button4

depending on if the on or off button is pressed, I want to do something.
My login problem is this. I have the code

if (state_changed $button1)
        set $All_Lights (state $button1);

if (state_changed $button2)
        set $living_room_light (state $button2);

If the livingroom light was turned on manually, and I want to turn it off
with the remote, I first have to press on, then off, because MH doesn't
know the light is on. I know I'm missing something real basic, but how do
you just capture the keypress?


This email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
To unsubscribe from this list, go to: