<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://proj.ettis.at/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Christian</id>
	<title>EttiWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://proj.ettis.at/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Christian"/>
	<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Special:Contributions/Christian"/>
	<updated>2026-06-17T14:01:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=172</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=172"/>
		<updated>2013-04-07T11:16:55Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Querying the Database */ removed minor detail&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
[[File:USB-WDE1.jpg|thumb|200px|USB-WDE1 Receiver from ELV]]&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
The USB-WDE1 contains a [https://www.silabs.com/Support%20Documents/TechnicalDocs/cp2102.pdf CP210x] serial-to-USB chip from Silicon Labs. Fortunately, Linux already contains a driver for that chip, so all that is needed is to plug the USB-WDE1 into the USB port. One can verify the driver is loaded correctly with ''lsmod'':&lt;br /&gt;
&amp;lt;pre&amp;gt;pi@raspberrypi ~ $ lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
cp210x                 11783  0&lt;br /&gt;
usbserial              34545  1 cp210x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From then on the USB-WDE1 will transmit a serial ASCII string whenever a new measurement has been received. This can be verified with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;stty -F /dev/ttyUSB0 9600&lt;br /&gt;
cat /dev/ttyUSB0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ASCII string sent by the USB-WDE1 can look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;$1;1;;;;;;-3,8;;;;;;;;94;;;;-4,2;98;0,0;36;1;0&amp;lt;/pre&amp;gt;&lt;br /&gt;
Which means:&lt;br /&gt;
* Temperature sensor address 5: -3.8°C&lt;br /&gt;
* Humidity sensor address 5: 94%&lt;br /&gt;
* Outside temperature: -4.2°C&lt;br /&gt;
* Outside humidity: 98%&lt;br /&gt;
* Wind speed: 0.0 km/h&lt;br /&gt;
* Rain intensity: 36 rocker switch impulses (equals 8.8mm/m²)&lt;br /&gt;
* Immediate rain detected&lt;br /&gt;
&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
I wrote a short C program which basically does the following:&lt;br /&gt;
* Open serial port and set communication settings.&lt;br /&gt;
* Wait for and read a line from the USB-WDE1.&lt;br /&gt;
* Split the semi-colon-separated values into separate strings and replace the decimal separator (, with .).&lt;br /&gt;
* Call the &amp;lt;code&amp;gt;rrd_update_r()&amp;lt;/code&amp;gt; function to enter these values into the RRDB.&lt;br /&gt;
&lt;br /&gt;
The complete C code can be found here: '''[[File:weathermon.c]]'''.&lt;br /&gt;
&lt;br /&gt;
To compile it I use the following short &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; (note that it makes heavy use of predefined rules). Using an extra &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; was only necessary for including the &amp;lt;code&amp;gt;librrd.so&amp;lt;/code&amp;gt; library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# predefined rule that compiles .c files into .o files: $(CC) $(LDFLAGS) n.o $(LOADLIBES) $(LDLIBS)&lt;br /&gt;
# predefined rule that links binary files from .o files: $(CC) -c $(CPPFLAGS) $(CFLAGS)&lt;br /&gt;
&lt;br /&gt;
LDLIBS = /usr/lib/librrd.so&lt;br /&gt;
&lt;br /&gt;
weathermon : weathermon.c&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
The tricky part is to configure the place of the database file differently depending on which machine it runs on (development machine or server). I decided to use Tomcat's ''Context Parameters''. I configured the context in &amp;lt;code&amp;gt;META-INF/context.xml&amp;lt;/code&amp;gt; which resides in the deployable WAR file and is copied to a machine-specific directory upon first deployment. There I can modify it to fit the corresponding machine configuration. To access this context parameter in the source code I have to do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;@javax.ws.rs.core.Context&lt;br /&gt;
public void setServletContext(ServletContext context) throws IOException {&lt;br /&gt;
  servletContext = context;&lt;br /&gt;
  String rrdbdir = servletContext.getInitParameter(&amp;quot;rrdbdir&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
A very good introduction to implementing REST services with Jersey can be found here:&lt;br /&gt;
* http://www.vogella.com/articles/REST/article.html&lt;br /&gt;
&lt;br /&gt;
Basically, you only need to do the following:&lt;br /&gt;
* setup the deployment descriptor (&amp;lt;code&amp;gt;WEB-INF/web.xml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* implement the service class with using the correct annotations&lt;br /&gt;
&lt;br /&gt;
The '''web.xml''' needs to contain the following information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;web-app xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://java.sun.com/xml/ns/javaee&amp;quot; xmlns:web=&amp;quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&amp;quot; xsi:schemaLocation=&amp;quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&amp;quot; version=&amp;quot;3.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;display-name&amp;gt;weatherserv&amp;lt;/display-name&amp;gt;&lt;br /&gt;
  &amp;lt;servlet&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-class&amp;gt;com.sun.jersey.spi.container.servlet.ServletContainer&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;
    &amp;lt;init-param&amp;gt;&lt;br /&gt;
      &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;&lt;br /&gt;
      &amp;lt;param-value&amp;gt;at.ettisoft.weatherserv&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/init-param&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet&amp;gt;&lt;br /&gt;
  &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;url-pattern&amp;gt;/rest/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/web-app&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The servlet container is implemented by Jersey, therefore the node &amp;lt;code&amp;gt;web-app/servlet/servlet-class&amp;lt;/code&amp;gt; must point to ''com.sun.jersey.spi.container.servlet.ServletContainer''.&lt;br /&gt;
* This container expects the parameter &amp;lt;code&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/code&amp;gt; to point to the service classes at ''at.ettisoft.weatherserv''&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=171</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=171"/>
		<updated>2013-04-01T13:15:33Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Querying the Database */ added detail where to set copyXML&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
[[File:USB-WDE1.jpg|thumb|200px|USB-WDE1 Receiver from ELV]]&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
The USB-WDE1 contains a [https://www.silabs.com/Support%20Documents/TechnicalDocs/cp2102.pdf CP210x] serial-to-USB chip from Silicon Labs. Fortunately, Linux already contains a driver for that chip, so all that is needed is to plug the USB-WDE1 into the USB port. One can verify the driver is loaded correctly with ''lsmod'':&lt;br /&gt;
&amp;lt;pre&amp;gt;pi@raspberrypi ~ $ lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
cp210x                 11783  0&lt;br /&gt;
usbserial              34545  1 cp210x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From then on the USB-WDE1 will transmit a serial ASCII string whenever a new measurement has been received. This can be verified with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;stty -F /dev/ttyUSB0 9600&lt;br /&gt;
cat /dev/ttyUSB0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ASCII string sent by the USB-WDE1 can look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;$1;1;;;;;;-3,8;;;;;;;;94;;;;-4,2;98;0,0;36;1;0&amp;lt;/pre&amp;gt;&lt;br /&gt;
Which means:&lt;br /&gt;
* Temperature sensor address 5: -3.8°C&lt;br /&gt;
* Humidity sensor address 5: 94%&lt;br /&gt;
* Outside temperature: -4.2°C&lt;br /&gt;
* Outside humidity: 98%&lt;br /&gt;
* Wind speed: 0.0 km/h&lt;br /&gt;
* Rain intensity: 36 rocker switch impulses (equals 8.8mm/m²)&lt;br /&gt;
* Immediate rain detected&lt;br /&gt;
&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
I wrote a short C program which basically does the following:&lt;br /&gt;
* Open serial port and set communication settings.&lt;br /&gt;
* Wait for and read a line from the USB-WDE1.&lt;br /&gt;
* Split the semi-colon-separated values into separate strings and replace the decimal separator (, with .).&lt;br /&gt;
* Call the &amp;lt;code&amp;gt;rrd_update_r()&amp;lt;/code&amp;gt; function to enter these values into the RRDB.&lt;br /&gt;
&lt;br /&gt;
The complete C code can be found here: '''[[File:weathermon.c]]'''.&lt;br /&gt;
&lt;br /&gt;
To compile it I use the following short &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; (note that it makes heavy use of predefined rules). Using an extra &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; was only necessary for including the &amp;lt;code&amp;gt;librrd.so&amp;lt;/code&amp;gt; library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# predefined rule that compiles .c files into .o files: $(CC) $(LDFLAGS) n.o $(LOADLIBES) $(LDLIBS)&lt;br /&gt;
# predefined rule that links binary files from .o files: $(CC) -c $(CPPFLAGS) $(CFLAGS)&lt;br /&gt;
&lt;br /&gt;
LDLIBS = /usr/lib/librrd.so&lt;br /&gt;
&lt;br /&gt;
weathermon : weathermon.c&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
The tricky part is to configure the place of the database file differently depending on which machine it runs on (development machine or server). I decided to use Tomcat's ''Context Parameters''. I configured the context in &amp;lt;code&amp;gt;META-INF/context.xml&amp;lt;/code&amp;gt; which resides in the deployable WAR file and is copied to a machine-specific directory upon first deployment (&amp;lt;code&amp;gt;Server/Service/Engine/Host@copyXML&amp;lt;/code&amp;gt; must be &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;/etc/tomcat7/server.xml&amp;lt;/code&amp;gt;). There I can modify it to fit the corresponding machine configuration. To access this context parameter in the source code I have to do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;@javax.ws.rs.core.Context&lt;br /&gt;
public void setServletContext(ServletContext context) throws IOException {&lt;br /&gt;
  servletContext = context;&lt;br /&gt;
  String rrdbdir = servletContext.getInitParameter(&amp;quot;rrdbdir&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
A very good introduction to implementing REST services with Jersey can be found here:&lt;br /&gt;
* http://www.vogella.com/articles/REST/article.html&lt;br /&gt;
&lt;br /&gt;
Basically, you only need to do the following:&lt;br /&gt;
* setup the deployment descriptor (&amp;lt;code&amp;gt;WEB-INF/web.xml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* implement the service class with using the correct annotations&lt;br /&gt;
&lt;br /&gt;
The '''web.xml''' needs to contain the following information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;web-app xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://java.sun.com/xml/ns/javaee&amp;quot; xmlns:web=&amp;quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&amp;quot; xsi:schemaLocation=&amp;quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&amp;quot; version=&amp;quot;3.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;display-name&amp;gt;weatherserv&amp;lt;/display-name&amp;gt;&lt;br /&gt;
  &amp;lt;servlet&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-class&amp;gt;com.sun.jersey.spi.container.servlet.ServletContainer&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;
    &amp;lt;init-param&amp;gt;&lt;br /&gt;
      &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;&lt;br /&gt;
      &amp;lt;param-value&amp;gt;at.ettisoft.weatherserv&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/init-param&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet&amp;gt;&lt;br /&gt;
  &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;url-pattern&amp;gt;/rest/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/web-app&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The servlet container is implemented by Jersey, therefore the node &amp;lt;code&amp;gt;web-app/servlet/servlet-class&amp;lt;/code&amp;gt; must point to ''com.sun.jersey.spi.container.servlet.ServletContainer''.&lt;br /&gt;
* This container expects the parameter &amp;lt;code&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/code&amp;gt; to point to the service classes at ''at.ettisoft.weatherserv''&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=File:Weathermon.c&amp;diff=170</id>
		<title>File:Weathermon.c</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=File:Weathermon.c&amp;diff=170"/>
		<updated>2013-03-28T20:20:53Z</updated>

		<summary type="html">&lt;p&gt;Christian: first version of this file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;first version of this file&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=File:USB-WDE1.jpg&amp;diff=169</id>
		<title>File:USB-WDE1.jpg</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=File:USB-WDE1.jpg&amp;diff=169"/>
		<updated>2013-03-28T20:15:48Z</updated>

		<summary type="html">&lt;p&gt;Christian: picture of weather data receiver USB-WDE1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;picture of weather data receiver USB-WDE1&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=168</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=168"/>
		<updated>2013-03-27T20:47:42Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Receiver */ link to picture&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
[[File:USB-WDE1.jpg|thumb|200px|USB-WDE1 Receiver from ELV]]&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
The USB-WDE1 contains a [https://www.silabs.com/Support%20Documents/TechnicalDocs/cp2102.pdf CP210x] serial-to-USB chip from Silicon Labs. Fortunately, Linux already contains a driver for that chip, so all that is needed is to plug the USB-WDE1 into the USB port. One can verify the driver is loaded correctly with ''lsmod'':&lt;br /&gt;
&amp;lt;pre&amp;gt;pi@raspberrypi ~ $ lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
cp210x                 11783  0&lt;br /&gt;
usbserial              34545  1 cp210x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From then on the USB-WDE1 will transmit a serial ASCII string whenever a new measurement has been received. This can be verified with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;stty -F /dev/ttyUSB0 9600&lt;br /&gt;
cat /dev/ttyUSB0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ASCII string sent by the USB-WDE1 can look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;$1;1;;;;;;-3,8;;;;;;;;94;;;;-4,2;98;0,0;36;1;0&amp;lt;/pre&amp;gt;&lt;br /&gt;
Which means:&lt;br /&gt;
* Temperature sensor address 5: -3.8°C&lt;br /&gt;
* Humidity sensor address 5: 94%&lt;br /&gt;
* Outside temperature: -4.2°C&lt;br /&gt;
* Outside humidity: 98%&lt;br /&gt;
* Wind speed: 0.0 km/h&lt;br /&gt;
* Rain intensity: 36 rocker switch impulses (equals 8.8mm/m²)&lt;br /&gt;
* Immediate rain detected&lt;br /&gt;
&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
I wrote a short C program which basically does the following:&lt;br /&gt;
* Open serial port and set communication settings.&lt;br /&gt;
* Wait for and read a line from the USB-WDE1.&lt;br /&gt;
* Split the semi-colon-separated values into separate strings and replace the decimal separator (, with .).&lt;br /&gt;
* Call the &amp;lt;code&amp;gt;rrd_update_r()&amp;lt;/code&amp;gt; function to enter these values into the RRDB.&lt;br /&gt;
&lt;br /&gt;
The complete C code can be found here: '''[[File:weathermon.c]]'''.&lt;br /&gt;
&lt;br /&gt;
To compile it I use the following short &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; (note that it makes heavy use of predefined rules). Using an extra &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; was only necessary for including the &amp;lt;code&amp;gt;librrd.so&amp;lt;/code&amp;gt; library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# predefined rule that compiles .c files into .o files: $(CC) $(LDFLAGS) n.o $(LOADLIBES) $(LDLIBS)&lt;br /&gt;
# predefined rule that links binary files from .o files: $(CC) -c $(CPPFLAGS) $(CFLAGS)&lt;br /&gt;
&lt;br /&gt;
LDLIBS = /usr/lib/librrd.so&lt;br /&gt;
&lt;br /&gt;
weathermon : weathermon.c&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
The tricky part is to configure the place of the database file differently depending on which machine it runs on (development machine or server). I decided to use Tomcat's ''Context Parameters''. I configured the context in &amp;lt;code&amp;gt;META-INF/context.xml&amp;lt;/code&amp;gt; which resides in the deployable WAR file and is copied to a machine-specific directory upon first deployment. There I can modify it to fit the corresponding machine configuration. To access this context parameter in the source code I have to do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;@javax.ws.rs.core.Context&lt;br /&gt;
public void setServletContext(ServletContext context) throws IOException {&lt;br /&gt;
  servletContext = context;&lt;br /&gt;
  String rrdbdir = servletContext.getInitParameter(&amp;quot;rrdbdir&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
A very good introduction to implementing REST services with Jersey can be found here:&lt;br /&gt;
* http://www.vogella.com/articles/REST/article.html&lt;br /&gt;
&lt;br /&gt;
Basically, you only need to do the following:&lt;br /&gt;
* setup the deployment descriptor (&amp;lt;code&amp;gt;WEB-INF/web.xml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* implement the service class with using the correct annotations&lt;br /&gt;
&lt;br /&gt;
The '''web.xml''' needs to contain the following information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;web-app xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://java.sun.com/xml/ns/javaee&amp;quot; xmlns:web=&amp;quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&amp;quot; xsi:schemaLocation=&amp;quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&amp;quot; version=&amp;quot;3.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;display-name&amp;gt;weatherserv&amp;lt;/display-name&amp;gt;&lt;br /&gt;
  &amp;lt;servlet&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-class&amp;gt;com.sun.jersey.spi.container.servlet.ServletContainer&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;
    &amp;lt;init-param&amp;gt;&lt;br /&gt;
      &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;&lt;br /&gt;
      &amp;lt;param-value&amp;gt;at.ettisoft.weatherserv&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/init-param&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet&amp;gt;&lt;br /&gt;
  &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;url-pattern&amp;gt;/rest/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/web-app&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The servlet container is implemented by Jersey, therefore the node &amp;lt;code&amp;gt;web-app/servlet/servlet-class&amp;lt;/code&amp;gt; must point to ''com.sun.jersey.spi.container.servlet.ServletContainer''.&lt;br /&gt;
* This container expects the parameter &amp;lt;code&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/code&amp;gt; to point to the service classes at ''at.ettisoft.weatherserv''&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=167</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=167"/>
		<updated>2013-03-27T20:24:39Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Filling Database */ link to source file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
The USB-WDE1 contains a [https://www.silabs.com/Support%20Documents/TechnicalDocs/cp2102.pdf CP210x] serial-to-USB chip from Silicon Labs. Fortunately, Linux already contains a driver for that chip, so all that is needed is to plug the USB-WDE1 into the USB port. One can verify the driver is loaded correctly with ''lsmod'':&lt;br /&gt;
&amp;lt;pre&amp;gt;pi@raspberrypi ~ $ lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
cp210x                 11783  0&lt;br /&gt;
usbserial              34545  1 cp210x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From then on the USB-WDE1 will transmit a serial ASCII string whenever a new measurement has been received. This can be verified with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;stty -F /dev/ttyUSB0 9600&lt;br /&gt;
cat /dev/ttyUSB0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ASCII string sent by the USB-WDE1 can look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;$1;1;;;;;;-3,8;;;;;;;;94;;;;-4,2;98;0,0;36;1;0&amp;lt;/pre&amp;gt;&lt;br /&gt;
Which means:&lt;br /&gt;
* Temperature sensor address 5: -3.8°C&lt;br /&gt;
* Humidity sensor address 5: 94%&lt;br /&gt;
* Outside temperature: -4.2°C&lt;br /&gt;
* Outside humidity: 98%&lt;br /&gt;
* Wind speed: 0.0 km/h&lt;br /&gt;
* Rain intensity: 36 rocker switch impulses (equals 8.8mm/m²)&lt;br /&gt;
* Immediate rain detected&lt;br /&gt;
&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
I wrote a short C program which basically does the following:&lt;br /&gt;
* Open serial port and set communication settings.&lt;br /&gt;
* Wait for and read a line from the USB-WDE1.&lt;br /&gt;
* Split the semi-colon-separated values into separate strings and replace the decimal separator (, with .).&lt;br /&gt;
* Call the &amp;lt;code&amp;gt;rrd_update_r()&amp;lt;/code&amp;gt; function to enter these values into the RRDB.&lt;br /&gt;
&lt;br /&gt;
The complete C code can be found here: '''[[File:weathermon.c]]'''.&lt;br /&gt;
&lt;br /&gt;
To compile it I use the following short &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; (note that it makes heavy use of predefined rules). Using an extra &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; was only necessary for including the &amp;lt;code&amp;gt;librrd.so&amp;lt;/code&amp;gt; library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# predefined rule that compiles .c files into .o files: $(CC) $(LDFLAGS) n.o $(LOADLIBES) $(LDLIBS)&lt;br /&gt;
# predefined rule that links binary files from .o files: $(CC) -c $(CPPFLAGS) $(CFLAGS)&lt;br /&gt;
&lt;br /&gt;
LDLIBS = /usr/lib/librrd.so&lt;br /&gt;
&lt;br /&gt;
weathermon : weathermon.c&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
The tricky part is to configure the place of the database file differently depending on which machine it runs on (development machine or server). I decided to use Tomcat's ''Context Parameters''. I configured the context in &amp;lt;code&amp;gt;META-INF/context.xml&amp;lt;/code&amp;gt; which resides in the deployable WAR file and is copied to a machine-specific directory upon first deployment. There I can modify it to fit the corresponding machine configuration. To access this context parameter in the source code I have to do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;@javax.ws.rs.core.Context&lt;br /&gt;
public void setServletContext(ServletContext context) throws IOException {&lt;br /&gt;
  servletContext = context;&lt;br /&gt;
  String rrdbdir = servletContext.getInitParameter(&amp;quot;rrdbdir&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
A very good introduction to implementing REST services with Jersey can be found here:&lt;br /&gt;
* http://www.vogella.com/articles/REST/article.html&lt;br /&gt;
&lt;br /&gt;
Basically, you only need to do the following:&lt;br /&gt;
* setup the deployment descriptor (&amp;lt;code&amp;gt;WEB-INF/web.xml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* implement the service class with using the correct annotations&lt;br /&gt;
&lt;br /&gt;
The '''web.xml''' needs to contain the following information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;web-app xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://java.sun.com/xml/ns/javaee&amp;quot; xmlns:web=&amp;quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&amp;quot; xsi:schemaLocation=&amp;quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&amp;quot; version=&amp;quot;3.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;display-name&amp;gt;weatherserv&amp;lt;/display-name&amp;gt;&lt;br /&gt;
  &amp;lt;servlet&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-class&amp;gt;com.sun.jersey.spi.container.servlet.ServletContainer&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;
    &amp;lt;init-param&amp;gt;&lt;br /&gt;
      &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;&lt;br /&gt;
      &amp;lt;param-value&amp;gt;at.ettisoft.weatherserv&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/init-param&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet&amp;gt;&lt;br /&gt;
  &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;url-pattern&amp;gt;/rest/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/web-app&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The servlet container is implemented by Jersey, therefore the node &amp;lt;code&amp;gt;web-app/servlet/servlet-class&amp;lt;/code&amp;gt; must point to ''com.sun.jersey.spi.container.servlet.ServletContainer''.&lt;br /&gt;
* This container expects the parameter &amp;lt;code&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/code&amp;gt; to point to the service classes at ''at.ettisoft.weatherserv''&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=166</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=166"/>
		<updated>2013-03-27T20:13:11Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Filling Database */ added predefined make rules&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
The USB-WDE1 contains a [https://www.silabs.com/Support%20Documents/TechnicalDocs/cp2102.pdf CP210x] serial-to-USB chip from Silicon Labs. Fortunately, Linux already contains a driver for that chip, so all that is needed is to plug the USB-WDE1 into the USB port. One can verify the driver is loaded correctly with ''lsmod'':&lt;br /&gt;
&amp;lt;pre&amp;gt;pi@raspberrypi ~ $ lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
cp210x                 11783  0&lt;br /&gt;
usbserial              34545  1 cp210x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From then on the USB-WDE1 will transmit a serial ASCII string whenever a new measurement has been received. This can be verified with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;stty -F /dev/ttyUSB0 9600&lt;br /&gt;
cat /dev/ttyUSB0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ASCII string sent by the USB-WDE1 can look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;$1;1;;;;;;-3,8;;;;;;;;94;;;;-4,2;98;0,0;36;1;0&amp;lt;/pre&amp;gt;&lt;br /&gt;
Which means:&lt;br /&gt;
* Temperature sensor address 5: -3.8°C&lt;br /&gt;
* Humidity sensor address 5: 94%&lt;br /&gt;
* Outside temperature: -4.2°C&lt;br /&gt;
* Outside humidity: 98%&lt;br /&gt;
* Wind speed: 0.0 km/h&lt;br /&gt;
* Rain intensity: 36 rocker switch impulses (equals 8.8mm/m²)&lt;br /&gt;
* Immediate rain detected&lt;br /&gt;
&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
I wrote a short C program which basically does the following:&lt;br /&gt;
* Open serial port and set communication settings.&lt;br /&gt;
* Wait for and read a line from the USB-WDE1.&lt;br /&gt;
* Split the semi-colon-separated values into separate strings and replace the decimal separator (, with .).&lt;br /&gt;
* Call the &amp;lt;code&amp;gt;rrd_update_r()&amp;lt;/code&amp;gt; function to enter these values into the RRDB.&lt;br /&gt;
&lt;br /&gt;
The complete C code can be found here ('''TODO''').&lt;br /&gt;
&lt;br /&gt;
To compile it I use the following short &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; (note that it makes heavy use of predefined rules). Using an extra &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; was only necessary for including the &amp;lt;code&amp;gt;librrd.so&amp;lt;/code&amp;gt; library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# predefined rule that compiles .c files into .o files: $(CC) $(LDFLAGS) n.o $(LOADLIBES) $(LDLIBS)&lt;br /&gt;
# predefined rule that links binary files from .o files: $(CC) -c $(CPPFLAGS) $(CFLAGS)&lt;br /&gt;
&lt;br /&gt;
LDLIBS = /usr/lib/librrd.so&lt;br /&gt;
&lt;br /&gt;
weathermon : weathermon.c&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
The tricky part is to configure the place of the database file differently depending on which machine it runs on (development machine or server). I decided to use Tomcat's ''Context Parameters''. I configured the context in &amp;lt;code&amp;gt;META-INF/context.xml&amp;lt;/code&amp;gt; which resides in the deployable WAR file and is copied to a machine-specific directory upon first deployment. There I can modify it to fit the corresponding machine configuration. To access this context parameter in the source code I have to do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;@javax.ws.rs.core.Context&lt;br /&gt;
public void setServletContext(ServletContext context) throws IOException {&lt;br /&gt;
  servletContext = context;&lt;br /&gt;
  String rrdbdir = servletContext.getInitParameter(&amp;quot;rrdbdir&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
A very good introduction to implementing REST services with Jersey can be found here:&lt;br /&gt;
* http://www.vogella.com/articles/REST/article.html&lt;br /&gt;
&lt;br /&gt;
Basically, you only need to do the following:&lt;br /&gt;
* setup the deployment descriptor (&amp;lt;code&amp;gt;WEB-INF/web.xml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* implement the service class with using the correct annotations&lt;br /&gt;
&lt;br /&gt;
The '''web.xml''' needs to contain the following information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;web-app xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://java.sun.com/xml/ns/javaee&amp;quot; xmlns:web=&amp;quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&amp;quot; xsi:schemaLocation=&amp;quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&amp;quot; version=&amp;quot;3.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;display-name&amp;gt;weatherserv&amp;lt;/display-name&amp;gt;&lt;br /&gt;
  &amp;lt;servlet&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-class&amp;gt;com.sun.jersey.spi.container.servlet.ServletContainer&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;
    &amp;lt;init-param&amp;gt;&lt;br /&gt;
      &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;&lt;br /&gt;
      &amp;lt;param-value&amp;gt;at.ettisoft.weatherserv&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/init-param&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet&amp;gt;&lt;br /&gt;
  &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;url-pattern&amp;gt;/rest/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/web-app&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The servlet container is implemented by Jersey, therefore the node &amp;lt;code&amp;gt;web-app/servlet/servlet-class&amp;lt;/code&amp;gt; must point to ''com.sun.jersey.spi.container.servlet.ServletContainer''.&lt;br /&gt;
* This container expects the parameter &amp;lt;code&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/code&amp;gt; to point to the service classes at ''at.ettisoft.weatherserv''&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=165</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=165"/>
		<updated>2013-03-27T19:59:13Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Filling Database */ C program and Makefile&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
The USB-WDE1 contains a [https://www.silabs.com/Support%20Documents/TechnicalDocs/cp2102.pdf CP210x] serial-to-USB chip from Silicon Labs. Fortunately, Linux already contains a driver for that chip, so all that is needed is to plug the USB-WDE1 into the USB port. One can verify the driver is loaded correctly with ''lsmod'':&lt;br /&gt;
&amp;lt;pre&amp;gt;pi@raspberrypi ~ $ lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
cp210x                 11783  0&lt;br /&gt;
usbserial              34545  1 cp210x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From then on the USB-WDE1 will transmit a serial ASCII string whenever a new measurement has been received. This can be verified with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;stty -F /dev/ttyUSB0 9600&lt;br /&gt;
cat /dev/ttyUSB0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ASCII string sent by the USB-WDE1 can look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;$1;1;;;;;;-3,8;;;;;;;;94;;;;-4,2;98;0,0;36;1;0&amp;lt;/pre&amp;gt;&lt;br /&gt;
Which means:&lt;br /&gt;
* Temperature sensor address 5: -3.8°C&lt;br /&gt;
* Humidity sensor address 5: 94%&lt;br /&gt;
* Outside temperature: -4.2°C&lt;br /&gt;
* Outside humidity: 98%&lt;br /&gt;
* Wind speed: 0.0 km/h&lt;br /&gt;
* Rain intensity: 36 rocker switch impulses (equals 8.8mm/m²)&lt;br /&gt;
* Immediate rain detected&lt;br /&gt;
&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
I wrote a short C program which basically does the following:&lt;br /&gt;
* Open serial port and set communication settings.&lt;br /&gt;
* Wait for and read a line from the USB-WDE1.&lt;br /&gt;
* Split the semi-colon-separated values into separate strings and replace the decimal separator (, with .).&lt;br /&gt;
* Call the &amp;lt;code&amp;gt;rrd_update_r()&amp;lt;/code&amp;gt; function to enter these values into the RRDB.&lt;br /&gt;
&lt;br /&gt;
The complete C code can be found here ('''TODO''').&lt;br /&gt;
&lt;br /&gt;
To compile it I use the following short &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; (note that it makes heavy use of predefined rules). Using an extra &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; was only necessary for including the &amp;lt;code&amp;gt;librrd.so&amp;lt;/code&amp;gt; library. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;LDLIBS = /usr/lib/librrd.so&lt;br /&gt;
&lt;br /&gt;
weathermon : weathermon.c&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
The tricky part is to configure the place of the database file differently depending on which machine it runs on (development machine or server). I decided to use Tomcat's ''Context Parameters''. I configured the context in &amp;lt;code&amp;gt;META-INF/context.xml&amp;lt;/code&amp;gt; which resides in the deployable WAR file and is copied to a machine-specific directory upon first deployment. There I can modify it to fit the corresponding machine configuration. To access this context parameter in the source code I have to do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;@javax.ws.rs.core.Context&lt;br /&gt;
public void setServletContext(ServletContext context) throws IOException {&lt;br /&gt;
  servletContext = context;&lt;br /&gt;
  String rrdbdir = servletContext.getInitParameter(&amp;quot;rrdbdir&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
A very good introduction to implementing REST services with Jersey can be found here:&lt;br /&gt;
* http://www.vogella.com/articles/REST/article.html&lt;br /&gt;
&lt;br /&gt;
Basically, you only need to do the following:&lt;br /&gt;
* setup the deployment descriptor (&amp;lt;code&amp;gt;WEB-INF/web.xml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* implement the service class with using the correct annotations&lt;br /&gt;
&lt;br /&gt;
The '''web.xml''' needs to contain the following information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;web-app xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://java.sun.com/xml/ns/javaee&amp;quot; xmlns:web=&amp;quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&amp;quot; xsi:schemaLocation=&amp;quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&amp;quot; version=&amp;quot;3.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;display-name&amp;gt;weatherserv&amp;lt;/display-name&amp;gt;&lt;br /&gt;
  &amp;lt;servlet&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-class&amp;gt;com.sun.jersey.spi.container.servlet.ServletContainer&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;
    &amp;lt;init-param&amp;gt;&lt;br /&gt;
      &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;&lt;br /&gt;
      &amp;lt;param-value&amp;gt;at.ettisoft.weatherserv&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/init-param&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet&amp;gt;&lt;br /&gt;
  &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;url-pattern&amp;gt;/rest/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/web-app&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The servlet container is implemented by Jersey, therefore the node &amp;lt;code&amp;gt;web-app/servlet/servlet-class&amp;lt;/code&amp;gt; must point to ''com.sun.jersey.spi.container.servlet.ServletContainer''.&lt;br /&gt;
* This container expects the parameter &amp;lt;code&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/code&amp;gt; to point to the service classes at ''at.ettisoft.weatherserv''&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=164</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=164"/>
		<updated>2013-03-27T19:46:11Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Protocol between Receiver and Server */ ASCII string format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
The USB-WDE1 contains a [https://www.silabs.com/Support%20Documents/TechnicalDocs/cp2102.pdf CP210x] serial-to-USB chip from Silicon Labs. Fortunately, Linux already contains a driver for that chip, so all that is needed is to plug the USB-WDE1 into the USB port. One can verify the driver is loaded correctly with ''lsmod'':&lt;br /&gt;
&amp;lt;pre&amp;gt;pi@raspberrypi ~ $ lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
cp210x                 11783  0&lt;br /&gt;
usbserial              34545  1 cp210x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From then on the USB-WDE1 will transmit a serial ASCII string whenever a new measurement has been received. This can be verified with the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;stty -F /dev/ttyUSB0 9600&lt;br /&gt;
cat /dev/ttyUSB0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ASCII string sent by the USB-WDE1 can look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;$1;1;;;;;;-3,8;;;;;;;;94;;;;-4,2;98;0,0;36;1;0&amp;lt;/pre&amp;gt;&lt;br /&gt;
Which means:&lt;br /&gt;
* Temperature sensor address 5: -3.8°C&lt;br /&gt;
* Humidity sensor address 5: 94%&lt;br /&gt;
* Outside temperature: -4.2°C&lt;br /&gt;
* Outside humidity: 98%&lt;br /&gt;
* Wind speed: 0.0 km/h&lt;br /&gt;
* Rain intensity: 36 rocker switch impulses (equals 8.8mm/m²)&lt;br /&gt;
* Immediate rain detected&lt;br /&gt;
&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
The tricky part is to configure the place of the database file differently depending on which machine it runs on (development machine or server). I decided to use Tomcat's ''Context Parameters''. I configured the context in &amp;lt;code&amp;gt;META-INF/context.xml&amp;lt;/code&amp;gt; which resides in the deployable WAR file and is copied to a machine-specific directory upon first deployment. There I can modify it to fit the corresponding machine configuration. To access this context parameter in the source code I have to do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;@javax.ws.rs.core.Context&lt;br /&gt;
public void setServletContext(ServletContext context) throws IOException {&lt;br /&gt;
  servletContext = context;&lt;br /&gt;
  String rrdbdir = servletContext.getInitParameter(&amp;quot;rrdbdir&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
A very good introduction to implementing REST services with Jersey can be found here:&lt;br /&gt;
* http://www.vogella.com/articles/REST/article.html&lt;br /&gt;
&lt;br /&gt;
Basically, you only need to do the following:&lt;br /&gt;
* setup the deployment descriptor (&amp;lt;code&amp;gt;WEB-INF/web.xml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* implement the service class with using the correct annotations&lt;br /&gt;
&lt;br /&gt;
The '''web.xml''' needs to contain the following information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;web-app xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://java.sun.com/xml/ns/javaee&amp;quot; xmlns:web=&amp;quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&amp;quot; xsi:schemaLocation=&amp;quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&amp;quot; version=&amp;quot;3.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;display-name&amp;gt;weatherserv&amp;lt;/display-name&amp;gt;&lt;br /&gt;
  &amp;lt;servlet&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-class&amp;gt;com.sun.jersey.spi.container.servlet.ServletContainer&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;
    &amp;lt;init-param&amp;gt;&lt;br /&gt;
      &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;&lt;br /&gt;
      &amp;lt;param-value&amp;gt;at.ettisoft.weatherserv&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/init-param&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet&amp;gt;&lt;br /&gt;
  &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;url-pattern&amp;gt;/rest/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/web-app&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The servlet container is implemented by Jersey, therefore the node &amp;lt;code&amp;gt;web-app/servlet/servlet-class&amp;lt;/code&amp;gt; must point to ''com.sun.jersey.spi.container.servlet.ServletContainer''.&lt;br /&gt;
* This container expects the parameter &amp;lt;code&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/code&amp;gt; to point to the service classes at ''at.ettisoft.weatherserv''&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=163</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=163"/>
		<updated>2013-03-27T19:31:32Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Protocol between Receiver and Server */ USB-to-serial chip&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
The USB-WDE1 contains a [https://www.silabs.com/Support%20Documents/TechnicalDocs/cp2102.pdf CP210x] serial-to-USB chip from Silicon Labs. Fortunately, Linux already contains a driver for that chip, so all that is needed is to plug the USB-WDE1 into the USB port. One can verify the driver is loaded correctly with ''lsmod'':&lt;br /&gt;
&amp;lt;pre&amp;gt;pi@raspberrypi ~ $ lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
cp210x                 11783  0&lt;br /&gt;
usbserial              34545  1 cp210x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
From then on the USB-WDE1 will transmit a serial ASCII string whenever a new measurement has been received.&lt;br /&gt;
&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
The tricky part is to configure the place of the database file differently depending on which machine it runs on (development machine or server). I decided to use Tomcat's ''Context Parameters''. I configured the context in &amp;lt;code&amp;gt;META-INF/context.xml&amp;lt;/code&amp;gt; which resides in the deployable WAR file and is copied to a machine-specific directory upon first deployment. There I can modify it to fit the corresponding machine configuration. To access this context parameter in the source code I have to do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;@javax.ws.rs.core.Context&lt;br /&gt;
public void setServletContext(ServletContext context) throws IOException {&lt;br /&gt;
  servletContext = context;&lt;br /&gt;
  String rrdbdir = servletContext.getInitParameter(&amp;quot;rrdbdir&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
A very good introduction to implementing REST services with Jersey can be found here:&lt;br /&gt;
* http://www.vogella.com/articles/REST/article.html&lt;br /&gt;
&lt;br /&gt;
Basically, you only need to do the following:&lt;br /&gt;
* setup the deployment descriptor (&amp;lt;code&amp;gt;WEB-INF/web.xml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* implement the service class with using the correct annotations&lt;br /&gt;
&lt;br /&gt;
The '''web.xml''' needs to contain the following information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;web-app xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://java.sun.com/xml/ns/javaee&amp;quot; xmlns:web=&amp;quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&amp;quot; xsi:schemaLocation=&amp;quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&amp;quot; version=&amp;quot;3.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;display-name&amp;gt;weatherserv&amp;lt;/display-name&amp;gt;&lt;br /&gt;
  &amp;lt;servlet&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-class&amp;gt;com.sun.jersey.spi.container.servlet.ServletContainer&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;
    &amp;lt;init-param&amp;gt;&lt;br /&gt;
      &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;&lt;br /&gt;
      &amp;lt;param-value&amp;gt;at.ettisoft.weatherserv&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/init-param&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet&amp;gt;&lt;br /&gt;
  &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;url-pattern&amp;gt;/rest/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/web-app&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The servlet container is implemented by Jersey, therefore the node &amp;lt;code&amp;gt;web-app/servlet/servlet-class&amp;lt;/code&amp;gt; must point to ''com.sun.jersey.spi.container.servlet.ServletContainer''.&lt;br /&gt;
* This container expects the parameter &amp;lt;code&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/code&amp;gt; to point to the service classes at ''at.ettisoft.weatherserv''&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=162</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=162"/>
		<updated>2013-03-17T15:06:13Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* REST Server */ added details about Jersey&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
The tricky part is to configure the place of the database file differently depending on which machine it runs on (development machine or server). I decided to use Tomcat's ''Context Parameters''. I configured the context in &amp;lt;code&amp;gt;META-INF/context.xml&amp;lt;/code&amp;gt; which resides in the deployable WAR file and is copied to a machine-specific directory upon first deployment. There I can modify it to fit the corresponding machine configuration. To access this context parameter in the source code I have to do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;@javax.ws.rs.core.Context&lt;br /&gt;
public void setServletContext(ServletContext context) throws IOException {&lt;br /&gt;
  servletContext = context;&lt;br /&gt;
  String rrdbdir = servletContext.getInitParameter(&amp;quot;rrdbdir&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
A very good introduction to implementing REST services with Jersey can be found here:&lt;br /&gt;
* http://www.vogella.com/articles/REST/article.html&lt;br /&gt;
&lt;br /&gt;
Basically, you only need to do the following:&lt;br /&gt;
* setup the deployment descriptor (&amp;lt;code&amp;gt;WEB-INF/web.xml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* implement the service class with using the correct annotations&lt;br /&gt;
&lt;br /&gt;
The '''web.xml''' needs to contain the following information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;web-app xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns=&amp;quot;http://java.sun.com/xml/ns/javaee&amp;quot; xmlns:web=&amp;quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&amp;quot; xsi:schemaLocation=&amp;quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&amp;quot; version=&amp;quot;3.0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;display-name&amp;gt;weatherserv&amp;lt;/display-name&amp;gt;&lt;br /&gt;
  &amp;lt;servlet&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-class&amp;gt;com.sun.jersey.spi.container.servlet.ServletContainer&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;
    &amp;lt;init-param&amp;gt;&lt;br /&gt;
      &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;&lt;br /&gt;
      &amp;lt;param-value&amp;gt;at.ettisoft.weatherserv&amp;lt;/param-value&amp;gt;&lt;br /&gt;
    &amp;lt;/init-param&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet&amp;gt;&lt;br /&gt;
  &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-name&amp;gt;Jersey REST Service&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
    &amp;lt;url-pattern&amp;gt;/rest/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
  &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/web-app&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The servlet container is implemented by Jersey, therefore the node &amp;lt;code&amp;gt;web-app/servlet/servlet-class&amp;lt;/code&amp;gt; must point to ''com.sun.jersey.spi.container.servlet.ServletContainer''.&lt;br /&gt;
* This container expects the parameter &amp;lt;code&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/code&amp;gt; to point to the service classes at ''at.ettisoft.weatherserv''&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=161</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=161"/>
		<updated>2013-03-17T14:54:46Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Querying the Database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
The tricky part is to configure the place of the database file differently depending on which machine it runs on (development machine or server). I decided to use Tomcat's ''Context Parameters''. I configured the context in &amp;lt;code&amp;gt;META-INF/context.xml&amp;lt;/code&amp;gt; which resides in the deployable WAR file and is copied to a machine-specific directory upon first deployment. There I can modify it to fit the corresponding machine configuration. To access this context parameter in the source code I have to do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;@javax.ws.rs.core.Context&lt;br /&gt;
public void setServletContext(ServletContext context) throws IOException {&lt;br /&gt;
  servletContext = context;&lt;br /&gt;
  String rrdbdir = servletContext.getInitParameter(&amp;quot;rrdbdir&amp;quot;);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=160</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=160"/>
		<updated>2013-03-17T14:47:26Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Querying the Database */  added configuration of database directory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
The tricky part is to configure the place of the database file differently depending on which machine it runs on (development machine or server). I decided to use Tomcat's ''Context Parameters''. I configured the context in &amp;lt;code&amp;gt;META-INF/context.xml&amp;lt;/code&amp;gt; which resides in the deployable WAR file and is copied to a machine-specific directory upon first deployment. There I can modify it to fit the corresponding machine configuration. To access this context parameter in the source code I have to do the following:&lt;br /&gt;
&amp;lt;code&amp;gt;@Context&lt;br /&gt;
	public void setServletContext(ServletContext context) throws IOException {&lt;br /&gt;
		servletContext = context;&lt;br /&gt;
		String rrdbdir = servletContext.getInitParameter(&amp;quot;rrdbdir&amp;quot;);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=159</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=159"/>
		<updated>2013-03-17T14:34:33Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Querying the Database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;&amp;quot;rrdtool -&amp;quot;&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=158</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=158"/>
		<updated>2013-03-17T14:33:57Z</updated>

		<summary type="html">&lt;p&gt;Christian: move description of how database is queried to separate section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
== Querying the Database ==&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;br /&gt;
&lt;br /&gt;
This library uses rrdtool's ''pipe mode'': It calls &amp;lt;code&amp;gt;rrdtool -&amp;lt;/code&amp;gt; which causes rrdtool to wait for commands from stdin and output its responses to stdout. This mode is also very fast, because the rrdtool instance only needs to be started once and from then on serves all requests.&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=157</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=157"/>
		<updated>2013-03-17T14:23:59Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* REST Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a [http://en.wikipedia.org/wiki/Representational_state_transfer REST] service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=156</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=156"/>
		<updated>2013-03-17T14:18:19Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* REST Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a REST service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=155</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=155"/>
		<updated>2013-03-17T12:57:50Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* REST Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a REST service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction by Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=154</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=154"/>
		<updated>2013-03-17T12:56:50Z</updated>

		<summary type="html">&lt;p&gt;Christian: added Interfaces and /* Software Components */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
== Protocol between Receiver and Server ==&lt;br /&gt;
== Protocol between Server and Clients ==&lt;br /&gt;
* REST with JSON&lt;br /&gt;
&lt;br /&gt;
= Software Components =&lt;br /&gt;
== Filling Database ==&lt;br /&gt;
Serial data coming from the receiver must be interpreted and then stored into the database.&lt;br /&gt;
&lt;br /&gt;
== REST Server ==&lt;br /&gt;
The web server implements a REST service which clients use to query data from the database. It is implemented in Java and uses the [http://jersey.java.net/ Jersey] framework.&lt;br /&gt;
&lt;br /&gt;
For fetching data from the database I decided to use the '''java-rrd''' library. In contrast to other Java implementations for interfacing an ''rrdtool'' database, this has the following advantages:&lt;br /&gt;
* It uses ''rrdtool'' itself, so it is 100% compatible with the database file format. Other implementations re-implement ''rrdtool'' but use a slightly different file format. As I use the original ''rrdtool'' to enter data into the database, the Java components must be compatible with it.&lt;br /&gt;
* It doesn't use '''JNI''' framework, which would cause the software to be not platform-independent any more. As I develop under Windows but run the server with Linux, this was no option either.&lt;br /&gt;
&lt;br /&gt;
The '''java-rrd''' library is written by Peter Stamfest. The original announcement can be found here:&lt;br /&gt;
* http://www.mail-archive.com/rrd-developers@lists.oetiker.ch/msg03866.html&lt;br /&gt;
Very helpful is the brief introduction my Manuel Aldana:&lt;br /&gt;
* http://www.aldana-online.de/2011/07/03/accessing-rrdtool-files-data-with-java/&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=153</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=153"/>
		<updated>2013-03-07T07:31:07Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
The server's job is to run the database and web server, so that clients can connect with a browser and retrieve and display all weather data.&lt;br /&gt;
* The server is a standard Linux PC, but not a common desktop machine. Instead, a [http://www.raspberrypi.org/ Raspberry PI] is used.&lt;br /&gt;
* The server runs an [http://tomcat.apache.org/ Apache Tomcat] web server.&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=152</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=152"/>
		<updated>2013-03-06T14:27:04Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/ RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=151</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=151"/>
		<updated>2013-03-06T14:26:27Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
Data from weather sensors is stored in a Round Robin Database (RRDB) at different resolutions. This means, while high-resolution data is stored for the last 90 days, it also gets accumulated into daily data which is then kept for 10 years.&lt;br /&gt;
&lt;br /&gt;
The database used is called [http://oss.oetiker.ch/rrdtool/|RRDtool] by Tobi Oetiker. It handles storing data at fixed intervals while updates come randomly, accumulating data and creating graphs. The latter is not used, instead a browser-based charting API is used to create dynamic charts.&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=150</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=150"/>
		<updated>2013-02-22T20:27:43Z</updated>

		<summary type="html">&lt;p&gt;Christian: added sensors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;br /&gt;
# Weather data is measured by sensors outside and inside the house. These sensors transmit all measured values via radio link.&lt;br /&gt;
# Transmitted values are received by a weather station and displayed for convenience.&lt;br /&gt;
# Transmitted values are also received by a small USB device which sends them to the PC connected.&lt;br /&gt;
# The PC reads received measurements and stores them in a database.&lt;br /&gt;
# From this database a web server serves all measurements to clients for display.&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
The sensors and the weather station come as a set from [http://www.elv.de ELV]:&lt;br /&gt;
* Outdoor sensor: [http://www.elv.de/elv-funk-kombi-wettersensor-ks-300-2-br-inkl-hochwertigem-2-m-edelstahlmast-br-und-qualitaetsbatterien.html ELV Funk-Kombi-Wettersensor KS300-2]&lt;br /&gt;
* Indoor sensor: [http://www.elv.de/funk-temperatur-luftfeuchteaussensensor-s-300-th-fuer-z-b-elv-ws-200-300-elv-ws-300-pc-usb-wde1-und-ipwe-1.html Funk-Temperatur-/Luftfeuchteaußensensor S300 TH]&lt;br /&gt;
* Weather station: WS300&lt;br /&gt;
&lt;br /&gt;
== Receiver ==&lt;br /&gt;
For receiving the 868,35 MHz signals the following device from ELV is used:&lt;br /&gt;
* [http://www.elv.de/usb-wetterdaten-empfaenger-usb-wde1-komplettbausatz.html USB-Wetterdaten-Empfänger USB-WDE1]&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=149</id>
		<title>Weather monitor</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Weather_monitor&amp;diff=149"/>
		<updated>2013-01-31T13:14:30Z</updated>

		<summary type="html">&lt;p&gt;Christian: first few lines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic idea of the '''weathermon''' project is to obtain, record and monitor the weather at my home. All weather data sent from wireless sensors is to be stored in a database, from which different graphs are generated that can be monitored on a PC, over the Internet and on a smartphone.&lt;br /&gt;
&lt;br /&gt;
= System Overview =&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=148</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=148"/>
		<updated>2012-05-29T16:05:15Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Lösungsidee 1: Controller umpolen */ zweite Lösungsidee&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
== RGB Leuchtdioden ==&lt;br /&gt;
Da RGB-Leuchtdioden relativ teuer sind, kaufte ich zuerst nur 10 Stück. Bei Conrad fand ich die günstigsten: [http://www.conrad.de/ce/de/product/185388/LED-FULL-COLOR-RGB-KLAR/0212268&amp;amp;ref=list Full Color RGB Lamp] von Kingbright (Datenblatt siehe [http://www.produktinfo.conrad.com/datenblaetter/175000-199999/185388-da-01-en-FULL_COLOR_RGB_LED_KLAR.pdf hier]).&lt;br /&gt;
&lt;br /&gt;
= Erste Inbetriebnahme =&lt;br /&gt;
Da ich davon ausging, dass der Controller eine (regelbare) Konstantstromquelle ist, hab ich für einen ersten Test einfach die Leuchtdiode ohne Vorwiderstand angeschlossen. Leider ohne Erfolg, nichts leuchtete.&lt;br /&gt;
&lt;br /&gt;
Also das Multimeter ausgepackt und erst mal nachgemessen: Die Spannung auf den Pins beträgt ~5V, leider hab ich kein Oszi, sonst hätte ich das genauer feststellen können. Allerdings ist mir dabei ein Riesenproblem aufgefallen. Der Controller besitzt 1 Pin als gemeinsamen Pluspol, und 3 Pins als Minuspole für die drei Farben:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Pin !! Bedeutung&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Pluspol (+)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Minuspol grün&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Minuspol rot&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Minuspol blau&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unglücklicherweise sind die Leutdioden aber so geschaltet, dass immer zwei Farben eine Kathode (Minuspol) teilen. Das heißt: diese Leuchtdioden lassen sich nicht mit diesem RGB-Controller betreiben.&lt;br /&gt;
&lt;br /&gt;
[[File:kingbright_schematic.png|none|200px]]&lt;br /&gt;
&lt;br /&gt;
(E steht für rot, G für grün und MB für blau)&lt;br /&gt;
&lt;br /&gt;
Um trotzdem einen ersten Funktionstest machen zu können, verzichtete ich vorerst auf die blaue Leuchtdiode und schloss nur die rote und grüne an. Leider leuchteten beide Farben sehr schwach und die grüne Leuchtdiode leuchtete orange statt grün. Zudem wurde das Leuchten nach wenigen Sekunden immer schwächer und die Leuchtdiode heizte sich stark auf.&lt;br /&gt;
&lt;br /&gt;
Um weiterzukommen, sah ich mir erst mal die Innereien vom RGB-Controller an.&lt;br /&gt;
&lt;br /&gt;
= LED Controller Aufbau =&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:RGB_controller_case.jpg|The Gehäuse ist nur mit 4 Noppen an den Längsseiten verschlossen&lt;br /&gt;
File:RGB_controller_top.jpg|Oberseite der Leiterplatine&lt;br /&gt;
File:RGB_controller_bottom.jpg|Unterseite der Leiterplatine&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Herzstück des RGB-Controllers ist ein [http://www.stc-51.com/stc11f01.php STC11F04 Mikrocontroller] mit 4k Flash und 256 Bytes SRAM (Datenblatt: [http://www.stc-51.com/datasheet/STC11F-10Fxx-english.pdf]). Dieser läuft mit 20 MHz und hat einen [http://www.atmel.com/dyn/products/product_card.asp?part_id=4706 24C02C EEPROM] mit 256 Byte zur Seite gestellt. Versorgt wird die ganze Schaltung von einem 78L05 Linearregler.&lt;br /&gt;
&lt;br /&gt;
Interessant für meinen Anwendungsfall ist vor allem der Ausgangsteil: Der besteht nämlich aus drei [https://www.onsemi.com/PowerSolutions/product.do?id=NTD60N02RG 60N02] MOSFETs (Datenblatt: [http://www.onsemi.com/pub_link/Collateral/NTD60N02R-D.PDF]), die für jede der drei Farben die Masse durchschalten oder sperren.&lt;br /&gt;
&lt;br /&gt;
Das heißt, die Betriebsspannung von 12 Volt (laut Aufdruck, durch den Linearregler kann sie zwischen 5-48V betragen) wird direkt zu den Leuchtdioden durchgeschaltet. Das ist für eine Leuchtdiode natürlich viel zu viel, als Maximalwerte sind im Datenblatt 4.5V bei Blau und 2.5V bei Rot und Grün angegeben. Das erklärt wahrscheinlich die starke Erwärmung, das schwächer werdende Leuchten und die falsche Farbe (orange statt grün). Die Erkenntnis daraus: '''Die LEDs dürfen nur mit Vorwiderstand angeschlossen werden!'''&lt;br /&gt;
&lt;br /&gt;
== Lösungsidee 1: Controller umpolen ==&lt;br /&gt;
Eine Möglichkeit, die LEDs mit der gemeinsamen Kathode doch noch mit diesem Controller zu betreiben, ist, den Controller umzupolen. Man könnte eine Leiterbahn durchtrennen und anders verbinden, sodass die MOSFETs nicht Masse durchschalten, sondern die Betriebsspannung.&lt;br /&gt;
&lt;br /&gt;
Leider führt diese Idee '''nicht zum Ziel''': die verwendeten MOSFETs besitzen eine interne Diode zwischen Source und Drain, sodass der Transistor nicht verkehrt betrieben werden kann. Das heißt, dass diese MOSFETs nur bei einer positiven Drain-Source Spannung sperren, in Gegenrichtung sind sie immer durchlässig. Das wäre für diese Idee aber notwendig.&lt;br /&gt;
&lt;br /&gt;
== Lösungsidee 2: invertierende Schaltung ==&lt;br /&gt;
Das vom Controller kommende Signal kann mit einer geeigneten Schaltung invertiert werden. Dazu sind 3 weitere Treiber-Transistoren notwendig.&lt;br /&gt;
&lt;br /&gt;
Diese Variante werde ich bei Gelegenheit einmal ausprobieren.&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=147</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=147"/>
		<updated>2011-11-05T11:50:58Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* LED Controller Aufbau */ hinzugefügt: Controller umpolen&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
== RGB Leuchtdioden ==&lt;br /&gt;
Da RGB-Leuchtdioden relativ teuer sind, kaufte ich zuerst nur 10 Stück. Bei Conrad fand ich die günstigsten: [http://www.conrad.de/ce/de/product/185388/LED-FULL-COLOR-RGB-KLAR/0212268&amp;amp;ref=list Full Color RGB Lamp] von Kingbright (Datenblatt siehe [http://www.produktinfo.conrad.com/datenblaetter/175000-199999/185388-da-01-en-FULL_COLOR_RGB_LED_KLAR.pdf hier]).&lt;br /&gt;
&lt;br /&gt;
= Erste Inbetriebnahme =&lt;br /&gt;
Da ich davon ausging, dass der Controller eine (regelbare) Konstantstromquelle ist, hab ich für einen ersten Test einfach die Leuchtdiode ohne Vorwiderstand angeschlossen. Leider ohne Erfolg, nichts leuchtete.&lt;br /&gt;
&lt;br /&gt;
Also das Multimeter ausgepackt und erst mal nachgemessen: Die Spannung auf den Pins beträgt ~5V, leider hab ich kein Oszi, sonst hätte ich das genauer feststellen können. Allerdings ist mir dabei ein Riesenproblem aufgefallen. Der Controller besitzt 1 Pin als gemeinsamen Pluspol, und 3 Pins als Minuspole für die drei Farben:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Pin !! Bedeutung&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Pluspol (+)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Minuspol grün&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Minuspol rot&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Minuspol blau&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unglücklicherweise sind die Leutdioden aber so geschaltet, dass immer zwei Farben eine Kathode (Minuspol) teilen. Das heißt: diese Leuchtdioden lassen sich nicht mit diesem RGB-Controller betreiben.&lt;br /&gt;
&lt;br /&gt;
[[File:kingbright_schematic.png|none|200px]]&lt;br /&gt;
&lt;br /&gt;
(E steht für rot, G für grün und MB für blau)&lt;br /&gt;
&lt;br /&gt;
Um trotzdem einen ersten Funktionstest machen zu können, verzichtete ich vorerst auf die blaue Leuchtdiode und schloss nur die rote und grüne an. Leider leuchteten beide Farben sehr schwach und die grüne Leuchtdiode leuchtete orange statt grün. Zudem wurde das Leuchten nach wenigen Sekunden immer schwächer und die Leuchtdiode heizte sich stark auf.&lt;br /&gt;
&lt;br /&gt;
Um weiterzukommen, sah ich mir erst mal die Innereien vom RGB-Controller an.&lt;br /&gt;
&lt;br /&gt;
= LED Controller Aufbau =&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:RGB_controller_case.jpg|The Gehäuse ist nur mit 4 Noppen an den Längsseiten verschlossen&lt;br /&gt;
File:RGB_controller_top.jpg|Oberseite der Leiterplatine&lt;br /&gt;
File:RGB_controller_bottom.jpg|Unterseite der Leiterplatine&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Herzstück des RGB-Controllers ist ein [http://www.stc-51.com/stc11f01.php STC11F04 Mikrocontroller] mit 4k Flash und 256 Bytes SRAM (Datenblatt: [http://www.stc-51.com/datasheet/STC11F-10Fxx-english.pdf]). Dieser läuft mit 20 MHz und hat einen [http://www.atmel.com/dyn/products/product_card.asp?part_id=4706 24C02C EEPROM] mit 256 Byte zur Seite gestellt. Versorgt wird die ganze Schaltung von einem 78L05 Linearregler.&lt;br /&gt;
&lt;br /&gt;
Interessant für meinen Anwendungsfall ist vor allem der Ausgangsteil: Der besteht nämlich aus drei [https://www.onsemi.com/PowerSolutions/product.do?id=NTD60N02RG 60N02] MOSFETs (Datenblatt: [http://www.onsemi.com/pub_link/Collateral/NTD60N02R-D.PDF]), die für jede der drei Farben die Masse durchschalten oder sperren.&lt;br /&gt;
&lt;br /&gt;
Das heißt, die Betriebsspannung von 12 Volt (laut Aufdruck, durch den Linearregler kann sie zwischen 5-48V betragen) wird direkt zu den Leuchtdioden durchgeschaltet. Das ist für eine Leuchtdiode natürlich viel zu viel, als Maximalwerte sind im Datenblatt 4.5V bei Blau und 2.5V bei Rot und Grün angegeben. Das erklärt wahrscheinlich die starke Erwärmung, das schwächer werdende Leuchten und die falsche Farbe (orange statt grün). Die Erkenntnis daraus: '''Die LEDs dürfen nur mit Vorwiderstand angeschlossen werden!'''&lt;br /&gt;
&lt;br /&gt;
== Lösungsidee 1: Controller umpolen ==&lt;br /&gt;
Eine Möglichkeit, die LEDs mit der gemeinsamen Kathode doch noch mit diesem Controller zu betreiben, ist, den Controller umzupolen. Man könnte eine Leiterbahn durchtrennen und anders verbinden, sodass die MOSFETs nicht Masse durchschalten, sondern die Betriebsspannung.&lt;br /&gt;
&lt;br /&gt;
Leider führt diese Idee nicht zum Ziel: die verwendeten MOSFETs besitzen eine interne Diode zwischen Source und Drain, sodass der Transistor nicht verkehrt betrieben werden kann. Das heißt, dass diese MOSFETs nur bei einer positiven Drain-Source Spannung sperren, in Gegenrichtung sind sie immer durchlässig. Das wäre für diese Idee aber notwendig.&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=146</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=146"/>
		<updated>2011-11-05T11:26:19Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* LED Controller Aufbau */ Datenblatt für Mosfet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
== RGB Leuchtdioden ==&lt;br /&gt;
Da RGB-Leuchtdioden relativ teuer sind, kaufte ich zuerst nur 10 Stück. Bei Conrad fand ich die günstigsten: [http://www.conrad.de/ce/de/product/185388/LED-FULL-COLOR-RGB-KLAR/0212268&amp;amp;ref=list Full Color RGB Lamp] von Kingbright (Datenblatt siehe [http://www.produktinfo.conrad.com/datenblaetter/175000-199999/185388-da-01-en-FULL_COLOR_RGB_LED_KLAR.pdf hier]).&lt;br /&gt;
&lt;br /&gt;
= Erste Inbetriebnahme =&lt;br /&gt;
Da ich davon ausging, dass der Controller eine (regelbare) Konstantstromquelle ist, hab ich für einen ersten Test einfach die Leuchtdiode ohne Vorwiderstand angeschlossen. Leider ohne Erfolg, nichts leuchtete.&lt;br /&gt;
&lt;br /&gt;
Also das Multimeter ausgepackt und erst mal nachgemessen: Die Spannung auf den Pins beträgt ~5V, leider hab ich kein Oszi, sonst hätte ich das genauer feststellen können. Allerdings ist mir dabei ein Riesenproblem aufgefallen. Der Controller besitzt 1 Pin als gemeinsamen Pluspol, und 3 Pins als Minuspole für die drei Farben:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Pin !! Bedeutung&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Pluspol (+)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Minuspol grün&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Minuspol rot&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Minuspol blau&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unglücklicherweise sind die Leutdioden aber so geschaltet, dass immer zwei Farben eine Kathode (Minuspol) teilen. Das heißt: diese Leuchtdioden lassen sich nicht mit diesem RGB-Controller betreiben.&lt;br /&gt;
&lt;br /&gt;
[[File:kingbright_schematic.png|none|200px]]&lt;br /&gt;
&lt;br /&gt;
(E steht für rot, G für grün und MB für blau)&lt;br /&gt;
&lt;br /&gt;
Um trotzdem einen ersten Funktionstest machen zu können, verzichtete ich vorerst auf die blaue Leuchtdiode und schloss nur die rote und grüne an. Leider leuchteten beide Farben sehr schwach und die grüne Leuchtdiode leuchtete orange statt grün. Zudem wurde das Leuchten nach wenigen Sekunden immer schwächer und die Leuchtdiode heizte sich stark auf.&lt;br /&gt;
&lt;br /&gt;
Um weiterzukommen, sah ich mir erst mal die Innereien vom RGB-Controller an.&lt;br /&gt;
&lt;br /&gt;
= LED Controller Aufbau =&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:RGB_controller_case.jpg|The Gehäuse ist nur mit 4 Noppen an den Längsseiten verschlossen&lt;br /&gt;
File:RGB_controller_top.jpg|Oberseite der Leiterplatine&lt;br /&gt;
File:RGB_controller_bottom.jpg|Unterseite der Leiterplatine&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Herzstück des RGB-Controllers ist ein [http://www.stc-51.com/stc11f01.php STC11F04 Mikrocontroller] mit 4k Flash und 256 Bytes SRAM (Datenblatt: [http://www.stc-51.com/datasheet/STC11F-10Fxx-english.pdf]). Dieser läuft mit 20 MHz und hat einen [http://www.atmel.com/dyn/products/product_card.asp?part_id=4706 24C02C EEPROM] mit 256 Byte zur Seite gestellt. Versorgt wird die ganze Schaltung von einem 78L05 Linearregler.&lt;br /&gt;
&lt;br /&gt;
Interessant für meinen Anwendungsfall ist vor allem der Ausgangsteil: Der besteht nämlich aus drei [https://www.onsemi.com/PowerSolutions/product.do?id=NTD60N02RG 60N02] MOSFETs (Datenblatt: [http://www.onsemi.com/pub_link/Collateral/NTD60N02R-D.PDF]), die für jede der drei Farben die Masse durchschalten oder sperren.&lt;br /&gt;
&lt;br /&gt;
Das heißt, die Betriebsspannung von 12 Volt (laut Aufdruck, durch den Linearregler kann sie zwischen 5-48V betragen) wird direkt zu den Leuchtdioden durchgeschaltet. Das ist für eine Leuchtdiode natürlich viel zu viel, als Maximalwerte sind im Datenblatt 4.5V bei Blau und 2.5V bei Rot und Grün angegeben. Das erklärt wahrscheinlich die starke Erwärmung, das schwächer werdende Leuchten und die falsche Farbe (orange statt grün). Die Erkenntnis daraus: '''Die LEDs dürfen nur mit Vorwiderstand angeschlossen werden!'''&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=145</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=145"/>
		<updated>2011-11-05T11:16:47Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Inbetriebnahme Prototyp */ umbenannt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
== RGB Leuchtdioden ==&lt;br /&gt;
Da RGB-Leuchtdioden relativ teuer sind, kaufte ich zuerst nur 10 Stück. Bei Conrad fand ich die günstigsten: [http://www.conrad.de/ce/de/product/185388/LED-FULL-COLOR-RGB-KLAR/0212268&amp;amp;ref=list Full Color RGB Lamp] von Kingbright (Datenblatt siehe [http://www.produktinfo.conrad.com/datenblaetter/175000-199999/185388-da-01-en-FULL_COLOR_RGB_LED_KLAR.pdf hier]).&lt;br /&gt;
&lt;br /&gt;
= Erste Inbetriebnahme =&lt;br /&gt;
Da ich davon ausging, dass der Controller eine (regelbare) Konstantstromquelle ist, hab ich für einen ersten Test einfach die Leuchtdiode ohne Vorwiderstand angeschlossen. Leider ohne Erfolg, nichts leuchtete.&lt;br /&gt;
&lt;br /&gt;
Also das Multimeter ausgepackt und erst mal nachgemessen: Die Spannung auf den Pins beträgt ~5V, leider hab ich kein Oszi, sonst hätte ich das genauer feststellen können. Allerdings ist mir dabei ein Riesenproblem aufgefallen. Der Controller besitzt 1 Pin als gemeinsamen Pluspol, und 3 Pins als Minuspole für die drei Farben:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Pin !! Bedeutung&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Pluspol (+)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Minuspol grün&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Minuspol rot&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Minuspol blau&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unglücklicherweise sind die Leutdioden aber so geschaltet, dass immer zwei Farben eine Kathode (Minuspol) teilen. Das heißt: diese Leuchtdioden lassen sich nicht mit diesem RGB-Controller betreiben.&lt;br /&gt;
&lt;br /&gt;
[[File:kingbright_schematic.png|none|200px]]&lt;br /&gt;
&lt;br /&gt;
(E steht für rot, G für grün und MB für blau)&lt;br /&gt;
&lt;br /&gt;
Um trotzdem einen ersten Funktionstest machen zu können, verzichtete ich vorerst auf die blaue Leuchtdiode und schloss nur die rote und grüne an. Leider leuchteten beide Farben sehr schwach und die grüne Leuchtdiode leuchtete orange statt grün. Zudem wurde das Leuchten nach wenigen Sekunden immer schwächer und die Leuchtdiode heizte sich stark auf.&lt;br /&gt;
&lt;br /&gt;
Um weiterzukommen, sah ich mir erst mal die Innereien vom RGB-Controller an.&lt;br /&gt;
&lt;br /&gt;
= LED Controller Aufbau =&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:RGB_controller_case.jpg|The Gehäuse ist nur mit 4 Noppen an den Längsseiten verschlossen&lt;br /&gt;
File:RGB_controller_top.jpg|Oberseite der Leiterplatine&lt;br /&gt;
File:RGB_controller_bottom.jpg|Unterseite der Leiterplatine&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Herzstück des RGB-Controllers ist ein [http://www.stc-51.com/stc11f01.php STC11F04 Mikrocontroller] mit 4k Flash und 256 Bytes SRAM (Datenblatt: [http://www.stc-51.com/datasheet/STC11F-10Fxx-english.pdf]). Dieser läuft mit 20 MHz und hat einen [http://www.atmel.com/dyn/products/product_card.asp?part_id=4706 24C02C EEPROM] mit 256 Byte zur Seite gestellt. Versorgt wird die ganze Schaltung von einem 78L05 Linearregler.&lt;br /&gt;
&lt;br /&gt;
Interessant für meinen Anwendungsfall ist vor allem der Ausgangsteil: Der besteht nämlich aus drei T60 N02RG MOSFETs, die für jede der drei Farben die Masse durchschalten oder sperren.&lt;br /&gt;
&lt;br /&gt;
Das heißt, die Betriebsspannung von 12 Volt (laut Aufdruck, durch den Linearregler kann sie zwischen 5-48V betragen) wird direkt zu den Leuchtdioden durchgeschaltet. Das ist für eine Leuchtdiode natürlich viel zu viel, als Maximalwerte sind im Datenblatt 4.5V bei Blau und 2.5V bei Rot und Grün angegeben. Das erklärt wahrscheinlich die starke Erwärmung, das schwächer werdende Leuchten und die falsche Farbe (orange statt grün). Die Erkenntnis daraus: '''Die LEDs dürfen nur mit Vorwiderstand angeschlossen werden!'''&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=144</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=144"/>
		<updated>2011-10-23T20:39:58Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Inbetriebnahme Prototyp */ Oszi erwähnt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
== RGB Leuchtdioden ==&lt;br /&gt;
Da RGB-Leuchtdioden relativ teuer sind, kaufte ich zuerst nur 10 Stück. Bei Conrad fand ich die günstigsten: [http://www.conrad.de/ce/de/product/185388/LED-FULL-COLOR-RGB-KLAR/0212268&amp;amp;ref=list Full Color RGB Lamp] von Kingbright (Datenblatt siehe [http://www.produktinfo.conrad.com/datenblaetter/175000-199999/185388-da-01-en-FULL_COLOR_RGB_LED_KLAR.pdf hier]).&lt;br /&gt;
&lt;br /&gt;
= Inbetriebnahme Prototyp =&lt;br /&gt;
Da ich davon ausging, dass der Controller eine (regelbare) Konstantstromquelle ist, hab ich für einen ersten Test einfach die Leuchtdiode ohne Vorwiderstand angeschlossen. Leider ohne Erfolg, nichts leuchtete.&lt;br /&gt;
&lt;br /&gt;
Also das Multimeter ausgepackt und erst mal nachgemessen: Die Spannung auf den Pins beträgt ~5V, leider hab ich kein Oszi, sonst hätte ich das genauer feststellen können. Allerdings ist mir dabei ein Riesenproblem aufgefallen. Der Controller besitzt 1 Pin als gemeinsamen Pluspol, und 3 Pins als Minuspole für die drei Farben:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Pin !! Bedeutung&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Pluspol (+)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Minuspol grün&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Minuspol rot&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Minuspol blau&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unglücklicherweise sind die Leutdioden aber so geschaltet, dass immer zwei Farben eine Kathode (Minuspol) teilen. Das heißt: diese Leuchtdioden lassen sich nicht mit diesem RGB-Controller betreiben.&lt;br /&gt;
&lt;br /&gt;
[[File:kingbright_schematic.png|none|200px]]&lt;br /&gt;
&lt;br /&gt;
(E steht für rot, G für grün und MB für blau)&lt;br /&gt;
&lt;br /&gt;
Um trotzdem einen ersten Funktionstest machen zu können, verzichtete ich vorerst auf die blaue Leuchtdiode und schloss nur die rote und grüne an. Leider leuchteten beide Farben sehr schwach und die grüne Leuchtdiode leuchtete orange statt grün. Zudem wurde das Leuchten nach wenigen Sekunden immer schwächer und die Leuchtdiode heizte sich stark auf.&lt;br /&gt;
&lt;br /&gt;
Um weiterzukommen, sah ich mir erst mal die Innereien vom RGB-Controller an.&lt;br /&gt;
&lt;br /&gt;
= LED Controller Aufbau =&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:RGB_controller_case.jpg|The Gehäuse ist nur mit 4 Noppen an den Längsseiten verschlossen&lt;br /&gt;
File:RGB_controller_top.jpg|Oberseite der Leiterplatine&lt;br /&gt;
File:RGB_controller_bottom.jpg|Unterseite der Leiterplatine&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Herzstück des RGB-Controllers ist ein [http://www.stc-51.com/stc11f01.php STC11F04 Mikrocontroller] mit 4k Flash und 256 Bytes SRAM (Datenblatt: [http://www.stc-51.com/datasheet/STC11F-10Fxx-english.pdf]). Dieser läuft mit 20 MHz und hat einen [http://www.atmel.com/dyn/products/product_card.asp?part_id=4706 24C02C EEPROM] mit 256 Byte zur Seite gestellt. Versorgt wird die ganze Schaltung von einem 78L05 Linearregler.&lt;br /&gt;
&lt;br /&gt;
Interessant für meinen Anwendungsfall ist vor allem der Ausgangsteil: Der besteht nämlich aus drei T60 N02RG MOSFETs, die für jede der drei Farben die Masse durchschalten oder sperren.&lt;br /&gt;
&lt;br /&gt;
Das heißt, die Betriebsspannung von 12 Volt (laut Aufdruck, durch den Linearregler kann sie zwischen 5-48V betragen) wird direkt zu den Leuchtdioden durchgeschaltet. Das ist für eine Leuchtdiode natürlich viel zu viel, als Maximalwerte sind im Datenblatt 4.5V bei Blau und 2.5V bei Rot und Grün angegeben. Das erklärt wahrscheinlich die starke Erwärmung, das schwächer werdende Leuchten und die falsche Farbe (orange statt grün). Die Erkenntnis daraus: '''Die LEDs dürfen nur mit Vorwiderstand angeschlossen werden!'''&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=143</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=143"/>
		<updated>2011-10-23T12:25:03Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* LED Controller Aufbau */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
== RGB Leuchtdioden ==&lt;br /&gt;
Da RGB-Leuchtdioden relativ teuer sind, kaufte ich zuerst nur 10 Stück. Bei Conrad fand ich die günstigsten: [http://www.conrad.de/ce/de/product/185388/LED-FULL-COLOR-RGB-KLAR/0212268&amp;amp;ref=list Full Color RGB Lamp] von Kingbright (Datenblatt siehe [http://www.produktinfo.conrad.com/datenblaetter/175000-199999/185388-da-01-en-FULL_COLOR_RGB_LED_KLAR.pdf hier]).&lt;br /&gt;
&lt;br /&gt;
= Inbetriebnahme Prototyp =&lt;br /&gt;
Da ich davon ausging, dass der Controller eine (regelbare) Konstantstromquelle ist, hab ich für einen ersten Test einfach die Leuchtdiode ohne Vorwiderstand angeschlossen. Leider ohne Erfolg, nichts leuchtete.&lt;br /&gt;
&lt;br /&gt;
Also das Multimeter ausgepackt und erst mal nachgemessen: Die Spannung auf den Pins beträgt ~5V, allerdings ist mir dabei ein Riesenproblem aufgefallen. Der Controller besitzt 1 Pin als gemeinsamen Pluspol, und 3 Pins als Minuspole für die drei Farben:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Pin !! Bedeutung&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Pluspol (+)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Minuspol grün&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Minuspol rot&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Minuspol blau&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unglücklicherweise sind die Leutdioden aber so geschaltet, dass immer zwei Farben eine Kathode (Minuspol) teilen. Das heißt: diese Leuchtdioden lassen sich nicht mit diesem RGB-Controller betreiben.&lt;br /&gt;
&lt;br /&gt;
[[File:kingbright_schematic.png|none|200px]]&lt;br /&gt;
&lt;br /&gt;
(E steht für rot, G für grün und MB für blau)&lt;br /&gt;
&lt;br /&gt;
Um trotzdem einen ersten Funktionstest machen zu können, verzichtete ich vorerst auf die blaue Leuchtdiode und schloss nur die rote und grüne an. Leider leuchteten beide Farben sehr schwach und die grüne Leuchtdiode leuchtete orange statt grün. Zudem wurde das Leuchten nach wenigen Sekunden immer schwächer und die Leuchtdiode heizte sich stark auf.&lt;br /&gt;
&lt;br /&gt;
Um weiterzukommen, sah ich mir erst mal die Innereien vom RGB-Controller an.&lt;br /&gt;
&lt;br /&gt;
= LED Controller Aufbau =&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:RGB_controller_case.jpg|The Gehäuse ist nur mit 4 Noppen an den Längsseiten verschlossen&lt;br /&gt;
File:RGB_controller_top.jpg|Oberseite der Leiterplatine&lt;br /&gt;
File:RGB_controller_bottom.jpg|Unterseite der Leiterplatine&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Herzstück des RGB-Controllers ist ein [http://www.stc-51.com/stc11f01.php STC11F04 Mikrocontroller] mit 4k Flash und 256 Bytes SRAM (Datenblatt: [http://www.stc-51.com/datasheet/STC11F-10Fxx-english.pdf]). Dieser läuft mit 20 MHz und hat einen [http://www.atmel.com/dyn/products/product_card.asp?part_id=4706 24C02C EEPROM] mit 256 Byte zur Seite gestellt. Versorgt wird die ganze Schaltung von einem 78L05 Linearregler.&lt;br /&gt;
&lt;br /&gt;
Interessant für meinen Anwendungsfall ist vor allem der Ausgangsteil: Der besteht nämlich aus drei T60 N02RG MOSFETs, die für jede der drei Farben die Masse durchschalten oder sperren.&lt;br /&gt;
&lt;br /&gt;
Das heißt, die Betriebsspannung von 12 Volt (laut Aufdruck, durch den Linearregler kann sie zwischen 5-48V betragen) wird direkt zu den Leuchtdioden durchgeschaltet. Das ist für eine Leuchtdiode natürlich viel zu viel, als Maximalwerte sind im Datenblatt 4.5V bei Blau und 2.5V bei Rot und Grün angegeben. Das erklärt wahrscheinlich die starke Erwärmung, das schwächer werdende Leuchten und die falsche Farbe (orange statt grün). Die Erkenntnis daraus: '''Die LEDs dürfen nur mit Vorwiderstand angeschlossen werden!'''&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=File:RGB_controller_bottom.jpg&amp;diff=142</id>
		<title>File:RGB controller bottom.jpg</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=File:RGB_controller_bottom.jpg&amp;diff=142"/>
		<updated>2011-10-23T11:41:37Z</updated>

		<summary type="html">&lt;p&gt;Christian: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=File:RGB_controller_top.jpg&amp;diff=141</id>
		<title>File:RGB controller top.jpg</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=File:RGB_controller_top.jpg&amp;diff=141"/>
		<updated>2011-10-23T11:41:15Z</updated>

		<summary type="html">&lt;p&gt;Christian: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=File:RGB_controller_case.jpg&amp;diff=140</id>
		<title>File:RGB controller case.jpg</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=File:RGB_controller_case.jpg&amp;diff=140"/>
		<updated>2011-10-23T11:40:46Z</updated>

		<summary type="html">&lt;p&gt;Christian: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=139</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=139"/>
		<updated>2011-10-23T11:14:26Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Inbetriebnahme Prototyp */ Bild kleiner&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
== RGB Leuchtdioden ==&lt;br /&gt;
Da RGB-Leuchtdioden relativ teuer sind, kaufte ich zuerst nur 10 Stück. Bei Conrad fand ich die günstigsten: [http://www.conrad.de/ce/de/product/185388/LED-FULL-COLOR-RGB-KLAR/0212268&amp;amp;ref=list Full Color RGB Lamp] von Kingbright (Datenblatt siehe [http://www.produktinfo.conrad.com/datenblaetter/175000-199999/185388-da-01-en-FULL_COLOR_RGB_LED_KLAR.pdf hier]).&lt;br /&gt;
&lt;br /&gt;
= Inbetriebnahme Prototyp =&lt;br /&gt;
Da ich davon ausging, dass der Controller eine (regelbare) Konstantstromquelle ist, hab ich für einen ersten Test einfach die Leuchtdiode ohne Vorwiderstand angeschlossen. Leider ohne Erfolg, nichts leuchtete.&lt;br /&gt;
&lt;br /&gt;
Also das Multimeter ausgepackt und erst mal nachgemessen: Die Spannung auf den Pins beträgt ~5V, allerdings ist mir dabei ein Riesenproblem aufgefallen. Der Controller besitzt 1 Pin als gemeinsamen Pluspol, und 3 Pins als Minuspole für die drei Farben:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Pin !! Bedeutung&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Pluspol (+)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Minuspol grün&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Minuspol rot&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Minuspol blau&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unglücklicherweise sind die Leutdioden aber so geschaltet, dass immer zwei Farben eine Kathode (Minuspol) teilen. Das heißt: diese Leuchtdioden lassen sich nicht mit diesem RGB-Controller betreiben.&lt;br /&gt;
&lt;br /&gt;
[[File:kingbright_schematic.png|none|200px]]&lt;br /&gt;
&lt;br /&gt;
(E steht für rot, G für grün und MB für blau)&lt;br /&gt;
&lt;br /&gt;
Um trotzdem einen ersten Funktionstest machen zu können, verzichtete ich vorerst auf die blaue Leuchtdiode und schloss nur die rote und grüne an. Leider leuchteten beide Farben sehr schwach und die grüne Leuchtdiode leuchtete orange statt grün. Zudem wurde das Leuchten nach wenigen Sekunden immer schwächer und die Leuchtdiode heizte sich stark auf.&lt;br /&gt;
&lt;br /&gt;
Um weiterzukommen, sah ich mir erst mal die Innereien vom RGB-Controller an.&lt;br /&gt;
&lt;br /&gt;
= LED Controller Aufbau =&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=138</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=138"/>
		<updated>2011-10-23T10:38:58Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Inbetriebnahme Prototyp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
== RGB Leuchtdioden ==&lt;br /&gt;
Da RGB-Leuchtdioden relativ teuer sind, kaufte ich zuerst nur 10 Stück. Bei Conrad fand ich die günstigsten: [http://www.conrad.de/ce/de/product/185388/LED-FULL-COLOR-RGB-KLAR/0212268&amp;amp;ref=list Full Color RGB Lamp] von Kingbright (Datenblatt siehe [http://www.produktinfo.conrad.com/datenblaetter/175000-199999/185388-da-01-en-FULL_COLOR_RGB_LED_KLAR.pdf hier]).&lt;br /&gt;
&lt;br /&gt;
= Inbetriebnahme Prototyp =&lt;br /&gt;
Da ich davon ausging, dass der Controller eine (regelbare) Konstantstromquelle ist, hab ich für einen ersten Test einfach die Leuchtdiode ohne Vorwiderstand angeschlossen. Leider ohne Erfolg, nichts leuchtete.&lt;br /&gt;
&lt;br /&gt;
Also das Multimeter ausgepackt und erst mal nachgemessen: Die Spannung auf den Pins beträgt ~5V, allerdings ist mir dabei ein Riesenproblem aufgefallen. Der Controller besitzt 1 Pin als gemeinsamen Pluspol, und 3 Pins als Minuspole für die drei Farben:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Pin !! Bedeutung&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Pluspol (+)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Minuspol grün&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Minuspol rot&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Minuspol blau&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unglücklicherweise sind die Leutdioden aber so geschaltet, dass immer zwei Farben eine Kathode (Minuspol) teilen. Das heißt: diese Leuchtdioden lassen sich nicht mit diesem RGB-Controller betreiben.&lt;br /&gt;
&lt;br /&gt;
[[File:kingbright_schematic.png|none]]&lt;br /&gt;
&lt;br /&gt;
(E steht für rot, G für grün und MB für blau)&lt;br /&gt;
&lt;br /&gt;
Um trotzdem einen ersten Funktionstest machen zu können, verzichtete ich vorerst auf die blaue Leuchtdiode und schloss nur die rote und grüne an. Leider leuchteten beide Farben sehr schwach und die grüne Leuchtdiode leuchtete orange statt grün. Zudem wurde das Leuchten nach wenigen Sekunden immer schwächer und die Leuchtdiode heizte sich stark auf.&lt;br /&gt;
&lt;br /&gt;
Um weiterzukommen, sah ich mir erst mal die Innereien vom RGB-Controller an.&lt;br /&gt;
&lt;br /&gt;
= LED Controller Aufbau =&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=File:Kingbright_schematic.png&amp;diff=137</id>
		<title>File:Kingbright schematic.png</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=File:Kingbright_schematic.png&amp;diff=137"/>
		<updated>2011-10-23T10:14:00Z</updated>

		<summary type="html">&lt;p&gt;Christian: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=136</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=136"/>
		<updated>2011-10-23T10:13:37Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Einkauf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
== RGB Leuchtdioden ==&lt;br /&gt;
Da RGB-Leuchtdioden relativ teuer sind, kaufte ich zuerst nur 10 Stück. Bei Conrad fand ich die günstigsten: [http://www.conrad.de/ce/de/product/185388/LED-FULL-COLOR-RGB-KLAR/0212268&amp;amp;ref=list Full Color RGB Lamp] von Kingbright (Datenblatt siehe [http://www.produktinfo.conrad.com/datenblaetter/175000-199999/185388-da-01-en-FULL_COLOR_RGB_LED_KLAR.pdf hier]).&lt;br /&gt;
&lt;br /&gt;
= Inbetriebnahme Prototyp =&lt;br /&gt;
Da ich davon ausging, dass der Controller eine (regelbare) Konstantstromquelle ist, hab ich für einen ersten Test einfach die Leuchtdiode ohne Vorwiderstand angeschlossen. Leider ohne Erfolg, nichts leuchtete.&lt;br /&gt;
&lt;br /&gt;
Also das Multimeter ausgepackt und erst mal nachgemessen: Die Spannung auf den Pins beträgt ~5V, allerdings ist mir dabei ein Riesenproblem aufgefallen. Der Controller besitzt 1 Pin als gemeinsamen Pluspol, und 3 Pins als Minuspole für die drei Farben:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Pin !! Bedeutung&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Pluspol (+)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Minuspol grün&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Minuspol rot&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Minuspol blau&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unglücklicherweise sind die Leutdioden aber so geschaltet, dass immer zwei Farben eine Kathode (Minuspol) teilen. Das heißt: diese Leuchtdioden lassen sich nicht mit diesem RGB-Controller betreiben.&lt;br /&gt;
&lt;br /&gt;
[[File:kingbright_schematic.png|none]]&lt;br /&gt;
&lt;br /&gt;
(E steht für rot, G für grün und MB für blau)&lt;br /&gt;
&lt;br /&gt;
Um trotzdem einen ersten Funktionstest machen zu können, verzichtete ich vorerst&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=135</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=135"/>
		<updated>2011-10-23T09:46:57Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* RGB Leuchtdioden */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
== RGB Leuchtdioden ==&lt;br /&gt;
Da RGB-Leuchtdioden relativ teuer sind, kaufte ich zuerst nur 10 Stück. Bei Conrad fand ich die günstigsten: [http://www.conrad.de/ce/de/product/185388/LED-FULL-COLOR-RGB-KLAR/0212268&amp;amp;ref=list Full Color RGB Lamp] von Kingbright (Datenblatt siehe [http://www.produktinfo.conrad.com/datenblaetter/175000-199999/185388-da-01-en-FULL_COLOR_RGB_LED_KLAR.pdf hier]).&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=134</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=134"/>
		<updated>2011-10-23T09:44:16Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* LED Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
== RGB Leuchtdioden ==&lt;br /&gt;
Da RGB-Leuchtdioden relativ teuer sind, hab ich zuerst nur 10 Stück gekauft. Bei Conrad fand ich die günstigsten: [http://www.conrad.de/ce/de/product/185388/LED-FULL-COLOR-RGB-KLAR/0212268&amp;amp;ref=list Full Color RGB Lamp] von Kingbright (Datenblatt siehe [http://www.produktinfo.conrad.com/datenblaetter/175000-199999/185388-da-01-en-FULL_COLOR_RGB_LED_KLAR.pdf hier]).&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=133</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=133"/>
		<updated>2011-10-23T09:38:53Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* LED Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= Einkauf =&lt;br /&gt;
Bevor ich den Plan mit der abgehängten Decke umsetze, wollte ich zuerst einen Prototyp bauen. Also mussten zuerst alle notwendigen Teile für den Prototyp gekauft werden.&lt;br /&gt;
&lt;br /&gt;
== LED Controller ==&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR:&lt;br /&gt;
&lt;br /&gt;
[[File:RGB controller.jpg|none|300px]]&lt;br /&gt;
&lt;br /&gt;
Die Fernbedienung ist etwas größer als die ursprüngliche im Baumarkt, dafür bietet sie mehr Möglichkeiten. Man kann z.B. jede einzelne Farbkomponente heller oder dunkler machen.&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=File:RGB_controller.jpg&amp;diff=132</id>
		<title>File:RGB controller.jpg</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=File:RGB_controller.jpg&amp;diff=132"/>
		<updated>2011-10-23T09:32:26Z</updated>

		<summary type="html">&lt;p&gt;Christian: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=131</id>
		<title>LED Sternenhimmel</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=LED_Sternenhimmel&amp;diff=131"/>
		<updated>2011-10-23T09:18:04Z</updated>

		<summary type="html">&lt;p&gt;Christian: created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In diesem Projekt geht es um das Bauen eines farbigen Sternenhimmels für unseren Wellness-Bereich (Badezimmer). Die Decke soll etwas abgehängt werden um Halogenstrahler versenkt einbauen zu können, und bei dieser Gelegenheit lässt sich auch gut ein dezenter Sternenhimmel einbauen.&lt;br /&gt;
&lt;br /&gt;
= Idee =&lt;br /&gt;
Die Idee kam mir, als ich in einem Baumarkt [http://www.amazon.de/Osram-79643-Leds-Deco-Basis/dp/B003VM8RYK/ref=pd_sim_sbs_ce_3 dieses Set] entdeckte. Mittels einer kleinen, schicken IR-Fernbedienung kann man dort jede gewünsche Farbe einstellen und hat auch automatische Farbwechselprogramme zur Auswahl. Meine Idee war, statt der LED-Streifen einzelne RGB-LEDs anzuschließen, die ich in der abgehängten Decke meines zukünftigen Badezimmer montieren würde.&lt;br /&gt;
&lt;br /&gt;
= LED Controller =&lt;br /&gt;
Da das Set durch die LED Streifen relativ teuer war, hab ich versucht, den RGB-Controller einzeln zu bekommen. Das Set ist eigentlich von [http://www.paulmann.com Paulmann], die wohl Marktführer auf diesem Gebiet sind. Der Controller heißt dort '''yourLED RGB-Control''' [http://www.paulmann.com/index.php?Land_ID=1&amp;amp;Sprache_ID=1&amp;amp;1Menu_ID=84&amp;amp;Anwendung_ID=22&amp;amp;EcatAction=Artikel&amp;amp;Katalog=2460&amp;amp;Kapitel=7777&amp;amp;Artikel=70202#top]. Gefunden habe ich ihn dann bei [http://www.leuchtenprofi.at/product_info.php?products_id=725&amp;amp;XTCsid=45694b0d9d33e1394ec62c1cc302fd94 leuchtenprofi.at] für günstige 29,90 EUR.&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=PIC_programmer&amp;diff=130</id>
		<title>PIC programmer</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=PIC_programmer&amp;diff=130"/>
		<updated>2011-10-12T20:03:53Z</updated>

		<summary type="html">&lt;p&gt;Christian: created empty placeholder page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is just an empty placeholder, this page is yet to be created&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Main_Page&amp;diff=128</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Main_Page&amp;diff=128"/>
		<updated>2011-08-28T17:51:21Z</updated>

		<summary type="html">&lt;p&gt;Christian: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Willkommen im EttiWiki!'''&lt;br /&gt;
&lt;br /&gt;
Das EttiWiki ist eine Plattform zur Veröffentlichung der verschiedenen Projekte der Etti-Familie.&lt;br /&gt;
&lt;br /&gt;
Jeder, also auch Nicht-Ettis, kann sich hier anmelden und zu Projekten beitragen. Kommentare, Verbesserungsvorschläge, aber auch Kritik ist immer willkommen!&lt;br /&gt;
&lt;br /&gt;
Vandalen aufgepasst: Jede Änderung wird registriert und kann mit zwei Klicks wieder rückgängig gemacht werden - spart euch also die Mühe!&lt;br /&gt;
&lt;br /&gt;
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Geocaching-Ressourcen&amp;diff=127</id>
		<title>Geocaching-Ressourcen</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Geocaching-Ressourcen&amp;diff=127"/>
		<updated>2011-08-27T20:51:48Z</updated>

		<summary type="html">&lt;p&gt;Christian: Links auf DOC und PPT-Datei entfernt, weil Wiki deren MIME-Typen falsch erkennt und den Upload blockiert&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Für mein Hobby '''Geocachen''' musste ich im Laufe der Zeit ein paar Dateien erstellen. Damit nicht jeder jedesmal das Rad neu erfinden muss, möchte ich hier diese Dateien mit euch teilen. Hoffentlich helfen sie dem einen oder anderen.&lt;br /&gt;
&lt;br /&gt;
= Geocaching-Notiz =&lt;br /&gt;
Die Geocaching-Notiz, oder auch ''Geocaching Stash Note'' genannt, wird jeder Geocacher schon fast auswendig kennen - eigentlich sollte sie in jedem Cache vorhanden sein.&lt;br /&gt;
&lt;br /&gt;
Da ich einen kleinen Farb-Laserdrucker zuhause habe, wollte ich gern diese Notiz auch in Farbe haben (sieht hübscher aus). Komischerweise habe ich sie nirgendwo im Internet in Deutsch und in Farbe gefunden, deswegen habe ich kurzerhand eine eigene erstellt:&lt;br /&gt;
&lt;br /&gt;
* PDF-Datei: [[File:Cachenote_german_color.pdf]]&lt;br /&gt;
* Original ist im Word-Format, schreibt mich einfach an wenn ihr es benötigt.&lt;br /&gt;
&lt;br /&gt;
Die Word-Datei ist so angelegt, dass links der Text auf Deutsch und rechts auf Englisch steht. Dadurch wird erreicht, dass man durch einen zweiseitigen Druck zwei Exemplare erhält, wobei jeweils die eine Seite Deutsch und die andere Englisch ist.&lt;br /&gt;
&lt;br /&gt;
= &amp;quot;Official Geocache&amp;quot; Aufkleber =&lt;br /&gt;
Mir gefallen diese dunkelgrünen Aufkleber sehr gut, nur sind sie nicht ganz günstig (€1,50) und ich hatte Probleme einen auf Englisch zu bekommen. Deswegen hab ich sie kurzerhand selber gemacht:&lt;br /&gt;
&lt;br /&gt;
* PDF-Datei: [[File:Official_geocache_small.pdf]]&lt;br /&gt;
* Original ist im PowerPoint-Format, schreibt mich einfach an wenn ihr es benötigt (ja ich weiß, PowerPoint ist nicht gut geeignet dafür, es war mein erster Versuch, jetzt verwende ich bessere Programme *g*)&lt;br /&gt;
&lt;br /&gt;
Interessanterweise konnte ich nicht rausfinden, welche Schriftart Groundspeak auf den offiziellen Aufklebern verwendet. Ich habe dann die Schriftart ''Gunplay'' genommen, die der offiziellen so nah wie möglich kommt. &lt;br /&gt;
&lt;br /&gt;
[[Category:Geocaching]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=File:Official_geocache_small.pdf&amp;diff=126</id>
		<title>File:Official geocache small.pdf</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=File:Official_geocache_small.pdf&amp;diff=126"/>
		<updated>2011-08-27T20:45:05Z</updated>

		<summary type="html">&lt;p&gt;Christian: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=File:Cachenote_german_color.pdf&amp;diff=125</id>
		<title>File:Cachenote german color.pdf</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=File:Cachenote_german_color.pdf&amp;diff=125"/>
		<updated>2011-08-27T20:13:19Z</updated>

		<summary type="html">&lt;p&gt;Christian: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Geocaching_ressourcen&amp;diff=124</id>
		<title>Geocaching ressourcen</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Geocaching_ressourcen&amp;diff=124"/>
		<updated>2011-08-27T20:07:54Z</updated>

		<summary type="html">&lt;p&gt;Christian: created redirect page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Geocaching-Ressourcen]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=Geocaching-Ressourcen&amp;diff=123</id>
		<title>Geocaching-Ressourcen</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=Geocaching-Ressourcen&amp;diff=123"/>
		<updated>2011-08-27T20:07:06Z</updated>

		<summary type="html">&lt;p&gt;Christian: created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Für mein Hobby '''Geocachen''' musste ich im Laufe der Zeit ein paar Dateien erstellen. Damit nicht jeder jedesmal das Rad neu erfinden muss, möchte ich hier diese Dateien mit euch teilen. Hoffentlich helfen sie dem einen oder anderen.&lt;br /&gt;
&lt;br /&gt;
= Geocaching-Notiz =&lt;br /&gt;
Die Geocaching-Notiz, oder auch ''Geocaching Stash Note'' genannt, wird jeder Geocacher schon fast auswendig kennen - eigentlich sollte sie in jedem Cache vorhanden sein.&lt;br /&gt;
&lt;br /&gt;
Da ich einen kleinen Farb-Laserdrucker zuhause habe, wollte ich gern diese Notiz auch in Farbe haben (sieht hübscher aus). Komischerweise habe ich sie nirgendwo im Internet in Deutsch und in Farbe gefunden, deswegen habe ich kurzerhand eine eigene erstellt:&lt;br /&gt;
&lt;br /&gt;
* PDF-Datei: [[File:Cachenote_german_color.pdf]]&lt;br /&gt;
* Word-Dokument: [[File:Cachenote_german_color.doc]]&lt;br /&gt;
&lt;br /&gt;
Die Word-Datei ist so angelegt, dass links der Text auf Deutsch und rechts auf Englisch steht. Dadurch wird erreicht, dass man durch einen zweiseitigen Druck zwei Exemplare erhält, wobei jeweils die eine Seite Deutsch und die andere Englisch ist.&lt;br /&gt;
&lt;br /&gt;
= &amp;quot;Official Geocache&amp;quot; Aufkleber =&lt;br /&gt;
Mir gefallen diese dunkelgrünen Aufkleber sehr gut, nur sind sie nicht ganz günstig (€1,50) und ich hatte Probleme einen auf Englisch zu bekommen. Deswegen hab ich sie kurzerhand selber gemacht:&lt;br /&gt;
&lt;br /&gt;
* PowerPoint-Datei: [[File:Official_Geocache_small.ppt]] (ja ich weiß, PowerPoint ist nicht gut geeignet dafür, es war mein erster Versuch, jetzt verwende ich bessere Programme *g*)&lt;br /&gt;
* PDF-Datei: [[File:Official_geocache_small.pdf]]&lt;br /&gt;
&lt;br /&gt;
Interessanterweise konnte ich nicht rausfinden, welche Schriftart Groundspeak auf den offiziellen Aufklebern verwendet. Ich habe dann die Schriftart ''Gunplay'' genommen, die der offiziellen so nah wie möglich kommt. &lt;br /&gt;
&lt;br /&gt;
[[Category:Geocaching]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
	<entry>
		<id>http://proj.ettis.at/index.php?title=USB_SNES_Controller&amp;diff=122</id>
		<title>USB SNES Controller</title>
		<link rel="alternate" type="text/html" href="http://proj.ettis.at/index.php?title=USB_SNES_Controller&amp;diff=122"/>
		<updated>2011-06-16T09:09:19Z</updated>

		<summary type="html">&lt;p&gt;Christian: /* Microcontroller */ link to microchip.com&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:snes9x_joypad.png|thumb|300px|gamepad configuration in an old version of [http://www.snes9x.com snes9x] - it's simply not fun to play SNES games on a keyboard]]&lt;br /&gt;
During my childhood I used to play many great games on the [[Wikipedia:Super Nintendo Entertainment System|Super Nintendo (SNES)]]. Many years later, I heard of [http://www.snes9x.com snes9x] and played a few of these games again on my PC. What always annoyed me was the controller: it was nearly impossible to play these games with the keyboard.&lt;br /&gt;
&lt;br /&gt;
I bought a few [[Wikipedia:Gamepad|gamepads]] then, but still, they were missing some more or less important keys compared to the original SNES controller and the real &amp;quot;Nintendo feeling&amp;quot; never came up. (See, back then, USB did not exist yet. Instead, joysticks and gamepads had this [[Wikipedia:Game port|15-pin D-sub connector]] that you had to plug into your soundcard, and this ''Game port'' only permitted up to 4 buttons - an SNES controller has 8!)&lt;br /&gt;
&lt;br /&gt;
Many years later, the idea struck me to program a microcontroller to interface with an original SNES controller on the one hand, and provide a standard [[Wikipedia:USB human interface device class|USB HID]] interface on the other hand, so that it could be used with any PC, any operating system and without the need for additional drivers.&lt;br /&gt;
&lt;br /&gt;
The vision I had in mind was a circuit so small that I could hide it in a standard USB connector. The result would be an SNES controller with a USB plug. I did not want to modify the electronics within the controller itself so it would still be usable on a normal SNES.&lt;br /&gt;
&lt;br /&gt;
= Components =&lt;br /&gt;
== SNES controller ==&lt;br /&gt;
I bought an old Super Nintendo on ebay and had a look on the controllers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:SNEScontroller_inside.jpg|the controller has standard rubber contacts like any TV remote&lt;br /&gt;
File:SNEScontroller_board.jpg|the board contains the contact plates and one IC&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find all details on the controller's schematic, pin assignment and communication protocol on a separate page: [[SNES Controller]].&lt;br /&gt;
&lt;br /&gt;
== Microcontroller ==&lt;br /&gt;
[[File:PIC18F2450_side.jpg|thumb|200px|PIC18F2450 microcontroller in DIL and QFN package]]&lt;br /&gt;
The microcontroller I chose for this project was one of the smallest PICs which has USB support: '''PIC18F2450''' with 28 pins.&lt;br /&gt;
&lt;br /&gt;
For my project it offers the following advantages:&lt;br /&gt;
* USB 2.0 compliant&lt;br /&gt;
* Low Speed (1.5Mb/s) and Full Speed (12Mb/s)&lt;br /&gt;
* On-chip USB transceiver with on-chip voltage regulator&lt;br /&gt;
* On-chip pull-up resistors&lt;br /&gt;
* Low-power modes&lt;br /&gt;
* 16kB Flash memory&lt;br /&gt;
&lt;br /&gt;
To program (flash) the microcontroller, one needs a programmer or debugger with In-Circuit Serial Programming (ICSP) support. There's either the official ones from [http://www.microchip.com Microchip], but since these were too expensive for this project, I chose to build my own, similar to [http://www.sprut.de/electronic/pic/brenner/index.htm#brenner5 Brenner5] from Sprut's homepage (you can find more details under [[PIC programmer]]).&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
All code files other source files can be found in the Subversion repository, hosted by [[File:googlecode_logo.gif|80px|link=https://code.google.com/p/usb-snes-controller|Google Code]]&lt;br /&gt;
&lt;br /&gt;
:https://code.google.com/p/usb-snes-controller&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For compiling and linking the code I use the '''MCC18''' compiler from [http://www.microchip.com Microchip]. It is available in a free evaluation version in which only a few optimizations have been disabled.&lt;br /&gt;
&lt;br /&gt;
To compile the code, all that is needed is the directory &amp;lt;code&amp;gt;svn/trunk/src&amp;lt;/code&amp;gt;. Edit the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; and set the correct directories there so MCC18 can be found. Then simply execute &amp;lt;code&amp;gt;make.exe&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code is divided into three modules:&lt;br /&gt;
; main.c&lt;br /&gt;
: This module implements the main application logic: CPU initialization and SNES controller polling. In the central &amp;lt;code&amp;gt;while (1)&amp;lt;/code&amp;gt; loop all controller buttons are polled cyclically every few milliseconds. The state of all buttons is recorded in the array &amp;lt;code&amp;gt;buttons&amp;lt;/code&amp;gt;. If the state of one or more buttons changed since the last poll cycle, a new [[Wikipedia:USB_human_interface_device_class#Reports|HID report]] is generated and the ''usb.c'' module notified that the report changed.&lt;br /&gt;
; usb.c&lt;br /&gt;
: In this module all USB logic is implemented. Interrupts from USB are handled here and then processed by the appropriate &amp;lt;code&amp;gt;process_*()&amp;lt;/code&amp;gt; functions, depending on what endpoint is targeted. This code contains a lot of &amp;lt;code&amp;gt;DEBUG_OUT()&amp;lt;/code&amp;gt; macros which, when enabled, resolve to functions calls to ''debug.c''. These are there to help debugging and to see what is happening on the USB.&lt;br /&gt;
; debug.c&lt;br /&gt;
: In ''debug.c'' are functions for serial I/O. With a serial terminal (such as the [[LCD Terminal]]) one can see what transactions, etc. appear on the USB. When &amp;lt;code&amp;gt;DEBUG&amp;lt;/code&amp;gt; is undefined (see ''debug.h'') these are all empty and don't cause any performance degradation.&lt;br /&gt;
&lt;br /&gt;
= Prototype =&lt;br /&gt;
I created a first prototype on a hole pattern board for developing the code and easy debugging. The board layout was done with [http://www.cadsoft.de Eagle].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:SNESUSB_prototype_design.png|prototype board design&lt;br /&gt;
File:SNESUSB_prototype.jpg|prototype on hole pattern board&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To the left (CON3) you can see a [[Wikipedia:D-subminiature|DB-9 connector]] for connecting the controller (in the prototype I used a connector so I could easily change the controllers). The pin assignment is as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! DB9 pin !! wire color !! signal&lt;br /&gt;
|-&lt;br /&gt;
| 2 || red || Data&lt;br /&gt;
|-&lt;br /&gt;
| 3 || orange || Latch&lt;br /&gt;
|-&lt;br /&gt;
| 4 || yellow || Clock&lt;br /&gt;
|-&lt;br /&gt;
| 6 || white || +5V supply voltage&lt;br /&gt;
|-&lt;br /&gt;
| 8 || brown || Ground&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To the top (CON1) one can find the ICSP connector (In-circuit serial programming) for programming the microcontroller. This connector has the following pin assignment:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! pin !! signal&lt;br /&gt;
|-&lt;br /&gt;
| 1 || +12V programming voltage (Vpp)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || +5V supply voltage (Vdd)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Ground (Vss)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Data (PGD)&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Clock (PGC)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Final Version =&lt;br /&gt;
When the experiments with the prototype were successful, I started to develop the final, miniaturized version.&lt;br /&gt;
&lt;br /&gt;
All source files in Eagle format can be found in the Subversion repository in the directory &amp;lt;code&amp;gt;svn/trunk/board&amp;lt;/code&amp;gt;:&lt;br /&gt;
:https://code.google.com/p/usb-snes-controller/source/browse/trunk/board&lt;br /&gt;
&lt;br /&gt;
== Schematic ==&lt;br /&gt;
The board layout for the final version was done with Eagle, the first thing was to draw the schematic:&lt;br /&gt;
[[File:SNESUSB_schematic.png|none|300px]]&lt;br /&gt;
&lt;br /&gt;
The wirepads to the left (labeled with YELLOW, ORANGE, RED, WHITE and BROWN) are the holes where the controller wires will be soldered. The wirepads labeled with PADx are solder pads where the wires for ICSP will be soldered: PAD1=PGC, PAD2=PGD, PAD3=VPP. Ground and supply voltage must always be connected through the USB connector.&lt;br /&gt;
&lt;br /&gt;
USB requires a highly-accurate clock, which can only be retrieved from a crystal or a ceramic resonator. A crystal would be much too big for my small board, so I chose a '''CSTCC''' ceramic resonator from [http://www.murata.com muRata]. This has the additional advantage that it already includes the two load capacitors, which again helps to save board space.&lt;br /&gt;
&lt;br /&gt;
The PIC18F2450 microcontroller is also available in a [[Wikipedia:Quad Flat No leads package|QFN]] package. Although this is quite difficult to solder (I tried several methods) it is the smallest possible alternative.&lt;br /&gt;
&lt;br /&gt;
The only other external parts are two capacitors: C1 for smoothing the supply voltage and C2, which is required for USB 3.3V generation. Note that no pull-up resistors can be found in the schematic: the PIC18F2450 contains internal pull-ups for that purpose (this fact was completely omitted from the original data sheet ''39760a.pdf'', it can only be found in the errata ''80274a.pdf'')!&lt;br /&gt;
&lt;br /&gt;
== PCB ==&lt;br /&gt;
As I said, I wanted the board to be so small that it could fit into the plug's casing. This made it quite difficult to route all signals, but in the end I succeeded:&lt;br /&gt;
&lt;br /&gt;
[[File:SNESUSB_board.png|none|300px]]&lt;br /&gt;
&lt;br /&gt;
The PCB layout is a double-sided layout with parts only on the top side (red), and traces on both sides, connected with vias (green). The solder pads for ICSP are on the bottom side (blue). To the right you can see five bigger holes, these are used to connect the wires of the SNES controller.&lt;br /&gt;
&lt;br /&gt;
This kind of PCB is impossible to manufacture at home, so I enlisted the services of http://www.pcb-pool.com. This manufacturer also provides and Eagle rule-file, which helps you to avoid layouts that can't be manufactured. After a few days I got the results, and I can tell you, I was very satisfied:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:SNESUSB_pcbpool.jpg|delivery from PCB-POOL&lt;br /&gt;
File:SNESUSB_board_top.jpg|final PCB, top side&lt;br /&gt;
File:SNESUSB_board_bottom.jpg|final PCB, bottom side&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Soldering the parts on such a small PCB is a bit tricky, especially the QFN-packaged microcontroller. I tried several approaches, but the way that worked best was the following:&lt;br /&gt;
* apply solder paste to all pads - the solder resist between the pads ensures that no pads or vias get short-connected that shouldn't&lt;br /&gt;
* place the parts on the board, the solder paste holds them in place&lt;br /&gt;
* &amp;lt;u&amp;gt;carefully&amp;lt;/u&amp;gt; heat up the PCB with a soldering torch (gas burner) until you see the solder paste becoming liquid&lt;br /&gt;
&lt;br /&gt;
Here you can see the populated PCB with attached ICSP connector - this of course will be removed after programming:&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:SNESUSB_boardparts_top.jpg|populated PCB, top side&lt;br /&gt;
File:SNESUSB_boardparts_bottom.jpg|populated PCB, bottom side&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Finished Controller ==&lt;br /&gt;
After attaching the SNES controller, flashing the software, final tests and detaching the ICSP connector the controller is finished and ready for long gaming hours:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:SNESUSB_final.jpg|SNES controller with attached USB connector&lt;br /&gt;
File:SNESUSB_final_play.jpg|controller in action&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What is working: ===&lt;br /&gt;
* Hardware is running stable&lt;br /&gt;
* Controller draws about 18mA, heat dissipation is fine&lt;br /&gt;
* Controller is detected and working correctly in Windows&lt;br /&gt;
&lt;br /&gt;
=== What can still be improved: ===&lt;br /&gt;
; Casing&lt;br /&gt;
: The original plan, to hide the electronics in the plug, proved to be too ambitious: The current PCB '''does''' fit into the plug's casing, but this results in the plug to become quite fragile. Furthermore, there is no strain relief on the controller cable any more, so any pull on the cable could cause the wires to be severed from the PCB. Also the current PCB is very dependent on one specific plug casing, which might be a problem if that casing is not available any more.&lt;br /&gt;
: A better solution would be to separate the electronics a few centimeters from the plug in its own casing (I got this idea from my USB headset). The problem there is that I would have to find a suitable casing.&lt;br /&gt;
&lt;br /&gt;
; Solution for damaged ceramic resonators&lt;br /&gt;
: In some of my PCBs the ceramic resonator stopped working for some reason. The microcontroller runs fine with its internal oscillator, but does not run when switched to the external resonator. I can only assume the resonator is sensitive to heat changes and gets damaged in my solder process. Maybe improving that with a hot-air soldering torch could help.&lt;br /&gt;
&lt;br /&gt;
; Pass USB compliance tests&lt;br /&gt;
: The USB Implementer's Forum provides a free compliance testing toolkit called '''USB Command Verifier''' (USB20CV), obtainable from http://www.usb.org/developers/tools/. USB20CV is the compliance test tool which evaluates High, Full and Low-speed USB devices for conformance to the USB Device Framework (Chapter 9), Hub device class (Chapter 11), HID class, and OTG specifications.  Also included are mass storage class and USB video class specification tests.  All USB peripherals are required to pass the Device Framework tests in order to gain certification.&lt;br /&gt;
: In first experiments, most of these tests failed. I guess this is due to mode switch commands, etc., that are not implemented (or only implemented as stubs). However it should be possible with minimal effort to get these running.&lt;br /&gt;
&lt;br /&gt;
; Implement USB low-power modes&lt;br /&gt;
: When the PC enters suspended state where the USB is still powered, any USB device that is not configured for wakeup must also put itself into suspended state and use only a minimum amount of electric power.&lt;br /&gt;
: We could achieve this with several methods, for one we can disable power supply to the SNES controller (which saves about 4.2mA). We could also power down the microcontroller, or activate whatever power-saving possibilities the PIC has to offer.&lt;br /&gt;
&lt;br /&gt;
; Support for [[Wikipedia:Nintendo Entertainment System|NES]] controllers&lt;br /&gt;
: The communication protocol of an NES controller is identical to a SNES controller (if I remember correctly). So with some luck it should already work, but due to the lack of a controller for testing, I can't say for sure.&lt;br /&gt;
&lt;br /&gt;
[[Category:Electronics]]&lt;/div&gt;</summary>
		<author><name>Christian</name></author>
		
	</entry>
</feed>