NEWS
Adapter WM-Bus / Kampstrup Multical 21
-
Ich habe jetzt nochmal eine jungfräuliche SD Karte genommen, ein neues Image installiert
pi@raspberrypi:~ $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
mosqutto installiert
sudo apt-get install mosquitto
pi@raspberrypi:~ $ apt policy mosquitto mosquitto: Installiert: 1.5.7-1+deb10u1 Installationskandidat: 1.5.7-1+deb10u1 Versionstabelle: *** 1.5.7-1+deb10u1 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages 100 /var/lib/dpkg/status
und den wmbusmeters aus den Quellen installiert
pi@raspberrypi:~ $ more /etc/wmbusmeters.conf loglevel=debug device=/dev/ttyUSB0:im871a:t1 logtelegrams=true format=json meterfiles=/var/log/wmbusmeters/meter_readings meterfilesaction=append meterfilesnaming=name meterfilestimestamp=day logfile=/var/log/wmbusmeters/wmbusmeters.log shell=/usr/local/bin/mosquitto_pub -d -h localhost -t wmbusmeters/$METER_ID -m "$METER_JSON" alarmshell=/usr/local/bin/mosquitto_pub -d -h localhost -t wmbusmeters_alarm -m "$ALARM_TYPE $ALARM_MESSAGE" alarmtimeout=1h alarmexpectedactivity=mon-sun(00-23)
pi@raspberrypi:~ $ more /etc/wmbusmeters.d/MyTapWater name=MyTapWater type=multical21 id=57813696 key=E4E7EAF6FD17EAFB9587BC2996783C63
pi@raspberrypi:~ $ sudo systemctl status wmbusmeters ● wmbusmeters.service - "wmbusmeters service" Loaded: loaded (/lib/systemd/system/wmbusmeters.service; disabled; vendor preset: enabled) Active: active (running) since Sat 2021-07-17 16:14:49 CEST; 9min ago Docs: https://github.com/weetmuts/wmbusmeters man:wmbusmeters(1) Process: 2774 ExecStartPre=/bin/mkdir -p /var/log/wmbusmeters/meter_readings (code=exited, status=0/SUCCESS) Process: 2775 ExecStartPre=/bin/chown -R wmbusmeters:wmbusmeters /var/log/wmbusmeters (code=exited, status=0/SUCCESS) Process: 2776 ExecStartPre=/bin/mkdir -p /run/wmbusmeters (code=exited, status=0/SUCCESS) Process: 2777 ExecStartPre=/bin/chown -R wmbusmeters:wmbusmeters /run/wmbusmeters (code=exited, status=0/SUCCESS) Process: 2778 ExecStart=/usr/sbin/wmbusmetersd /run/wmbusmeters/wmbusmeters.pid (code=exited, status=0/SUCCESS) Main PID: 2779 (wmbusmetersd) Tasks: 3 (limit: 4915) CGroup: /system.slice/wmbusmeters.service └─2779 /usr/sbin/wmbusmetersd /run/wmbusmeters/wmbusmeters.pid Jul 17 16:14:49 raspberrypi wmbusmetersd[2779]: (config) "alarmshell" "/usr/local/bin/mosquitto_pub -d -h localhost -t w Jul 17 16:14:49 raspberrypi wmbusmetersd[2779]: (config) "alarmtimeout" "1h" Jul 17 16:14:49 raspberrypi wmbusmetersd[2779]: (config) "alarmexpectedactivity" "mon-sun(00-23)" Jul 17 16:14:49 raspberrypi wmbusmetersd[2779]: (config) "" "" Jul 17 16:14:49 raspberrypi wmbusmetersd[2779]: (config) loading meter file /etc/wmbusmeters.d/MyTapWater Jul 17 16:14:49 raspberrypi wmbusmetersd[2779]: (config) name=MyTapWater Jul 17 16:14:49 raspberrypi wmbusmetersd[2779]: (config) type=multical21 Jul 17 16:14:49 raspberrypi wmbusmetersd[2779]: (config) id=57813696 Jul 17 16:14:49 raspberrypi wmbusmetersd[2779]: (config) key=<notprinted> Jul 17 16:14:49 raspberrypi wmbusmetersd[2779]: (wmbusmeters) using log file /var/log/wmbusmeters/wmbusmeters.log pi@raspberrypi:~ $
pi@raspberrypi:~ $ more /var/log/wmbusmeters/wmbusmeters.log (serial) stopping manager (serial) EVENT thread interrupted (serial) event loop stopped! (serial) TIMER thread interrupted (wmbusmeters) shutting down (wmbusmeters) logging started 2021-07-17 16:31:43 using _ (wmbusmeters) version: _ (config) store meter files in: "/var/log/wmbusmeters/meter_readings" (config) using device: /dev/ttyUSB0:im871a:t1 (config) number of meters: 1 [2021-07-17_16:31:43] [ALARM SpecifiedDeviceNotFound] the device /dev/ttyUSB0:im871a:t1 is not working (shell) exec "/bin/sh" (shell) arg "-c" (shell) arg "/usr/local/bin/mosquitto_pub -d -h localhost -t wmbusmeters_alarm -m "$ALARM_TYPE $ALARM_MESSAGE"" (shell) env "ALARM_TYPE=SpecifiedDeviceNotFound" (shell) env "ALARM_MESSAGE=[ALARM SpecifiedDeviceNotFound] the device /dev/ttyUSB0:im871a:t1 is not working" (shell) waiting for child 7033 to complete. (shell) /bin/sh: return code 127 [2021-07-17_16:31:44] (shell) /bin/sh exited with non-zero return code: 127 (serial) EVENT thread interrupted No wmbus device detected, waiting for a device to be plugged in. (shell) exec (capture output) "/bin/pidof" (shell) arg "wmbusmetersd" (shell) output: >>>7030 <<< (serial) EVENT thread interrupted (shell) return code 0 (shell) 7035 exited (shell) exec (capture output) "/bin/pidof" (shell) arg "wmbusmeters" (shell) output: >>>652 <<< (serial) EVENT thread interrupted (shell) return code 0 (shell) 7036 exited Notice! Other wmbusmeters (pid 652) is running and it might hog any wmbus devices. (serial) registered regular callback HOT_PLUG_DETECTOR(0) every 2 seconds (wmbusmeters) waiting for telegrams (serial) waiting for stop (serial) EVENT thread interrupted (serial) TIMER thread interrupted [2021-07-17_16:31:46] (memory) rss 2818048 peak 2.68 MiB pi@raspberrypi:~ $
Hier sieht es für mich so aus, als ob der USB Stick nicht erkannt wird. Muss man da evtl. einen Treiber installieren?
pi@raspberrypi:~ $ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family] Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub pi@raspberrypi:~ $ ls -l /dev/serial/by-id insgesamt 0 lrwxrwxrwx 1 root root 13 Jul 17 16:06 usb-Silicon_Labs_WiMOD_iM871A-usb_00919907-if00-port0 -> ../../ttyUSB0 pi@raspberrypi:~ $
-
@wolfgangfb hallo, gibt's die Datei /etc/wmbusmeters.d/MyTapWater, wie oben beschrieben?
-
Ja, habe ich ja mit
more /etc/wmbusmeters.d/MyTapWater
angezeigt, dann muss es sie ja auch geben.
Darin sehe ich aber nichts was mir die Meldung im wmbusmeters.log (DeviceNotFound) erklären würde.Wie sieht den Dein wmbusmeters.log aus?
-
@wolfgangfb sind da auch der Key drin und die Zähler ID?
-
@matze-dev
Das muss in der MyTapWater stehenname=MyTapWater
type=multical21
id=##der Name/ID des Zaehlers ##
key=##hier den Key eintragen - kommt aus der zugeschickten XML-Datei des Wasserversorgers## -
Ja, habe ich doch in meinem Beitrag alles gequoted (incl. Key weil ich nicht denke, dass damit irgend jemand etwas anfangen kann). Fünfter Codeblock.
-
@wolfgangfb ok, habe es gesehen.
-
Ich denke das Entscheidende ist die Zeile
[2021-07-17_16:31:43] [ALARM SpecifiedDeviceNotFound] the device /dev/ttyUSB0:im871a:t1 is not working
aus
more /var/log/wmbusmeters/wmbusmeters.log
Codeblock 7
-
@wolfgangfb ja, das hätte ich auch als nächstes angemerkt.
-
@matze-dev
Muss man da irgendeinen Treiber installieren? -
@wolfgangfb nein, das macht der wmbusmeters. D.h. der ist der Treiber für das Device.
-
@matze-dev gibt's in dem Verzeichnis auch noch Dateien /var/log/wmbusmeters/meter_readings?
-
Das Verzeichnis existiert ist aber leer (was ja auch logisch ist, wenn nichts gelesen werden kann).
-
@wolfgangfb hier gibt's einen Threat
https://github.com/weetmuts/wmbusmeters/issues/286
Ich würde mal in Richtung udev schauen, in meiner alten Version musste ich da noch was machen, die neue Software braucht das wohl nicht mehr. -
@matze-dev Was sagt denn der Befehl:
wmbusmeters --debug auto:t1 MyTapWater auto 57813696 E4E7EAF6FD17EAFB9587BC2996783C63 -
@matze-dev Änderung, die vorher hier abgelegte Installationsanleitung ist heraus genommen, die komplette Doku findet sich weiter unten.
-
pi@raspberrypi:~ $ wmbusmeters --debug auto:t1 MyTapWater auto 57813696 E4E7EAF6FD17EAFB9587BC2996783C63 (wmbusmeters) version: _ (config) number of meters: 1 (main) device /dev/ttyAMA0 not currently used, detect contents... (serial) EVENT thread interrupted (serial) before config: /dev/ttyAMA0 speed(B38400) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serial) after config: /dev/ttyAMA0 speed(B9600) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serialtty) opened /dev/ttyAMA0 fd 3 (detect amb8465) (serial) received binary "" (serial /dev/ttyAMA0) sent "FF0A02008077" (serial /dev/ttyAMA0) sent "FF0A02008077" (serial) EVENT thread interrupted (serial) received binary "" (serial) received binary "" (serialtty) closed /dev/ttyAMA0 (detect amb8465) (amb8465) are you there? no. (serial) EVENT thread interrupted (serial) EVENT thread interrupted (serial) before config: /dev/ttyAMA0 speed(B9600) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serial) after config: /dev/ttyAMA0 speed(B57600) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serialtty) opened /dev/ttyAMA0 fd 3 (detect im871a) (serial) received binary "" (serial /dev/ttyAMA0) sent "A5010F00" (serial) EVENT thread interrupted (serial) received binary "" (im871a/im170a) are you there? no. (serialtty) closed /dev/ttyAMA0 (detect im871a) (serial) EVENT thread interrupted (serial) before config: /dev/ttyAMA0 speed(B57600) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serial) after config: /dev/ttyAMA0 speed(B19200) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serialtty) opened /dev/ttyAMA0 fd 3 (detect rc1180) (serial /dev/ttyAMA0) sent "00" (serial) EVENT thread interrupted (serial) received binary "" (serial /dev/ttyAMA0) sent "30" (serial) EVENT thread interrupted (serial) received binary "" (serialtty) closed /dev/ttyAMA0 (detect rc1180) (rc1180) are you there? no. (serial) EVENT thread interrupted (serial) EVENT thread interrupted (serial) before config: /dev/ttyAMA0 speed(B19200) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serial) after config: /dev/ttyAMA0 speed(B38400) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serialtty) opened /dev/ttyAMA0 fd 3 (detect cul) (serial /dev/ttyAMA0) sent "560A0D" (serial) EVENT thread interrupted (serial) received binary "" (cul) probe response "" (serial /dev/ttyAMA0) sent "560A0D" (serial) EVENT thread interrupted (serial) received binary "" (cul) probe response "" (serial /dev/ttyAMA0) sent "560A0D" (serial) EVENT thread interrupted (serial) received binary "" (cul) probe response "" (serialtty) closed /dev/ttyAMA0 (detect cul) (cul) are you there? no (serial) EVENT thread interrupted (main) ignoring /dev/ttyAMA0, it does not respond as any of the supported wmbus devices. (main) device /dev/ttyUSB0 not currently used, detect contents... (serial) EVENT thread interrupted (serial) EVENT thread interrupted (serial) EVENT thread interrupted (serial) EVENT thread interrupted (main) ignoring /dev/ttyUSB0, it does not respond as any of the supported wmbus devices. No wmbus device detected, waiting for a device to be plugged in. (shell) exec (capture output) "/bin/pidof" (shell) arg "wmbusmetersd" (serial) EVENT thread interrupted (shell) return code 1 (shell) 1824 exited (shell) exec (capture output) "/bin/pidof" (shell) arg "wmbusmeters" (serial) EVENT thread interrupted (shell) return code 0 (shell) 1825 exited Notice! Other wmbusmeters (pid 673) is running and it might hog any wmbus devices. (serial) registered regular callback HOT_PLUG_DETECTOR(0) every 2 seconds (serial) waiting for stop
-
@wolfgangfb schau Dir mal meine hochgeladene Install-Doku an. Vielleicht kommst Du damit weiter.
-
Notice! Other wmbusmeters (pid 673) is running and it might hog any wmbus devices.
-
In wmbusmeters.log steht nichts.
Ich frage mich allerdings, wie ich den "Other wmbusmeters" in den Griff bekommen kann. Da start ständig eine neue Instanz.pi@raspberrypi:/var/log/wmbusmeters/meter_readings $ sudo systemctl stop wmbusmeters pi@raspberrypi:/var/log/wmbusmeters/meter_readings $ ps -aux | grep wmbus root 16817 0.2 0.0 1468 392 ? Ss 21:28 0:00 /snap/wmbusmeters/596/bin/sh /snap/wmbusmeters/596/launcher.sh root 16841 0.2 0.0 23032 1448 ? Sl 21:28 0:00 /snap/wmbusmeters/596/usr/bin/wmbusmeters --useconfig=/var/snap/wmbusmeters/common pi 17054 0.0 0.0 7360 492 pts/0 S+ 21:29 0:00 grep --color=auto wmbus pi@raspberrypi:/var/log/wmbusmeters/meter_readings $ sudo kill -9 16817 pi@raspberrypi:/var/log/wmbusmeters/meter_readings $ ps -aux | grep wmbus root 17125 2.6 0.0 1468 388 ? Ss 21:29 0:00 /snap/wmbusmeters/596/bin/sh /snap/wmbusmeters/596/launcher.sh root 17154 0.5 0.0 22008 1464 ? Sl 21:29 0:00 /snap/wmbusmeters/596/usr/bin/wmbusmeters --useconfig=/var/snap/wmbusmeters/common pi 17170 0.0 0.0 7360 496 pts/0 S+ 21:29 0:00 grep --color=auto wmbus pi@raspberrypi:/var/log/wmbusmeters/meter_readings $ wmbusmeters --debug auto:t1 MyTapWater auto 57813696 E4E7EAF6FD17EAFB9587BC2996783C63 (wmbusmeters) version: _ (config) number of meters: 1 (main) device /dev/ttyAMA0 not currently used, detect contents... (serial) EVENT thread interrupted (serial) before config: /dev/ttyAMA0 speed(B38400) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serial) after config: /dev/ttyAMA0 speed(B9600) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serialtty) opened /dev/ttyAMA0 fd 3 (detect amb8465) (serial) received binary "" (serial /dev/ttyAMA0) sent "FF0A02008077" (serial /dev/ttyAMA0) sent "FF0A02008077" (serial) EVENT thread interrupted (serial) received binary "" (serial) received binary "" (serialtty) closed /dev/ttyAMA0 (detect amb8465) (amb8465) are you there? no. (serial) EVENT thread interrupted (serial) EVENT thread interrupted (serial) before config: /dev/ttyAMA0 speed(B9600) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serial) after config: /dev/ttyAMA0 speed(B57600) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serialtty) opened /dev/ttyAMA0 fd 3 (detect im871a) (serial) received binary "" (serial /dev/ttyAMA0) sent "A5010F00" (serial) EVENT thread interrupted (serial) received binary "0984488448844884" (im871a) checkIM871AFrame "0984488448844884" (im871a) frame does not start with a5 "0984488448844884" (im871a) no a5 found at all, drop frame packet. (im871a/im170a) are you there? no. (serialtty) closed /dev/ttyAMA0 (detect im871a) (serial) EVENT thread interrupted (serial) before config: /dev/ttyAMA0 speed(B57600) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serial) after config: /dev/ttyAMA0 speed(B19200) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serialtty) opened /dev/ttyAMA0 fd 3 (detect rc1180) (serial /dev/ttyAMA0) sent "00" (serial) EVENT thread interrupted (serial) received binary "" (serial /dev/ttyAMA0) sent "30" (serial) EVENT thread interrupted (serial) received binary "" (serialtty) closed /dev/ttyAMA0 (detect rc1180) (rc1180) are you there? no. (serial) EVENT thread interrupted (serial) before config: /dev/ttyAMA0 speed(B19200) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serial) after config: /dev/ttyAMA0 speed(B38400) input() output() control(CLOCAL|CREAD|CSIZE) local() special_chars() modem(DTR|RTS|CTS) (serialtty) opened /dev/ttyAMA0 fd 3 (detect cul) (serial /dev/ttyAMA0) sent "560A0D" (serial) EVENT thread interrupted (serial) received binary "540442205404E2" (cul) probe response "T<04>B T<04><E2>" (serial /dev/ttyAMA0) sent "560A0D" (serial) EVENT thread interrupted (serial) received binary "540442205404E2" (cul) probe response "T<04>B T<04><E2>" (serial /dev/ttyAMA0) sent "560A0D" (serial) EVENT thread interrupted (serial) received binary "540442205404E2" (cul) probe response "T<04>B T<04><E2>" (serialtty) closed /dev/ttyAMA0 (detect cul) (cul) are you there? no (main) ignoring /dev/ttyAMA0, it does not respond as any of the supported wmbus devices. (main) device /dev/ttyUSB0 not currently used, detect contents... (serial) EVENT thread interrupted (serial) EVENT thread interrupted (serial) EVENT thread interrupted (serial) EVENT thread interrupted (main) ignoring /dev/ttyUSB0, it does not respond as any of the supported wmbus devices. No wmbus device detected, waiting for a device to be plugged in. (shell) exec (capture output) "/bin/pidof" (shell) arg "wmbusmetersd" (shell) output: >>><<< (serial) EVENT thread interrupted (shell) return code 1 (shell) 17248 exited (shell) exec (capture output) "/bin/pidof" (shell) arg "wmbusmeters" (serial) EVENT thread interrupted (shell) return code 0 (shell) 17249 exited Notice! Other wmbusmeters (pid 17154) is running and it might hog any wmbus devices. (serial) registered regular callback HOT_PLUG_DETECTOR(0) every 2 seconds (serial) waiting for stop