Originally posted by: <email address deleted>
Hallo zusammen
ich habe mehrere enocean switches (Eltako) , die Lampen und Rollo
kontrollieren
define Luce_S_LettoBimbe EnOcean FFA8_______
attr Luce_S_LettoBimbe eventMap AI:off A0:on
attr Luce_S_LettoBimbe fp_Secondopiano 336,1018,0,
attr Luce_S_LettoBimbe room OG
attr Luce_S_LettoBimbe subType switch
attr Luce_S_LettoBimbe webCmd on:off
Die Switches kann ich schalten und ich sehe bei */fhem?room=EG* eine schone
Gluhbirne, die ich klikken kann.
Leider wird die Gluhbirne nuer eingeschaltet und nicht ausgechaltet mit
klicken. Das gilt auch fuer floorplann.
ich habe *geforscht* und gesehen dass alles wird in 01_FHEMWEB.pm
kontrolliert ab reie 2064:
$txt = "
$txt
";
if($webCmd) {
my @a = split(":", $webCmd);
$link = "cmd.$d=set $d $a[0]";
$cmdlist = $webCmd;
}
elsif($hasOnOff && !$cmdlist) {
my (undef, $nstate) = ReplaceEventMap($d, [$d, $state], 0);
$nstate = $state if(!defined($nstate));
$link = "cmd.$d=set $d " . ($nstate eq "on" ? "off" : "on");
$cmdlist = "on:off";
*1. problem mit "attr Luce_S_LettoBimbe webCmd on:off":* $a[0] ist immer
"on"
*2. problem ohne "attr Luce_S_LettoBimbe webCmd on:off":* $nstate wird
nicht *uebersetzt *(d.h bleibt AI oder A0; egal welche eventMap ich habe)
und dann ($nstate eq "on" ? "off" : "on") ist immer "on".
*1. Loesung mit "attr Luce_S_LettoBimbe webCmd on:off"* fuer enocean
funktionierende workarround ist
> diff line 2067:
$link = "cmd.$d=set $d $a[0]"; -->
> $link = "cmd.$d=set $d " . ($state eq $a[0] ? $a[1] : $a[0]);
>
2. *Loesung ohne "attr Luce_S_LettoBimbe webCmd on:off"* fuer enocean
funktionierende workarround ist
> diff line 2073:
$link = "cmd.$d=set $d " . ($nstate eq "on" ? "off" : "on"); -->
>
$link = "cmd.$d=set $d " . ($state eq "on" ? "off" : "on");
>
Da ich nicht verstehe wofuer $nstate gebraucht wird.... hier (2.Loesung)
sollte bitte ein experte kontrollieren.
FHEM macht richtig spass!! Danke an alle!
immi
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com