A user called Grantig on computerbase.de created the tool Notebook FanControl. It is written in C# and uses WCF for communication with a backend service. Using JustDecompile and the information from the config I managed to build my own front-end.
Image courtesy of bplanet / FreeDigitalPhotos.net
The Fancontrol client uses a DispatcherTimer for interval updates. A DispatcherTimer is close related to WPF and needs some extra work for unittesting and other non-WPF programs. So I’m using polling.
// simplified code var model = new NbfcServiceClient.ViewModels.MainWindowViewModel(); model.PropertyChanged += (s, e) => Console.WriteLine(model.CpuTemperature); var client = new NbfcServiceClient.FanControlClient(model, 10); client.StartFanControl(); // polling (done recursive) Task.Factory.StartNew(() => { client.UpdateViewModel(); Thread.Sleep(10000); };
References
How to Test a Class Which Uses DispatcherTimer by Josh Smith.
My sources on Github