Temperature warnings under Windows

Temperature warnings under Windows

One of the most common uses of the Yocto-Temperature is to monitor the temperature in server rooms. Many customers have asked us about applications using our modules under Windows and able to send warning emails in case of temperature increase. To the point that we decided to create one, just like this, because we are really nice people :-)

Indeed, the Yocto-Temperature is ideal for this task: it works by USB, does not require a driver, and is tiny. If, on top of this, you put it in the appropriate enclosure, the magnets of the enclosure allow you to fix it on a server rack is less time than it takes to tell.

Thanks to the magnets included in the enclosures, the Yoctopuce modules can stick to server racks.
Thanks to the magnets included in the enclosures, the Yoctopuce modules can stick to server racks.

The idea for this week is therefore to provide a minimal application (which can still be used in production) which allows you to monitor the temperature measured by a Yocto-Temperature. This application sends a warning email when the temperature goes above a given threshold. To make sure that the application runs all the time, it is provided as a Windows service.

This raises an issue for the configuration: a Windows service doesn't have an interface. Therefore, we also created a second Windows application which allows you to configure the service, that is to specify when and to whom to send a warning email.

The proposed solution is based on a Windows service
The proposed solution is based on a Windows service

This application is written in C# .NET: the Microsoft .NET framework 4 must therefore be installed on your machine for the application to be able to run.

There is no installer. You need the ThermalControlSvc.exe,ThermalControlSvc.exe.config, yapi.dll and ThermalControlCfg.exe files. Put them in a directory of your choice and, from this directory, run the following command line:

ThermalControlSvc.exe /INSTALL

This command installs and starts the Thermal control Windows service. You then only need to configure it.

Run the ThermalControlCfg.exe application. This application connects itself to the service and displays the measured temperature, allowing you to check that you have indeed remembered to connect a Yocto-Temperature to your machine :-).
Configuration is performed under the "Configuration" tab. You must enter the credentials necessary to connect the service to the email server from which you want to send the warning emails. You must also specify the email address of the person who must receive these emails, and the threshold from which the service must start to send warning emails.If you wish to do so, you can also customize the content of the warning email.

Configuration interface
Configuration interface

Inner workings
The inner workings of the service are very simple: as soon as the measured temperature goes up 0.5░C above the given threshold, the service switches to warning mode. When the temperature goes down 0.5░C below the threshold, the service switches back to standard mode. In warning mode, the service sends a warning email every four hours.

To uninstall everything, run the following command:

ThermalControlSvc.exe /UNINSTALL

and delete the files.

You can stop the ThermalControlSvc.exe service with the command:

ThermalControlSvc.exe /STOP

And you can restart it with the command:

ThermalControlSvc.exe /START

If you assign a logical name to your module, it is used instead of the serial number in warning emails, which is useful if you monitor several rooms.

It is also possible to run ThermalControlSvc.exe in "debug" mode without having to install it as a service. Simply run the following command:

ThermalControlSvc.exe /RUN

Beware, in "debug" mode, the settings stored the Windows registry base are not saved in the same location. You'll need to reconfigure the application if you run it as a service.

The application works with any Yoctopuce module equipped with a temperature sensor. It is designed to monitor a Yocto-Temperature, but it works as well with a Yocto-Meteo.

You can download the application with the C# sources from here. Obviously, this application is provided as is, without any kind of warranty. But this shouldn't prevent you from contacting Yoctopuce support if you encounter difficulties in making it work.

Add a comment 2 comments
Back to blog

1 - pomperj Tuesday,december 11,2012 14H13

I have a vacation home, like 10M other people in EU.
And in wintertime I do want to check the temperature in my second home so pipes do not freeze and break.
I usually set the heating controler to 15 degreeC, to keep the house warm enough while I am away. But last year the heating broke down and some pipes broke and cost me $5000 to repair.

Your USB thermometer is just fine solution for this.
BUT, I need then a PC running all the time, plus WiFI.
Plus a program, to send me an email if tempereature goes bolow 10C.

Now, my question is: Why not develop a small android app, and sell on the internet as a complete package of an android application?

This way I need only a cheap mobile phone, a small $2.50-$10 app. software on it, plus your USB thermo, plugged into the cellphone, all packaged (without the phone) for $40?
Your thermometer would sell like hot cakes;
all vacation home owner would want it.
And imagine how many other applications you might build: heater controller, security cameras controlled, etc.

I certainly would love to buy it,
as "remote home thermo surveillance" .
Coulld you do this for me?
best regards,
Janos Pomper

2 - seb (Yocto-Team)Tuesday,december 11,2012 16H06

Hi Janos Pomper,

Actually it does already exist: see https://play.google.com/store/apps/details?id=net.valarm.android.pro

Valarm has integrated our Android Library into his Android application and sell it. You can configure the app to send you an email or a SMS when the temperature of a connected Yocto-Meteo goes out of a specified range. They have implemented lots of others nice functionalities and plan to support most of our devices in the future. You can check there web site: http://www.valarm.net

We do not plan to write ourself other Android app than the open source examples for now... (see our demo applications : https://play.google.com/store/apps/developer?id=Yoctopuce)

Yoctopuce, get your stuff connected.