Plötzlich keine Verbindung mehr zum OWServer

Begonnen von efyzz, 12 Januar 2024, 23:45:58

Vorheriges Thema - Nächstes Thema

efyzz

Moin,

ich hatte nun seit einigen Wochen erfolgreich DS1820 Sensoren über den OWServer in FHEM eingelesen.

Gestern habe ich mit meinem Raspberry ein apt upgrade durchgeführt und nun verbindet sich FHEM scheinbar nicht mehr mit dem OWServer.

Auf das Webinterface des OWServer auf Port 2121 kann ich zugreifen und sehe dort auch, dass die Temperaturen aktualisiert werden. Aber in FHEM kommen keine Temperaturen mehr an. Das Device steht auf Initialized.


Hier die Definition in FHEM:
defmod owServer OWServer localhost:4304
attr owServer room Heizungskeller,OWDevice

Und hier die /etc/owfs.conf:

# Sample configuration file for the OWFS suite for Debian GNU/Linux.
#
#
# This is the main OWFS configuration file. You should read the
# owfs.conf(5) manual page in order to understand the options listed
# here.

######################## SOURCES ########################
#
# With this setup, any client (but owserver) uses owserver on the
# local machine...
! server: server = localhost:4304
#
# ...and owserver uses the real hardware, by default fake devices
# This part must be changed on real installation
#server: FAKE = DS18S20,DS2405
#
# USB device: DS9490
#server: usb = all
#
# Serial port: DS9097
#server: device = /dev/ttyDS1820
server: passive = /dev/ttyDS1820
#
# owserver tcp address
#server: server = 192.168.1.9:3131
#
# random simulated device
#server: FAKE = DS18S20,DS2405
#
######################### OWFS ##########################
#
#mountpoint = /mnt/1wire
#allow_other
#
####################### OWHTTPD #########################

http: port = 2121

####################### OWFTPD ##########################

ftp: port = 2120

####################### OWSERVER ########################

server: port = localhost:4304


Echt merkwürdig, dass es seit dem Upgrade plötzlich nicht mehr geht. An FHEM habe ich nichts relevantes geändert ... Jemand eine Idee dazu?

Vielen Dank im Voraus!
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

Dr. Boris Neubert

Hi,

ich tippe auf ein Problem mit der Library. In der Commandref zu OWServer gibt es Hinweise auf den Einsatz der richtigen ow*-Pakete unter Debian.

Viele Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

efyzz

Hallo Boris,

vielen Dank für den Hinweis! Ich nehme an, ich müsste jetzt die entsprechende ownet.pm in die FHEM/lib kopieren, wie Du es hier beschrieben hast:
https://forum.fhem.de/index.php?topic=85542.msg784834#msg784834

Aber wie finde ich raus, welche Version ich brauche und wo kriege ich die her? Google wollte es mir bisher nicht sagen ... Außer, dass das Projekt wohl nach Github umgezogen ist:
https://github.com/owfs/owfs/blob/master/module/ownet/perl5/OWNet/lib/OWNet.pm

Aber da steht auch nichts von Version.  ???

Nochmals danke!
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

Dr. Boris Neubert

Du könntest es mit dieser Version von OWNet.pm versuchen:

https://github.com/owfs/owfs/blob/master/module/ownet/perl5/OWNet/lib/OWNet.pm

Die ist seit 3 Jahren nicht mehr angepasst worden. Vielleicht läuft sie mit dem bei Dir installierten owserver. Welche Version hat denn das owserver-Paket in Deiner Raspbian-Installation?
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

efyzz

#4
Das war ja genau mein Problem, dass ich nicht wusste, wie ich die Version rauskriege  ;D
Aber nun:
$ dpkg -l

ii  ow-shell                            3.2p4+dfsg1-4.1+b1              arm64        shell utilities to talk to an 1-Wire owserver
ii  owfs                                3.2p4+dfsg1-4.1                  all          Dallas 1-wire support
ii  owfs-common                          3.2p4+dfsg1-4.1                  all          common files used by any of the OWFS programs
ii  owfs-fuse                            3.2p4+dfsg1-4.1+b1              arm64        1-Wire filesystem
ii  owftpd                              3.2p4+dfsg1-4.1+b1              arm64        FTP daemon providing access to 1-Wire networks
ii  owhttpd                              3.2p4+dfsg1-4.1+b1              arm64        HTTP daemon providing access to 1-Wire networks
ii  owserver                            3.2p4+dfsg1-4.1+b1              arm64        Backend server for 1-Wire control

Also habe ich die OWNet.pm von Github nach /opt/fhem/FHEM/lib/OWNet-3.2p4.pm kopiert (und natürlich chown auf fhem:dialout).

Aber es funktioniert trotzdem nicht und in FHEM wird immer noch die alte Version 3.1p5 angezeigt:
Internals
DEF localhost:4304
FUUID 656115ec-f33f-6f7b-2c7c-046c2fb2ddd5957a
LAST_READ_FAILED 0
NAME owServer
NOTIFYDEV global
NR 684
NTFY_ORDER 50a-owServer
OWNET_VERSION 3.1p5
STATE Initialized
TYPE OWServer
eventCount 2

Übrigens steht im fhem.log bei einem set owServer reopen:
2024.01.13 20:23:36 3: owServer: Opening connection to OWServer localhost:4304...
2024.01.13 20:23:36 3: owServer: Successfully connected to localhost:4304.
::)

Die ist seit 3 Jahren nicht mehr angepasst worden.Das hat mich auch irritiert. Ich habe meinen Rapsberry im November komplett neu mit Bookworm aufgesetzt und dann auch OWServer eingerichtet. Seitdem lief es. Und nun, bei einem Update nur 2 Monate später, geht nichts mehr.


Möglicherweise liegt die Wurzel des Problems aber auch ganz woanders (obwohl das für mich keinen Sinn ergibt):

Ich bin auf das Problem überhaupt erst aufmerksam geworden, weil ich gesehen habe, dass owserver beim Booten mehrere Versuche braucht, um zu starten. Im Moment läuft er sogar direkt nach einem Reboot erst mal gar nicht:

$ sudo service owserver status
× owserver.service - Backend server for 1-wire control
    Loaded: loaded (/lib/systemd/system/owserver.service; enabled; preset: enabled)
    Active: failed (Result: exit-code) since Sat 2024-01-13 21:04:34 CET; 1min 7s ago
TriggeredBy: × owserver.socket
      Docs: man:owserver(1)
    Process: 646 ExecStart=/usr/bin/owserver --foreground -c /etc/owfs.conf (code=exited, status=1/FAILURE)
  Main PID: 646 (code=exited, status=1/FAILURE)
        CPU: 66ms

Jan 13 21:04:34 raspberryFHEM systemd[1]: owserver.service: Scheduled restart job, restart counter is at 5.
Jan 13 21:04:34 raspberryFHEM systemd[1]: Stopped owserver.service - Backend server for 1-wire control.
Jan 13 21:04:34 raspberryFHEM systemd[1]: owserver.service: Start request repeated too quickly.
Jan 13 21:04:34 raspberryFHEM systemd[1]: owserver.service: Failed with result 'exit-code'.
Jan 13 21:04:34 raspberryFHEM systemd[1]: Failed to start owserver.service - Backend server for 1-wire control.

Manuell lässt er sich dann aber starten:
$ sudo service owserver start
$ sudo service owserver status
● owserver.service - Backend server for 1-wire control
    Loaded: loaded (/lib/systemd/system/owserver.service; enabled; preset: enabled)
    Active: active (running) since Sat 2024-01-13 21:09:06 CET; 4s ago
TriggeredBy: × owserver.socket
      Docs: man:owserver(1)
  Main PID: 1408 (owserver)
      Tasks: 3 (limit: 765)
        CPU: 52ms
    CGroup: /system.slice/owserver.service
            └─1408 /usr/bin/owserver --foreground -c /etc/owfs.conf

Jan 13 21:09:06 raspberryFHEM systemd[1]: Starting owserver.service - Backend server for 1-wire control...
Jan 13 21:09:06 raspberryFHEM systemd[1]: Started owserver.service - Backend server for 1-wire control.

Dasselbe gilt für owhttpd.


Warum starten owserver und owhttp nicht erfolgreich beim Booten, lassen sich aber manuell starten?

Und gibt es außer den beiden vielleicht noch einen weiteren Service, der laufen muss?


Nochmals danke!
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

Dr. Boris Neubert

Zitat von: efyzz am 13 Januar 2024, 21:32:43Übrigens steht im fhem.log bei einem set owServer reopen:
2024.01.13 20:23:36 3: owServer: Opening connection to OWServer localhost:4304...
2024.01.13 20:23:36 3: owServer: Successfully connected to localhost:4304.

Das ist erstmal gut. Außer owserver muss für FHEM nichts laufen. Ich bleibe mal bei dem FHEM-Problem.

Die heruntergeladenen OWNet.pm muss als OWNet-3.2p4.pm in den Ordner FHEM/lib (da wo die beiden anderen schon sind).

Die Versionsnummer dann im define angeben, Beispiel:

define myOWServer OWServer raspi:4304 3.2p4
3.2p4 ist geraten. Du kannst auch einen anderen String im Namen des OWNet-Moduls und im Define verwenden.

Interessant wäre dann noch der Teil des FHEM-Logs, der beim Laden des OWServer-Moduls geschrieben wird.

Eine weitere Fehlerquelle ist üblicherweise noch /etc/owfs.conf, die ziehmlich genauso aussehen soll wie in der Commandref. Wenn die aber nicht verändert wurde (prüfen! vielleicht versehentlich beim Update überschrieben) und es vor dem Update lief, scheidet diese Fehlerquelle aus.
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

efyzz

Nabend,

ZitatDie heruntergeladenen OWNet.pm muss als OWNet-3.2p4.pm in den Ordner FHEM/lib (da wo die beiden anderen schon sind).
Genau so habe ich es gemacht:
$ ls -l /opt/fhem/FHEM/lib/
total 3316
-rw-r--r-- 1 fhem dialout  80291 Nov 15  2015 74_AMADautomagicFlows0.8.1.xml
-rw-r--r-- 1 fhem dialout 209958 Dec 12  2016 74_AMADautomagicFlowset_2.6.7.xml
-rw-r--r-- 1 fhem dialout 330219 Sep 15  2018 74_AMADautomagicFlowset_4.2.3.xml
-rw-r--r-- 1 fhem dialout 334539 Nov 12  2019 74_AMADautomagicFlowset_4.4.3.xml
-rw-r--r-- 1 fhem dialout 410988 Sep 15  2018 74_AMADtaskerset_4.2.3.prj.xml
-rw-r--r-- 1 fhem dialout 465967 Nov 12  2019 74_AMADtaskerset_4.4.3.prj.xml
drwxr-xr-x 2 fhem dialout   4096 Apr 16  2021 AttrTemplate
drwxr-xr-x 4 fhem dialout   4096 Dec 12  2016 Device
drwxr-xr-x 2 fhem dialout   4096 Nov 19 20:09 EnOcean
-rw-r--r-- 1 fhem dialout   9355 Sep 15  2018 EnO_ReCom_Device_Descr.xml
-rw-r--r-- 1 fhem dialout  45332 Dec 24 20:09 fhem_zwave_deviceconfig.xml.gz
-rw-r--r-- 1 fhem dialout  11604 Nov 15  2015 LiquidCrystal.pm
drwxr-xr-x 3 fhem dialout   4096 Dec 12  2016 MP3
drwxr-xr-x 3 fhem dialout   4096 Dec 12  2016 Net
-rw-r--r-- 1 fhem dialout 730362 Nov 19 21:16 openzwave_deviceconfig.xml.gz
-rw-r--r-- 1 fhem dialout 174240 Dec 24 20:09 openzwave_manufacturer_specific.xml
-rw-r--r-- 1 fhem dialout  21353 Sep 15  2018 OWNet-2.8p17.pm
-rw-r--r-- 1 fhem dialout  21474 Sep 15  2018 OWNet-3.1p5.pm
-rw-r--r-- 1 fhem dialout  21448 Jan 13 20:55 OWNet-3.2p4.pm
-rw-r--r-- 1 fhem dialout  21407 Nov 15  2015 OWNet.pm
-rw-r--r-- 1 fhem dialout   6413 Nov 15  2015 ProtoThreads.pm
-rw-r--r-- 1 fhem dialout   1162 Nov 15  2015 README.perl-firmata
-rw-r--r-- 1 fhem dialout 246073 Nov 19 21:16 SD_ProtocolData.pm
-rw-r--r-- 1 fhem dialout  80768 Nov 19 21:16 SD_Protocols.pm
-rw-r--r-- 1 fhem dialout  29754 Nov 19 21:16 SHC_packet_layout.xml
drwxr-xr-x 4 fhem dialout   4096 Dec 12  2016 SWAP
drwxr-xr-x 2 fhem dialout   4096 Sep 15  2018 UPnP
-rw-r--r-- 1 fhem dialout  39700 Apr  9  2023 zwave_alliancelinks.csv.gz
-rw-r--r-- 1 fhem dialout  22473 Sep 15  2018 zwave_pepperlinks.csv.gz

ZitatDie Versionsnummer dann im define angeben
Ach ja, na klar ... ::)

Geht aber trotzdem nicht, er nutzt scheinbar trotzdem noch 3.1p5:
Internals
DEF OWServer localhost:4304 3.2p4
FUUID 656115ec-f33f-6f7b-2c7c-046c2fb2ddd5957a
LAST_READ_FAILED 0
NAME owServer
NOTIFYDEV global
NR 684
NTFY_ORDER 50a-owServer
OWNET_VERSION 3.1p5
STATE Initialized
TYPE OWServer
eventCount 2

ZitatInteressant wäre dann noch der Teil des FHEM-Logs, der beim Laden des OWServer-Moduls geschrieben wird.
Habe mein Device owServer auf Verbose 5 gesetzt und FHEM neu gestartet:
2024.01.14 22:45:39 1: in INITIALIZED
2024.01.14 22:45:39 1: in DEFINED
2024.01.14 22:45:39 3: owServer: Opening connection to OWServer OWServer...
2024.01.14 22:45:39 3: owServer: Successfully connected to OWServer.
2024.01.14 22:45:39 1: PERL WARNING: Use of uninitialized value in split at ./FHEM/10_OWServer.pm line 496.
2024.01.14 22:45:39 0: Featurelevel: 6.2
2024.01.14 22:45:39 0: Server started with 692 defined entities (fhem.pl:28227/2023-11-29 perl:5.036000 os:linux user:fhem pid:141656)

Sieht doch eigentlich ganz gut aus...?

ZitatEine weitere Fehlerquelle ist üblicherweise noch /etc/owfs.conf, die ziehmlich genauso aussehen soll wie in der Commandref
Sollte passen und wurde durch das Update nicht verändert:
# Sample configuration file for the OWFS suite for Debian GNU/Linux.
#
#
# This is the main OWFS configuration file. You should read the
# owfs.conf(5) manual page in order to understand the options listed
# here.

######################## SOURCES ########################
#
# With this setup, any client (but owserver) uses owserver on the
# local machine...
! server: server = localhost:4304
#
# ...and owserver uses the real hardware, by default fake devices
# This part must be changed on real installation
#server: FAKE = DS18S20,DS2405
#
# USB device: DS9490
#server: usb = all
#
# Serial port: DS9097
#server: device = /dev/ttyDS1820
server: passive = /dev/ttyDS1820
#
# owserver tcp address
#server: server = 192.168.1.9:3131
#
# random simulated device
#server: FAKE = DS18S20,DS2405
#
######################### OWFS ##########################
#
#mountpoint = /mnt/1wire
#allow_other
#
####################### OWHTTPD #########################

http: port = 2121

####################### OWFTPD ##########################

ftp: port = 2120

####################### OWSERVER ########################

server: port = localhost:4304
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

Dr. Boris Neubert

Hallo,

ich bräuchte bitte noch den Teil des Logs, wo der define owServer OWServer localhost:4304 3.2p4 protokolliert wird. Da steht was von "Suggesting OWNet version ..." im Protokoll.

Viele Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

efyzz

Hallo Boris,

gern:
2024.01.15 18:46:37 5: Cmd: >define owServer OWServer OWServer localhost:4304 3.2p4<
2024.01.15 18:46:37 5: Loading ./FHEM/10_OWServer.pm
2024.01.15 18:46:37 5: owServer: Suggesting OWNet version localhost:4304 3.2p4
2024.01.15 18:46:37 2: owServer: Suggested OWNet version localhost:4304 3.2p4 not available, falling back to default version 3.1p5
2024.01.15 18:46:37 5: owServer: Loading OWNet version 3.1p5...
2024.01.15 18:46:37 3: owServer: OWNet version 3.1p5 loaded.
2024.01.15 18:46:37 3: owServer: Opening connection to OWServer OWServer...
2024.01.15 18:46:37 3: owServer: Successfully connected to OWServer.
2024.01.15 18:46:37 2: owServer: Could not read owserver version, using OWNet version 3.1p5.
2024.01.15 18:46:37 5: Cmd: >setuuid owServer 656115ec-f33f-6f7b-2c7c-046c2fb2ddd5957a<
2024.01.15 18:46:37 5: Cmd: >attr owServer room Heizungskeller,OWDevice<
2024.01.15 18:46:37 5: Cmd: >attr owServer verbose 5<

Danke nochmal für Deine Zeit!
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

Wernieman

Auffallend:
2024.01.15 18:46:37 2: owServer: Suggested OWNet version localhost:4304 3.2p4 not available, falling back to default version 3.1p5
Was mir da gleich auffällt, welche Berechtigung hat denn eigentlich das "lib"-Verzeichnis?

ls -lhad /opt/fhem/FHEM/lib
Und zur Sicherheit: Liegt FHEM bei Dir wirklich unter /opt/fhem?
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

efyzz

ZitatUnd zur Sicherheit: Liegt FHEM bei Dir wirklich unter /opt/fhem?
Ja.

$ ls -lhad /opt/fhem/FHEM/lib
drwxr-xr-x 9 fhem dialout 4.0K Jan 13 20:55 /opt/fhem/FHEM/lib

Ich habe spasseshalber mal die originale 3.1p5 nach 3.2p5 kopiert, um sicherzustellen, dass die Datei von Github nicht defekt ist. Das Ergebnis ist dasselbe:

2024.01.15 21:23:31 5: owServer: Suggesting OWNet version localhost:4304 3.2p5
2024.01.15 21:23:31 2: owServer: Suggested OWNet version localhost:4304 3.2p5 not available, falling back to default version 3.1p5
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

Dr. Boris Neubert

Ich glaube, wir haben einen Fehler in Zeile 200 von 10_OWServer.pm:

my $filename= $attr{global}{modpath}."/FHEM/lib/OWNet-$v.pm";
Vermutlich geht es schneller, wenn Du es ausprobierst: entferne mal bitte /FHEM aus dem Pfad in Zeile 200, dann FHEM neu starten, und nochmal schauen, ob er OWNet-3.2p4 jetzt findet.
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

efyzz

Hat leider nichts geändert, die Fehlermeldung ist wie gehabt.
2024.01.16 21:48:29 5: owServer: Suggesting OWNet version localhost:4304 3.2p4
2024.01.16 21:48:29 2: owServer: Suggested OWNet version localhost:4304 3.2p4 not available, falling back to default version 3.1p5

Ich habe jetzt auch nochmal die originale 3.1p5 mit der Version von Github überschrieben (und nach dem Test natürlich wieder rückgängig gemacht). Temperaturen sehe ich trotzdem nicht.

Also auch wenn es interessant ist, warum er die Datei nicht findet, mein Problem wird es wohl letztlich nicht lösen. Oder holt er sich die 3.1p5 womöglich ganz woanders her und nicht aus /opt/fhem/FHEM/lib?
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

efyzz

Zitat von: efyzz am 13 Januar 2024, 21:32:43Ich bin auf das Problem überhaupt erst aufmerksam geworden, weil ich gesehen habe, dass owserver beim Booten mehrere Versuche braucht, um zu starten. Im Moment läuft er sogar direkt nach einem Reboot erst mal gar nicht:

$ sudo service owserver status
× owserver.service - Backend server for 1-wire control
    Loaded: loaded (/lib/systemd/system/owserver.service; enabled; preset: enabled)
    Active: failed (Result: exit-code) since Sat 2024-01-13 21:04:34 CET; 1min 7s ago
TriggeredBy: × owserver.socket
      Docs: man:owserver(1)
    Process: 646 ExecStart=/usr/bin/owserver --foreground -c /etc/owfs.conf (code=exited, status=1/FAILURE)
  Main PID: 646 (code=exited, status=1/FAILURE)
        CPU: 66ms

Jan 13 21:04:34 raspberryFHEM systemd[1]: owserver.service: Scheduled restart job, restart counter is at 5.
Jan 13 21:04:34 raspberryFHEM systemd[1]: Stopped owserver.service - Backend server for 1-wire control.
Jan 13 21:04:34 raspberryFHEM systemd[1]: owserver.service: Start request repeated too quickly.
Jan 13 21:04:34 raspberryFHEM systemd[1]: owserver.service: Failed with result 'exit-code'.
Jan 13 21:04:34 raspberryFHEM systemd[1]: Failed to start owserver.service - Backend server for 1-wire control.

Hier bin ich jetzt einen Schritt weiter. Ich habe eine udev rule definiert, die den Symlink "ttyDS1820" anlegt, damit immer das richtige USB-Gerät benutzt wird.

/etc/udev/rules.d/99-usb.rules

KERNELS=="1-1.5", SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="ttyHeizung"
KERNELS=="1-1.3", SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="ttyDS1820"
SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="ttyStromzaehler"

Offensichtlich kann OWserver "ttyDS1820" beim Booten nicht finden, da scheinbar die udev rule noch nicht abgearbeitet wurde. Wenn ich den OWserver stattdessen direkt auf "ttyUSB1" konfiguriere, startet er erfolgreich beim Booten.

Hat jemand eine Idee, wie man den OWserver Dienst erst starten kann, nachdem die udev rule abgearbeitet wurde?
Und warum ändert sich sowas plötzlich, nur weil man ein apt upgrade durchgeführt hat? ???


Hilft übrigens nicht bei dem FHEM-Problem weiter, das ist wie bereits vermutet eine andere Baustelle.
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

Dr. Boris Neubert

Hallo,

zu dem Problem mit dem OWServer in FHEM kann ich tatsächlich nur in der Theorie beitragen, weil ich seit Umzug keine 1-Wire-Geräte mehr betreibe.

Wenn Du die mitgelieferte OWNet-xxx.pm, die FHEM lädt, mit der neuesten überschrieben hast, und diese dann geladen wird, und es immer noch nicht geht, dass kann wohl die neueste OWNet.pm nicht helfen. Warum der Lademechanismus nicht funktioniert, kann ich hier "trocken" testen und das Modul anpassen, wenn erforderlich.

Als nächstes könntest Du es mit einen Downgrade des owserver-Pakets versuchen auf die in der Commandref als funktionierend gekennzeichnete Version. Ich weiß aber nicht, ob das alte Debian-Paket auf Deinem System installierbar ist.

Viele Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

Dr. Boris Neubert

Ich habe versucht, eine Teststellung aufzubauen und die ow*-Pakete unter Debian 11.8 Bullseye mit den Default-Einstellungen installiert. Leider bekomme ich noch nicht einmal den owhttp mit Fake-Devices ans Laufen. owserver läuft, aber die Ports sind nicht erreichbar. Werde erst einmal keine weitere Zeit darauf verwenden, außer jemand hat eine Lösung, wie man den owserver erreichbar machen kann.
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

efyzz

Hallo Boris,

nochmal vielen Dank, dass Du Deine Zeit hier investierst!

ZitatWenn Du die mitgelieferte OWNet-xxx.pm, die FHEM lädt, mit der neuesten überschrieben hast, und diese dann geladen wird
Falls überhaupt irgendwas geladen wird ... Vielleicht kann er die 3.1p5 auch nicht laden?! Oder würde ich das auf jeden Fall im Log sehen (Verbose 5)?

ZitatAls nächstes könntest Du es mit einen Downgrade des owserver-Pakets versuchen auf die in der Commandref als funktionierend gekennzeichnete Version.
Ich beziehe mich mal hierauf, denn da steht ja in etwa dasselbe wie in der Commandref:
https://wiki.fhem.de/wiki/OWServer_%26_OWDevice#Installation_einer_abweichenden_Version_von_OWNet.pm
owfs Pakete installieren -> Zweite Variante

Der Link zu "owfs_2.8p17-1_all.zip" funktioniert leider nicht. Außerdem weiß ich nicht, ob die dann mit meinem USB/UART-Converter funktionieren würde, denn:
ZitatVersion 3.1p0 von owfs lässt sich derzeit für den Raspberry Pi mit USB-Unterstützung nur kompilieren, wenn man einiges in den Make-Files patcht


Außerdem verstehe ich das nicht so recht:
ZitatEine ältere, kompilierte Version für den RaspberryPi kann hier heruntergeladen werden: owfs_2.8p17-1_all.zip

sudo apt-get install automake autoconf autotools-dev gcc g++ libtool libusb-dev fuse-utils libfuse-dev swig python-dev tcl-dev php5-dev
sudo apt-get install git git-buildpackage dh-make quilt php5-cli
git clone [git://git.debian.org/collab-maint/owfs.git git://git.debian.org/collab-maint/owfs.git] git
git-buildpackage -uc -us
cd ..
sudo dpkg -i ./owserver_2.8p7+cvs20110310-1_i386.deb ./libow-2.8-7_2.8p7+cvs20110310-1_i386.deb ./owfs-common_2.8p7+cvs20110310-1_all.deb
sudo dpkg -i ./owhttpd_2.8p7+cvs20110310-1_i386.deb

Hier wird scheinbar die 2.8p7 installiert. Ist das als alternativer Weg zum Download der owfs_2.8p17-1_all.zip zu verstehen?


Also habe ich die 3.1p0 von Github runtergeladen und versucht den Patch anzuwenden. Das kriege ich allerdings nicht hin ...
Ich mache sowas zum ersten Mal, vielleicht mache ich was falsch. Habe die Sourcen mit dem Laptop runtergeladen von dieser Seite (Grüner Button auf "Download zip"):
https://github.com/owfs/owfs/tree/v3.1p0
Dann die Zip auf den Raspberry kopiert und dort entpackt. Darin ist ein Ordner "owfs-3.1p0", der Patch zeigt jedoch auf "owfs-3.1p0_org". Also wie wende ich den Patch richtig an?


Was mich sehr wundert ist, dass die aktuelle 3.2p4 auch schon knapp 4 Jahre alt ist. Warum sollte die erst jetzt im Upgrade enthalten sein? Ich habe das Gefühl, wir sind auf dem Holzweg ... Vielleicht ist doch eher das Problem, dass das FHEM-Modul nicht mal die 3.1p5.pm laden kann ...?

ZitatLeider bekomme ich noch nicht einmal den owhttp mit Fake-Devices ans Laufen. owserver läuft, aber die Ports sind nicht erreichbar.
Bei mir läuft wie gesagt der httpd. Somit sind die Ports bei mir scheinbar erreichbar.
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

Wernieman

Um mal auf andere Ideen zu kommen .. was mir Spontan einfällt, was hast Du für eine perl-Version installiert? Und auch Packete per CPAN installiert?
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

efyzz

Moin,

andere Ideen klingt gut :)

ii  perl                                 5.36.0-7+deb12u1                 arm64        Larry Wall's Practical Extraction and Report Language
ii  perl-base                            5.36.0-7+deb12u1                 arm64        minimal Perl system
ii  perl-modules-5.36                    5.36.0-7+deb12u1                 all          Core Perl modules
ii  perl-openssl-defaults:arm64          7+b1                             arm64        version compatibility baseline for Perl OpenSSL packages
Was sagt uns das?

CPAN habe ich nicht genutzt.
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

Wernieman

O.K. da ist auch nichts auffälliges ....

Wobei .. hast DU nicht mehr perl-Module installiert?
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

efyzz

Die ein oder andere Lib habe ich sicherlich zusätzlich installiert. Hier alles zu perl:

$ dpkg -l | grep "perl"
ii  fhem                                 6.2.28184                        all          GPL'd perl server for house automation.
ii  libalgorithm-diff-perl               1.201-1                          all          module to find differences between files
ii  libalgorithm-diff-xs-perl:arm64      0.04-8+b1                        arm64        module to find differences between files (XS accelerated)
ii  libalgorithm-merge-perl              0.08-5                           all          Perl module for three-way merge of textual data
ii  libauthen-sasl-perl                  2.1600-3                         all          Authen::SASL - SASL Authentication framework
ii  libb-hooks-endofscope-perl           0.26-1                           all          module for executing code after a scope finished compilation
ii  libb-hooks-op-check-perl:arm64       0.22-2+b1                        arm64        Perl wrapper for OP check callbacks
ii  libcgi-fast-perl                     1:2.15-1                         all          CGI subclass for work with FCGI
ii  libcgi-pm-perl                       4.55-1                           all          module for Common Gateway Interface applications
ii  libclass-inspector-perl              1.36-3                           all          Perl module that provides information about classes
ii  libclass-method-modifiers-perl       2.14-1                           all          Perl module providing method modifiers
ii  libclass-xsaccessor-perl             1.19-4+b1                        arm64        Perl module providing fast XS accessors
ii  libclone-perl:arm64                  0.46-1                           arm64        module for recursively copying Perl datatypes
ii  libcommon-sense-perl:arm64           3.75-3                           arm64        module that implements some sane defaults for Perl programs
ii  libconvert-binhex-perl               1.125-3                          all          Perl5 module for extracting data from macintosh BinHex files
ii  libcrypt-cbc-perl                    3.04-3                           all          implementation of cipher block chaining (CBC) mode
ii  libcrypt-pbkdf2-perl                 0.161520-2                       all          Perl implementation of PBKDF2 password hash
ii  libcrypt-rijndael-perl               1.16-1+b2                        arm64        Perl module implementing the Rijndael algorithm
ii  libcryptx-perl                       0.077-1+b1                       arm64        Perl module that provides a self-contained cryptographic toolkit
ii  libdata-dump-perl                    1.25-1                           all          Perl module to help dump data structures
ii  libdbd-sqlite3-perl:arm64            1.72-1                           arm64        Perl DBI driver with a self-contained RDBMS
ii  libdbi-perl:arm64                    1.643-4                          arm64        Perl Database Interface (DBI)
ii  libdevel-callchecker-perl:arm64      0.008-2                          arm64        custom op checking attached to subroutines
ii  libdevice-serialport-perl            1.04-4+b1                        arm64        emulation of Win32::SerialPort for Linux/POSIX
ii  libdigest-hmac-perl                  1.04+dfsg-2                      all          module for creating standard message integrity checks
ii  libdigest-sha3-perl                  1.05-1+b1                        arm64        Perl extension for SHA-3
ii  libdpkg-perl                         1.21.22                          all          Dpkg perl modules
ii  libdynaloader-functions-perl         0.003-3                          all          deconstructed dynamic C library loading
ii  libencode-locale-perl                1.05-3                           all          utility to determine the locale encoding
ii  libexporter-tiny-perl                1.006000-1                       all          tiny exporter similar to Sub::Exporter
ii  libfcgi-perl                         0.82+ds-2                        arm64        helper module for FastCGI
ii  libfile-fcntllock-perl               0.22-4+b1                        arm64        Perl module for file locking with fcntl(2)
ii  libfile-find-rule-perl               0.34-3                           all          module to search for files based on rules
ii  libfile-listing-perl                 6.15-1                           all          module to parse directory listings
ii  libfont-afm-perl                     1.20-4                           all          Perl interface to Adobe Font Metrics files
ii  libhtml-form-perl                    6.11-1                           all          module that represents an HTML form element
ii  libhtml-format-perl                  2.16-2                           all          module for transforming HTML into various formats
ii  libhtml-parser-perl:arm64            3.81-1                           arm64        collection of modules that parse HTML text documents
ii  libhtml-tagset-perl                  3.20-6                           all          data tables pertaining to HTML
ii  libhtml-tree-perl                    5.07-3                           all          Perl module to represent and create HTML syntax trees
ii  libhttp-cookies-perl                 6.10-1                           all          HTTP cookie jars
ii  libhttp-daemon-perl                  6.16-1                           all          simple http server class
ii  libhttp-date-perl                    6.05-2                           all          module of date conversion routines
ii  libhttp-message-perl                 6.44-1                           all          perl interface to HTTP style messages
ii  libhttp-negotiate-perl               6.01-2                           all          implementation of content negotiation
ii  libimport-into-perl                  1.002005-2                       all          module for importing packages into other packages
ii  libio-html-perl                      1.004-3                          all          open an HTML file with automatic charset detection
ii  libio-sessiondata-perl               1.03-3                           all          set of modules for non-blocking I/O
ii  libio-socket-ssl-perl                2.081-2                          all          Perl module implementing object oriented interface to SSL sockets
ii  libio-stringy-perl                   2.111-3                          all          modules for I/O on in-core objects (strings/arrays)
ii  libjson-perl                         4.10000-1                        all          module for manipulating JSON-formatted data
ii  libjson-xs-perl                      4.030-2+b1                       arm64        module for manipulating JSON-formatted data (C/XS-accelerated)
ii  liblocale-gettext-perl               1.07-5                           arm64        module using libc functions for internationalization in Perl
ii  liblwp-mediatypes-perl               6.04-2                           all          module to guess media type for a file or a URL
ii  liblwp-protocol-https-perl           6.10-1                           all          HTTPS driver for LWP::UserAgent
ii  libmailtools-perl                    2.21-2                           all          modules to manipulate email in perl programs
ii  libmath-int128-perl                  0.22-4                           arm64        Perl module to manipulate 128 bits integers
ii  libmath-int64-perl                   0.54-2+b1                        arm64        module to manipulate 64 bits integers in Perl
ii  libmath-round-perl                   0.07-3                           all          Perl extension for rounding numbers
ii  libmime-tools-perl                   5.510-1                          all          Perl5 modules for MIME-compliant messages
ii  libmodule-implementation-perl        0.09-2                           all          module for loading one of several alternate implementations of a module
ii  libmodule-runtime-perl               0.016-2                          all          Perl module for runtime module handling
ii  libmoo-perl                          2.005005-1                       all          Minimalist Object Orientation library (with Moose compatibility)
ii  libnamespace-autoclean-perl          0.29-2                           all          module to remove imported symbols after compilation
ii  libnamespace-clean-perl              0.27-2                           all          module for keeping imports and functions out of the current namespace
ii  libnet-http-perl                     6.22-1                           all          module providing low-level HTTP connection client
ii  libnet-smtp-ssl-perl                 1.04-2                           all          Perl module providing SSL support to Net::SMTP
ii  libnet-ssleay-perl:arm64             1.92-2+b1                        arm64        Perl module for Secure Sockets Layer (SSL)
ii  libnumber-compare-perl               0.03-3                           all          module for performing numeric comparisons in Perl
ii  libpackage-stash-perl                0.40-1                           all          module providing routines for manipulating stashes
ii  libpackage-stash-xs-perl:arm64       0.30-1+b1                        arm64        Perl module providing routines for manipulating stashes (XS version)
ii  libparams-classify-perl:arm64        0.015-2+b1                       arm64        Perl module for argument type classification
ii  libperl5.36:arm64                    5.36.0-7+deb12u1                 arm64        shared Perl library
ii  libreadonly-perl                     2.050-3                          all          facility for creating read-only scalars, arrays and hashes
ii  libref-util-perl                     0.204-2                          all          set of utility functions for checking references
ii  libref-util-xs-perl                  0.117-2+b1                       arm64        XS implementation for Ref::Util
ii  libregexp-ipv6-perl                  0.03-3                           all          Regular expression for IPv6 addresses
ii  librole-tiny-perl                    2.002004-1                       all          Perl module for minimalist role composition
ii  librrds-perl:arm64                   1.7.2-4+b8                       arm64        time-series data storage and display system (Perl interface, shared)
ii  libsoap-lite-perl                    1.27-3                           all          Perl implementation of a SOAP client and server
ii  libstrictures-perl                   2.000006-1                       all          Perl module to turn on strict and make all warnings fatal
ii  libsub-exporter-progressive-perl     0.001013-3                       all          module for using Sub::Exporter only if needed
ii  libsub-identify-perl                 0.14-3                           arm64        module to retrieve names of code references
ii  libsub-name-perl:arm64               0.26-2+b1                        arm64        module for assigning a new name to referenced sub
ii  libsub-quote-perl                    2.006008-1                       all          helper modules for subroutines
ii  libtask-weaken-perl                  1.06-2                           all          module for ensuring that a platform has weaken support
ii  libtext-charwidth-perl:arm64         0.04-11                          arm64        get display widths of characters on the terminal
ii  libtext-diff-perl                    1.45-2                           all          Perl module to find differences in files and record sets
ii  libtext-glob-perl                    0.11-3                           all          Perl module for matching globbing patterns against text
ii  libtext-iconv-perl:arm64             1.7-8                            arm64        module to convert between character sets in Perl
ii  libtext-wrapi18n-perl                0.06-10                          all          internationalized substitute of Text::Wrap
ii  libtimedate-perl                     2.3300-2                         all          collection of modules to manipulate date/time information
ii  libtry-tiny-perl                     0.31-2                           all          module providing minimalistic try/catch
ii  libtype-tiny-perl                    2.002001-1                       all          tiny, yet Moo(se)-compatible type constraint
ii  libtype-tiny-xs-perl:arm64           0.025-1                          arm64        boost for some of Type::Tiny's built-in type constraints
ii  libtypes-serialiser-perl             1.01-1                           all          module providing simple data types for common serialisation formats
ii  liburi-perl                          5.17-1                           all          module to manipulate and access URI strings
ii  libvariable-magic-perl               0.63-1+b1                        arm64        module to associate user-defined magic to variables from Perl
ii  libwww-perl                          6.68-1                           all          simple and consistent interface to the world-wide web
ii  libwww-robotrules-perl               6.02-1                           all          database of robots.txt-derived permissions
ii  libxml-libxml-perl                   2.0207+dfsg+really+2.0134-1+b1   arm64        Perl interface to the libxml2 library
ii  libxml-namespacesupport-perl         1.12-2                           all          Perl module for supporting simple generic namespaces
ii  libxml-parser-perl                   2.46-4                           arm64        Perl module for parsing XML files
ii  libxml-sax-base-perl                 1.09-3                           all          base class for SAX drivers and filters
ii  libxml-sax-expat-perl                0.51-2                           all          Perl module for a SAX2 driver for Expat (XML::Parser)
ii  libxml-sax-perl                      1.02+dfsg-3                      all          Perl module for using and building Perl SAX2 XML processors
ii  libxml-simple-perl                   2.25-2                           all          Perl module for reading and writing XML
ii  libxmlrpc-lite-perl                  0.717-5                          all          client and server implementation of the XML-RPC protocol
ii  libxstring-perl:arm64                0.005-2+b1                       arm64        module containing isolated string helpers from B
ii  perl                                 5.36.0-7+deb12u1                 arm64        Larry Wall's Practical Extraction and Report Language
ii  perl-base                            5.36.0-7+deb12u1                 arm64        minimal Perl system
ii  perl-modules-5.36                    5.36.0-7+deb12u1                 all          Core Perl modules
ii  perl-openssl-defaults:arm64          7+b1                             arm64        version compatibility baseline for Perl OpenSSL packages
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

efyzz

Ich habe mal in den Apt Cache geschaut:
$ ls -l /var/cache/apt/archives/ow*
-rw-r--r-- 1 root root  6012 Oct 31  2022 /var/cache/apt/archives/owfs_3.2p4+dfsg1-4.1_all.deb
-rw-r--r-- 1 root root 14368 Oct 31  2022 /var/cache/apt/archives/owfs-common_3.2p4+dfsg1-4.1_all.deb
-rw-r--r-- 1 root root 20828 Jan  6  2023 /var/cache/apt/archives/owfs-fuse_3.2p4+dfsg1-4.1+b1_arm64.deb
-rw-r--r-- 1 root root 42660 Jan  6  2023 /var/cache/apt/archives/owftpd_3.2p4+dfsg1-4.1+b1_arm64.deb
-rw-r--r-- 1 root root 28676 Jan  6  2023 /var/cache/apt/archives/owhttpd_3.2p4+dfsg1-4.1+b1_arm64.deb
-rw-r--r-- 1 root root 28564 Jan  6  2023 /var/cache/apt/archives/owserver_3.2p4+dfsg1-4.1+b1_arm64.deb
-rw-r--r-- 1 root root 29208 Jan  6  2023 /var/cache/apt/archives/ow-shell_3.2p4+dfsg1-4.1+b1_arm64.deb

Die Pakete sind aus Januar 2023 und älter. Beweist das nicht, dass sie beim apt upgrade letzte Woche nicht dabei waren? Stattdessen wird es bei der Bookworm-Installation im November schon dieselbe Version gewesen sein.
Somit liegt es also nicht an der OWserver-Version. Oder sehe ich das falsch?
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.

Dr. Boris Neubert

Hallo,

es spricht einiges dafür, die Ursache an einer anderen Stelle zu suchen.

Bedenklich finde ich es, dass ich noch nicht einmal den owserver zum Laufen bringe.

Ich schwanke zwischen meine Zeit anderweitig zu verbringen und meinem Jagdtrieb nachzugehen. Vielleicht aktualisiere ich meinen Server diese Woche erst einmal auf Debian 12 Bookworm und starte mit einer sauberen Installation der owserver-Pakete neu.

Bevor ich den owserver und owhttp bei mir nicht am Laufen habe, ist an einer Weitersuche gar nicht zu denken.

Viele Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

efyzz

Hallo Boris,

dann hoffe ich mal, dass Dich der Jagdtrieb noch packt :)

Ich habe mir erstmal eine Krücke gebaut und lese die Temperaturen nun mit HTTPMOD vom owhttpd.

Bis dahin, Waidmannsheil!
RaspberryPi3B, Bookworm Lite
Homematic Funkmodul HM-MOD-RPI-PCB
------------------------------------------------------------------------
Ich bin kein Programmierer ... aber ich weiß, auf welcher Seite der Lötkolben heiß ist.