From 2ce3f33151347e7f62d15bbae904866e4f0aaa6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20=C3=96hrstr=C3=B6m?= Date: Wed, 21 Sep 2022 16:49:51 +0200 Subject: [PATCH] Rename --device= to --overridedevice= --- .gitignore | 1 + CHANGES | 4 +++- README.md | 10 +++++----- src/cmdline.cc | 10 ++++++++-- tests/test_additional_json.sh | 2 +- tests/test_alarm.sh | 2 +- tests/test_config_overrides.sh | 4 ++-- tests/test_meter_extras.sh | 2 +- wmbusmeters.1 | 2 +- 9 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 0a9821a..c59c3af 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ build/ build_debug build_arm/ build_arm_debug/ +packaging/ testaes/ testoutput/ tests_tmp/ diff --git a/CHANGES b/CHANGES index 070dc17..c656f1b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,6 @@ -Version: 1.10.0 2022-09-14 + +Rename option --device=xyz to --overridedevice=xyz and add better error message +if it is used without --useconfig=xyz. --device still works but will eventually be removed. OPTIONAL fields were only printed in the json, if they appeared in the telegram, even if the field had received a value before. Now a field will be printed diff --git a/README.md b/README.md index db47e0b..d1e8e1d 100644 --- a/README.md +++ b/README.md @@ -255,20 +255,20 @@ wmbusmeters --useconfig=/home/me/.config/wmbusmeters If you already have config with a device specified, and you want to use the config with another device. You might have multiple meters in the config -that you want to listen to. Then you can add `--device` to override the settings +that you want to listen to. Then you can add `--overridedevice` to override the settings in the config. Like this: ```shell -wmbusmeters --useconfig=/home/me/.config/wmbusmeters --device=rtlwmbus +wmbusmeters --useconfig=/home/me/.config/wmbusmeters --overridedevice=rtlwmbus ``` -You must have both `--useconfig=` and `--device=` for it to work. +You must have both `--useconfig=` and `--overridedevice=` for it to work. The files/dir should then be located here: `/home/me/.config/wmbusmeters/wmbusmeters.conf` and `/home/me/.config/wmbusmeters/wmbusmeters.d` -The option `--useconfig=` can only be combined with a few other options: `--device= --listento= --exitafter= --oneshot= --silent --normal --verbose --debug --trace` +The option `--useconfig=` can only be combined with a few other options: `--overridedevice= --listento= --exitafter= --oneshot= --silent --normal --verbose --debug --trace` When running using config files then you can trigger a reload of the config files using `sudo killall -HUP wmbusmetersd` or `killall -HUP wmbusmeters` @@ -293,7 +293,7 @@ As {options} you can use: --analyze= Analyze a telegram and use only this driver. --analyze=: Analyze a telegram and use only this driver with this key. --debug for a lot of information - --device= override device in config files. Use only in combination with --useconfig= option + --overridedevice= override device in config files. Use only in combination with --useconfig= option --donotprobe= do not auto-probe this tty. Use multiple times for several ttys or specify "all" for all ttys. --exitafter=