fhem-mirror icon indicating copy to clipboard operation
fhem-mirror copied to clipboard

31_HUEDevice.pm log warning

Open bmw-biker opened this issue 4 years ago • 0 comments

Hi HUEDevice works great - also for some Chinese products. Many thanks for that !

One issue I've got... I mainly use some of these Chinese sensors, like Konke and Aqara. Once setup they work very well.

Although sometimes I get a warning in Fhem log file from last line of function HUEDevice_Get. PERL WARNING: Use of uninitialized value $list in concatenation (.) or string at ./FHEM/31_HUEDevice.pm line 1257. It seems that I get these warnings during setup, each time I change an attribute from Fhem UI. I put a log code at the beginning of regarding function HUEDevice_Get. my $cmd= $a[1]; Log3 $name, 2, "[$name] command <$cmd>"; The output shows that if in case of a warning a Fhem command '?' to this device is being issued. [motion_FX_stairs] command <?> Yes, the command itself seems to be a questionmark and therefore is not being handled in the code. Because of my sensor the $list at the end of HUEDevice_Get will not be set. So the last line of HUEDevice_Get throws the warning. return "Unknown argument $cmd, choose one of $list";

Could you please implement some bugfix ? Where does command '?' come from. I do not issue it. I only set valid attributes in Fhem UI. Maybe e.g. just ignore the '?'

Best regards

bmw-biker avatar Mar 21 '20 12:03 bmw-biker