Energy-efficient appliances in Switzerland

Top Ten is a well-designed and user-friendly website that carries information on energy-efficient appliances and other equipment. It is mainly targeted at the swiss audience but I am sure most of these products can be found all over the european market.

On this site one can also find information on alternative energy sources and pointers to specialized companies that can help with their installation.

Review: Decompiling Java

I just finished reading through Decompiling Java by Godfrey Nolan. You might ask, why would I mention a book on reverse-engineering bytecode in a weblog dedicated to smart buildings? What is the relationship between the intellectual property of companies writing Java code and home automation? The answer, essentially, is OSGi.

An OSGi framework, in a nutshell, is a Java program for managing and running other Java programs. When you start it you get a shell prompt that allows you to download, install, start, stop, upgrade and remove other Java programs delivered as bundles, i.e. compressed sets of files.

Since recent years it has become economically possible to have embedded controllers that run on stripped-down versions of Linux with specially designed Java Virtual Machines (JVM). In other words, it has become possible to run Java on these constrained targets. And Java is a good language for writing home automation systems. Indeed, according to Peter Kriens, the author of OSGi’s official weblog, OSGi was initially designed in 1998 for the home automation market.

I work together with Adhoco AG, whose flagship product is a home control system running an OSGi framework on an embedded controller. The author of the JVM we use has pointed out to us the relative ease with which compiled code can be decompiled, which is why I picked up this book after seeing it being reviewed in the ACM Computing Reviews.

Most of the book is about the process of decompilation itself, i.e. extracting the maximum amount of information from a compiled bytecode. While technically interesting, the meat of the book was in chapter 4, “Protecting Your Source: Strategies for Defeating Decompilers”.

That chapter will, I think, be the most interesting one for businesses and it is neatly summarized in a table at the end of the chapter. Protection strategies range from naive obfuscation (cheap to do, but provides weak protection) to the use of native methods for sensitive parts of the code (best protection in my opinion, but breaks portability).

I would not recommend the purchase of this book if all your business wanted to do was to protect yourself against decompilation. After all, about 90% of the book is concerned with the writing of a Java decompiler. You might be best served by borrowing this book from a library and reading chapter 4 instead. But if you want to know the internal workings of a Java classfile, then I am not sure where I would find a book with as much information as this one.

Vampires in the home

Referring again to the power consumption of “stand-by” appliances discussed earlier, I recently stoborrowed a WSE Wattmeter, made by Messtechnik Schaffhausen GmbH, from our laboratory, and measured the power consumption of the few appliances we have at our place after our recent move.

  • Sony stereo player: 6 W.
  • Aquarium, 60 L: 100 W with lighting turned on, 20 W with only filter, air pump and heater.
  • Philips TV: 8 W on standby, 130 W when turned on.
  • Philips DVD: not measurable on standby(!), 17 W when playing.

We have now decided to turn the TV completely off when not in use, which saves us 17.5 swiss francs per year. The Sony stereo can unfortunately not be turned off unless I install a mechanical switch.

I was rather surprised to learn that the lighting on our aquarium required about 80 W, when the fluorescent lamp was only rated at 15 W. I even went to a hardware store to buy a new one, only to discover that the power consumption did not improve. Then I realized that the 10+ years old ballast was almost certainly the culprit, accounting for the missing 65 W. That will be for the next visit to the hardware store…