I felt the need to control my lights with the media-player remote-control I had available. I assumed it would be easy to quickly build a C# console application which I could easily start from within EventGhost.
The application was finished rather fast, EventGhost was quickly configured, yet the result was not behaving fast enough to my taste. EventGhost needed to start the external console application, which connects to HomeSeer and triggers an event. The delay was too annoying. I decided to make a bit harder: let’s build a plugin for EventGhost, which connects to HomeSeer. Some of the C# quotes however, I decided to share:
Requisites:
- HomeSeer – http://www.homeseer.com/ (to actually control the lights)
- HomeSeer Speaker Client – http://www.homeseer.com/downloads/index.htm (only needed in case you want to access HomeSeer from a remote machine)
- Visual Studio Express – http://www.microsoft.com/express/Windows/ (when no other alternative at hand)
References to Scheduler.dll
and HomeSeer2.dll
should reveal the necessary classes and namespaces to control HomeSeer.
Connect to HomeSeer, I assume the port is actually optional:
Detailed device information is available via the device code as parameter.
Sending a command isn’t hard either. I did notice the command parameter to be case sensitive: “On” seem to work, “on” did not.
References:
- http://www.homeseer.com/support/homeseer/WebHelp/scripting/homeseer_scripting_interface_(function_quick_reference).htm
- http://www.homeseer.com/support/homeseer/WebHelp2/tipstricks/tipstricks_controlling_homeseer_remotely.h