Ryan Herbst

Home Monitor Display

My home monitor display is located in the common area between our kitchen and family room. It is displayed on a 17inch LCD display at a location where it can be seen from both the kitchen and the family room couch. I use a DVI extender product from Fry’s to connect the monitor to my Linux server using a ~30′ length of CAT6 cable. The monitor is configured as a separate screen  on the Linux server and does not interfere with the operation of the primary display. The monitor application is started automatically when I log into the server console.

Home Monitor Displa

The home monitor is written using QT4. QT is a cross platform application and UI framework. The monitor software shows the following information on a single display:

  • Current values from all of the sensors in my weather station displayed on the left column.
  • 7 day weather forecast along the top row
  • A 24 plot of the temperature values in my weather station.
  • A 24 hour plot of the average and gust wind speed values.
  • A list of unread emails for three email accounts, my wife’s personal email, my personal email and my work email.

Each portion of the monitor panel operates as an independent unit as shown in the following block diagram:

Software Structure

Current Environmental Values

 Two C++ classes form the current value display. The first class which is the XPL Listener class. This object integrates the xPL4Linux framework into a QT Object class. The xPLLIB software is implemented using a QThread class where the xPLLIB software is configured and called within the run() routine in the QThread. Whenever an XPL message is received a callback function is called which stores the XPL message information in a C++ class which is then passed to the WeatherStatus class using the QT SIGNAL/SLOT mechanism.

The WeatherStatus class receives the xPL messages, parses them and displays them in the appropriate location on the monitor panel. Each received value is timestamped to determine if any sensor values have become become stale. Any sensor values that are stale are removed from the panel. A value is determined to be stale when it has not been updated in 15 minutes. This ensures all displayed values are current and gives a visual indication that a sensor has gone missing and needs attention. The current time is also displayed at the bottom of the current weather value panel.

Weather Forecast

The weather forecast portion of the display panel uses the forecast API from www.weatherunderground.com. This API allows you to retrieve weather forecast data for your website using XML or JSON. The free version allows 500 downloads today which is plenty for my monitor panel.

A QTimer object is used to initiate a forecast update every 15 minutes. The forecast panel uses the QNetworkRequest and QDomDocument classes to retrieve and parse the XML forecast data from www.weatherunderground.com. In addition to parsing the forecast data the panel will retrieve the updated forecast items from the website.

Temperature & Wind Speed Plots

The temperature and wind speed plot portions of the monitor display retrieve historic temperature and wind speed information from the MySql database and plots the values using the QWT plotting widgets software. A QTimer object triggers the update of the plot every 1 minute. The QSqlQuery object is used to retrieve and parse the data from the MySql database.

New Email Display

The new email display portion of the panel uses a QWebView widget to display a web page from my home web server. On the web-server I use an PHP script to retrieve a list of messages in the three email in boxes. Any messages that are currently marked as unread are displayed on the web page which is then displayed on my monitor panel. I plan in the future to embed the IMAP email client directly into the panel software and remove need for the intermediate web page.

Email me if you have any questions.

Amaroq Weather Station

temp: ()
humidity: %
wind: From the at MPH