This is a binding for the openHAB / eclipse Smart Home home automation system. It aims to make data available to the user, which is already sent by lots of modern metering hardware (e.g. heat cost allocators, electricity/gas/water/heat meters) already widely deployed in houses and especially flats.
The binding is based on the jMBus library, which provides all basic receiving and decoding. It is currently using version 3.1.1 plus one extension for access to the RAW frame. Implementation of the Techem devices has been ported from FHEM.
The binding is working stable. To use it, you need a device to receive the transmissions. The underlying library supports transceivers of Amber, Radiocrafts (RC1180-MBUS) and IMST (iM871A-USB), the binding is mainly developed and tested with the Amber Wireless AMB8465-M. However, development is still going on and there are some known issues.
There is some more information and discussion in the forum.
openhab/addons
or /usr/share/openhab/addons/
.bundle:list
in the OSGi console, it should show a wmbus
bundle in active state. If it is there but not active yet, try feature:install openhab-transport-serial
or bundle:start XXX
where XXX
is the number of the wmbus bundle shown by the list
command.Settings
-> Things
-> (+)
lists the WMBus Binding.include the BridgeUID (stick/adapter name) into the ThingUID of the metering device
to true
./dev/ttyUSB0
, check via dmesg
when plugging in the stick) as configuration parameter.ONLINE
as status. If not, edit the Thing, this screen should include some more error details, also check OSGi console and userdata/logs/openhab.log
or /var/log/oppenhab/openhab.log
.If your device is encrypted, you will need to get the AES key from the manufacturer, metering company or landlord. Then
mvn package
in the root directory..org.openhab.binding.wmbus/target/org.openhab.binding.wmbus-3.1.0-SNAPSHOT.jar
.For debugging and development, it is helpful to add the folloing to /var/lib/openhab/etc/org.ops4j.pax.logging.cfg
to log to a separate file /var/log/openhab/wmbus.log
# Define WMBus file appender
log4j2.appender.wmbus.type = RollingRandomAccessFile
log4j2.appender.wmbus.name = WMBUS
log4j2.appender.wmbus.fileName = ${openhab.logdir}/wmbus.log
log4j2.appender.wmbus.filePattern = ${openhab.logdir}/wmbus.log.%i
log4j2.appender.wmbus.append = true
log4j2.appender.wmbus.layout.type = PatternLayout
log4j2.appender.wmbus.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n
log4j2.appender.wmbus.policies.type = Policies
log4j2.appender.wmbus.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.wmbus.policies.size.size = 100MB
# Configure WMBus logging
log4j2.logger.org_openhab_binding_wmbus.level = TRACE
log4j2.logger.org_openhab_binding_wmbus.name = org.openhab.binding.wmbus
log4j2.logger.org_openhab_binding_wmbus.additivity = false
log4j2.logger.org_openhab_binding_wmbus.appenderRefs = wmbus
log4j2.logger.org_openhab_binding_wmbus.appenderRef.wmbus.ref = WMBUS
There is an additional tool, that compiles as a second .jar file org.openhab.binding.wmbus.tools-3.1.0-SNAPSHOT.jar
(also available from the releases page). If you drop this bundle into your addons folder or install it otherwise to openHAB, you can access the tool at http://localhost:8080/wmbus. It gives you the ability to inject frames to the binding, as if they were received via a stick. There is also a collector, which lists you each received WMbus frame as raw hex, together with timestamp and basic grouping (ID, Manufacturer, device type).
If you add the following lines to /var/lib/openhab/etc/org.ops4j.pax.logging.cfg
, you can also log all frames to a plaintext file wmbustools.log
. The content of that file can later be fed to the injector.
# Define WMBus Tools file appender
log4j2.appender.wmbustools.type = RollingRandomAccessFile
log4j2.appender.wmbustools.name = WMBUSTOOLS
log4j2.appender.wmbustools.fileName = ${openhab.logdir}/wmbustools.log
log4j2.appender.wmbustools.filePattern = ${openhab.logdir}/wmbustools.log.%i
log4j2.appender.wmbustools.append = true
log4j2.appender.wmbustools.layout.type = PatternLayout
log4j2.appender.wmbustools.layout.pattern = %m%n
log4j2.appender.wmbustools.policies.type = Policies
log4j2.appender.wmbustools.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.wmbustools.policies.size.size = 100MB
# Configure WMBus Tools logging
log4j2.logger.org_openhab_binding_wmbus_tools.level = DEBUG
log4j2.logger.org_openhab_binding_wmbus_tools.name = org.openhab.binding.wmbus.tools.LoggingMessageListener
log4j2.logger.org_openhab_binding_wmbus_tools.additivity = false
log4j2.logger.org_openhab_binding_wmbus_tools.appenderRefs = wmbustools
log4j2.logger.org_openhab_binding_wmbus_tools.appenderRef.wmbustools.ref = WMBUSTOOLS
This binding is released under EPL-1.0, the included jmbus is under MPL-2.0.