FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: P.A.Trick am 15 Juli 2014, 20:11:09

Titel: FB_CALLMONITOR seit heute kaputt?
Beitrag von: P.A.Trick am 15 Juli 2014, 20:11:09
2014.07.15 20:08:06.531 1: reload: Error:Modul 72_FB_CALLMONITOR deactivated:
Type of arg 1 to keys must be hash (not hash element) at ./FHEM/72_FB_CALLMONITOR.pm line 292, near "})
    "

2014.07.15 20:08:06.532 0: Type of arg 1 to keys must be hash (not hash element) at ./FHEM/72_FB_CALLMONITOR.pm line 292, near "})
    "


Eben nach dem Update bekomme ich die obige Fehlermeldung!
Titel: Antw:FB_CALLMONITOR seit heute kaputt?
Beitrag von: Markus Bloch am 15 Juli 2014, 22:51:51
soeben gefixt. In meiner Perl-Version meckert er da nicht rum, daher habe ich das übersehen.

Ist ab morgen verfügbar.

Viele Grüße

Markus
Titel: Antw:FB_CALLMONITOR seit heute kaputt?
Beitrag von: P.A.Trick am 16 Juli 2014, 00:06:15
Merci
Titel: Antw:FB_CALLMONITOR seit heute kaputt?
Beitrag von: hyper2910 am 20 Juli 2014, 09:56:46
hi,

habe das problem noch immer:

2014.07.20 09:51:07 0: Server shutdown
Subroutine myUtils_Initialize redefined at ./FHEM/99_myUtils.pm line 26.
Useless use of a variable in void context at ./FHEM/99_myUtilsTelefon.pm line 184.
2014.07.20 09:51:18 1: reload: Error:Modul 99_myUtilsTelefon deactivated:

2014.07.20 09:51:18 3: telnetPort: port 7072 opened

Titel: Antw:FB_CALLMONITOR seit heute kaputt?
Beitrag von: Brockmann am 20 Juli 2014, 10:12:07
Zitat von: hyper2910 am 20 Juli 2014, 09:56:46
habe das problem noch immer:
Das ist doch aber ein ganz anderer Fehler. Und er tritt in Deinem eigenen Modul auf und nicht im FB_CALLMONITOR.
Woher soll denn hier jemand wissen, was Du an dieser Stelle in Deiner eigenen Datei stehen hast?
Titel: Antw:FB_CALLMONITOR seit heute kaputt?
Beitrag von: hyper2910 am 20 Juli 2014, 10:16:16
OK,

hier mal die Datei, so aus dem Artikel übernommen.


#################################################
# $Id: 99_myUtilsTelefon.pm 1932 2012-10-06 20:15:33Z ulimaass $
package main;

use strict;
use warnings;
use POSIX;
use FritzBoxUtils;


# fuer Telefonanrufe
our @A;
our @B;
our @C;
our @D;
our @E;
our %TelefonAktionsListe;


sub
myUtilsTelefon_Initialize($$)
{
  my ($hash) = @_;

 
  #...
 

}
################################################################
##
#
#sub SendSMS ($$)
#{
#  my $adress = $_[0].'@tenbrock.de';
#   my $body = $_[1];
#   Log (3,"SendSMS: $adress - $body");
#   FB_mail($adress,"",$body);
# end sub SendSMS
#}
#####################################
# Anruffunktionen ueber Fritzbox

sub
FBCall ($$)
{

my $callnr = $_[0];
my $duration = $_[1];

Log(3,"FBCall: $callnr mit Dauer $duration");


$callnr = "ATDT".$callnr."#";
my $ret = "ATD: " . `echo $callnr | nc 127.0.0.1 1011`;
InternalTimer(gettimeofday()+$duration, "FBHangOn", "", 0);
return;
}

sub FBHangOn ()
{
Log(3,"FBCallHangOn aufgerufen");

my $ret = " ATH: " . `echo "ATH" | nc 127.0.0.1 1011`;
$ret =~ s,[\r\n]*,,g;
return;
}

######################################

sub TelefonAktion($$)
{
# es wird der Name und die interne angerufene Nummer uebergeen

my ($caller) = split ('\(',$_[0]);
$caller = ltrim(rtrim($caller));

my $intern = $_[1];

# Log(3,"TelefonAktion: $caller $intern");
# Sound ausgeben

my $com = $main::TelefonAktionsListe{$caller};

if ($com)
{
    Log(3,"TelefonAktion: commando: $com");
   sig2_repeat($com,5,4);
} # falls commando vorhanden

} # end sub TelefonAktion

######################################
# EventZeit: Die Zeit wird nicht in der fhem-Reihenfolge, sondern für "human Interface" dargestellt
sub EventZeit()
{
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time());
return sprintf ("%2d:%02d:%02d %2d.%02d.%4d", $hour,$min,$sec,$mday,($mon+1),($year+1900));
} # end sub EventZeit

######################################


sub TelefonMonitor($)
{
our $extnum;
our $intnum;
our $extname;
our $callID;
our $callDuration;
our $stat;
my $i; my $j;
our $ab;
my $Fritz_Box = $defs{"Fritz_Box"};

my ($event,$arg) = split (':',$_[0]);
$arg = ltrim($arg);

# Log(3,"TM: event: $event arg: $arg");
if ($event eq "event")
{
$stat = $arg;
if ($arg eq "disconnect")
  {
#    fhem("set msg2_TVMarina MUTE 0");
#    fhem("set msg2_TVWohnzimmer MUTE 0");
#    sig2_break(); fiedel: -> Funktion um Anrufername auf FS20SIG2 auszugeben (nicht genutzt)
#    sig2(70); # ringout
  } # if disconnect
    return;
} # end if event

if ($stat eq "ring")
{
if ($event eq"external_number")
  {
    $extnum = $arg;
return;
} # if external number


if ($event eq "external_name")
  {
    $extname = $arg;
   return;
}
if ($event eq "internal_number")
  {
    $intnum = $arg;
   return;
   } # end if intnum


if ($event eq "call_id")
{
   $callID = $arg;
# hier koennen wir eine anrufgesteuerte Aktion starten
TelefonAktion($extname, $intnum);

$A[$callID] = "in";
   $B[$callID] = EventZeit();
   $C[$callID] = $extname;
   $D[$callID] = $extnum;
# fiedel: Folgende Dummys bzw. Funktionen in der CFG einrichten, wenn Samsung TV vorhanden!
#    fhem("set msg2_TVMarina MUTE 1");
#    fhem("set msg2_TVWohnzimmer MUTE 1");
#    fhem("set msg1_TVMarina call Anruf von $extname $extnum");
#    fhem("set msg1_TVWohnzimmer call Anruf von $extname $extnum");
   return;
   } # end if callid
return;
} # end if ring loop

if ($stat eq "connect")
{
if (($event eq"internal_connection") &&
     ($arg =~m/Answering_Machine_.*/))
    {
    $ab = "ab";
    } # end if internal_connection
if ($event eq "call_id")
{
   $callID = $arg;
if ($ab && ($ab eq "AB")) {$A[$callID] = "AB"; $ab; }
  $ab = undef; # zuruecksetzen
   } # end if  callID
   } # end if connect


if ($stat eq "call")
{
if ($event eq"external_number")
  {
    $extnum = $arg;
#sig2(70); # ringout
return;   
} # if external number

if ($event eq "external_name")
  {
    $extname = $arg;
   return;
}
if ($event eq "call_id")
{
   $callID = $arg;
$A[$callID] = "out";
   $B[$callID] = EventZeit();
   $C[$callID] = $extname;
   $D[$callID] = $extnum;

   return;
   } # end if callid
return;
} # end if callloop



if ($stat eq "disconnect")
{


if ($event eq "call_duration")
{
  $callDuration = sprintf("%2d:%02d", ($arg/60),$arg%60);
  return;
} # if call_duration


if ($event eq "call_id")
   {
   $callID = $arg;
# shiften der alten Inhalte
   my $tt;
    readingsBeginUpdate($Fritz_Box);

    for ($i=4;$i>0; $i--)
    {
   foreach $j ('A'..'E')
   {
#   $defs{"Fritz_Box"}{READINGS}{$j.($i-1)}{VAL};

    $tt = ReadingsVal("Fritz_Box",$j.($i-1),"-");
   readingsBulkUpdate($Fritz_Box,$j.$i,$tt);
   } # end j
   } # end i
   $E[$callID] = $callDuration;
  readingsBulkUpdate($Fritz_Box,"A0",$A[$callID]);
  readingsBulkUpdate($Fritz_Box,"B0",$B[$callID]);
  readingsBulkUpdate($Fritz_Box,"C0",$C[$callID]);
  readingsBulkUpdate($Fritz_Box,"D0",$D[$callID]);
  readingsBulkUpdate($Fritz_Box,"E0",$E[$callID]);

  readingsEndUpdate($Fritz_Box, 1);
   $stat = "";

   return;
   } # end if callid


} # end if disconnect

##############################
} #end sub TelefonMonitor
Titel: Antw:FB_CALLMONITOR seit heute kaputt?
Beitrag von: Brockmann am 20 Juli 2014, 10:27:01
FB_Callmonitor und der Anrufmonitor aus diesem Thread http://forum.fhem.de/index.php/topic,19238.0.html sind zwei Paar Schuhe. Wobei es durchaus an Änderungen beim FB_CALLMONITOR liegen kann, dass es bei eurem Anrufmonitor nun Probleme gibt. Aber vielleicht verfolgst Du das lieber im dortigen Thread, da gibt es auch schon ein paar Nachrichten zu dem Problem.
Titel: Antw:FB_CALLMONITOR seit heute kaputt?
Beitrag von: P.A.Trick am 20 Juli 2014, 11:00:23
Ja das wird es sein! Ich werde mal den verbose Level hochsetzen und debuggen!
Titel: Antw:FB_CALLMONITOR seit heute kaputt?
Beitrag von: Brockmann am 20 Juli 2014, 12:19:34
Nachtrag:
Der Entwickler von FB_CALLMONITOR hat den Fehler gefunden und behoben. Sollte ab morgen im Update sein.