How to Install the Lurker Version 1.0

  1. Copy and register the NT Service control:

    copy ntsvc.ocx %systemdrive%\lurker
    regsvr32 %systemdrive%\lurker\ntsvc.ocx
  2. Copy and register the HomeSeer Technology cm11a ActiveX control:

    copy cm11a.ocx %systemdrive%\lurker
    regsvr32 %systemdrive%\lurker\cm11a.ocx
  3. Install the Winamp media player which can be controlled through the Winamp API.
  4. On the Microsoft Agent download page (http://www.microsoft.com/msagent/downloads/user.asp) download and install:
  5. Create registry entries with information about your X-10 devices.  Each device gets its own key under HKEY_LOCAL_MACHINE\Software\Lurker\devices.  For the key name use prefixes of "LM_" or "AM_" for lamp and appliance modules, respectively.  Under each device key are data values as follows:
value name data type value description
description string optional description of device
hc string house code
dc string device code
state dword current state -- 1 or 0 for on or off
dimstate dword last dim state value -- leave at 255 for non-dimmable devices

Non-dimmable devices should have the special value of 255 for DimState.  The Lurker is hard-coded to look for "AM_STEREO" and "AM_ROUTER" for the stereo and router. Registry values are strings except for state and dimstate which are DWords.  So a registry dump of a couple of a device might look like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Lurker\devices\AM_STEREO
hc = REG_SZ J
dc = REG_SZ 5
description = REG_SZ stereo receiver
state = REG_DWORD 0x00000001
dimstate = REG_DWORD 0x00000255

Virtual devices, should you choose to implement them, have a naming scheme of VI_HD where H and D are the house and device codes of the actual device.  For example, a virtual device might have a name VI_A2 associated with house and device code pair H14.  Commands sent to H14 would get mapped to an actual device on A2.

  1. Create registry string values under HKEY_LOCAL_MACHINE\Software\Lurker\commands mapping X-10 commands to music functions.  Some of the commands are:  
command description
pause_resume toggle pause/resume
prev_list previous playlist
next_list next playlist
prev_track previous track in playlist
next_track next track in playlist
first_track first track in playlist
last_track last track in playlist
seek_back seek backwards 30 seconds in current track
seek_forward seek forwards 30 seconds in current track
vol_down lower volume
vol_up raise volume
end shut down media player

So one registry value might be:

pause_resume = REG_SZ D15

to map the pause_resume command to the X-10 D15 command.

  1. Create registry string values for other Lurker settings:
setting description
gateway IP address to be pinged periodically -- network connectivity check is disabled if left blank
RouterLog path and file name to log gateway ping history
RouterCheckInterval number of minutes between ping tests
PowerOffSeconds number of seconds before turning power back on
MaxConnectAttempts max number of connection attempts before recycling
MaxPingAttempts max number of pings in a connection attempt
PlayListMask wildcard mask of play list files, e.g., *.m3u
PlayListPath path to directory containing play lists, e.g., d:\wma
PlayerPath path to media player
JobPickup path and file name to look for scheduled jobs
cm11aPort COM port to look for cm11a

Sample registry file: lurker_reg.txt (Change the file name to lurker.reg when saving.)

Note that the .reg file format requires that the '\' character be escaped with an initial '\' so directory paths get entered like "c:\\winnt\\system32".

  1. Register the lurker service:

    sc create lurker start= auto binPath= "c:\lurker\lurker.exe"
  2. Adjust Lurker service settings:

    Go to Start | Programs | Administrative Tools | Computer Management | Services and set the lurker service to start automatically and add a description.  I originally had the service running with Allow Service to Interact with Desktop enabled.  Then Winamp would be visible from any account that was logged in.  This helped for initial testing and debugging.  Later I disabled desktop interaction.

Source Code for Visual Basic 6

Change the '_' to a '.' and drop the .txt extension when saving text files.

Compiled Executable

In case you don't have Visual Basic 6 or are otherwise unable to compile you can download the executable. My web server blocks requests except for those made for a fixed list of safe extensions such as .jpg. The list does not include the extension "exe". The executable file has been renamed as a workaround. To download, right-click and choose Save As and then change the file name to lurker.exe.

lurker_exe.jpg (88Kb)

Supporting Documents