From: Marc M. <ma...@me...> - 2012-12-20 02:49:01
|
On Sat, Dec 15, 2012 at 10:27:39PM -0500, Dustin Robinson wrote: > Don't know if anyone else has run across this but delete orphan links > throws the following error in my setup: > > tie_events eval error: Can't locate object method "device_id" via package > "Insteon::ALDB_PLM" at > /opt/misterhouse/mh/bin/../lib/Insteon/AllLinkDatabase.pm line 718. Similar (but not idential problem) here on delete orphans: 19/12/2012 18:30:24 [Insteon_PLM] DEBUG3: Received raw PLM data: 026207de8b0f2be806 19/12/2012 18:30:24 [Insteon_PLM] DEBUG3: Received PLM acknowledge: obj=$gar_outlights_kpl; command=peek; extra=E8 19/12/2012 18:30:24 [Insteon_PLM] DEBUG3: Received raw PLM data: 025007de8b18d4ce232ba2 Can't use an undefined value as an ARRAY reference at ../lib/Insteon/AllLinkDatabase.pm line 1240. mh stopped, enter to restart Here's the patch I had to write for mine. You may need to write a similar patch for your problem. --- mh/lib/Insteon/AllLinkDatabase.pm.orig 2012-12-19 18:35:22.259809914 -0800 +++ mh/lib/Insteon/AllLinkDatabase.pm 2012-12-19 18:40:50.003238952 -0800 @@ -1217,7 +1217,9 @@ sub delete_duplicate_link_address { my ($self, $address) = @_; - my $num_duplicate_link_addresses = @{$$self{aldb}{duplicates}}; + my $num_duplicate_link_addresses = 0; + + $num_duplicate_link_addresses = @{$$self{aldb}{duplicates}} if (defined $$self{aldb}{duplicates}); if ($num_duplicate_link_addresses) { my @temp_duplicates = (); @@ -1237,7 +1239,8 @@ { my ($self, $address) = @_; # before adding it, make sure that it isn't already in the list!! - my $num_addresses = @{$$self{aldb}{empty}}; + my $num_addresses = 0; + $num_addresses = @{$$self{aldb}{empty}} if (defined $$self{aldb}{empty}); my $exists = 0; if ($num_addresses and $address) { Note that this code is not bullet proof, Gregg wrote a lot of it quicky when I was reporting bugs to him just before he had to stop contributing. Marc -- "A mouse is a device used to point at the xterm you want to type in" - A.S.R. Microsoft is to operating systems .... .... what McDonalds is to gourmet cooking Home page: http://marc.merlins.org/ |