Change default location of meter_readings from /var/log/wmbusmeters to /var/lib/wmbusmeters.

pull/540/head
Fredrik Öhrström 2022-04-30 10:41:45 +02:00
rodzic 368fe7a823
commit b34d53c65f
7 zmienionych plików z 23 dodań i 15 usunięć

Wyświetl plik

@ -1,4 +1,9 @@
ATTENTION! The default location of the meter_readings directory has changed
from /var/log/wmbusmeters/meter_readings to /var/lib/wmbusmeters/meter_readings
This only affects new installations. Existing conf files will use the old location
as specified int the conf file.
Add detection of bad CUL firmware.
Using :mbus as suffix to the meter driver now works to poll a meter of mbus instead of

Wyświetl plik

@ -133,7 +133,7 @@ device=auto:c1
donotprobe=/dev/ttyACM2
logtelegrams=false
format=json
meterfiles=/var/log/wmbusmeters/meter_readings
meterfiles=/var/lib/wmbusmeters/meter_readings
meterfilesaction=overwrite
meterfilesnaming=name
meterfilestimestamp=day
@ -165,7 +165,7 @@ exists inside the same directory as the wmbusmeters executable. If not you will
error message `(rtlwmbus) error: when starting as daemon, wmbusmeters looked for .../rtl_wmbus and /usr/bin/rtl_wmbus, but found neither!`
and the daemon will refuse to start.)
The latest reading of the meter can also be found here: `/var/log/wmbusmeters/meter_readings/MyTapWater`
The latest reading of the meter can also be found here: `/var/lib/wmbusmeters/meter_readings/MyTapWater`
You can use several ids using `id=1111111,2222222,3333333` or you can listen to all
meters of a certain type `id=*` or you can suffix with star `id=8765*` to match
@ -745,7 +745,7 @@ Binary generated: `./build_arm_debug/wmbusmeters`
creates these directories:
`/etc/wmbusmeters.d`
`/var/log/wmbusmeters/meter_readings`
`/var/lib/wmbusmeters/meter_readings`
and adds the user `wmbusmeters` with no login account.

Wyświetl plik

@ -13,7 +13,7 @@ loglevel=debug
device=/dev/ttyUSB0:t1
logtelegrams=true
format=json
meterfiles=/var/log/wmbusmeters/meter_readings
meterfiles=/var/lib/wmbusmeters/meter_readings
meterfilesaction=overwrite
meterfilesnaming=name-id
logfile=/var/log/wmbusmeters/wmbusmeters.log

Wyświetl plik

@ -12,10 +12,11 @@ then
mkdir -p "$ROOT"/etc/
cat <<EOF > "$ROOT"/etc/wmbusmeters.conf
loglevel=normal
# Remember to change auto here to the device you are going to use in production.
device=auto:t1
logtelegrams=false
format=json
meterfiles=/var/log/wmbusmeters/meter_readings
meterfiles=/var/lib/wmbusmeters/meter_readings
meterfilesaction=overwrite
logfile=/var/log/wmbusmeters/wmbusmeters.log
EOF

Wyświetl plik

@ -52,7 +52,7 @@ RestartSec=1
# Run ExecStartPre with root-permissions
PermissionsStartOnly=true
ExecStartPre=-/bin/mkdir -p /var/log/wmbusmeters/meter_readings
ExecStartPre=-/bin/mkdir -p /var/lib/wmbusmeters/meter_readings
ExecStartPre=/bin/chown -R wmbusmeters:wmbusmeters /var/log/wmbusmeters
ExecStartPre=-/bin/mkdir -p /run/wmbusmeters
ExecStartPre=/bin/chown -R wmbusmeters:wmbusmeters /run/wmbusmeters

Wyświetl plik

@ -3,17 +3,17 @@
####################################################################
##
## Prepare for /var/log/wmbusmeters and /var/log/wmbusmeters/meter_readings
## Prepare for /var/log/wmbusmeters and /var/lib/wmbusmeters/meter_readings
##
if [ ! -d "$ROOT"/var/log/wmbusmeters/meter_readings ]
if [ ! -d "$ROOT"/var/lib/wmbusmeters/meter_readings ]
then
# Create the log directories
mkdir -p "$ROOT"/var/log/wmbusmeters/meter_readings
chown -R wmbusmeters:wmbusmeters "$ROOT"/var/log/wmbusmeters
echo "log: created $ROOT/var/log/wmbusmeters/meter_readings"
mkdir -p "$ROOT"/var/lib/wmbusmeters/meter_readings
chown -R wmbusmeters:wmbusmeters "$ROOT"/var/lib/wmbusmeters
echo "log: created $ROOT/var/lib/wmbusmeters/meter_readings"
else
echo "log: $ROOT/var/log/wmbusmeters/meter_readings unchanged"
echo "log: $ROOT/var/lib/wmbusmeters/meter_readings unchanged"
fi
####################################################################

Wyświetl plik

@ -119,7 +119,9 @@ Add :verbose to any analyze to get more verbose analyze output.
.SH DEVICES
.TP
\fBauto:c1\fR detect any serially connected wmbus dongles and rtl_sdr dongles and configure them for c1 mode. Always try to use auto first.
\fBauto:c1\fR detect any serially connected wmbus dongles and rtl_sdr dongles and configure them for c1 mode.
Use auto to detect your dongle when testing, but then in production, state explicitly the dongle you are using.
This will reduce the amount of probing done on the serial ports.
.TP
\fBim871a:t1\fR look for an im871a dongle attached to any of the serial ttys and configure it for t1 mode.
@ -214,9 +216,9 @@ device=im871a[12345678]:c1
device=rtlwmbus:433M:c1,t1
logtelegrams=false
format=json
# Remove meterfiles to spare precious flash memory when only
# Remember to remove meterfiles to spare precious flash memory when only
# relaying data using for example mqtt.
meterfiles=/var/log/wmbusmeters/meter_readings
meterfiles=/var/lib/wmbusmeters/meter_readings
meterfilesaction=overwrite
meterfilesnaming=name
meterfilestimestamp=day