Warning im Log alle 3 Minuten

Begonnen von maxritti, 06 Januar 2022, 20:38:27

Vorheriges Thema - Nächstes Thema

maxritti

N'Abend zusammen,

seit einiger Zeit nervt mich eine Meldung im Log von meinem FHEM.
Es funktioniert zwar alles, aber irgendwie finde ich auch Warnings im Log unschön.

Ich habe mal eine eigene Rollladensteuerung gebaut, die mit HM Aktoren und einem Helligkeitssensort arbeitet.
Dabei ist ein notify definiert, welches auf den Helligkeitswert reagieren soll.

Internals:
   DEF        EG_dr_TS_Terrasse:luminosity:.* {myRolllaedenUtils_Runter1()}
   FUUID      5c549a8a-f33f-b047-0990-8b7df69b81bb91a7
   NAME       no_Rollo_Luminosity
   NOTIFYDEV  EG_dr_TS_Terrasse
   NR         166
   NTFY_ORDER 50-no_Rollo_Luminosity
   REGEXP     EG_dr_TS_Terrasse:luminosity:.*
   STATE      active
   TRIGGERTIME 1641497511.06315
   TYPE       notify
   READINGS:
     2022-01-06 20:34:18   state           active
     2022-01-06 20:31:51   triggeredByDev  EG_dr_TS_Terrasse
     2022-01-06 20:31:51   triggeredByEvent luminosity: 1.17
Attributes:
   room       Rollo


Die Meldung sieht wie folgt aus:

2022.01.06 20:34:52 1: PERL WARNING: Argument "runningUp" isn't numeric in division (/) at (eval 15599) line 1.
2022.01.06 20:34:52 3: eval: my $EVENT=   $evalSpecials->{'%EVENT'};my $EVTPART0=   $evalSpecials->{'%EVTPART0'};my $EVTPART1=   $evalSpecials->{'%EVTPART1'};my $NAME=   $evalSpecials->{'%NAME'};my $SELF=   $evalSpecials->{'%SELF'};my $TYPE=   $evalSpecials->{'%TYPE'};{myRolllaedenUtils_Runter1()}
2022.01.06 20:34:52 1: PERL WARNING: Argument "runningUp" isn't numeric in division (/) at (eval 15600) line 1.
2022.01.06 20:34:52 3: eval: my $EVENT=   $evalSpecials->{'%EVENT'};my $EVTPART0=   $evalSpecials->{'%EVTPART0'};my $EVTPART1=   $evalSpecials->{'%EVTPART1'};my $NAME=   $evalSpecials->{'%NAME'};my $SELF=   $evalSpecials->{'%SELF'};my $TYPE=   $evalSpecials->{'%TYPE'};{myRolllaedenUtils_Runter1()}


und kommt wohl aus meinem Modul, wo die Funktion myRolllaedenUtils_Runter1 definiert ist.
Nur was ist da falsch an der Funktion, dass solch eine Warning ausgegeben wird?

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# $Id: 99 _myRolllaedenUtils.pm 0001 2017 - 06 - 23 hh: mm: ssZ maxritti $

# EG_ku_RO_StrasseLinks
# EG_ku_RO_StrasseRechts
# EG_wz_RO_Carport
# EG_wz_RO_TerrasseLinks
# EG_wz_RO_TerrasseRechts
# OG_elt_RO_Strasse
# OG_ki1_RO_Carport
# OG_ki1_RO_Garten
# OG_ki2_RO_Garten

# EG_ku_TK_Strasse
# EG_wz_TK_Carport
# EG_wz_TK_Terrasse
# OG_szk_TK_SchlafenTim

# du_Rollo_Art

package main;
use strict;
use warnings;
use POSIX;

our @devices_Rollo;
our @devices_TK;
our % devices_Rollo_state;
our % devices_TK_state;
our $OnOff;
our $Art;
our $PV;
our $Zeit_hoch;
our $Zeit_hoch_WE;
our $Zeit_runter;
our $Luminosity;
our $cur_Luminosity;
our $Azimuth;
our $cur_time;
our $Tageslicht;

our $debug;
our $test;

sub myRolllaedenUtils_Initialize($$) {
my($hash) = @_;
}

sub myRolllaedenUtils_OnOff() {

$OnOff = ReadingsVal("du_Automatic", "state", "");

if ($OnOff eq "off") {
fhem("set no_Rollo_Luminosity inactive");
fhem("set di_Rollo_Rauf disable");
fhem("set di_Rollo_Rauf_WE disable");
fhem("set di_Rollo_Runter disable");
} else {
fhem("set no_Rollo_Luminosity active");
fhem("set di_Rollo_Rauf initialize");
fhem("set di_Rollo_Rauf_WE initialize");
fhem("set di_Rollo_Runter initialize");
}
}

sub myRolllaedenUtils_Init() {

$debug = 0;

if ($debug eq 1) {
Log(3, "----- Init --------");
}

my @devices_Rollo = devspec2array("automatic=1");

my @devices_TK = ("EG_ku_TK_Strasse",
"EG_wz_TK_Carport",
"EG_wz_TK_Terrasse",
"OG_elt_TK_Strasse",
"OG_szk_TK_SchlafenTim");

$OnOff = ReadingsVal("du_Automatic", "state", "");
$Art = ReadingsVal("du_Rollo_Art", "state", "");
$PV = ReadingsVal("du_Rollo_PV", "state", "");
$Zeit_hoch = ReadingsVal("du_Rollo_Zeit_ho", "state", "");
$Zeit_hoch_WE = ReadingsVal("du_Rollo_Zeit_ho_WE", "state", "");
$Zeit_runter = ReadingsVal("du_Rollo_Zeit_ru", "state", "");
$Luminosity = ReadingsVal("du_Rollo_Luminosity_ru", "state", "");
$cur_Luminosity = ReadingsVal("EG_dr_TS_Terrasse", "luminosity", "0");
$Azimuth = ReadingsVal("myTL", "azimuth", "");
$Tageslicht = ReadingsVal("du_Tageslicht", "state", "");
$cur_time = substr(FmtTime(time()), 0, 5);

if ($debug eq 1) {
Log(3, "cur_time         : $cur_time");
Log(3, "OnOff            : $OnOff");
Log(3, "Art              : $Art");
Log(3, "PV               : $PV");
Log(3, "Zeit_hoch        : $Zeit_hoch");
Log(3, "Zeit_hoch_WE     : $Zeit_hoch_WE");
Log(3, "Zeit_runter      : $Zeit_runter");
Log(3, "Luminosity       : $Luminosity");
Log(3, "cur_Luminosity   : $cur_Luminosity");
Log(3, "Azimuth          : $Azimuth");
Log(3, "Tageslicht       : $Tageslicht");
}

foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
$devices_Rollo_state {
$device
} = $state;
if ($debug eq 1) {
Log(3, "device: $device, state: $state");
}
}

foreach my $deviceTK(@devices_TK) {
my $stateTK = ReadingsVal($deviceTK, "state", "");
$devices_TK_state {
$deviceTK
} = $stateTK;
if ($debug eq 1) {
Log(3, "device-TK: $deviceTK, state: $stateTK");
}
}
if ($debug eq 1) {
Log(3, "---------Init Ende----------------------------");
}
}

sub myRolllaedenUtils_Pushover($$) {
my($msg, $device) = @_;
Log(3, "msg: $msg");
Log(3, "device: $device");
fhem("set myPushover msg '".$msg.
"' device='".$device.
"'");
}

sub myRolllaedenUtils_RunterZeit() {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "----- Runter Zeit --------------------------------");
}

if ($OnOff eq "on") {
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($debug eq 1) {
Log(3, "Device: $device - state: $state");
}
if ($state ne "off") {
if (($device eq "EG_wz_RO_TerrasseLinks")) {
if ($devices_TK_state {
"EG_wz_TK_Terrasse"
}
eq "closed") {
Log(3, "  Terrasse");
my $state = ReadingsVal($device, "state", "");
if ($state ne "off") {
fhem("set EG_wz_RO_TerrasseLinks off");
}
}
}
elsif(($device eq "EG_ku_RO_StrasseRechts")) {
if ($devices_TK_state {
"EG_ku_TK_Strasse"
}
eq "closed") {
Log(3, "  Strasse");
my $state = ReadingsVal($device, "state", "");
if ($state ne "off") {
fhem("set EG_ku_RO_StrasseRechts off");
}
}
} else {
if ($debug eq 1) {
Log(3, "  nicht terasse und nicht strasse");
fhem("set $device off");
}
}
}
}
}
if ($debug eq 1) {
Log(3, "----- Runter Zeit ENDE --------------------------------");
}

}

sub myRolllaedenUtils_Runter($) {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "------ Runter -------------------------------");
}

my $par = $_[0];

if ($debug eq 1) {
Log(3, "Parameter: $par");
}

if ($OnOff eq "on") {
if ((($cur_Luminosity < $Luminosity) and($par eq "1") and($Tageslicht eq "dunkel")) or($par eq "2")) {

if ($debug eq 1) {
Log(3, "  cur < luminosity");
}

my @devices_Rollo = devspec2array("automatic=1");
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($state ne "off") {
if ($device eq "EG_wz_RO_TerrasseLinks") {
Log(3, "TERRASSE");
my $TKstate = $devices_TK_state {
"EG_wz_TK_Terrasse"
};
Log(3, "TK State: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_wz_RO_TerrasseLinks off");
}
}
elsif($device eq "EG_ku_RO_StrasseRechts") {
Log(3, "Strasse rechts");
my $TKstate = $devices_TK_state {
"EG_ku_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_ku_RO_StrasseRechts off");
}
}
elsif($device eq "OG_elt_RO_Strasse") {
Log(3, "Eltern schlafen");
my $TKstate = $devices_TK_state {
"OG_elt_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set OG_elt_RO_Strasse off");
}
} else {
fhem("set $device off");
}
}
}
}
}
if ($debug eq 1) {
Log(3, "---------Runter Ende---------------------");
}

}

sub myRolllaedenUtils_Runter1 {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "------ Runter 1 -------------------------------");
}

if ($OnOff eq "on") {
if (($cur_Luminosity < $Luminosity) and($Tageslicht eq "dunkel")) {

if ($debug eq 1) {
Log(3, "  cur < luminosity");
}

my @devices_Rollo = devspec2array("automatic=1");
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($state ne "off") {
if ($device eq "EG_wz_RO_TerrasseLinks") {
Log(3, "TERRASSE");
my $TKstate = $devices_TK_state {
"EG_wz_TK_Terrasse"
};
Log(3, "TK State: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_wz_RO_TerrasseLinks off");
}
}
elsif($device eq "EG_ku_RO_StrasseRechts") {
Log(3, "Strasse rechts");
my $TKstate = $devices_TK_state {
"EG_ku_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_ku_RO_StrasseRechts off");
}
}
elsif($device eq "OG_elt_RO_Strasse") {
Log(3, "Eltern schlafen");
my $TKstate = $devices_TK_state {
"OG_elt_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set OG_elt_RO_Strasse off");
}
} else {
fhem("set $device off");
}
}
}
}
}
if ($debug eq 1) {
Log(3, "---------Runter Ende---------------------");
}

}

sub myRolllaedenUtils_Runter2() {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "------ Runter 2 -------------------------------");
}

if ($OnOff eq "on") {
if ($debug eq 1) {
Log(3, "  cur < luminosity");
}

my @devices_Rollo = devspec2array("automatic=1");
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($state ne "off") {
if ($device eq "EG_wz_RO_TerrasseLinks") {
Log(3, "TERRASSE");
my $TKstate = $devices_TK_state {
"EG_wz_TK_Terrasse"
};
Log(3, "TK State: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_wz_RO_TerrasseLinks off");
}
}
elsif($device eq "EG_ku_RO_StrasseRechts") {
Log(3, "Strasse rechts");
my $TKstate = $devices_TK_state {
"EG_ku_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_ku_RO_StrasseRechts off");
}
}
elsif($device eq "OG_elt_RO_Strasse") {
Log(3, "Eltern schlafen");
my $TKstate = $devices_TK_state {
"OG_elt_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set OG_elt_RO_Strasse off");
}
} else {
fhem("set $device off");
}
}
}
}
if ($debug eq 1) {
Log(3, "---------Runter Ende---------------------");
}

}

sub myRolllaedenUtils_Rollos_Rauf {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "Rollos rauf wegen Uhrzeit oder Manuell....");
Log(3, "-------------------------------------");
}

if ($OnOff eq "on") {
my @devices_Rollo = devspec2array("automatic=1");
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($state ne "on") {
fhem("set $device on");
}
}
}
}

sub myRolllaedenUtils_Rollos_Rauf_WE() {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "Rollos rauf wegen Uhrzeit-WE....");
Log(3, "-------------------------------------");
}

if ($OnOff eq "on") {
my @devices_Rollo = devspec2array("automatic=1");
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($state ne "on") {
fhem("set $device on");
}
}
}
}

sub myRolllaedenUtils_Tuerkontakte($$) {
my($name, $event) = @_;
Log(3, "device: $name - event: $event");
fhem("set myPushover msg 'Tuerkontakte' 'device: $name - event: $event' 'iPhone7' 0 ''");
}

sub myRolllaedenUtils_LongStop() {
fhem("set EG_Rollo_Haustuer stop");
fhem("set EG_Rollo_Haustuer stop");
fhem("set EG_Rollo_Haustuer stop");
}

1;# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# $Id: 99 _myRolllaedenUtils.pm 0001 2017 - 06 - 23 hh: mm: ssZ maxritti $

# EG_ku_RO_StrasseLinks
# EG_ku_RO_StrasseRechts
# EG_wz_RO_Carport
# EG_wz_RO_TerrasseLinks
# EG_wz_RO_TerrasseRechts
# OG_elt_RO_Strasse
# OG_ki1_RO_Carport
# OG_ki1_RO_Garten
# OG_ki2_RO_Garten

# EG_ku_TK_Strasse
# EG_wz_TK_Carport
# EG_wz_TK_Terrasse
# OG_szk_TK_SchlafenTim

# du_Rollo_Art

package main;
use strict;
use warnings;
use POSIX;

our @devices_Rollo;
our @devices_TK;
our % devices_Rollo_state;
our % devices_TK_state;
our $OnOff;
our $Art;
our $PV;
our $Zeit_hoch;
our $Zeit_hoch_WE;
our $Zeit_runter;
our $Luminosity;
our $cur_Luminosity;
our $Azimuth;
our $cur_time;
our $Tageslicht;

our $debug;
our $test;

sub myRolllaedenUtils_Initialize($$) {
my($hash) = @_;
}

sub myRolllaedenUtils_OnOff() {

$OnOff = ReadingsVal("du_Automatic", "state", "");

if ($OnOff eq "off") {
fhem("set no_Rollo_Luminosity inactive");
fhem("set di_Rollo_Rauf disable");
fhem("set di_Rollo_Rauf_WE disable");
fhem("set di_Rollo_Runter disable");
} else {
fhem("set no_Rollo_Luminosity active");
fhem("set di_Rollo_Rauf initialize");
fhem("set di_Rollo_Rauf_WE initialize");
fhem("set di_Rollo_Runter initialize");
}
}

sub myRolllaedenUtils_Init() {

$debug = 0;

if ($debug eq 1) {
Log(3, "----- Init --------");
}

my @devices_Rollo = devspec2array("automatic=1");

my @devices_TK = ("EG_ku_TK_Strasse",
"EG_wz_TK_Carport",
"EG_wz_TK_Terrasse",
"OG_elt_TK_Strasse",
"OG_szk_TK_SchlafenTim");

$OnOff = ReadingsVal("du_Automatic", "state", "");
$Art = ReadingsVal("du_Rollo_Art", "state", "");
$PV = ReadingsVal("du_Rollo_PV", "state", "");
$Zeit_hoch = ReadingsVal("du_Rollo_Zeit_ho", "state", "");
$Zeit_hoch_WE = ReadingsVal("du_Rollo_Zeit_ho_WE", "state", "");
$Zeit_runter = ReadingsVal("du_Rollo_Zeit_ru", "state", "");
$Luminosity = ReadingsVal("du_Rollo_Luminosity_ru", "state", "");
$cur_Luminosity = ReadingsVal("EG_dr_TS_Terrasse", "luminosity", "0");
$Azimuth = ReadingsVal("myTL", "azimuth", "");
$Tageslicht = ReadingsVal("du_Tageslicht", "state", "");
$cur_time = substr(FmtTime(time()), 0, 5);

if ($debug eq 1) {
Log(3, "cur_time         : $cur_time");
Log(3, "OnOff            : $OnOff");
Log(3, "Art              : $Art");
Log(3, "PV               : $PV");
Log(3, "Zeit_hoch        : $Zeit_hoch");
Log(3, "Zeit_hoch_WE     : $Zeit_hoch_WE");
Log(3, "Zeit_runter      : $Zeit_runter");
Log(3, "Luminosity       : $Luminosity");
Log(3, "cur_Luminosity   : $cur_Luminosity");
Log(3, "Azimuth          : $Azimuth");
Log(3, "Tageslicht       : $Tageslicht");
}

foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
$devices_Rollo_state {
$device
} = $state;
if ($debug eq 1) {
Log(3, "device: $device, state: $state");
}
}

foreach my $deviceTK(@devices_TK) {
my $stateTK = ReadingsVal($deviceTK, "state", "");
$devices_TK_state {
$deviceTK
} = $stateTK;
if ($debug eq 1) {
Log(3, "device-TK: $deviceTK, state: $stateTK");
}
}
if ($debug eq 1) {
Log(3, "---------Init Ende----------------------------");
}
}

sub myRolllaedenUtils_Pushover($$) {
my($msg, $device) = @_;
Log(3, "msg: $msg");
Log(3, "device: $device");
fhem("set myPushover msg '".$msg.
"' device='".$device.
"'");
}

sub myRolllaedenUtils_RunterZeit() {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "----- Runter Zeit --------------------------------");
}

if ($OnOff eq "on") {
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($debug eq 1) {
Log(3, "Device: $device - state: $state");
}
if ($state ne "off") {
if (($device eq "EG_wz_RO_TerrasseLinks")) {
if ($devices_TK_state {
"EG_wz_TK_Terrasse"
}
eq "closed") {
Log(3, "  Terrasse");
my $state = ReadingsVal($device, "state", "");
if ($state ne "off") {
fhem("set EG_wz_RO_TerrasseLinks off");
}
}
}
elsif(($device eq "EG_ku_RO_StrasseRechts")) {
if ($devices_TK_state {
"EG_ku_TK_Strasse"
}
eq "closed") {
Log(3, "  Strasse");
my $state = ReadingsVal($device, "state", "");
if ($state ne "off") {
fhem("set EG_ku_RO_StrasseRechts off");
}
}
} else {
if ($debug eq 1) {
Log(3, "  nicht terasse und nicht strasse");
fhem("set $device off");
}
}
}
}
}
if ($debug eq 1) {
Log(3, "----- Runter Zeit ENDE --------------------------------");
}

}

sub myRolllaedenUtils_Runter($) {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "------ Runter -------------------------------");
}

my $par = $_[0];

if ($debug eq 1) {
Log(3, "Parameter: $par");
}

if ($OnOff eq "on") {
if ((($cur_Luminosity < $Luminosity) and($par eq "1") and($Tageslicht eq "dunkel")) or($par eq "2")) {

if ($debug eq 1) {
Log(3, "  cur < luminosity");
}

my @devices_Rollo = devspec2array("automatic=1");
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($state ne "off") {
if ($device eq "EG_wz_RO_TerrasseLinks") {
Log(3, "TERRASSE");
my $TKstate = $devices_TK_state {
"EG_wz_TK_Terrasse"
};
Log(3, "TK State: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_wz_RO_TerrasseLinks off");
}
}
elsif($device eq "EG_ku_RO_StrasseRechts") {
Log(3, "Strasse rechts");
my $TKstate = $devices_TK_state {
"EG_ku_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_ku_RO_StrasseRechts off");
}
}
elsif($device eq "OG_elt_RO_Strasse") {
Log(3, "Eltern schlafen");
my $TKstate = $devices_TK_state {
"OG_elt_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set OG_elt_RO_Strasse off");
}
} else {
fhem("set $device off");
}
}
}
}
}
if ($debug eq 1) {
Log(3, "---------Runter Ende---------------------");
}

}

sub myRolllaedenUtils_Runter1() {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "------ Runter 1 -------------------------------");
}

if ($OnOff eq "on") {
if (($cur_Luminosity < $Luminosity) and($Tageslicht eq "dunkel")) {

if ($debug eq 1) {
Log(3, "  cur < luminosity");
}

my @devices_Rollo = devspec2array("automatic=1");
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($state ne "off") {
if ($device eq "EG_wz_RO_TerrasseLinks") {
Log(3, "TERRASSE");
my $TKstate = $devices_TK_state {
"EG_wz_TK_Terrasse"
};
Log(3, "TK State: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_wz_RO_TerrasseLinks off");
}
}
elsif($device eq "EG_ku_RO_StrasseRechts") {
Log(3, "Strasse rechts");
my $TKstate = $devices_TK_state {
"EG_ku_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_ku_RO_StrasseRechts off");
}
}
elsif($device eq "OG_elt_RO_Strasse") {
Log(3, "Eltern schlafen");
my $TKstate = $devices_TK_state {
"OG_elt_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set OG_elt_RO_Strasse off");
}
} else {
fhem("set $device off");
}
}
}
}
}
if ($debug eq 1) {
Log(3, "---------Runter Ende---------------------");
}

}

sub myRolllaedenUtils_Runter2() {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "------ Runter 2 -------------------------------");
}

if ($OnOff eq "on") {
if ($debug eq 1) {
Log(3, "  cur < luminosity");
}

my @devices_Rollo = devspec2array("automatic=1");
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($state ne "off") {
if ($device eq "EG_wz_RO_TerrasseLinks") {
Log(3, "TERRASSE");
my $TKstate = $devices_TK_state {
"EG_wz_TK_Terrasse"
};
Log(3, "TK State: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_wz_RO_TerrasseLinks off");
}
}
elsif($device eq "EG_ku_RO_StrasseRechts") {
Log(3, "Strasse rechts");
my $TKstate = $devices_TK_state {
"EG_ku_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set EG_ku_RO_StrasseRechts off");
}
}
elsif($device eq "OG_elt_RO_Strasse") {
Log(3, "Eltern schlafen");
my $TKstate = $devices_TK_state {
"OG_elt_TK_Strasse"
};
Log(3, "TK state: $TKstate");
if ($TKstate eq "closed") {
fhem("set OG_elt_RO_Strasse off");
}
} else {
fhem("set $device off");
}
}
}
}
if ($debug eq 1) {
Log(3, "---------Runter Ende---------------------");
}

}

sub myRolllaedenUtils_Rollos_Rauf() {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "Rollos rauf wegen Uhrzeit oder Manuell....");
Log(3, "-------------------------------------");
}

if ($OnOff eq "on") {
my @devices_Rollo = devspec2array("automatic=1");
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($state ne "on") {
fhem("set $device on");
}
}
}
}

sub myRolllaedenUtils_Rollos_Rauf_WE() {

myRolllaedenUtils_Init();

if ($debug eq 1) {
Log(3, "Rollos rauf wegen Uhrzeit-WE....");
Log(3, "-------------------------------------");
}

if ($OnOff eq "on") {
my @devices_Rollo = devspec2array("automatic=1");
foreach my $device(@devices_Rollo) {
my $state = ReadingsVal($device, "state", "");
if ($state ne "on") {
fhem("set $device on");
}
}
}
}

sub myRolllaedenUtils_Tuerkontakte($$) {
my($name, $event) = @_;
Log(3, "device: $name - event: $event");
fhem("set myPushover msg 'Tuerkontakte' 'device: $name - event: $event' 'iPhone7' 0 ''");
}

sub myRolllaedenUtils_LongStop() {
fhem("set EG_Rollo_Haustuer stop");
fhem("set EG_Rollo_Haustuer stop");
fhem("set EG_Rollo_Haustuer stop");
}

1;

Benni

Wo findet sich denn das angemeckerte Argument "runningUp"?

Ich finde es weder im gelisteten Device, noch im Listing des Moduls.

gb#

maxritti

Tjo, das ist wohl eine berechtigte Frage.
Ich finde da auch nichts, weder in irgendeinem Modul noch in der fhem.cfg.

Irgendwie komisch. Ich habe so gar keinen Ansatz...

frank

myRolllaedenUtils_Runter1()
kommt die funktion vielleicht aus deiner 99_myutils.pm?
FHEM: 6.0(SVN) => Pi3(buster)
IO: CUL433|CUL868|HMLAN|HMUSB2|HMUART
CUL_HM: CC-TC|CC-VD|SEC-SD|SEC-SC|SEC-RHS|Sw1PBU-FM|Sw1-FM|Dim1TPBU-FM|Dim1T-FM|ES-PMSw1-Pl
IT: ITZ500|ITT1500|ITR1500|GRR3500
WebUI [HMdeviceTools.js (hm.js)]: https://forum.fhem.de/index.php/topic,106959.0.html

maxritti

Nö, da steht die nicht drin.

Die Funktion findest Du schon in der 99_myRolllaedenUtils.pm, die ich oben gepostet habe.
Und die funktioniert ja auch halt nur diese doofe Warning.

maxritti

#5
Ob das mit dem Siro Modul zusammenhängt?
Da steht "runningUp" drin.
Ich habe einen Rollo, der via Siro gesteuert wird, wenn es zu dunkel wird.
Alle anderen sind Homematicaktoren.

Ich forsche da noch mal was...

./log/eventTypes.txt:110379 EG_Rollo_Haustuer state: runningUp
./log/eventTypes.txt:2 Siro_43055EA1 state: runningUp
./log/eventTypes.txt:8 Siro_7805E281 state: runningUp
./FHEM/98_Siro.pm: my $state = ReadingsVal( $name, 'state', 'undef' ); #aktuelle aktion ( runningDown/runningUp )
./FHEM/98_Siro.pm: if ($state eq "runningUp" || $state eq "runningUpfortimer")
./FHEM/98_Siro.pm: readingsSingleUpdate( $hash, "state", "runningUp" , 1 ) ;
./FHEM/98_Siro.pm: readingsSingleUpdate( $hash, "state", "runningUpfortimer" , 1 ) ;
./FHEM/98_Siro.pm: $directionmsg ="runningUp";
./FHEM/98_Siro.pm: my $ret ="programming:edit_settings notAvaible:hue_room_garage runningUp.*:fts_shutter_up:stop runningDown.*:fts_shutter_down:stop ".$state.":".$sticon.(int($state/10)*10).":".$move;
./FHEM/98_Siro.pm: $ret ="programming:edit_settings notAvaible:hue_room_garage runningUp.*:fts_shutter_up:stop runningDown.*:fts_shutter_down:stop ".$state.":".$sticon.(100 - (int($state/10)*10)).":".$move if $invers eq "1";
joergwetzig@s-master01:/opt/fhem$

Benni

Ich hab kein Siro am Laufen, von daher einfach mal ein paar Ideen für weitere Forschungen:

Siro schreibt, so wie ich das im Code-Fragment sehe, "runningUp" bei den jeweiligen devices in den state.

Der Warnmeldung nach, soll irgendwo mit diesem state gerechnet (Division) werden. Das kann jetzt wieder an allen möglichen Stellen sein, im Siro-Modul selbst, ein userReading ein notify/doif, ein at.... Hast du ASC laufen, dann könnte es auch dort sein.
Die Verwendung von state könnte u.U. (User-seitig), neben ReadingsVal() auch per Value() erfolgen, das STATE zurück gibt, was per default bei den meisten devices state entspricht.

gb#

maxritti

#7
Danke Dir für die Ideen. Mal schauen ob sich noch etwas findet.

Lustigerweise gab es heute morgen eine ähnliche Warning und zwar zu dem Zeitpunkt, wo ich einfach via Notify die Funktion myRolllaedenUtils_Rollos_Rauf(); aus meinem Modul aufrufe.

Internals:
   DEF        du_RolloRauf_Alle:.*  {myRolllaedenUtils_Rollos_Rauf();}
   FUUID      60239c0b-f33f-7b3d-74b1-d0327ee2460d68f8
   NAME       no_RolloRauf_Alle
   NOTIFYDEV  du_RolloRauf_Alle
   NR         231
   NTFY_ORDER 50-no_RolloRauf_Alle
   REGEXP     du_RolloRauf_Alle:.*
   STATE      2022-01-06 08:12:34
   TYPE       notify
   READINGS:
     2022-01-06 23:13:35   state           active
     2022-01-06 08:12:34   triggeredByDev  du_RolloRauf_Alle
     2022-01-06 08:12:34   triggeredByEvent active
Attributes:
   room       Rollo


Kann bitte jemand dieses Thema nach "Sonstige Systeme" schieben?
Ggf schaut dann jemand wegen Signaliduno mal vorbei und hat eine Idee...

Danke schön

CoolTux

Aktivier mal stacktrace dann sollte mehr zu sehen sein.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

maxritti

Danke. Ist aktiv. Ich bin gespannt.

maxritti

Immerhin kann ich das reproduzieren.

2022.01.07 09:02:28 3 : Siro-Set (EG_Rollo_Haustuer) : set Down
2022.01.07 09:02:28 1 : PERL WARNING: Argument "undef" isn't numeric in multiplication (*) at ./FHEM/98_Siro.pm line 1267.
2022.01.07 09:02:28 3 : eval: {myRolllaedenUtils_Rollos_Rauf()}
2022.01.07 09:02:28 1 : stacktrace:
2022.01.07 09:02:28 1 :     main::__ANON__                      called by ./FHEM/98_Siro.pm (1267)
2022.01.07 09:02:28 1 :     FHEM::Siro::Set                     called by fhem.pl (3891)
2022.01.07 09:02:28 1 :     main::CallFn                        called by fhem.pl (1940)
2022.01.07 09:02:28 1 :     main::DoSet                         called by fhem.pl (1972)
2022.01.07 09:02:28 1 :     main::CommandSet                    called by fhem.pl (1266)
2022.01.07 09:02:28 1 :     main::AnalyzeCommand                called by fhem.pl (1117)
2022.01.07 09:02:28 1 :     main::AnalyzeCommandChain           called by fhem.pl (3936)
2022.01.07 09:02:28 1 :     main::fhem                          called by ./FHEM/99_myRolllaedenUtils.pm (824)
2022.01.07 09:02:28 1 :     main::myRolllaedenUtils_Rollos_Rauf called by (eval 435) (1)
2022.01.07 09:02:28 1 :     (eval)                              called by fhem.pl (1161)
2022.01.07 09:02:28 1 :     main::AnalyzePerlCommand            called by fhem.pl (1190)
2022.01.07 09:02:28 1 :     main::AnalyzeCommand                called by fhem.pl (1117)
2022.01.07 09:02:28 1 :     main::AnalyzeCommandChain           called by ./FHEM/01_FHEMWEB.pm (2780)
2022.01.07 09:02:28 1 :     main::FW_fC                         called by ./FHEM/01_FHEMWEB.pm (1006)
2022.01.07 09:02:28 1 :     main::FW_answerCall                 called by ./FHEM/01_FHEMWEB.pm (598)
2022.01.07 09:02:28 1 :     main::FW_Read                       called by fhem.pl (3896)
2022.01.07 09:02:28 1 :     main::CallFn                        called by fhem.pl (774)
2022.01.07 09:02:28 1 : PERL WARNING: Argument "runningDown" isn't numeric in division (/) at (eval 439) line 1.
2022.01.07 09:02:28 3 : eval: {myRolllaedenUtils_Rollos_Rauf()}
2022.01.07 09:02:28 1 : stacktrace:
2022.01.07 09:02:28 1 :     main::__ANON__                      called by (eval 439) (1)
2022.01.07 09:02:28 1 :     (eval)                              called by ./FHEM/01_FHEMWEB.pm (2977)
2022.01.07 09:02:28 1 :     main::FW_dev2image                  called by ./FHEM/01_FHEMWEB.pm (3302)
2022.01.07 09:02:28 1 :     main::FW_devState                   called by ./FHEM/01_FHEMWEB.pm (3164)
2022.01.07 09:02:28 1 :     main::FW_Notify                     called by fhem.pl (3896)
2022.01.07 09:02:28 1 :     main::CallFn                        called by fhem.pl (3813)
2022.01.07 09:02:28 1 :     main::DoTrigger                     called by fhem.pl (4911)
2022-01-07 09:02:28 Siro EG_Rollo_Haustuer ActionTrigger: fhem
2022-01-07 09:02:28 Siro EG_Rollo_Haustuer 100
2022-01-07 09:02:28 Siro EG_Rollo_Haustuer pct: 100
2022-01-07 09:02:28 Siro EG_Rollo_Haustuer motor-term: Function is not available without set runtime attribute, please define
2022-01-07 09:02:28 Siro EG_Rollo_Haustuer LastAction: on
2022-01-07 09:02:28 Siro EG_Rollo_Haustuer aktRunningAction: on
2022-01-07 09:02:28 Siro EG_Rollo_Haustuer aktEndAction: 1641542548
2022-01-07 09:02:28 Siro EG_Rollo_Haustuer aktTimeAction: 0
2022-01-07 09:02:28 Siro EG_Rollo_Haustuer aktActionFinish: 100
2022-01-07 09:02:28 Siro EG_Rollo_Haustuer LastAction: on
<div class='fhemlog'>2022.01.07 09:02:28 1 :     main::readingsEndUpdate           
2022.01.07 09:02:28 1 :     main::readingsSingleUpdate          called by ./FHEM/98_Siro.pm (1285)
2022.01.07 09:02:28 1 :     FHEM::Siro::Set                     called by fhem.pl (3891)
2022.01.07 09:02:28 1 :     main::CallFn                        called by fhem.pl (1940)
2022.01.07 09:02:28 1 :     main::DoSet                         called by fhem.pl (1972)
2022.01.07 09:02:28 1 :     main::CommandSet                    called by fhem.pl (1266)
2022.01.07 09:02:28 1 :     main::AnalyzeCommand                called by fhem.pl (1117)
2022.01.07 09:02:28 1 :     main::AnalyzeCommandChain           called by fhem.pl (3936)
2022.01.07 09:02:28 1 :     main::fhem                          called by ./FHEM/99_myRolllaedenUtils.pm (824)
2022.01.07 09:02:28 1 :     main::myRolllaedenUtils_Rollos_Rauf called by (eval 435) (1)
2022.01.07 09:02:28 1 :     (eval)                              called by fhem.pl (1161)
2022.01.07 09:02:28 1 :     main::AnalyzePerlCommand            called by fhem.pl (1190)
2022.01.07 09:02:28 1 :     main::AnalyzeCommand                called by fhem.pl (1117)
2022.01.07 09:02:28 1 :     main::AnalyzeCommandChain           called by ./FHEM/01_FHEMWEB.pm (2780)
2022.01.07 09:02:28 1 :     main::FW_fC                         called by ./FHEM/01_FHEMWEB.pm (1006)
2022.01.07 09:02:28 1 :     main::FW_answerCall                 called by ./FHEM/01_FHEMWEB.pm (598)
2022.01.07 09:02:28 1 :     main::FW_Read                       called by fhem.pl (3896)
2022.01.07 09:02:28 1 :     main::CallFn                        called by fhem.pl (774)
2022.01.07 09:02:28 1 : PERL WARNING: Argument "runningDown" isn't numeric in division (/) at (eval 440) line 1.
2022.01.07 09:02:28 3 : eval: {myRolllaedenUtils_Rollos_Rauf()}
2022.01.07 09:02:28 1 : stacktrace:
2022.01.07 09:02:28 1 :     main::__ANON__                      called by (eval 440) (1)
2022.01.07 09:02:28 1 :     (eval)                              called by ./FHEM/01_FHEMWEB.pm (2977)
2022.01.07 09:02:28 1 :     main::FW_dev2image                  called by ./FHEM/01_FHEMWEB.pm (3302)
2022.01.07 09:02:28 1 :     main::FW_devState                   called by ./FHEM/01_FHEMWEB.pm (3164)
2022.01.07 09:02:28 1 :     main::FW_Notify                     called by fhem.pl (3896)
2022.01.07 09:02:28 1 :     main::CallFn                        called by fhem.pl (3813)
2022.01.07 09:02:28 1 :     main::DoTrigger                     called by fhem.pl (4911)
2022.01.07 09:02:28 1 :     main::readingsEndUpdate             called by fhem.pl (5094)
2022.01.07 09:02:28 1 :     main::readingsSingleUpdate          called by ./FHEM/98_Siro.pm (1443)
2022.01.07 09:02:28 1 :     FHEM::Siro::Set                     called by fhem.pl (3891)
2022.01.07 09:02:28 1 :     main::CallFn                        called by fhem.pl (1940)
2022.01.07 09:02:28 1 :     main::DoSet                         called by fhem.pl (1972)
2022.01.07 09:02:28 1 :     main::CommandSet                    called by fhem.pl (1266)
2022.01.07 09:02:28 1 :     main::AnalyzeCommand                called by fhem.pl (1117)
2022.01.07 09:02:28 1 :     main::AnalyzeCommandChain           called by fhem.pl (3936)
2022.01.07 09:02:28 1 :     main::fhem                          called by ./FHEM/99_myRolllaedenUtils.pm (824)
2022.01.07 09:02:28 1 :     main::myRolllaedenUtils_Rollos_Rauf called by (eval 435) (1)
2022.01.07 09:02:28 1 :     (eval)                              called by fhem.pl (1161)
2022.01.07 09:02:28 1 :     main::AnalyzePerlCommand            called by fhem.pl (1190)
2022.01.07 09:02:28 1 :     main::AnalyzeCommand                called by fhem.pl (1117)
2022.01.07 09:02:28 1 :     main::AnalyzeCommandChain           called by ./FHEM/01_FHEMWEB.pm (2780)
2022.01.07 09:02:28 1 :     main::FW_fC                         called by ./FHEM/01_FHEMWEB.pm (1006)
2022.01.07 09:02:28 1 :     main::FW_answerCall                 called by ./FHEM/01_FHEMWEB.pm (598)
2022.01.07 09:02:28 1 :     main::FW_Read                       called by fhem.pl (3896)
2022.01.07 09:02:28 1 :     main::CallFn                        called by fhem.pl (774)
2022.01.07 09:02:28 3 : CUL_HM set EG_wz_RO_Carport on noArg
called by fhem.pl (5094)</div>2022-01-07 09:02:28 Siro EG_Rollo_Haustuer runningDown
2022-01-07 09:02:28 Siro EG_Rollo_Haustuer batteryState: unknown

CoolTux

In Zeile 1267 steht bei mir im Siro Modul nichts. Kannst mal bitte bei Dir schauen.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

maxritti

Musst du nicht in Zeile 1267 schauen?

2022.01.07 09:02:28 1 :     main::__ANON__                      called by ./FHEM/98_Siro.pm (1267)

Ich habe es mal ein wenig aufgebröselt:

Und jetzt bin ich wohl vom Maintainer des Siro Moduls abhängig.  ;)
In Zeile 4 (des u.a. Codeschnipsels) wird zwar $downtime auf undef geprüft und dann ins if gegangen, dann aber in

my $timetodrive = $waytodrive * $down1time;

mit $down1time welches undef ist versucht zu rechnen.

if ($comand eq "on" || $comand eq "downfortimer" )
    {
        Log3( $name, 3, "Siro-Set ($name) : set Down");
        if ($downtime eq "undef" || $uptime eq "undef") # bei ungesetzten fahrzeiten
        {
            readingsBeginUpdate($hash);
            readingsBulkUpdate( $hash, "state", "100" ) ;
            readingsBulkUpdate( $hash, "pct", "100" ) ;
            readingsBulkUpdate( $hash, "motor-term", "Function is not available without set runtime attribu$
            readingsBulkUpdate( $hash, "LastAction", $comand );
            readingsEndUpdate( $hash, 1);
            SendCommand( $hash, 'on' );
        }
        if ($state eq "undef" || $state eq "notAvaible") { $state = 0; }
        my $waytodrive = 100 - $state;

        if (AttrVal( $name, 'SIRO_inversPosition',0 ) eq "1"){$waytodrive = $state;}

        my $timetodrive = $waytodrive * $down1time;
        my $endaction = time + $timetodrive;
        Log3( $name, 5, "Siro-Set: on downtime - waytodrive $waytodrive");
        Log3( $name, 5, "Siro-Set: on downtime - state  $state");
        Log3( $name, 5, "Siro-Set: on downtime - down1time  $down1time");
        SendCommand( $hash, 'on' );
        #SendCommand( $hash, 'stop' );

CoolTux

komisch das das bei mir noch nie gekommen ist. Ist das Siro Rollo bei Dir was besonderes?
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

maxritti

Eigentlich nicht. Einfach ein Rollo an der Haustür, was halt hoch und runter geht, wie es alle anderen 9 Rollos auch machen.
Also für mich nichts besonderes.

Seit wann das auftritt weiß ich auch nicht. Ist mir nur aufgefallen, dass das Log auf einmal so immens gross wurde.