Search the Community
Showing results for tags 'x10'.
-
Greetings! So I found a device named "X10 RF Remote Receiver" along with the remote in an old PC and it was connected to the motherboard with a 4-pole connector, so I soldered a USB plug on it and plugged it into my laptop - and it worked! But since programs don't usually come with support for all kinds of HIDs, this needed a little bit of software inbetween the drivers and whatever I want to control. After a few hours, I ran into a .NET tool that translated the remote signals into keystrokes, tailored to a wide variety of programs. Except they wanted money for it. After the free trial expired, my remote was once again useless, except for arrow keys and the power button. But today I managed to get hold of the raw signals! TL;DR: If your PC has an X10 type remote (and many other models are said to be compatible, I just can't guarantee this will work) and you've been wanting to directly control a script with it, this code is for you! (I seriously hope this is something new) First, you need the ActiveHome PRO SDK. After you've installed it, you can listen for key press events in your AutoIt script: $x10 = ObjCreate("X10.ActiveHome") If @error Then MsgBox(0,"",@error) EndIf $x10event = ObjEvent($x10, "_x10event", "_DIActiveHomeEvents") If @error Then MsgBox(0,"",Hex(@error)) Exit EndIf Func _x10eventRecvAction($parameter1,$parameter2,$parameter3,$parameter4,$parameter5,$parameter6,$parameter7) ConsoleWrite($parameter1 & @CRLF & $parameter2 & @CRLF & $parameter3 & @CRLF & $parameter4 & @CRLF & $parameter5 & @CRLF & $parameter6 & @CRLF & $parameter7) EndFunc While 1 Sleep(10) WEnd Your computer might still interpret remote key presses as keystrokes. To disable that, open your Control Panel and locate the Remote Control menu: Press any key on the remote to see which channel it sends on, then tell it to accept commands only from a different channel. The script will still work fine and Windows will leave you alone! Edit: It even survives unplugging and re-plugging the receiver. In fact, it fires a DeviseStop/DeviceStart event! Translating key presses on the remote into useful things is left as an exercise for the reader.