Stoppt die Vorratsdatenspeicherung! Jetzt klicken & handeln!Willst du auch bei der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

PCWSD Homepage

pcwsd receiver

In December 2001 Germany had a real winter and there was a white christmas in most parts of the country. I recogniced, that I didn't even own a thermometer to measure the current outdoor temperature which was quite cold compared to the temperatures we are used to. At least here in the valley of the rhine.

With my somewhat geeky attitude, I decided to get some sensors which aquire environmental data and broadcast them by means of 433MHz radio waves. The frequency range which is free for private use, at least here in Germany.

There is a company called ELV which sells stuff like that. They also have a somewhat cheap receiver kit (Part No. 68-390-61 35,90 Euros) which is connected to the serial port of a computer.

As usual they provide Software only for a strange Operating system called "Microsoft Windows" which I don't have installed on any of my Computers.

Searching the Web for suitable Unix Software I found a Programm called pcwsr which is available from http://wth.berlios.de/.

Unfortunately this Software didn't do exactly what I wanted it to do! It actualy just dumped the received Data to stdout.

Thus beeing GPLed I extracted the Serial Port communication code and wrote this Software, which I called pcwsd.

What is pcwsd?

pcwsd is a Server Programm which provides the Data received from any of the ELV Sensors, using the receiver I mentioned above, by means of a very simple TCP based communication Protocol.

The lateset sources pcwsd-1.3.1.tar.gz are available from here.

In the most simple setup sensor data can be displayed using telnet:


sven@benzin:~> telnet localhost 4711
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
PCWSD Version 0.1 ready
get od2temp 0
7.7 1011533243
quit
Connection closed by foreign host.

This gives you the Outdoor temperature value of sensor Number 0 (7.7 °C in this example). The other value (1011533243) is the timestamp when this data has been received from the sensor in seconds sice epoch.

In addition to this, the Software writes the received Data to logfiles (one file for each physical value) which can be visualised by means of gnuplot.

This is exactly what my weather page does using a small cgi-script witten in the Tcl scripting language.

The following values are generated by a small piece of Python-Code which communicates with the daemon via TCP:

temperature:
(acquired Sep 10, 23:40:58, 171 seconds ago)
  1 7.0 °C
barometric pressure:
(acquired Sep 10, 23:42:13, 96 seconds ago)
1 0 0 6 hPa
atmospheric humidity:
(acquired Sep 10, 23:40:58, 171 seconds ago)
6 3.0 %

© 2001-2007 Sven Geggus

Last modified: Wednesday, 05-Dec-2007 10:41:56 CET