SPS S7Modul mit S5 und 2 Logo8

Begonnen von rotschmid, 25 Oktober 2017, 17:53:40

Vorheriges Thema - Nächstes Thema

rotschmid

Hallo  Hatte mit FHEM 5.7 eine sehr gut funktionierende Installation mit einer Siemens S5 95U und 2 Logo 8.Nach Update auf 5.8
hat die S5 keine Verbindung mehr über die seriele Schnittstelle.Nach Neuinstallation ist die Verbindung wieder da. Nach  herunterfahren und wieder hochfahren verbindet sich die S5 nicht mehr Logos sind ok.
Gruß Karl-Heinz
2017.10.25 13:45:00 1:   - bugfix:  21_HEOSMaster: fix typo in define Fn
2017.10.25 13:45:00 1:   - feature: 93_DbRep: V5.8.0, can set table as flexible argument for command
2017.10.25 13:45:00 1:                                countEntries and fetchrows
2017.10.25 13:45:00 1:   - new:     76_msgDialog: introducing new module to define dialogs for instant
2017.10.25 13:45:00 1:                            messaging via TelegramBot, Jabber and yowsub
2017.10.25 13:45:00 1: ... rest of lines skipped.
2017.10.25 13:45:00 1: Calling /usr/bin/perl ./contrib/commandref_join.pl, this may take a while
2017.10.25 15:45:35 1:
2017.10.25 15:45:35 1: update finished, "shutdown restart" is needed to activate the changes.
2017.10.25 15:45:35 1:
2017.10.25 15:45:35 1: Please consider using the global attribute sendStatistics
2017.10.25 15:46:25 1: Including fhem.cfg
2017.10.25 15:46:25 3: WEB: port 8083 opened
2017.10.25 15:46:25 3: WEBphone: port 8084 opened
2017.10.25 15:46:25 3: WEBtablet: port 8085 opened
2017.10.25 15:46:25 2: eventTypes: loaded 0 events from ./log/eventTypes.txt
2017.10.25 15:46:25 1: Including ./log/fhem.save
2017.10.25 15:46:25 0: Server shutdown
2017.10.25 15:46:53 1: Including fhem.cfg
2017.10.25 15:46:53 3: WEB: port 8083 opened
2017.10.25 15:46:53 3: WEBphone: port 8084 opened
2017.10.25 15:46:53 3: WEBtablet: port 8085 opened
2017.10.25 15:46:53 2: eventTypes: loaded 0 events from ./log/eventTypes.txt
2017.10.25 15:46:53 1: Including ./log/fhem.save
2017.10.25 15:46:53 1: usb create starting
2017.10.25 15:46:54 3: Probing CUL device /dev/ttyAMA0
2017.10.25 15:46:54 3: Probing TCM_ESP3 device /dev/ttyAMA0
2017.10.25 15:46:54 3: Probing ZWDongle device /dev/ttyAMA0
2017.10.25 15:46:54 3: Probing FRM device /dev/ttyAMA0
2017.10.25 15:47:00 3: Probing CUL device /dev/ttyS0
2017.10.25 15:47:00 1: usb create end
2017.10.25 15:47:00 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2017.10.25 15:47:00 0: Featurelevel: 5.8
2017.10.25 15:47:00 0: Server started with 8 defined entities (fhem.pl:15294/2017-10-20 perl:5.024001 os:linux user:fhem pid:704)
2017.10.25 15:57:16 3: S5Client ->S5ConnectPLCAS511 start of inputs in memory 25344
2017.10.25 15:57:16 3: S5Client ->S5ConnectPLCAS511 start of outputs in memory 25472
2017.10.25 15:57:16 3: S5Client ->S5ConnectPLCAS511 start of flags in memory 24832
2017.10.25 15:57:16 3: S5Client ->S5ConnectPLCAS511 start of timers in memory 24320
2017.10.25 15:57:16 3: S5Client ->S5ConnectPLCAS511 start of counters in memory 24576
2017.10.25 15:57:16 3: s5test S7_connect: connect to PLC with maxPDUlength=240
2017.10.25 15:58:07 3: Robomo S7_connect: connect to PLC with maxPDUlength=240
2017.10.25 15:59:28 3: myLogo S7_connect: connect to PLC with maxPDUlength=240
2017.10.25 16:39:24 0: Server shutdown
2017.10.25 16:39:43 1: Including fhem.cfg
2017.10.25 16:39:43 3: WEB: port 8083 opened
2017.10.25 16:39:43 3: WEBphone: port 8084 opened
2017.10.25 16:39:43 3: WEBtablet: port 8085 opened
2017.10.25 16:39:43 2: eventTypes: loaded 6 events from ./log/eventTypes.txt
2017.10.25 16:39:46 0: S7_connect: Undefined subroutine &Device::SerialPort called at FHEM/44_S7_S5Client.pm line 485, <$fh> line 40.

2017.10.25 16:39:46 2: S7_connect: s5test Could not connect to PLC (-1)
2017.10.25 16:39:49 3: Robomo S7_connect: connect to PLC with maxPDUlength=240
2017.10.25 16:39:52 3: myLogo S7_connect: connect to PLC with maxPDUlength=240
2017.10.25 16:39:52 1: Including ./log/fhem.save
2017.10.25 16:39:52 1: usb create starting
2017.10.25 16:39:53 3: Probing CUL device /dev/ttyAMA0
2017.10.25 16:39:53 3: Probing TCM_ESP3 device /dev/ttyAMA0
2017.10.25 16:39:54 3: Probing ZWDongle device /dev/ttyAMA0
2017.10.25 16:39:54 3: Probing FRM device /dev/ttyAMA0
2017.10.25 16:39:59 3: Probing CUL device /dev/ttyS0
2017.10.25 16:39:59 1: usb create end
2017.10.25 16:39:59 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2017.10.25 16:39:59 0: Featurelevel: 5.8
2017.10.25 16:39:59 0: Server started with 11 defined entities (fhem.pl:15294/2017-10-20 perl:5.024001 os:linux user:fhem pid:596)

rudolfkoenig

ZitatNach Update auf 5.8 hat die S5 keine Verbindung mehr
Ich vermute, dass hier auch ein neues perl zusaetzlich installiert wurde.

Die Ursache des Problems wird hier (etwas ungluecklich) gemeldet:
2017.10.25 16:39:46 0: S7_connect: Undefined subroutine &Device::SerialPort called at FHEM/44_S7_S5Client.pm line 485, <$fh> line 40.
was darauf hindeutet, dass in dieser perl Installation das perl Modul Device::SerialPort nicht installiert ist. Das kann man mit cpan oder einem Distribution spezifischen Befehl (apt-get, etc) nachholen, es gibt diverse Beschreibungen dazu, u.A. auch direkt auf fhem.de

@Modulautor: ich wuerde den Rueckgabewert von eval abfragen, und diese Fehlermeldung ausgeben, duerfte verstaendlicher sein als die aktuelle Fehlermeldung.



rotschmid

Hallo Herr  rudolfkoenig bei meiner installation ist das  perl Modul Device::SerialPort schon installiert.Habe nach der Anleitung https://wiki.fhem.de/wiki/S7
und https://wiki.fhem.de/wiki/Siemens_S5_Vorbemerkungen_f%C3%BCr_Einsteiger installiert.Zu ihrer Antwort @Modulautor: ich wuerde den Rueckgabewert von eval abfragen, und diese Fehlermeldung ausgeben, duerfte verstaendlicher sein als die aktuelle Fehlermeldung dazu finde ich keine Anleitung wie ich vorgehen
sollte vileicht gibt es noch eine andere Möglichkeit für mich um das programm wieder zum laufen zu bringen.
bis jetzt eimal besten Dank Karl-Heinz

rudolfkoenig

Was liefert ein im Shell/Kommandofenster ausgefuehrtes
perl -e 'use Device::SerialPort'

@Modulautor bedeutet, das der nachfolgende Text an dem Modulautor von 44_S7_S5Client.pm gerichtet ist, das ist laut MAINTAINER.txt der Forumbenutzer charlie71

rotschmid

Hallo nach Eingabe der Zeile perl -e 'use Device::SerialPort' erfolgt keine sichtbare Reaktion
Gruß Karl-Heinz

rudolfkoenig

#5
Ich habe was festgestellt, evtl. hilft das weiter:
- mit perl 5.14 gibt es keine Fehlermeldung
- mit perl 5.16 kriege ich die beschriebene Fehlermeldung
- mit perl 5.18 stuerzt FHEM ab (Can't locate object method "new" via package "S5Client" (perhaps you forgot to load "S5Client"?) at ./FHEM/44_S7.pm line 163)
- mit perl 5.24 gibt es keine Fehlermeldung

Ich habe jeweils "define S5 S7 S5 12" eingetippt, ohne zu wissen, ob das Sinn macht oder nicht.

Es wurmt mich zwar sehr, aber ich kann die Ursache nicht erklaeren.
Wenn jemand eine Idee hat, oder noch besser eine Erklaerung, dann bitte melden.

rotschmid

Hallo im Moment habe ich meine fhem Installation wieder in Betrieb.Sie geht halt nur wenn man sie nicht mehr herunterfährt oder
Betriebsspannungsausfall dann ist neuinstallation angesagt.Eventuell schaut sich ja mal Charlie 71 dasProgramm an.
gruß Karl-Heinz