PID20 - Warnings bei Neustart

Begonnen von Nobbynews, 02 Januar 2025, 10:11:18

Vorheriges Thema - Nächstes Thema

Nobbynews

Guten Morgen,

das Modul PID20 verursacht hier bei mir bei einem Neustart von FHEM einen Haufen Warnings.
[2025.01.02 09:34:25 1: stacktrace:
2025.01.02 09:34:25 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (305)
2025.01.02 09:34:25 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.02 09:34:25 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 09:34:25 1:     main::DoTrigger                     called by fhem.pl (5017)
2025.01.02 09:34:25 1:     main::readingsEndUpdate             called by fhem.pl (5200)
2025.01.02 09:34:25 1:     main::readingsSingleUpdate          called by ./FHEM/00_TCM.pm (208)
2025.01.02 09:34:25 1:     main::TCM_InitSerialCom             called by ./FHEM/00_TCM.pm (1518)
2025.01.02 09:34:25 1:     main::TCM_Notify                    called by fhem.pl (3988)
2025.01.02 09:34:25 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 09:34:25 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.02 09:34:25 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.

2025.01.02 09:34:46 1: stacktrace:
2025.01.02 09:34:46 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (305)
2025.01.02 09:34:46 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.02 09:34:46 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 09:34:46 1:     main::DoTrigger                     called by fhem.pl (5017)
2025.01.02 09:34:46 1:     main::readingsEndUpdate             called by fhem.pl (5200)
2025.01.02 09:34:46 1:     main::readingsSingleUpdate          called by ./FHEM/90_at.pm (178)
2025.01.02 09:34:46 1:     main::at_Define                     called by fhem.pl (3988)
2025.01.02 09:34:46 1:     main::CallFn                        called by fhem.pl (2165)
2025.01.02 09:34:46 1:     main::CommandDefine                 called by fhem.pl (2263)
2025.01.02 09:34:46 1:     main::CommandDefMod                 called by fhem.pl (1285)
2025.01.02 09:34:46 1:     main::AnalyzeCommand                called by fhem.pl (1136)
2025.01.02 09:34:46 1:     main::AnalyzeCommandChain           called by fhem.pl (4028)
2025.01.02 09:34:46 1:     main::fhem                          called by (eval 398) (2)
2025.01.02 09:34:46 1:     (eval)                              called by fhem.pl (1180)
2025.01.02 09:34:46 1:     main::AnalyzePerlCommand            called by fhem.pl (1209)
2025.01.02 09:34:46 1:     main::AnalyzeCommand                called by fhem.pl (1136)
2025.01.02 09:34:46 1:     main::AnalyzeCommandChain           called by ./FHEM/91_notify.pm (122)
2025.01.02 09:34:46 1:     main::notify_Exec                   called by fhem.pl (3988)
2025.01.02 09:34:46 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 09:34:46 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.02 09:34:46 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.

Version des Moduls ist:
98_PID20.pm:0.294410/2024-12-20
Kann das etwas mit den Änderungen vom 20.12.24 bzw. 5.4.24 zu tun haben?

Edit:
Die Version vom 20.12.24 ist nicht der Übeltäter.
Habe mal die Veriosn vom 5.4.42 zurückgespielt.
Bei einem der PID-Regler bekomme ich im state die Meldung:
    
alarm - no yet for

betateilchen

Ich glaube nicht, dass PID20 selbst die Ursache für die Meldungen ist, das Modul ist nur das letzte in der Kette.

Im zweiten stacktrace sieht man, dass durch einen trigger ein notify ausgelöst wird, das per defmod ein at anlegt (oder ändert), das offenbar einen Bezug zu PID20 hat.

Mach Dich mal auf die Suche, wo in Deiner Konfiguration diese Kette gestartet wird und überlege, ob das gefundene Vorgehen sinnvoll ist.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Nobbynews

Hallo betateilchen,

Das mit dem at fiel mir auch auf, allerdings habe ich da erst einmal keinen Zusammenhang hergestellt.
defmod n_StartFhem notify global:INITIALIZED {\
fhem ("defmod atemp at 03:05 set Abfall update");;\
fhem ("defmod atemp2 at 03:06 set NRW_Ferien update");;\
Refresh_HomeStatus();;\
}

setstate n_StartFhem 2025-01-02 10:34:01
setstate n_StartFhem 2025-01-02 10:33:58 state active
setstate n_StartFhem 2025-01-02 10:34:01 triggeredByDev global
setstate n_StartFhem 2025-01-02 10:34:01 triggeredByEvent INITIALIZED

Nach dem Löschen des at mit anschließendem Neustart kommen diese Warnings:
2025.01.02 17:50:35 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.
2025.01.02 17:50:35 1: stacktrace:
2025.01.02 17:50:35 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (305)
2025.01.02 17:50:35 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.02 17:50:35 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:35 1:     main::DoTrigger                     called by fhem.pl (5017)
2025.01.02 17:50:35 1:     main::readingsEndUpdate             called by fhem.pl (5200)
2025.01.02 17:50:35 1:     main::readingsSingleUpdate          called by ./FHEM/00_TCM.pm (872)
2025.01.02 17:50:35 1:     main::TCM_Get                       called by ./FHEM/00_TCM.pm (161)
2025.01.02 17:50:35 1:     main::TCM_InitSerialCom             called by ./FHEM/00_TCM.pm (1518)
2025.01.02 17:50:35 1:     main::TCM_Notify                    called by fhem.pl (3988)
2025.01.02 17:50:35 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:35 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.02 17:50:35 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.

2025.01.02 17:50:35 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.
2025.01.02 17:50:35 1: stacktrace:
2025.01.02 17:50:35 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (305)
2025.01.02 17:50:35 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.02 17:50:35 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:35 1:     main::DoTrigger                     called by fhem.pl (5017)
2025.01.02 17:50:35 1:     main::readingsEndUpdate             called by fhem.pl (5200)
2025.01.02 17:50:35 1:     main::readingsSingleUpdate          called by ./FHEM/34_ESPEasy.pm (2365)
2025.01.02 17:50:35 1:     main::ESPEasy_TcpServer_Open        called by ./FHEM/34_ESPEasy.pm (1285)
2025.01.02 17:50:35 1:     main::ESPEasy_Notify                called by fhem.pl (3988)
2025.01.02 17:50:35 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:35 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.02 17:50:35 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.
2025.01.02 17:50:35 1: stacktrace:
2025.01.02 17:50:35 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (305)
2025.01.02 17:50:35 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.02 17:50:35 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:35 1:     main::DoTrigger                     called by fhem.pl (5017)
2025.01.02 17:50:35 1:     main::readingsEndUpdate             called by fhem.pl (5200)
2025.01.02 17:50:35 1:     main::readingsSingleUpdate          called by ./FHEM/34_ESPEasy.pm (2365)
2025.01.02 17:50:35 1:     main::ESPEasy_TcpServer_Open        called by ./FHEM/34_ESPEasy.pm (1285)
2025.01.02 17:50:35 1:     main::ESPEasy_Notify                called by fhem.pl (3988)
2025.01.02 17:50:35 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:35 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.02 17:50:35 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.

2025.01.02 17:50:35 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.
2025.01.02 17:50:35 1: stacktrace:
2025.01.02 17:50:35 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (305)
2025.01.02 17:50:35 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.02 17:50:35 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:35 1:     main::DoTrigger                     called by fhem.pl (5017)
2025.01.02 17:50:35 1:     main::readingsEndUpdate             called by ./FHEM/98_weekprofile.pm (678)
2025.01.02 17:50:35 1:     main::weekprofile_assignDev         called by ./FHEM/98_weekprofile.pm (1338)
2025.01.02 17:50:35 1:     main::weekprofile_Notify            called by fhem.pl (3988)
2025.01.02 17:50:35 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:35 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.02 17:50:35 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.
2025.01.02 17:50:35 1: stacktrace:
2025.01.02 17:50:35 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (305)
2025.01.02 17:50:35 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.02 17:50:35 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:35 1:     main::DoTrigger                     called by fhem.pl (5017)
2025.01.02 17:50:35 1:     main::readingsEndUpdate             called by ./FHEM/98_weekprofile.pm (678)
2025.01.02 17:50:35 1:     main::weekprofile_assignDev         called by ./FHEM/98_weekprofile.pm (1338)
2025.01.02 17:50:35 1:     main::weekprofile_Notify            called by fhem.pl (3988)
2025.01.02 17:50:35 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:35 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.02 17:50:35 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.
2025.01.02 17:50:36 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.
2025.01.02 17:50:36 1: stacktrace:
2025.01.02 17:50:36 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (305)
2025.01.02 17:50:36 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.02 17:50:36 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:36 1:     main::DoTrigger                     called by FHEM/DevIo.pm (423)
2025.01.02 17:50:36 1:     main::__ANON__                      called by FHEM/DevIo.pm (640)
2025.01.02 17:50:36 1:     main::DevIo_OpenDev                 called by ./FHEM/98_Modbus.pm (1727)
2025.01.02 17:50:36 1:     Modbus::DoOpen                      called by ./FHEM/98_Modbus.pm (1623)
2025.01.02 17:50:36 1:     Modbus::NotifyFn                    called by fhem.pl (3988)
2025.01.02 17:50:36 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:36 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.02 17:50:36 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.
2025.01.02 17:50:36 1: stacktrace:
2025.01.02 17:50:36 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (305)
2025.01.02 17:50:36 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.02 17:50:36 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:36 1:     main::DoTrigger                     called by FHEM/DevIo.pm (423)
2025.01.02 17:50:36 1:     main::__ANON__                      called by FHEM/DevIo.pm (640)
2025.01.02 17:50:36 1:     main::DevIo_OpenDev                 called by ./FHEM/98_Modbus.pm (1727)
2025.01.02 17:50:36 1:     Modbus::DoOpen                      called by ./FHEM/98_Modbus.pm (1623)
2025.01.02 17:50:36 1:     Modbus::NotifyFn                    called by fhem.pl (3988)
2025.01.02 17:50:36 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.02 17:50:36 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.02 17:50:36 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.

Das ist nur ein kurzer Auszug.
Leider habe ich in meinen Sicherungen keine ältere Version vom PID-Modul.
Zum test würde ich gerne eine Version von vor dem 5.4.24 installieren.
Das würde vielleicht ein wenig Licht ins Dunkel bringen.

Nobbynews

#3
Habe jetzt mal aus dem SVN die  Version

98_PID20.pm:0.278270/2023-08-07
Installiert.
Gleicher Effekt.
Bin jetzt ziemlich ratlos.

Wenn ich die PID-Devices mit attr disable 1 deaktivieren kommen regelmäßig nur noch diese warnings:
2025.01.02 20:12:27 1: PERL WARNING: Use of uninitialized value $d in hash element at fhem.pl line 4709.
2025.01.02 20:12:27 1: stacktrace:
2025.01.02 20:12:27 1:     main::__ANON__                      called by fhem.pl (4709)
2025.01.02 20:12:27 1:     main::ReadingsVal                   called by ./FHEM/98_PID20.pm (485)
2025.01.02 20:12:27 1:     main::PID20_Calc                    called by fhem.pl (3511)
2025.01.02 20:12:27 1:     main::HandleTimeout                 called by fhem.pl (710)
2025.01.02 20:12:27 1: PERL WARNING: Use of uninitialized value $d in hash element at fhem.pl line 4729.
2025.01.02 20:12:27 1: stacktrace:
2025.01.02 20:12:27 1:     main::__ANON__                      called by fhem.pl (4729)
2025.01.02 20:12:27 1:     main::ReadingsTimestamp             called by ./FHEM/98_PID20.pm (487)
2025.01.02 20:12:27 1:     main::PID20_Calc                    called by fhem.pl (3511)
2025.01.02 20:12:27 1:     main::HandleTimeout                 called by fhem.pl (710)
2025.01.02 20:12:27 1: PERL WARNING: Use of uninitialized value $d in hash element at fhem.pl line 4709.
2025.01.02 20:12:27 1: stacktrace:
2025.01.02 20:12:27 1:     main::__ANON__                      called by fhem.pl (4709)
2025.01.02 20:12:27 1:     main::ReadingsVal                   called by ./FHEM/98_PID20.pm (485)
2025.01.02 20:12:27 1:     main::PID20_Calc                    called by fhem.pl (3511)
2025.01.02 20:12:27 1:     main::HandleTimeout                 called by fhem.pl (710)
2025.01.02 20:12:27 1: PERL WARNING: Use of uninitialized value $d in hash element at fhem.pl line 4729.
2025.01.02 20:12:27 1: stacktrace:
2025.01.02 20:12:27 1:     main::__ANON__                      called by fhem.pl (4729)
2025.01.02 20:12:27 1:     main::ReadingsTimestamp             called by ./FHEM/98_PID20.pm (487)
2025.01.02 20:12:27 1:     main::PID20_Calc                    called by fhem.pl (3511)
2025.01.02 20:12:27 1:     main::HandleTimeout                 called by fhem.pl (710)
2025.01.02 20:12:27 1: PERL WARNING: Use of uninitialized value $d in hash element at fhem.pl line 4709.
2025.01.02 20:12:27 1: stacktrace:
2025.01.02 20:12:27 1:     main::__ANON__                      called by fhem.pl (4709)
2025.01.02 20:12:27 1:     main::ReadingsVal                   called by ./FHEM/98_PID20.pm (485)
2025.01.02 20:12:27 1:     main::PID20_Calc                    called by fhem.pl (3511)
2025.01.02 20:12:27 1:     main::HandleTimeout                 called by fhem.pl (710)
2025.01.02 20:12:27 1: PERL WARNING: Use of uninitialized value $d in hash element at fhem.pl line 4729.
2025.01.02 20:12:27 1: stacktrace:
2025.01.02 20:12:27 1:     main::__ANON__                      called by fhem.pl (4729)
2025.01.02 20:12:27 1:     main::ReadingsTimestamp             called by ./FHEM/98_PID20.pm (487)
2025.01.02 20:12:27 1:     main::PID20_Calc                    called by fhem.pl (3511)
2025.01.02 20:12:27 1:     main::HandleTimeout                 called by fhem.pl (710)
2025.01.02 20:12:27 1: PERL WARNING: Use of uninitialized value $d in hash element at fhem.pl line 4709.
2025.01.02 20:12:27 1: stacktrace:
2025.01.02 20:12:27 1:     main::__ANON__                      called by fhem.pl (4709)
2025.01.02 20:12:27 1:     main::ReadingsVal                   called by ./FHEM/98_PID20.pm (485)
2025.01.02 20:12:27 1:     main::PID20_Calc                    called by fhem.pl (3511)
2025.01.02 20:12:27 1:     main::HandleTimeout                 called by fhem.pl (710)
2025.01.02 20:12:27 1: PERL WARNING: Use of uninitialized value $d in hash element at fhem.pl line 4729.
2025.01.02 20:12:27 1: stacktrace:
2025.01.02 20:12:27 1:     main::__ANON__                      called by fhem.pl (4729)
2025.01.02 20:12:27 1:     main::ReadingsTimestamp             called by ./FHEM/98_PID20.pm (487)
2025.01.02 20:12:27 1:     main::PID20_Calc                    called by fhem.pl (3511)
2025.01.02 20:12:27 1:     main::HandleTimeout                 called by fhem.pl (710)

Nobbynews

#4
Die Warnings werden alle mit Bezug auf Zeile 305 ausgegeben.
Ich habe jetzt mal zum Testen eine zusätzliche Zeile für einen Log-Eintrag eingebaut und die config auf meinem Testsytem abgebildet.
Zeile 304:
my $temp = dev->{name}; Log 1,"**** PID20: $temp";
Damit erhalte ich nach einem Neustart folgende Log-Einträge:
2025.01.03 17:22:42 1: ***** PID20: HK_ZWave
2025.01.03 17:22:42 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.
2025.01.03 17:22:42 1: ***** PID20: HK_ZWave
2025.01.03 17:22:47 1: ***** PID20: fhemInstaller
2025.01.03 17:22:47 1: ***** PID20: pidFlur
2025.01.03 17:22:47 1: ***** PID20: wdT_Flur
2025.01.03 17:22:47 1: ***** PID20: wdT_Flur
2025.01.03 17:22:47 1: ***** PID20: wdT_Flur
2025.01.03 17:22:47 1: ***** PID20: wdT_Flur
2025.01.03 17:22:47 1: ***** PID20: wdT_Flur
2025.01.03 17:22:47 1: ***** PID20: wdT_Flur
2025.01.03 17:22:47 1: ***** PID20: wdT_Flur
2025.01.03 17:22:47 1: ***** PID20: SIGNALespDach
2025.01.03 17:22:47 1: ***** PID20: SIGNALESP
2025.01.03 17:22:48 1: ***** PID20: fhemInstaller 
2025.01.03 17:22:57 1: ***** PID20: pidFlur
2025.01.03 17:22:57 1: ***** PID20: pidFlur
2025.01.03 17:22:59 1: ***** PID20: SD_WS07_TH_1
2025.01.03 17:23:11 1: ***** PID20: SD_WS_89_TH_1
2025.01.03 17:23:16 1: ***** PID20: SD_WS07_TH_2
2025.01.03 17:23:19 1: ***** PID20: Mebus_30
2025.01.03 17:23:21 1: ***** PID20: HandyBirgit
2025.01.03 17:23:21 1: ***** PID20: HandyCarina
2025.01.03 17:23:21 1: ***** PID20: HandyHenrike
2025.01.03 17:23:21 1: ***** PID20: HandyNorbert
2025.01.03 17:23:21 1: ***** PID20: TabletBirgit
2025.01.03 17:23:21 1: ***** PID20: TabletHenrike2
2025.01.03 17:23:21 1: ***** PID20: TabletNorbert
2025.01.03 17:23:21 1: ***** PID20: PsnceDaemon
2025.01.03 17:23:26 1: ***** PID20: Mebus_163
2025.01.03 17:23:28 1: ***** PID20: SD_WS_27_TH_8
2025.01.03 17:23:28 1: ***** PID20: global
2025.01.03 17:23:51 1: ***** PID20: HandyBirgit
2025.01.03 17:23:51 1: ***** PID20: HandyHenrike
2025.01.03 17:23:51 1: ***** PID20: HandyNorbert
2025.01.03 17:23:51 1: ***** PID20: TabletBirgit
2025.01.03 17:23:51 1: ***** PID20: TabletNorbert
2025.01.03 17:23:51 1: ***** PID20: PsnceDaemon
2025.01.03 17:23:57 1: ***** PID20: pidFlur
2025.01.03 17:23:57 1: ***** PID20: pidFlur
2025.01.03 17:24:21 1: ***** PID20: HandyBirgit
2025.01.03 17:24:21 1: ***** PID20: HandyHenrike
2025.01.03 17:24:21 1: ***** PID20: HandyNorbert
2025.01.03 17:24:21 1: ***** PID20: TabletBirgit
2025.01.03 17:24:21 1: ***** PID20: TabletNorbert
2025.01.03 17:24:21 1: ***** PID20: PsnceDaemon
2025.01.03 17:24:31 1: ***** PID20: global
2025.01.03 17:24:42 1: ***** PID20: Hideki_30_2
2025.01.03 17:24:51 1: ***** PID20: HandyBirgit
2025.01.03 17:24:51 1: ***** PID20: HandyHenrike
2025.01.03 17:24:51 1: ***** PID20: HandyNorbert
2025.01.03 17:24:51 1: ***** PID20: TabletBirgit
2025.01.03 17:24:51 1: ***** PID20: TabletNorbert
2025.01.03 17:24:51 1: ***** PID20: PsnceDaemon
2025.01.03 17:24:51 1: ***** PID20: unknown_please_select_model
2025.01.03 17:24:57 1: ***** PID20: pidFlur
2025.01.03 17:24:57 1: ***** PID20: pidFlur
2025.01.03 17:24:59 1: ***** PID20: Hideki_30_3
2025.01.03 17:25:21 1: ***** PID20: HandyBirgit
2025.01.03 17:25:21 1: ***** PID20: HandyHenrike
2025.01.03 17:25:21 1: ***** PID20: HandyNorbert
2025.01.03 17:25:21 1: ***** PID20: TabletBirgit
2025.01.03 17:25:21 1: ***** PID20: TabletNorbert
2025.01.03 17:25:21 1: ***** PID20: PsnceDaemon
usw.
Als nächtes dann die Ausgabe um $sensorName ergänzt:
2025.01.03 17:42:48 1: ***** PID20: SIGNALespDach  | SensorName: Hideki_30_4
2025.01.03 17:42:48 1: ***** PID20: SIGNALESP  | SensorName: Hideki_30_4
2025.01.03 17:42:50 1: ***** PID20: wdT_Flur  | SensorName: Hideki_30_4
2025.01.03 17:42:50 1: ***** PID20: Mebus_30  | SensorName: Hideki_30_4
2025.01.03 17:42:55 1: ***** PID20: HK_Dummy  | SensorName: Hideki_30_4
2025.01.03 17:42:55 1: ***** PID20: pidFlur  | SensorName: Hideki_30_4
2025.01.03 17:42:55 1: ***** PID20: pidFlur  | SensorName: Hideki_30_4
2025.01.03 17:43:00 1: ***** PID20: Hideki_30_3  | SensorName: Hideki_30_4
2025.01.03 17:43:06 1: ***** PID20: Mebus_163  | SensorName: Hideki_30_4

Ist das Verhalten so gewünscht und damit korrekt? Edit: Passt zu den events im Eventmonitor. Also OK.



Das device ist definiert als:
define pidFlur PID20 Hideki_30_4:temperature HK_Dummy:dim
#   DEF        Hideki_30_4:temperature HK_Dummy:dim
#   FUUID      677773d6-f33f-2b56-c182-c3cf19702a13f221
#   FVERSION   98_PID20.pm:0.294410/2024-12-20
#   NAME       pidFlur
#   NR         130
#   NTFY_ORDER 50-pidFlur
#   STATE      processing
#   STILLDONETIME 0
#   TYPE       PID20
#   VERSION    1.0.0.11
#   eventCount 29
#   READINGS:
#     2025-01-03 17:35:57   actuation       0
#     2025-01-03 17:35:57   actuationCalc   -13.0999999999998
#     2025-01-03 17:35:57   delta           -3.5
#     2025-01-03 17:35:57   desired         18.0
#     2025-01-03 17:35:57   measured        21.5
#     2025-01-03 17:35:57   p_d             0
#     2025-01-03 17:35:57   p_i             74.4000000000002
#     2025-01-03 17:35:57   p_p             -87.5
#     2025-01-03 17:35:57   state           processing
#   helper:
#     actor      HK_Dummy
#     actorCommand dim
#     actorErrorAction freeze
#     actorErrorPos 0
#     actorInterval 180
#     actorKeepAlive 1800
#     actorLimitLower 0
#     actorLimitUpper 100
#     actorThreshold 1
#     actorTimestamp 2025-01-03 17:22:57
#     actorValueDecPlaces 0
#     adjust    
#     calcInterval 60
#     deltaGradient 0
#     deltaOld   -3.5
#     deltaOldTS 2025-01-03 17:30:39
#     deltaTreshold 0
#     desiredName desired
#     disable    0
#     factor_D   0
#     factor_I   0.25
#     factor_P   25
#     isWindUP   1
#     measuredName measured
#     reading    temperature
#     regexp     ^([\+,\-]?\d+\.?\d*$)
#     reverseAction 0
#     sensor     Hideki_30_4
#     sensorTimeout 3600
#     stopped    0
#     updateInterval 600
#
setstate pidFlur processing
setstate pidFlur 2025-01-03 17:35:57 actuation 0
setstate pidFlur 2025-01-03 17:35:57 actuationCalc -13.0999999999998
setstate pidFlur 2025-01-03 17:35:57 delta -3.5
setstate pidFlur 2025-01-03 17:35:57 desired 18.0
setstate pidFlur 2025-01-03 17:35:57 measured 21.5
setstate pidFlur 2025-01-03 17:35:57 p_d 0
setstate pidFlur 2025-01-03 17:35:57 p_i 74.4000000000002
setstate pidFlur 2025-01-03 17:35:57 p_p -87.5
setstate pidFlur 2025-01-03 17:35:57 state processing


Auf meinem Produktivsystem sieht das dann so aus:
2025.01.03 18:05:53 1: PERL WARNING: Use of uninitialized value $sensorName in concatenation (.) or string at ./FHEM/98_PID20.pm line 304.
2025.01.03 18:05:53 1: stacktrace:
2025.01.03 18:05:53 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (304)
2025.01.03 18:05:53 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.03 18:05:53 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.03 18:05:53 1:     main::DoTrigger                     called by fhem.pl (5017)
2025.01.03 18:05:53 1:     main::readingsEndUpdate             called by fhem.pl (5200)
2025.01.03 18:05:53 1:     main::readingsSingleUpdate          called by ./FHEM/98_PID20.pm (264)
2025.01.03 18:05:53 1:     main::PID20_Check                   called by ./FHEM/98_PID20.pm (300)
2025.01.03 18:05:53 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.03 18:05:53 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.03 18:05:53 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.03 18:05:53 1: ***** PID20 dev: pidGaesteWC | sensorName:
2025.01.03 18:05:53 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.
2025.01.03 18:05:53 1: stacktrace:
2025.01.03 18:05:53 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (305)
2025.01.03 18:05:53 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.03 18:05:53 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.03 18:05:53 1:     main::DoTrigger                     called by fhem.pl (5017)
2025.01.03 18:05:53 1:     main::readingsEndUpdate             called by fhem.pl (5200)
2025.01.03 18:05:53 1:     main::readingsSingleUpdate          called by ./FHEM/98_PID20.pm (264)
2025.01.03 18:05:53 1:     main::PID20_Check                   called by ./FHEM/98_PID20.pm (300)
2025.01.03 18:05:53 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.03 18:05:53 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.03 18:05:53 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.03 18:05:53 1: ***** PID20 dev: pidKueche | sensorName: TempFlur
2025.01.03 18:05:53 1: ***** PID20 dev: pidKueche | sensorName: TempGaesteWC
2025.01.03 18:05:53 1: ***** PID20 dev: pidKueche | sensorName: TempKueche
2025.01.03 18:05:53 1: PERL WARNING: Use of uninitialized value $sensorName in concatenation (.) or string at ./FHEM/98_PID20.pm line 304.
2025.01.03 18:05:53 1: stacktrace:
2025.01.03 18:05:53 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (304)
2025.01.03 18:05:53 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.03 18:05:53 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.03 18:05:53 1:     main::DoTrigger                     called by fhem.pl (5017)
2025.01.03 18:05:53 1:     main::readingsEndUpdate             called by fhem.pl (5200)
2025.01.03 18:05:53 1:     main::readingsSingleUpdate          called by ./FHEM/98_PID20.pm (264)
2025.01.03 18:05:53 1:     main::PID20_Check                   called by ./FHEM/98_PID20.pm (300)
2025.01.03 18:05:53 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.03 18:05:53 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.03 18:05:53 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.03 18:05:53 1: ***** PID20 dev: pidKueche | sensorName:
2025.01.03 18:05:53 1: PERL WARNING: Use of uninitialized value $sensorName in string ne at ./FHEM/98_PID20.pm line 305.
2025.01.03 18:05:53 1: stacktrace:
2025.01.03 18:05:53 1:     main::__ANON__                      called by ./FHEM/98_PID20.pm (305)
2025.01.03 18:05:53 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.03 18:05:53 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.03 18:05:53 1:     main::DoTrigger                     called by fhem.pl (5017)
2025.01.03 18:05:53 1:     main::readingsEndUpdate             called by fhem.pl (5200)
2025.01.03 18:05:53 1:     main::readingsSingleUpdate          called by ./FHEM/98_PID20.pm (264)
2025.01.03 18:05:53 1:     main::PID20_Check                   called by ./FHEM/98_PID20.pm (300)
2025.01.03 18:05:53 1:     main::PID20_Notify                  called by fhem.pl (3988)
2025.01.03 18:05:53 1:     main::CallFn                        called by fhem.pl (3900)
2025.01.03 18:05:53 1:     main::DoTrigger                     called by fhem.pl (691)
2025.01.03 18:05:53 1: ***** PID20 dev: pidWerkstatt | sensorName: TempFlur
2025.01.03 18:05:53 1: ***** PID20 dev: pidWerkstatt | sensorName: TempGaesteWC
2025.01.03 18:05:53 1: ***** PID20 dev: pidWerkstatt | sensorName: TempKueche
2025.01.03 18:05:53 1: ***** PID20 dev: pidWerkstatt | sensorName: TempWerkstatt  

Sieht für mich so aus, dass PID20 auf events reagiert und die Temperatursensoren noch nicht definiert sind bzw. die Initialisierung der pid noch nicht abgeschlossen ist.
Ab diesem Zeitpunkt gibt es keine fehlenden Sensoren mehr.

Nobbynews

Zitat von: betateilchen am 02 Januar 2025, 13:50:14Mach Dich mal auf die Suche, wo in Deiner Konfiguration diese Kette gestartet wird und überlege, ob das gefundene Vorgehen sinnvoll ist.
Also auch nach intensiver Suche habe nichts auffälliges entdecken können. Die pid werden über weekDayTimer hinsichtlich der Temperatur im Reading desired angesteuert. Der Wert ist aber bei einem Neustart noch gesetzt. Ansonsten wird über notify ebenfalls nur des Reading desired verändert, was ich aber zum Zeitpunkt eines Neustarts ausschließen möchte.
Die durch die Log-Einträge ermittelten anderen devices haben definitiv nichts mit den pid zu tun.

Norbert

betateilchen

Moin,

ich habe gerade eine Version eingecheckt, die PID20_Notify() nicht ausführt, solange der FHEM Start noch nicht abgeschlossen ist.

Du kannst die Version aktuell schon aus SVN holen, ansonsten kommt sie morgen früh ab 8 Uhr auf dem regulären Update-Weg.

Bitte um Rückmeldung, ob Dein Problem damit gelöst ist.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Nobbynews

#7
Hallo betateilchen,

leider kommen immer noch warnings.
Die Log-Ausgabe habe ich mal um $init_done ergänzt.

2025.01.08 11:07:27 1: ***** PID20: HK_ZWave | Sensor:  | initDone: 1
2025.01.08 11:07:27 1: ***** PID20: HK_ZWave | Sensor:  | initDone: 1
2025.01.08 11:07:32 1: ***** PID20: fhemInstaller | Sensor:  | initDone: 1

Bei dem Sensor handelt es sich um ein device vom Type Hideki.

Beta-User

Zitat von: Nobbynews am 08 Januar 2025, 11:17:28Bei dem Sensor handelt es sich um ein device vom Type Hideki.
Wann und wo steht das define zu Hideki_30_4?

Ist sehr komisch, dass der beim Start noch nicht vorhanden sein soll...
Und irgendwie hatte ich im Kopf, dass notify (-fn) auch erst nach $init_done ausgeführt werden (aber vor timern). Zu dem Zeitpunkt sollte $sensorName eigentlich immer ein Ergebnis liefern. Strange!
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

Nobbynews

Zitat von: Beta-User am 08 Januar 2025, 11:28:36Wann und wo steht das define zu Hideki_30_4?
Das define vom Sensor steht in Zeile 147 der fhem.cfg und der pid20 in Zeile 431.

Nobbynews

Ich habe jetzt mal eine zusätzliche Abfrage eingebaut, und zwar in Zeile 304:

return if (!defined($sensorName);
Die Abfrage
return if (IsDisabled($name) || !$init_done)ergänzt um || !defined($sensorName))hat nicht zum Erfolg geführt.

Damit sind die warnings erst einmal weg.

betateilchen

Das ist aber nur eine Krücke, um eine ansonsten völlig belanglose und zu ignorierende Warnung zu unterdrücken.

Die Warnung wird nicht von 98_PID20.pm verursacht, deshalb wäre es viel interessanter gewesen, die tatsächliche Ursache zu finden.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Nobbynews

Zitat von: betateilchen am 08 Januar 2025, 16:03:12Das ist aber nur eine Krücke, um eine ansonsten völlig belanglose und zu ignorierende Warnung zu unterdrücken.
Das ist mir klar.
Zitat von: betateilchen am 08 Januar 2025, 16:03:12Die Warnung wird nicht von 98_PID20.pm verursacht, deshalb wäre es viel interessanter gewesen, die tatsächliche Ursache zu finden.
Dabei mithelfen würde ich ja gerne. Sicherlich wäre es der richtige Ansatz herauszufinden, warum der Sensor undefiniert ist. Dazu fehlen mir aber die nötigen Programmierkenntnisse und vor allem die vertieften Kenntnisse zur Programmierung von fhem ansich.

Wenn jemand eine Idee hat, wo ich was an Information liefern kann, dann her damit.

Beta-User

Da du von "Zeilen" sprichst..
Falls du cfg-editierer bist könnte da auch irgendwas komisches in den Zeilen dazwischen stehen.

Das Warning ist m.E. jedenfalls dahingehend klar, dass dieses Device kurzfristig nicht mehr unter diesem Namen vorhanden war...
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

Nobbynews

Zitat von: Beta-User am 08 Januar 2025, 16:10:17Da du von "Zeilen" sprichst..
Falls du cfg-editierer bist könnte da auch irgendwas komisches in den Zeilen dazwischen stehen.
Nein, bin ich nicht.
Damit wollte ich nur aufzeigen, dass der Sensor in der cfg weit vor dem pid definiert wird.

Stellt sich nur die Frage, warum der Sensor bzw. im Hauptsystem insgesamt 4 Sensoren (3* Hideki, 1* ESPEasy) nicht vorhanden sind.