# wmbusmeters The program receives and decodes C1 or T1 telegrams (using the wireless mbus protocol) to acquire utility meter readings. The readings can then be published using MQTT, curled to a REST api, inserted into a database or stored in a log file. The program runs on GNU/Linux (standard x86) and Raspberry Pi (arm). | OS | Status | | ------------ |:-------------:| |GNU/Linux & MacOSX| [![Build Status](https://travis-ci.org/weetmuts/wmbusmeters.svg?branch=master)](https://travis-ci.org/weetmuts/wmbusmeters) | | Static Scan | Status | | ------------- |:-------------:| |Linux G++| [![Build Status](https://scan.coverity.com/projects/14774/badge.svg)](https://scan.coverity.com/projects/weetmuts-wmbusmeters) | # Run as a daemon Remove the wmbus dongle (im871a or amb8465) from your computer. `make; sudo make install` will install wmbusmeters as a daemon that starts automatically when an appropriate wmbus usb dongle is inserted in the computer. Check the config file /etc/wmbusmeters.conf: ``` loglevel=normal device=auto logtelegrams=false meterfiles=/var/log/wmbusmeters/meter_readings logfile=/var/log/wmbusmeters/wmbusmeters.log shell=/usr/bin/mosquitto_pub -h localhost -t wmbusmeters -m "$METER_JSON" ``` Then add a meter file in /etc/wmbusmeters.d/MyTapWater ``` name=MyTapWater type=multical21 id=12345678 key=00112233445566778899AABBCCDDEEFF ``` Now plugin your wmbus dongle. Wmbusmeters should start automatically, check with `tail -f /var/log/syslog` and `tail -f /var/log/wmbusmeters/wmbusmeters.log` The latest reading of the meter can also be found here: /var/log/wmbusmeters/meter_readings/MyTapWater # Run using config files If you cannot install as a daemon, then you can also start wmbusmeters in your terminal using the config files in /etc/wmbusmeters. ``` wmbusmeters --useconfig=/ ``` Or you can start wmbusmeters with your own config files: ``` wmbusmeters --useconfig=/home/me/.config/wmbusmeters ``` The files/dir should then be located here: `/home/me/.config/wmbusmeters/etc/wmbusmeters.conf` and `/home/me/.config/wmbusmeters/etc/wmbusmeters.d` # Running without config files, good for experimentation and test. ``` wmbusmeters version: 0.9 Usage: wmbusmeters {options} ( [meter_name] [meter_type] [meter_id] [meter_key] )* As you can use: --c1 or --t1 listen to C1 or T1 messages when no meters are supplied --debug for a lot of information --exitafter=