Project DescriptionPowermateLights is a small tray application that connects to a USB PowerMate and allows the room lights to be controlled from the HID simply.
I have a Griffin PowerMate USB knob connected to my PC. Whilst the quality is brilliant, I have always had difficulty finding uses for it. I also Have LightwaveRF light switches and the LightwaveRF wifi-link that allows the home lights to be controlled remotely over the internet or local wifi.
The API for the lightwaveRF switches is relatively simple and makes use of UDP packets. This gave me the idea of being able to dim my work room lights using the PowerMate in a similar way to changing the volume.
I did some research and found the following brilliant tutorial on connecting to the PowerMate in C# by Thomas H@mmer
http://thammer.net/?p=374 .
The aim of the project is to control one set of dim-able lights from the PowerMate. Unfortunately, one of the shortcomings of the LightwaveRF product suite is the lack of state tracking. This means that when the application first starts up, or if the state of the lights is changed outside of the application, it will have no way of knowing what state they are in. When the the application starts, it assumes the lights are off and will start dimming from that point. If the state of the lights are changed outside of the application, it will continue to assume the lights are in the same dim state as the last known state. This might result in some off dimming states as it reverts back to the last known state.
In order to run the application, simply copy the assembly and its references to a known directory and add it to the start up application.