X10 MouseRemote
Posted: Fri Jun 10, 2011 4:06 am
This is a plugin for the serial X10 MouseRemote. Specifically for the MK19A package which consists of the JR20A RF remote along with the JR21A receiver which connects to a COM port (it can also connect via a PS/2 mouse port, but that's not part of this plugin).
To install the plugin, extract the attached X10Mouse.zip to your EventGhost\plugins directory. It should create an X10Mouse folder with two files inside.
Here's some notes for this plugin:
-When Windows sees the receiver for the first time, it installs the drivers for a Microsoft Serial Mouse. Go into the Windows Device Manager and disable it.
-If any other program has an open connection to the COM port that the receiver is on, EventGhost will fail to open it and give you an error message similar to
Exception in thread Thread-113:
Traceback (most recent call last):
File "threading.pyc", line 525, in __bootstrap_inner
File "threading.pyc", line 477, in run
File "C:\Program Files (x86)\EventGhost\eg\Classes\SerialThread.py", line 376, in ReceiveThreadProc
SerialError: (6, u'The handle is invalid.')
Make sure that the MS Serial Mouse device is disabled and that no other serial programs such as Hyperterminal, the original X10 software or maX10 are running.
-Once this plugin is enabled there's about a 20 second delay before it starts receiving events. Watch the red LED on the receiver. If it flickers when you press something on the remote, EventGhost should be getting input.
-MouseMove events carry a payload of relative x and y coordinates, where positive is right or up, and negative is the reverse. Here's a macro to make use of it: That one in the middle is an EventGhost->Python Command with the text "eg.plugins.Mouse.MoveRelative(2*eg.event.payload['x'], 2*eg.event.payload['y'])"
In the autorepeat command, all the settings are 0.05
Fiddle with the numbers in the above two commands until you find something that works for you.
-With all the stray radio signals being thrown around these days the RF receiver gets quite a bit of junk input, pretty much all of which come in as valid mouse moves. I'd suggest dedicating one of the MouseRemote buttons (I use the A.B button) for only enabling the mouse functions when you want to use them.
-The mouse buttons on the MouseRemote only send buttondown and buttonup messages, so you won't be able to drag using it. I'll look into adding some macros to the Mouse plugin to solve that.
To install the plugin, extract the attached X10Mouse.zip to your EventGhost\plugins directory. It should create an X10Mouse folder with two files inside.
Here's some notes for this plugin:
-When Windows sees the receiver for the first time, it installs the drivers for a Microsoft Serial Mouse. Go into the Windows Device Manager and disable it.
-If any other program has an open connection to the COM port that the receiver is on, EventGhost will fail to open it and give you an error message similar to
Exception in thread Thread-113:
Traceback (most recent call last):
File "threading.pyc", line 525, in __bootstrap_inner
File "threading.pyc", line 477, in run
File "C:\Program Files (x86)\EventGhost\eg\Classes\SerialThread.py", line 376, in ReceiveThreadProc
SerialError: (6, u'The handle is invalid.')
Make sure that the MS Serial Mouse device is disabled and that no other serial programs such as Hyperterminal, the original X10 software or maX10 are running.
-Once this plugin is enabled there's about a 20 second delay before it starts receiving events. Watch the red LED on the receiver. If it flickers when you press something on the remote, EventGhost should be getting input.
-MouseMove events carry a payload of relative x and y coordinates, where positive is right or up, and negative is the reverse. Here's a macro to make use of it: That one in the middle is an EventGhost->Python Command with the text "eg.plugins.Mouse.MoveRelative(2*eg.event.payload['x'], 2*eg.event.payload['y'])"
In the autorepeat command, all the settings are 0.05
Fiddle with the numbers in the above two commands until you find something that works for you.
-With all the stray radio signals being thrown around these days the RF receiver gets quite a bit of junk input, pretty much all of which come in as valid mouse moves. I'd suggest dedicating one of the MouseRemote buttons (I use the A.B button) for only enabling the mouse functions when you want to use them.
-The mouse buttons on the MouseRemote only send buttondown and buttonup messages, so you won't be able to drag using it. I'll look into adding some macros to the Mouse plugin to solve that.