From 22899d7c240fe75232a19a98180665fdf844403a Mon Sep 17 00:00:00 2001 From: DaveNeudoerffer Date: Wed, 19 Jun 2024 13:30:27 -0400 Subject: [PATCH] Some debug messages --- lib/AoGSmartHome_Items.pm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/AoGSmartHome_Items.pm b/lib/AoGSmartHome_Items.pm index ee78ade96..57680fcb1 100644 --- a/lib/AoGSmartHome_Items.pm +++ b/lib/AoGSmartHome_Items.pm @@ -216,6 +216,32 @@ use Storable; #--------------Logging and debugging functions---------------------------------------- +sub break_long_str { + my ($self, $str, $prefix, $maxlength) = @_; + my $result; + + $result = ''; + $str = $str || ''; + while( length( $str ) > $maxlength ) { + my $l = 0; + my $i; + for( $i=0; $i{'id'}; # Makes things easier below... if ( !exists $self->{'uuids'}->{$uuid} ) { + $self->error( "No device id $uuid found"); $response .= <{'uuids'}->{$uuid} ); if ( !defined $devstate ) { + $self->error( "Device $self->{'uuids'}->{$uuid}->{'realname'} has no state; ignoring AoG item."); $response .= <