fhem / INDEGO

GNU General Public License v2.0
2 stars 1 forks source link

Use of uninitialized value warning #2

Closed siggel closed 3 years ago

siggel commented 3 years ago

My FHEM log shows the following warning repeatedly for an Indego S+350 using the dev branch module (log shown most recent top):

2021.09.03 15:12:34 1: main::ANON called by fhem.pl (770) 2021.09.03 15:12:34 1: FHEM::INDEGO::ReceiveCommand called by FHEM/HttpUtils.pm (647) 2021.09.03 15:12:34 1: main::readingsBulkUpdateIfChanged called by ./FHEM/70_INDEGO.pm (864) 2021.09.03 15:12:34 1: main::ANON called by fhem.pl (4925) 2021.09.03 15:12:34 1: stacktrace: 2021.09.03 15:12:34 1: PERL WARNING: Use of uninitialized value $value in string eq at fhem.pl line 4925. 2021.09.03 15:12:32 1: main::ANON called by fhem.pl (770) 2021.09.03 15:12:32 1: FHEM::INDEGO::ReceiveCommand called by FHEM/HttpUtils.pm (647) 2021.09.03 15:12:32 1: main::readingsBulkUpdateIfChanged called by ./FHEM/70_INDEGO.pm (648) 2021.09.03 15:12:32 1: main::ANON called by fhem.pl (4925) 2021.09.03 15:12:32 1: stacktrace: 2021.09.03 15:12:32 1: PERL WARNING: Use of uninitialized value $value in string eq at fhem.pl line 4925.

Looking into the code it seems to concern alm_name and fc_loc_dtz, that do not appear as readings either. I'm not a Perl pro, is it possible to implement it more robust if those values are missing to keep the log clean?

siggel commented 3 years ago

see pull request for a proposed fix

vuffiraa72 commented 3 years ago

Thank you for the fix!