Update man page.

pull/156/head
Fredrik Öhrström 2020-10-24 21:59:16 +02:00
rodzic 23f9a92605
commit 203e90bb7c
4 zmienionych plików z 52 dodań i 19 usunięć

Wyświetl plik

@ -226,7 +226,7 @@ Supported wmbus dongles:
IMST 871a (im871a)
Amber 8465 (amb8465)
CUL family (cul)
Radiocraft (RC1180) work in progress
Radiocraft (RC1180) work in progress only T1 mode
rtl_wmbus (rtlwmbus)
rtl_433 (rtl433)
BMeters RFM-RX2 (rfmrx2)
@ -305,7 +305,9 @@ Received telegram from: 12345678
manufacturer: (KAM) Kamstrup Energi (0x2c2d)
device type: Cold water meter (0x16)
device ver: 0x1b
device driver: multical21
device: im871a[12345678]
rssi: -77 dBm
driver: multical21
```
Now listen to this specific meter.
@ -329,7 +331,7 @@ Example format json output:
`wmbusmeters --format=json /dev/ttyUSB0:im871a MyTapWater multical21 12345678 00112233445566778899AABBCCDDEEFF MyHeater multical302 22222222 00112233445566778899AABBCCDDEEFF`
`{"media":"cold water","meter":"multical21","name":"MyTapWater","id":"12345678","total_m3":6.388,"target_m3":6.377,"max_flow_m3h":0.000,"flow_temperature":8,"external_temperature":23,"current_status":"DRY","time_dry":"22-31 days","time_reversed":"","time_leaking":"","time_bursting":"","timestamp":"2018-02-08T09:07:22Z"}`
`{"media":"cold water","meter":"multical21","name":"MyTapWater","id":"12345678","total_m3":6.388,"target_m3":6.377,"max_flow_m3h":0.000,"flow_temperature":8,"external_temperature":23,"current_status":"DRY","time_dry":"22-31 days","time_reversed":"","time_leaking":"","time_bursting":"","timestamp":"2018-02-08T09:07:22Z","device":"im871a[1234567]","rssi_dbm":-40}`
`{"media":"heat","meter":"multical302","name":"MyHeater","id":"22222222","total_kwh":0.000,"total_volume_m3":0.000,"current_kw":"0.000","timestamp":"2018-02-08T09:07:22Z"}`

Wyświetl plik

@ -101,6 +101,7 @@ int main(int argc, char **argv)
initUI();
clear();
/*
refresh();
int x=0;
int y=0;
@ -113,12 +114,11 @@ int main(int argc, char **argv)
for(;;) {}
endwin();
return 0;
/*
*/
running_as_root_ = detectIfRoot();
member_of_dialout_ = detectIfMemberOfGroup("dialout");
handler = createSerialCommunicationManager(0, 0, false);
handler = createSerialCommunicationManager(0, 0);
initUI();
@ -159,7 +159,6 @@ int main(int argc, char **argv)
break;
}
} while (running);
*/
}
void alwaysOnScreen()

Wyświetl plik

@ -258,6 +258,9 @@ bool handleDevice(Configuration *c, string devicefile)
if (specified_device.type == "auto")
{
c->use_auto_detect = true;
#if defined(__APPLE__) && defined(__MACH__)
error("You cannot use auto on macosx. You must specify the device tty or rtlwmbus.\n");
#endif
}
else
{
@ -270,13 +273,14 @@ bool handleDevice(Configuration *c, string devicefile)
void handleListenTo(Configuration *c, string mode)
{
LinkModeSet lms = parseLinkModes(mode.c_str());
if (lms.bits() == 0) {
if (lms.bits() == 0)
{
error("Unknown link mode \"%s\"!\n", mode.c_str());
}
/* TODO HOW SHOULD THIS BE HANDLED?
if (c->linkmodes_configured) {
error("You have already specified a link mode!\n");
}*/
if (c->linkmodes_configured)
{
error("You have already specified a link mode!\n");
}
c->linkmodes = lms;
c->linkmodes_configured = true;

Wyświetl plik

@ -85,17 +85,33 @@ mqtt_publish) sent to a REST API (eg curl) or store it in a database
.SH DEVICES
.TP
\fB/dev/ttyUSB0\fR to which an im871a,amb8456 or cul dongle is attached and let wmbusmeters detect the type.
\fBauto:c1\fR detect any serially connected wmbus dongles and rtl_sdr dongles and configure them for c1 mode. (You do not need to use --c1 or --listento=c1 when suffixing the device with the linkmode.) Always try to use auto first.
.TP
\fB/dev/ttyACM0:rfmrx2\fR when an rfmrx2 dongle is attached to this tty.
\fBim871a:t1\fR look for an im871a dongle attached to any of the serial ttys and configure it for t1 mode.
.TP
\fBauto\fR detect any serially connected wmbus dongles and rtl_sdr dongles.
\fBim871a[12345678]:t1\fR look for the im871a dongle with this particular id.
.TP
\fB/dev/ttyUSB0:9600\fR read serial data from tty at 9600 bps, expects raw wmbus frames with the DLL crcs removed.
.TP
\fB/dev/ttyUSB0:amb8465:c1,t1\fR expect an amb8465 on this tty.
.TP
\fBrtlwmbus\fR use software defined radio rtl_sdr|rtl_wmbus to receive wmbus telegrams.This defaults to 868.95MHz, use for example \fBrtlwmbus:868.9M\fR to tune the rtl_sdr dongle to slightly lower frequency.
.TP
\fBrtlwmbus[alfa]:433M:c1,t1 rtlwmbus[beta]:868.9M:c1,t1\fR Use two rtlsdr dongles, one has its id set to alfa (using rtl_eeprom)
and the other set to beta. Alfa has an antenna tuned for 433M, beta has an antenna suitable for 868.9M.
.TP
\fBstdin:rtlwmbus\fR read rtlwmbus formatted data from stdin.
.TP
\fBmyfile.txt:rtlwmbus\fR read rtlwmbus formatted data from this file instead.
.TP
\fBsimulation_xxx.txt\fR read telegrams from file to replay telegram feed (use --logtelegrams to acquire feed for replay)
@ -116,11 +132,16 @@ mqtt_publish) sent to a REST API (eg curl) or store it in a database
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 --c1 auto
% wmbusmeters auto:c1
Listen to C1 and T1 traffic using a wmbus dongle attached to ttyUSB0.
Listen to C1 traffic using an im871a dongle attached to some tty.
% wmbusmeters --listento=c1,t1 /dev/ttyUSB0:amd8465
% 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
.TP
Listen to both T1 and C1 traffic using rtl_sdr|rtl_wmbus and the standard frequency 868.95M, which
@ -128,6 +149,12 @@ 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
.TP
Execute using config file /home/me/etc/wmbusmeters.conf and meter config files in /home/me/etc/wmbusmeters.d
@ -143,7 +170,8 @@ An example wmbusmeters.conf:
.nf
loglevel=normal
device=/dev/ttyUSB0:im871a:c1
device=im871a[12345678]:c1
device=rtlwmbus:433M:c1,t1
logtelegrams=false
meterfiles=/var/log/wmbusmeters/meter_readings
meterfilesaction=overwrite