Copy and register the NT Service control:
copy ntsvc.ocx %systemdrive%\lurkerCopy and register the HomeSeer Technology cm11a ActiveX control:
copy cm11a.ocx %systemdrive%\lurker| 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_STEREOVirtual 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.
| 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 D15to map the pause_resume command to the X-10 D15 command.
| 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".
Register the lurker service:
sc create lurker start= auto binPath= "c:\lurker\lurker.exe"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.
Supporting Documents