Martin Ewing of Branford, CT, gives seriously awesome detail on building his Home Utility Support System:
Scope of ProjectPrototype development of a system to monitor and control home heating and hot water systems with the objective of providing engineering and economic analysis to allow the homeowner to minimize costs and increase the effectiveness of the home's utility systems. The system is to be based on the Linux-based Plat'Home Open Micro Server to be supported by additional open-source software solutions.
Hardware System- OMS 400 server, 128 MB RAM
- Compact Flash Card, 2 GB (SanDisk Versa II)
- DLP Design DLP-IO8-G USB-Based 8-channel data acquisition module
- Maxim DS18B20+ temperature sensors (2) for ambient and hot water monitors
- Encore ENRXWI-G Wireless LAN Extender
- Custom built interfaces for oil furnace, heating zone and domestic hot water circulators
Software Tools- Plat'Home SSD/Linux, version 0.4-20080727/2.6.16.
- SSD packages for Apache (web server), Python 2.4, ssh, vim
- Graphics support via gnuplot
- All code developed in Python
DiscussionIn its current stage, the application monitors the outdoor temperature and the temperature of the outlet pipe of our hot water heat exchanger. (Our domestic hot water is generated by flowing hot water from the furnace “boiler” through a heat exchanger by means of a circulator pump. Temperature at the outlet port depends on current hot water demand, as well as the water thermostat set point.) We also sample the state (on/off) of the furnace oil burner, the hot water circulator, and the three house heating “zones”. The operating cost of our system is proportional to the “on” time of the burner. Our objective, after analysis, is to minimize that cost, subject to weather conditions, etc.
The initial phase of the project was completed in about 3 weeks' elapsed time, demonstrating the rapid prototyping capabilities of the OMS device supporting the powerful Linux environment combined with the Python system. Several days of data acquisition have been run. A sample data display generated by gnuplot is shown in Figure 3. Plots like this will be available on demand via the OMS Apache web server, along with statistical summaries of collected data. Full analysis will required extended operation over the heating season.
It will be possible to operate the application, once fully debugged, though remote web access, thus being available to any authorized computer on the Internet, for example, to the homeowner who is traveling.
Comments on the Plat'Home OpenMicroServer
HardwareThe OMS-AL400/128 is a powerful and well-packaged system based on a 400 MHz RMI Alchemy au1550 (MIPS architecture). The data logging (in production mode) requires well under 1% of CPU capacity. The great benefit of the system is in the development environment (a full version of Linux) that supports advanced networking and language tools, such as the powerful rapid development language Python. Having substantial CPU and RAM availability permits intensive analysis and display options that are being put to use in CGI-driven web displays, supported by the powerful Apache web server.
SSD/Linux, provided by Plat'Home, has an advanced USB capability that auto-recognizes our DLP data acquisition module, saving a lot of development effort. It was only a matter of minutes to connect our Python application to real-world analog input, digital in/out, and temperature readings.
The physical package is suitable for installation in moderately unfriendly environments such as a typical home basement. Its small size, low power, and wide operating temperature range are also well suited to our environment.
Plat'Home's documentation discusses the issues involved in using Compact Flash memory as a solid state disk. In some applications, lifetime (maximum number of write operations) can be a problem. Our application is not particularly strenuous in this regard. Using an inexpensive CF card as a disk substitute is a big plus in our semi-industrial environment. Nearly unlimited RAM and/or hard drive capacity may be attached through the USB or Ethernet ports, thanks to the versatile networking support.
If the current application were to be produced commercially, it could be made to fit entirely in the 128 MB RAM without CF support. There is little need to do so at this point, since we make good use of the development tools, and CF is not particularly expensive. Nonvolatile storage, like CF, is desirable to protect logs against power outages.
SoftwareThe OMS 400 is supported by the Plat'Home SSD/Linux distribution, which offers a selection of the most widely used Linux tools. Plat'Home provides a file repository for downloading software packages as required. There is also an option to install the Debian Linux distribution, which offers an even wider spectrum of tools and applications, along with frequent software updates.
We have taken advantage of many common Linux-based tools for this project, including gcc, Python, vim, gnuplot, ssh, and Apache. A live Internet connection (via Ethernet and a WiFi bridge) also permits real time clock synchronization via ntp, along with web and ssh access.
Software developed for this project will be made available as Open Source, under terms of the GPL v 3.0.
Areas for Improvement in the OMS 400 productWhile the OMS device has been great to work with overall, there are naturally some problems that arose in the course of our work. This is a list of some of these:
- The Alchemy au1550 processor works very well, and potentially can be supported by cross-compilation on an x86 Linux platform. However, an x86-compatible chip would be somewhat more convenient for development, other things being equal.
- For an application like ours, it would be handy to have more DIO, A/D, and D/A capability on board, comparable to the DLP device we are using. Or, perhaps, a empty space where a customer supplied interface could be installed. However, external USB connected devices are not a great problem.
- The limitations on CF write cycles are still a bit mysterious. It would be helpful if there were a monitor that could tell us the actual number of physical writes that an application creates over time. (Perhaps this exists in Linux already.)
- It appears that the Python 2.4 package is not supported, even though provided in the SSD repository. It does not install for us. (The documentation warns that not all packages are guaranteed to work. This is disappointing!) We had to compile from source. The good news is that the OMS platform does have the ability to compile large software packages. The bad news is that Python did not correctly compile, although the result was usable.
- We have also had unresolved difficulties in getting sendmail (or postfix) to operate. Sending results by email would benefit this application. In general, we would expect a standard Linux distribution like Debian would provide easier access to Python and sendmail.
- Some physical details:
- The OMS box does not have mounting tabs that would make it easy to install against a vertical wall, as required in our case.
- The case is not sealed against a dusty or dirty environment. It may be acceptable in our environment, but more positive seals would increase operating confidence.
- When installing in an environment with electrical equipment interfaces, it is desirable to have a definite case ground connection. The cable clamp screw can be used, but it is not ideal for this purpose. A separate grounding post would be useful.
ConclusionThe OMS 400 server has provided an ideal tool for implementing the Home Utility Support System. While this project could have been implemented with a standard PC, the operating environment is marginal for normal PC hardware. The OMS 400's combination of compact, robust packaging and nonvolatile flash disk, along with the power of its Linux operating environment, were ideal for this application.
We are grateful for generous support from Plat'Home Co., Ltd. that made this work possible.