diff --git a/fhem/FHEM/98_MSwitch.pm b/fhem/FHEM/98_MSwitch.pm index 3799a1c3b..9fda7b1f1 100644 --- a/fhem/FHEM/98_MSwitch.pm +++ b/fhem/FHEM/98_MSwitch.pm @@ -83,7 +83,7 @@ if ( $preconf && $preconf ne "" ) { } my $autoupdate = 'off'; #off/on -my $version = '2.10'; +my $version = '2.11'; my $vupdate = 'V2.00' ; # versionsnummer der datenstruktur . änderung der nummer löst MSwitch_VUpdate aus . my $savecount = 30 @@ -3684,6 +3684,11 @@ sub MSwitch_fhemwebFn($$$$) { my $alert; foreach (@affecteddevices) { + + my $nopoint =$_; + + $nopoint =~ s/\./point/g; + $alert = ''; my @devicesplit = split( /-AbsCmd/, $_ ); my $devicenamet = $devicesplit[0]; @@ -3714,8 +3719,12 @@ sub MSwitch_fhemwebFn($$$$) { } @befehlssatz = split( / /, $cmdsatz{$devicenamet} ); - my $aktdevice = $_; + + + + my $aktdevice = $_; + ## optionen erzeugen my $option1html = ''; my $option2html = ''; @@ -3839,14 +3848,14 @@ sub MSwitch_fhemwebFn($$$$) { if ( AttrVal( $Name, 'MSwitch_Debug', "0" ) eq '4' ) { $realname = ""; } else { $realname = ""; } @@ -3863,7 +3872,7 @@ sub MSwitch_fhemwebFn($$$$) { ###################### priority my $aktfolge = $reihenfolgehtml; - my $newname = "reihe" . $_; + my $newname = "reihe" . $nopoint; my $tochange = "$savedetails{ $aktdevice . '_priority' }"; my $change = @@ -3895,7 +3904,7 @@ sub MSwitch_fhemwebFn($$$$) { # ID $aktfolge = $idfolgehtml; - $newname = "idreihe" . $_; + $newname = "idreihe" . $nopoint; $tochange = "$savedetails{ $aktdevice . '_id' }"; $change = @@ -3916,7 +3925,7 @@ sub MSwitch_fhemwebFn($$$$) { "; my $aktfolge = $showfolgehtml; - my $newname = "showreihe" . $_; + my $newname = "showreihe" . $nopoint; my $tochange = "$savedetails{ $aktdevice . '_showreihe' }"; my $change = @@ -3941,7 +3950,7 @@ sub MSwitch_fhemwebFn($$$$) { " + . $nopoint . "'>" . $savedetails{ $aktdevice . '_comment' } . " @@ -3975,7 +3984,7 @@ sub MSwitch_fhemwebFn($$$$) { Set "; @@ -4024,7 +4033,7 @@ sub MSwitch_fhemwebFn($$$$) { $detailhtml = $detailhtml . "MSwitch 'cmd1': " . $savedetails{ $aktdevice . '_onarg' } . " @@ -4036,10 +4045,10 @@ sub MSwitch_fhemwebFn($$$$) { "; + . $_ . "' name='cmdseton" . $nopoint . "' size='20' value ='cmd'>"; } $detailhtml = $detailhtml . ""; @@ -4062,7 +4071,7 @@ sub MSwitch_fhemwebFn($$$$) { Set "; @@ -4150,7 +4159,7 @@ sub MSwitch_fhemwebFn($$$$) { . "'cmd1' condition: "; @@ -4168,14 +4177,14 @@ sub MSwitch_fhemwebFn($$$$) { $detailhtml = $detailhtml . " execute and exit if applies"; } else { $detailhtml = $detailhtml . " "; + . $nopoint . "' /> "; } if ( AttrVal( $Name, 'MSwitch_Debug', "0" ) eq '1' ) { @@ -4209,7 +4218,7 @@ sub MSwitch_fhemwebFn($$$$) { . "'cmd2' condition: "; @@ -4225,14 +4234,14 @@ sub MSwitch_fhemwebFn($$$$) { $detailhtml = $detailhtml . " execute and exit if applies"; } else { $detailhtml = $detailhtml . " "; + . $nopoint . "' /> "; } if ( AttrVal( $Name, 'MSwitch_Debug', "0" ) eq '1' ) { @@ -4314,7 +4323,7 @@ sub MSwitch_fhemwebFn($$$$) { $detailhtml = $detailhtml . "'cmd1' "; + . $nopoint . "'>"; my $se11 = ''; my $sel2 = ''; my $sel3 = ''; @@ -4354,7 +4363,7 @@ sub MSwitch_fhemwebFn($$$$) { . " (hh:mm:ss)"; @@ -4370,7 +4379,7 @@ sub MSwitch_fhemwebFn($$$$) { $detailhtml = $detailhtml . "'cmd2' "; + . $nopoint . "'>"; $se11 = ''; $sel2 = ''; @@ -4412,9 +4421,9 @@ sub MSwitch_fhemwebFn($$$$) { $detailhtml = $detailhtml . " (hh:mm:ss) "; @@ -4430,13 +4439,13 @@ sub MSwitch_fhemwebFn($$$$) { $detailhtml = $detailhtml . "Repeats: Repeatdelay in sec: "; @@ -4466,47 +4475,47 @@ sub MSwitch_fhemwebFn($$$$) { # javazeile für übergabe erzeugen $javaform = $javaform . " - devices += \$(\"[name=devicename$_]\").val(); + devices += \$(\"[name=devicename$nopoint]\").val(); devices += '#[DN]'; - devices += \$(\"[name=cmdon$_]\").val()+'#[NF]'; - devices += \$(\"[name=cmdoff$_]\").val()+'#[NF]'; - change = \$(\"[name=cmdonopt$_]\").val(); + devices += \$(\"[name=cmdon$nopoint]\").val()+'#[NF]'; + devices += \$(\"[name=cmdoff$nopoint]\").val()+'#[NF]'; + change = \$(\"[name=cmdonopt$nopoint]\").val(); devices += change+'#[NF]';; - change = \$(\"[name=cmdoffopt$_]\").val(); + change = \$(\"[name=cmdoffopt$nopoint]\").val(); devices += change+'#[NF]';; - devices += \$(\"[name=onatdelay$_]\").val(); + devices += \$(\"[name=onatdelay$nopoint]\").val(); devices += '#[NF]'; - devices += \$(\"[name=offatdelay$_]\").val(); + devices += \$(\"[name=offatdelay$nopoint]\").val(); devices += '#[NF]'; - delay1 = \$(\"[name=timesetoff$_]\").val(); + delay1 = \$(\"[name=timesetoff$nopoint]\").val(); devices += delay1+'#[NF]'; - delay2 = \$(\"[name=timeseton$_]\").val(); + delay2 = \$(\"[name=timeseton$nopoint]\").val(); devices += delay2+'#[NF]'; - devices1 = \$(\"[name=conditionon$_]\").val(); + devices1 = \$(\"[name=conditionon$nopoint]\").val(); devices1 = devices1.replace(/\\|/g,'(DAYS)'); - devices2 = \$(\"[name=conditionoff$_]\").val(); + devices2 = \$(\"[name=conditionoff$nopoint]\").val(); devices2 = devices2.replace(/\\|/g,'(DAYS)'); devices += devices1+'#[NF]'; devices += devices2; devices += '#[NF]'; - devices3 = \$(\"[name=repeatcount$_]\").val(); + devices3 = \$(\"[name=repeatcount$nopoint]\").val(); devices += devices3; devices += '#[NF]'; - devices += \$(\"[name=repeattime$_]\").val(); + devices += \$(\"[name=repeattime$nopoint]\").val(); devices += '#[NF]'; - devices += \$(\"[name=reihe$_]\").val(); + devices += \$(\"[name=reihe$nopoint]\").val(); devices += '#[NF]'; - devices += \$(\"[name=idreihe$_]\").val(); + devices += \$(\"[name=idreihe$nopoint]\").val(); devices += '#[NF]'; - devices += \$(\"[name=cmdcomment$_]\").val(); + devices += \$(\"[name=cmdcomment$nopoint]\").val(); devices += '#[NF]'; - devices += \$(\"[name=exit1$_]\").prop(\"checked\") ? \"1\":\"0\"; + devices += \$(\"[name=exit1$nopoint]\").prop(\"checked\") ? \"1\":\"0\"; devices += '#[NF]'; - devices += \$(\"[name=exit2$_]\").prop(\"checked\") ? \"1\":\"0\"; + devices += \$(\"[name=exit2$nopoint]\").prop(\"checked\") ? \"1\":\"0\"; devices += '#[NF]'; - devices += \$(\"[name=showreihe$_]\").val(); + devices += \$(\"[name=showreihe$nopoint]\").val(); devices += '#[DN]'; "; }