Hi,
I thought about this over the last days and there are some things you have to consider for yourself and how to do it.
Hardware
Be sure to get the correct one. I checked the model on Hager’s German site: The ECA380D has a so called “Agardio” interface. Seems like something proprietary that Hager uses with his home automation systems.
The “real” modbus version is the ECR380D. Again, this is for Germany, but be sure to double check.
But why using this meter? Sure, Hager makes good and reliable meters. But they’re also expensive. I searched for an alternative meter with comparable specs. You can find some models from China - but as there will flow some current inside this, I didn’t want the all cheap way.
Looking for some European models, I found the Orno OR-WE-516. It has a Modbus RTU interface (see below) and is MID approved. Simplified the latter means, that it measures precisely enough that power companies may use them.
I’ve been wanting my own Modbus reading (independent from my power company) for a long time. So I ordered one of these guys this weekend.
Protocol
The Hager and Orno meters use Modbus RTU. Physically, that is RS-485, a serial protocol.
There is a variant of Modbus over IP, indeed. But these cheap devices usually don’t implement that.
You may find more details on Wikipedia.
Adapter
You have to use an adapter not to burn your computer when connecting RS-485. There are models for USB, like this one. From the comments, the device should work with Linux.
I’m going to use a Raspberry Pi and bought a HAT from Linker Kit. Linksprite also sells a HAT which should work the same way - looking at the pictures, it could even be the same device. Both expose the RPi’s serial UART but shift the voltage levels.
Software
A small tool called ModBus Measurement Daemon is maintained under the Volkszähler project. It supports the above mentioned Orno meters - that’s what led me to buying this one.
What’s nice about this software is that it exposes the read out data via several APIs. I’m planning to use plain MQTT. Maybe, the Homie API is somewhat more comfortable to use with OpenHAB. I can’t tell, maybe some users can shed some light on this one.
Conclusion
In the end, I think this will be the easiest and most robust way to include a modbus meter. I’ll keep you updated.