From 891e3f4228549fbe96cc63265d95f19217ee93bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20=C3=96hrstr=C3=B6m?= Date: Fri, 18 Sep 2020 20:05:59 +0200 Subject: [PATCH] Alarm test work again. --- CHANGES | 26 +++++++++ README.md | 3 + install.sh | 24 +++++--- simulations/simulation_alarm.txt | 2 +- src/admin.cc | 19 ------ src/main.cc | 92 +++++++++++++++++++++++++----- src/serial.cc | 57 ++++++++++++------ src/serial.h | 2 + src/shell.cc | 19 ++++++ src/shell.h | 1 + src/testinternals.cc | 1 + src/timings.h | 6 +- src/wmbus.cc | 79 +++++++++++++++---------- src/wmbus_im871a.cc | 4 +- src/wmbus_rtlwmbus.cc | 5 ++ src/wmbus_simulator.cc | 6 +- src/wmbus_utils.h | 2 - test.sh | 11 ++-- tests/config7/etc/wmbusmeters.conf | 4 +- tests/test_alarm.sh | 14 +++-- 20 files changed, 264 insertions(+), 113 deletions(-) diff --git a/CHANGES b/CHANGES index 6b2c712..a94ac1e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,32 @@ +IMPORTANT CHANGES THAT MIGHT AFFECT YOU! + +** No udev rules + +Wmbusmeters new default behaviour is to NOT exit if no wmbus +device is found. It stays running all the time even if no +wmbus device is detected. As soon as a device is inserted +it will detect/configure and start using the device. + +When reading stdin and files, then wmbusmeters will exit +as soon as there is no more data. + +This means that the udev rules no longer are needed and must be +removed. This will be done automatically by the install script. + +** Use stderr for logging, stdout for data. + +wmbusmeters now uses STDERR as default for info/verbose/debug/trace output. +This will not affect you if you run wmbusmeters as a daemon, +but if you start wmbusmeters yourself you should check where stderr is going. +To use the old style add --usestdoutforlogging. + +** New features + To list the shell envs for a meter do --listenvs=multical21 To list the fields avilable for a meter do --listfields=multical21 +To list all meters do --listmeters +To search for a meter do --listmeters=water or --listmeters=multi Version 0.9.36: 2020-09-08 diff --git a/README.md b/README.md index ee20de3..887de41 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,9 @@ Usage: wmbusmeters {options} {:suffix} ( [meter_name] [meter_type]{: you can use: --addconversions=+ add conversion to these units to json and meter env variables (GJ) + --alarmexpectedactivity=mon-fri(08-17) Specify when the timeout is tested, default is mon-sun(00-23) + --alarmshell= invokes cmdline when an alarm triggers + --alarmtimeout=