WMBUSMETERS(1)
WMBUSMETERS(1) ๐
okay bestie, welcome to the General Commands Manual page for wmbusmeters and friends โ grab a boba, this one is a whole vibe ๐งโจ
โจ NAME โจ
wmbusmeters โ acquire, query and decode wired and wireless mbus telegrams, then relay those telegrams to other software. that's the whole job description, no cap ๐ซถ
๐ธ SYNOPSIS ๐ธ
wmbusmeters {options} [device]+ { [name] [driver] [id] [key] }*
wmbusmeters {options} [hex] { [name] [driver] [id] [key] }*
wmbusmetersd {options} [pid_file>]
๐ฆ DESCRIPTION ๐ฆ
so Wmbusmeters acquires wired or wireless mbus telegrams, decodes them, and relays them to some other software for further processing. it is literally the main character of your meter-reading setup ๐
it can, for example, listen to radio traffic using dedicated wmbus dongles (eg im871a,im170a,amb8465, amb8335,cul,rc1180) or a software defined radio dongle (rtl_sdr) with an RTL2832U (decoded using rtl_wmbus, rtl_433). yes queen, software defined radio ๐
once the acquired telegram has been decrypted and parsed, it can then be relayed using a shell command, or stored in a log file. the shell commands can for example relay the telegram using MQTT (eg mqtt_publish) sent to a REST API (eg curl) or store it in a database (eg psql). pick your fighter โจ
๐ OPTIONS ๐
--alarmexpectedactivity=mon-fri(08-17),sat-sun(09-12)โ specify when the timeout is tested, default ismon-sun(00-23)โฐ--alarmshell=<cmdline>โ invokescmdlinewhen an alarm triggers ๐จ--alarmtimeout=<time>โ expect a telegram to arrive within<time>seconds, eg60s,60m,24hduring expected activity--analyzeโ analyze a telegram to find the best driver ๐--analyze=<key>โ analyze a telegram to find the best driver and use the provided decryption key--analyze=<driver>โ analyze a telegram but use only this driver--analyze=<driver>:<key>โ analyze a telegram and use only this driver with this key. add:verboseto any analyze to get more verbose analyze output ๐--calculate_xxx_yyy=...โ addxxx_yyyto the json and calculate it using the formula. e.g.--calculate_sumtemp_c='external_temperature_c+flow_temperature_c'--calculate_flow_f=flow_temperature_cโ units are automatically translated if possible ๐งฎ--debugโ for a lot of information--donotprobe=<tty>โ do not auto-probe this tty. use multiple times for several ttys or specify"all"for all ttys ๐--exitafter=<time>โ exit program after time, eg20h,10m 5s--format=(hr|json|fields)โ for human readable, json or semicolon separated fields--helpโ list all options ๐ซถ--identitymode=(id,id-mfct,full,none)โ group meter state based on the identity mode. default isid.--ignoreduplicates=<bool>โ ignore duplicate telegrams, remember the last 10 telegrams. default istrue.--field_xxx=yyyโ always add"xxx"="yyy"to the json output and add shell envMETER_xxx=yyy. the fieldxxxcan also be selected or added usingselectfields=. equivalent older command is--json_xxx=yyy.--licenseโ print GPLv3+ license ๐--listento=<mode>โ listen to one of thec1,t1,s1,s1m,n1a-n1flink modes--listento=<mode>,<mode>โ listen to more than one link mode at the same time, assuming the dongle supports it ๐ฅ--listenvs=<meter_type>โ list the env variables available for the given meter type--listfields=<meter_driver>โ list the fields selectable for the given meter type--printdriver=<meter_driver>โ print xmq driver source code--listmetersโ list all meter types--listmeters=<search>โ list all meter types containing the text<search>--listunits=โ list all unit suffixes that can be used for typing values--logfile=<dir>โ use this file for logging or--logfile=syslog--logtelegramsโ log the contents of the telegrams for easy replay--logtimestamps=<when>โ add timestamps to log entries:never/always/important--meterfiles=<dir>โ store meter readings indir--meterfilesaction=(overwrite|append)โ overwrite or append to the meter readings file--meterfilesnaming=(name|id|name-id)โ the meter file is the meter's: name, id or name-id--meterfilestimestamp=(never|day|hour|minute|micros)โ the meter file is suffixed with a timestamp (localtime) with the given resolution.--nodeviceexitโ if no wmbus devices are found, then exit immediately--normalโ for normal logging--oneshotโ wait for an update from each meter, then quit โ๏ธ--overridedevice=<device>โ override device in config files. can only be used in combination with--useconfig=option--pollinterval=<interval>โ poll mbus meters every<interval>, default is10m.--ppjsonโ pretty print the json output โจ--resetafter=<time>โ reset the wmbus dongle regularly, default is23h--selectfields=id,timestamp,total_m3โ select only these fields to be printed (--listfields=<meter>to list available fields)--separator=<c>โ change field separator toc--shell=<cmdline>โ invokescmdlinewith env variables containing the latest reading ๐--silentโ do not print informational messages nor warnings ๐คซ--traceโ for tons of information--useconfig=<dir>โ load config<dir>/wmbusmeters.confand meters from<dir>/wmbusmeters.d--usestderrโ write notices/debug/verbose and other logging output to stderr (the default)--usestdoutforloggingโ write debug/verbose and logging output to stdout--verboseโ for more information ๐ฃ๏ธ--versionโ print version
๐ DEVICES ๐
auto:c1โ detect any serially connected wmbus dongles andrtl_sdrdongles and configure them for c1 mode.- use
autoto detect your dongle when testing, but then in production, state explicitly the dongle you are using. this will significantly reduce the amount of probing done on the serial ports. (ngl, do this, bestie ๐ซถ)
- use
im871a:t1โ look for an im871a dongle attached to any of the serial ttys and configure it for t1 mode.im871a[12345678]:t1โ look for the im871a dongle with this particular id./dev/ttyUSB0:amb8465:c1,t1โ expect an amb8465 on this tty.rtlwmbusโ use software defined radiortl_sdr|rtl_wmbusto receive wmbus telegrams. this defaults to868.95MHz, use for examplertlwmbus:868.9Mto tune thertl_sdrdongle to slightly lower frequency. ๐กrtlwmbus[alfa]:433M:c1,t1rtlwmbus[beta]:868.9M:c1,t1โ use two rtlsdr dongles, one has its id set to alfa (usingrtl_eeprom) and the other set to beta. alfa has an antenna tuned for433M, beta has an antenna suitable for868.9M. two dongles, two vibes ๐/dev/ttyUSB0:9600โ read serial data from tty at9600bps, expects raw wmbus frames with the DLL crcs removed.MAIN=/dev/ttyUSB0:mbus:2400โ expect an serial to mbus master converter onttyUSB0.stdin:rawttyโ read binary telegrams (without dll crc:s) from stdin.filename:rawttyโ read binary telegrams from the file.stdin:hexโ decode any hex found on stdin, non-hex characters are ignored.stdin:rtlwmbusโ read rtlwmbus formatted data from stdin.myfile.txt:rtlwmbusโ read rtlwmbus formatted data from this file instead.simulation_xxx.txtโ read telegrams from file to replay telegram feed (use--logtelegramsto acquire feed for replay) ๐ฌ2e441122334455667788โ decode the given hex string, the hex string must have only hex digits or underscores.
๐ METER QUADRUPLES ๐
meter_nameโ a mnemonic for your utility metermeter_typeโ for examplemultical21:t1(suffix means that we expect this meter to transmit t1 telegrams) the driverautocan be used, but is not recommended for production.meter_idโ one or more addresses separated with commas, a single'*'wildcard, or a prefix'76543*'with wildcard. you can as a suffix fully or partially specify manufacturer, version and type:12345678.M=KAM.V=1b.T=16you can usep0top250to specify an mbus primary address. you can filter out telegrams:76543*,!76543210๐ต๏ธmeter_keyโ a unique key for the meter, if meter telegrams are not encrypted, you must supply an empty key:""
โญ EXAMPLES โญ
wait for wmbus dongles to be inserted and then listen for c1 telegrams. print a summary of the telegram and whether wmbusmeters has a driver for decoding it.
% wmbusmeters auto:c1
listen to C1 traffic using an im871a dongle attached to some tty.
% wmbusmeters im871a:c1
the im871a dongles have an id number that is printed when the dongle is started. you can use this to specify which dongle to use for which linkmode.
% wmbusmeters im871a[12345678]:c1 im871a[22334455]:t1
listen to both T1 and C1 traffic using rtl_sdr|rtl_wmbus and the standard frequency 868.95M, which might need tweaking depending on the rtl_sdr dongle you are using.
% wmbusmeters rtlwmbus:868.95M
you can identify rtlsdr dongles this way as well. the id of the rtlsdr dongle is set using rtl_eeprom. assuming you want to listen to multiple frequencies, one dongle has one type of antenna attached.
% wmbusmeters rtlwmbus[alfa]:433M:t1 rtlwmbus[beta]:868.9M:c1
you can query an mbus meter:
% wmbusmeters MAIN=/dev/ttyUSB0:mbus:2400 MyTempMeter piigth:MAIN:mbus 12001932 NOKEY
execute using config file /home/me/etc/wmbusmeters.conf and meter config files in /home/me/etc/wmbusmeters.d
% wmbusmeters --useconfig=/home/me
start a daemon using config file /etc/wmbusmeters.conf and meter config files in /etc/wmbusmeters.d
% wmbusmetersd --useconfig=/ /var/run/wmbusmeters/wmbusmeters.pid
an example wmbusmeters.conf:
loglevel=normal
device=im871a[12345678]:c1
device=rtlwmbus:433M:c1,t1
logtelegrams=false
format=json
# Remember to remove meterfiles to spare precious flash memory when only
# relaying data using for example mqtt.
meterfiles=/var/lib/wmbusmeters/meter_readings
meterfilesaction=overwrite
meterfilesnaming=name
meterfilestimestamp=day
logfile=/var/log/wmbusmeters/wmbusmeters.log
shell=/usr/bin/mosquitto_pub -h localhost -t "wmbusmeters/$METER_ID" -m "$METER_JSON"
alarmshell=/usr/bin/mosquitto_pub -h localhost -t wmbusmeters_alarm -m "$ALARM_TYPE $ALARM_MESSAGE"
alarmtimeout=1h
alarmexpectedactivity=mon-sun(00-23)
ignoreduplicates=false
field_address=MyStreet 5
an example wmbusmeters.d file:
name=MyTapWater
driver=multical21:c1
id=12345678
key=001122334455667788AABBCCDDEEFF
field_floor=4
you can use the driver auto, but it is not recommended for production. the auto driver might change over time to better versions of the driver with new names, whereas a fixed driver name should generate backwards compatible json. ๐
fr fr bestie, pin your driver name in prod. the auto driver is a โจsurpriseโจ and surprises in production are not the cute kind ๐
๐ AUTHOR ๐
written by Fredrik รhrstrรถm. ๐
๐ COPYRIGHT ๐
copyright ยฉ 2017-2022 Fredrik รhrstrรถm.
license GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
this is free software: you are free to change and redistribute it. there is NO WARRANTY, to the extent permitted by law.
and that's the whole page, bestie!! ๐ฆ this was the WMBUSMETERS(1) manual page from the General Commands Manual โ go forth and decode some telegrams, you absolute icon ๐โจ๐
๐ฆ where this page comes from
- fedora 43: wmbusmeters 1.19.0-2.fc43 ยท GPL-3.0-or-later
- fedora 44: wmbusmeters 1.20.0-1.fc44 ยท GPL-3.0-or-later
- ubuntu resolute: wmbusmeters 1.20.0-1 ยท GPL-3.0-or-later
- ubuntu stonking: wmbusmeters 2.0.0-2 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms