FHEM module for ELV ESA1000 (WZ/Z/GAS) series of devices

FHEM, the amazing home-automation server software, already has support for several sensors, meters and switches produced by ELV. In October 2010 I bought two meters, ESA1000WZ and ESA1000GAS for my house in the hope that FHEM would support them. Unfortunately it did not (at the time). I quickly found some hints that somebody, namely Gerd K., was working on adding support. So I contacted him and a day later received his module for testing. In the meantime eager in anticipation I was hacking away, duplicating the existing EM1000 extension and customizing it to read the raw strings coming from my Busware.de CUL 868 MHz USB adapter. While I got the power meter’s values (ESA1000WZ) figured out pretty quickly, it was a bit more involving to get correct readings from the gas meter (ESA1000GAS). Unfortunately Gerd’s code did not include support for the gas meter, so I emailed him my changes, but sadly never received feedback.
So today I am releasing my code on a works-for-me basis:

Download

UPDATE:Patch for FHEM 5.3 Version: Feb 10th 2013 for FHEM 5.3
Package for FHEM 5.0 Version: Oct 25th 2010 for FHEM 5.0

  • Supports ESA1000WZ power meter (infrared version, possibly others as well)
  • Supports ESA1000Z and ESA1000GAS gas meters (infrared version and version using impulse transducer for the Elster-Kromschroeder BK-G4)
  • Features proper graph files to plot current and cumulated day/month consumption

Photos / Screenshots

Installation

If you are using FHEM 5.3, please download the tar-ball version (or SVN version for that matter) and directly apply the patch cul_esa-for-fhem-5.3.patch.

UPDATE 2: Here is a completely patched version based on the tar-ball version of FHEM 5.3: fhem-5.3-cul_esa.tar.gz Version: Feb 10th 2013

If you are using FHEM 5.0:
Copy 19_CUL_ESA.pm and all .gplot files to your FHEM directories.
Sadly adding autocreate support and extending the CUL module to understand the raw message strings requires patching. Check cul_esa-for-fhem-5.0.patch to patch the files. This was diffed against the Debian package of FHEM 5.0. The very same version of FHEM as tar.gz has some differences in the sourcecode and some files missing. I contacted the author of FHEM about this issue but he has not updated the packages yet. So if you run into issues here it is probably due to these differences.

UPDATE 1: Here is a completely patched version based on the Debian package of FHEM 5.0: fhem-5.0-cul_esa.tar.gz Version: Oct 25th 2010

Here are some notes in German I made while developing the module, mostly concerning the different behavior of the ESA1000GAS compared to the ESA1000WZ:

Der ESA1000GAS mit dem ESA1000Z-Messgerät verhält sich leider anders als das ESA1000WZ, sodaß ich wieder die Korrektur-Faktoren einbinden mußte.
Ich konnte nicht herausfinden, wozu der übermittelte Tick beim ESA1000Z dient. Zwar ändert sich dieser mit geänderter Zählerkonstante, allerdings ergibt der Wert im Zusammenhang mit den von der Einheit übermittelten Werten keinen Sinn, sodaß ich hier direkt mit der Zählerkonstante multipliziere, um die Kubikmeter zu erhalten, und dann zusätzlich noch mit dem Umrechnungsfaktor (bei der EWE ergibt sich dieser aus der Zustandszahl * Brennwert Hs) multipliziere, um die Kilowattstunden aus der Gasmenge zu erhalten.
Leider ändern sich damit die Parameter bei der Definition:

Stromzähler:
define CUL_ESA_286 CUL_ESA 1925 286 1 1 23.086
also:
corr1 = corr2 = 1 (und damit wirkungslos)
CostPerUnit = 23.086 Cent/kWh

Gaszähler:
define CUL_ESA_798 CUL_ESA 1429 798 0.001 9.5154 4.5339
also:
corr1 = 0.001
corr2 = 9.5154 kWh/m3
CostPerUnit = 4.5339 Cent/kWh

Ich habe ebenfalls noch einen Durchschnittswert in Kilowatt implementiert, sodaß man die Durchschnittleistung einigermaßen sinnvoll in einem Diagramm darstellen kann. Hier gab es allerdings bei meinem Drehstromzähler Probleme mit Unterabtastung, weil sich die Drehscheibe bei geringem Verbrauch zu langsam dreht, sodaß das Meßgerät zwischendurch schon Nullwerte zurückmeldet, weil kein Impuls eingegangen ist. Dafür habe ich einen entsprechenden Schwellenwert bei der Berechnung des Durchschnittswertes implementiert. Nicht schön, funktioniert aber für meine Zwecke.

WD Raptor + Mac Mini Intel = external 10k rpm SATA madness

Alright, I had this crazy idea last week: Let’s see if I can somehow route the internal SATA interface of the Mac Mini to the outside of the case so I could attach a bigger and faster external (e)SATA drive. Well, guess I wasn’t the only person with such ideas:
Perle over at 123Macmini.com already has brief instructions on how he did the internal to external mod.
I’ve made some refinements to his process which I will post shortly – along with a few pictures and links where to get the parts. Update: It’s here.

So, after doing the science (finding the right adapters and cables etc.) and tearing apart the Mac Mini with a pizza cutter (yes, you read right!), I finally have my fast drive (Wester Digital Raptor WD1500ADFD 150 GB @ 10k rpm) and the Mac Mini is still as energy efficient as previously – mostly due to the fact that another FireWire drive is now in standby mode most of the time.

That should make me the first person with a WD Raptor in use on a Mac Mini. W00t! ;)

Obligatory XBench results that mean absolutely nothing:
Madness
Comparison with modded 7200 rpm Mac Mini

I’m using the Pleiades Super S-Combo external enclosure with the WD Raptor. The enclosure is made of aluminium. No cheap plastic parts here. It’s pretty solid and the aluminium functions as passive heatsink. That way, even under load the Raptor won’t cross the upper 55°C specification limit. My initial thought was that given the S-Combos universal FW400/FW800/USB2.0/eSATA-bridge it may perform worse than when connecting the cable directly to the drive. This is not the case. Actually, some benchmarks performed slightly better. I can only assume this being due to some sort of caching going on inside the bridge.
Also, if you think the drive is loud with its 10000 rpms, I can assure you it isn’t. Actually, in idle mode it is very much on par with the latest Seagate Barracuda drives which have a reputation for being very silent. The only thing that’s loud are the access noises, but in my opinion it’s not annoying.