1WMBUSMETERS(1)              General Commands Manual             WMBUSMETERS(1)
2
3
4

NAME

6       wmbusmeters  -  listen  to  wireless  mbus  radio traffic and relay the
7       decoded telegrams to other software
8
9

SYNOPSIS

11       wmbusmeters       [options]       <device>{:suffix}       (<meter_name>
12       <meter_type>[:<mode>] <meter_id> meter_key>)*
13
14       wmbusmetersd <pid_file>
15
16

DESCRIPTION

18       Wmbusmeters  acquires  wmbus telegrams, decodes them and relays them to
19       some other software for further processing.  It can for example  listen
20       to    radio    traffic    using    dedicated    wmbus    dongles   like
21       (im871a/amb8465/rfmrx2) or a  generic  software  defined  radio  dongle
22       (rtl_sdr).
23
24       After  the received telegram has been decrypted and parsed, it can then
25       be relayed using a shell command, or stored in a log file.   The  shell
26       commands  can  for  example relay the telegram using MQTT (eg mqtt_pub‐
27       lish) sent to a REST API (eg curl) or store it in a database (eg psql).
28
29

OPTIONS

31       --addconversions=<unit>[,<unit>] add conversion to these units for json
32       and shell envs (GJ,F)
33
34       --debug for a lot of information
35
36       --exitafter=<time> exit program after time, eg 20h, 10m 5s
37
38       --format=(hr|json|fields)  for  human readable, json or semicolon sepa‐
39       rated fields
40
41       --json_xxx=yyy always add "xxx"="yyy" to the json output and add  shell
42       env METER_xxx=yyy
43
44       --listento=<mode> listen to one of the c1,t1,s1,s1m,n1a-n1f link modes.
45
46       --listento=<mode>,<mode>  listen to more than one link mode at the same
47       time, assuming the dongle supports it.
48
49       --c1 --t1 --s1 --s1m --n1a ...  --n1f  listen  to  c1,t1,s1,s1m,n1a-n1f
50       telegrams.
51
52       --logfile=<dir> use this file instead of stdout
53
54       --logtelegrams log the contents of the telegrams for easy replay
55
56       --meterfiles=<dir> store meter readings in dir
57
58       --meterfilesaction=(overwrite|append)  overwrite or append to the meter
59       readings file
60
61       --meterfilesnaming=(name|id|name-id) the meter  file  is  the  meter's:
62       name, id or name-id
63
64       --oneshot wait for an update from each meter, then quit
65
66       --reopenafter=<time>  close/reopen  dongle  connection repeatedly every
67       <time> seconds, eg 60s, 60m, 24h
68
69       --separator=<c> change field separator to c
70
71       --shell=<cmdline> invokes cmdline with  env  variables  containing  the
72       latest reading
73
74       --shellenvs list the env variables available for the meter
75
76       --useconfig=<dir> load config files from dir/etc
77
78       --verbose for more information
79
80

DEVICES

82       /dev/ttyUSB0  to  which an im871a or amb8456 dongle is attached and let
83       wmbusmeters detect the type.
84
85
86       /dev/ttyACM0:rfmrx2 when an rfmrx2 dongle is attached to this tty.
87
88
89       auto look for /dev/im871a,  /dev/amb8465,  /dev/rfmrx2  or  /dev/rtlsdr
90       (these  will  only  show up automatically if the appropriate udev rules
91       have been installed)
92
93
94       rtlwmbus use software defined radio rtl_sdr|rtl_wmbus to receive  wmbus
95       telegrams.This  defaults  to 868.95MHz, use for example rtlwmbus:868.9M
96       to tune the rtl_sdr dongle to slightly lower frequency.
97
98
99       simulation_xxx.txt read telegrams from file  to  replay  telegram  feed
100       (use --logtelegrams to acquire feed for replay)
101
102

METER QUADRUPLES

104       meter_name a mnemonic for your utility meter
105
106       meter_type               multical21/flowiq3100/supercom587/iperl/multi‐
107       cal302/omnipower/qcaloric/apator162/amiplus
108              (Can be suffix with :<mode>, eg apator162:t1 to tell wmbusmeters
109              that  you  expect only t1 telegrams.  This is necessary since an
110              apator162 can be configured to send either c1 or t1 telegrams.)
111
112       meter_id one or more 8 digit numbers separated with  commas,  a  single
113       '*' wildcard, or a prefix '76543*' with wildcard.
114
115       meter_key  a  unique  key  for  the  meter,  if meter telegrams are not
116       encrypted, you must supply an empty key: ""
117
118

EXAMPLES

120       Listen to C1 and T1 traffic using a wmbus dongle attached to ttyUSB0.
121
122              % wmbusmeters --listento=c1,t1 /dev/ttyUSB0:amd8465
123
124
125       Listen to  C1  traffic  and  assume  that  a  wmbus  dongle  is  either
126       /dev/im871a, /dev/amb8465, /dev/rfmrx2 or /dev/rtlsdr
127
128              % wmbusmeters --c1 auto
129
130
131       Listen  to both T1 and C1 traffic using rtl_sdr|rtl_wmbus and the stan‐
132       dard frequency 868.95M, which
133              might need tweaking depending on  the  rtl_sdr  dongle  you  are
134              using.
135
136              % wmbusmeters rtlwmbus:868.95M
137
138
139       Execute  using config file /home/me/etc/wmbusmeters.conf and meter con‐
140       fig files in /home/me/etc/wmbusmeters.d
141
142              % wmbusmeters --useconfig=/home/me
143
144
145       Start a daemon using config file /etc/wmbusmeters.conf and meter config
146       files in /etc/wmbusmeters.d
147
148              %   wmbusmetersd   --useconfig=/   /var/run/wmbusmeters/wmbusme‐
149              ters.pid
150
151
152       An example wmbusmeters.conf:
153
154              loglevel=normal
155              device=auto
156              logtelegrams=false
157              meterfiles=/var/log/wmbusmeters/meter_readings
158              meterfilesaction=overwrite
159              logfile=/var/log/wmbusmeters/wmbusmeters.log
160              shell=/usr/bin/mosquitto_pub -h localhost -t "wmbusmeters/$METER_ID" -m "$METER_JSON"
161              json_address=MyStreet 5
162
163
164       An example wmbusmeters.d file:
165
166              name=MyTapWater
167              type=multical21
168              id=12345678
169              key=001122334455667788AABBCCDDEEFF
170              json_floor=4
171
172

AUTHOR

174       Written by Fredrik Öhrström.
175
176
178       Copyright © 2017-2019 Fredrik Öhrström.
179       License     GPLv3+:     GNU     GPL     version     3     or      later
180       <http://gnu.org/licenses/gpl.html>.
181       This is free software: you are free to change and redistribute it.
182       There is NO WARRANTY, to the extent permitted by law.
183
184
185
186                                                                WMBUSMETERS(1)
Impressum