FHEM Forum

FHEM => Frontends => Thema gestartet von: wkarl am 21 Dezember 2014, 20:30:33

Titel: [gelöst] Woher kommt set_...?
Beitrag von: wkarl am 21 Dezember 2014, 20:30:33
Hallo,

folgende readingsGroup ist definiert:
#################################################
define Rollladen readingsGroup <%fts_shutter_updown@darkblue>,<Status>,<Lvl>,<Auf>,<>,<>,<Zu>,<Stop> (Badezimmer_RL|Wohnzimmer_RL_(Teich|Terasse)):state,pct,<%fts_shutter_00@grey>,<%fts_shutter_20@grey>,<%fts_shutter_60@grey>,<%fts_shutter_100@grey>,<%rc_RED@red>
attr Rollladen cellStyle { 'c:0' => 'style="color:darkblue;;text-align:left;;font-weight:bold"', 'r:1' => 'style="color:darkblue;;text-align:center;;font-weight:bold"' }
attr Rollladen commands { 'Rollladen.fts_shutter_00@grey' => 'set $DEVICE open', 'Rollladen.fts_shutter_20@grey' => 'set $DEVICE pct 15', 'Rollladen.fts_shutter_60@grey' => 'set $DEVICE pct 50', 'Rollladen.fts_shutter_100@grey' => 'set $DEVICE close', 'Rollladen.rc_RED@red' => 'set $DEVICE stop' }
attr Rollladen fp_H_DV_RolloMarkiseDeko 400,120,0,
attr Rollladen mapping { 'Badezimmer_RL' => 'Badezimmer', 'Wohnzimmer_RL_Teich' => 'Wohnzimmer_Teich', 'Wohnzimmer_RL_Terasse' => 'Wohnzimmer_Terasse' }
attr Rollladen notime 1
attr Rollladen room HausGarten,Z-HA-FloorPlans
attr Rollladen valueFormat { 'state' => "%.0f %%", 'pct' => "%.0f %%" }
attr Rollladen valueIcon { my ($m,$l)=split(":",ReadingsVal($DEVICE,"motor",0),2);; if($m eq "down" && $READING eq "state") {return "fts_shutter_down";;} elsif($m eq "up" && $READING eq "state") {return "fts_shutter_up";;} elsif($READING eq "state") {return "%devStateIcon";;} elsif($VALUE eq "set_on" && $READING eq "state") {return "fts_shutter_down";;} elsif($VALUE eq "set_off" && $READING eq "state") {return "fts_shutter_up";;} }


Die Definition des Badezimmer Rollladen sieht so aus:
#################################################
###### Rollladen
######
#################################################
define Badezimmer_RL CUL_HM 1511E9
attr Badezimmer_RL IODev HMLAN_02
attr Badezimmer_RL IOgrp VirtCCU:HMLAN_02
attr Badezimmer_RL autoReadReg 4_reqStatus
attr Badezimmer_RL devStateIcon open:fts_shutter_00@black \d(\.\d)?:fts_shutter_00@black 1\d(\.\d)?:fts_shutter_10@black 2\d(\.\d)?:fts_shutter_20@black 3\d(\.\d)?:fts_shutter_30@black 4\d(\.\d)?:fts_shutter_40@black 5\d(\.\d)?:fts_shutter_50@black 6\d(\.\d)?:fts_shutter_60@black 7\d(\.\d)?:fts_shutter_70@black 8\d(\.\d)?:fts_shutter_80@black 9\d(\.\d)?:fts_shutter_90@black close:fts_shutter_100@black
attr Badezimmer_RL eventMap off:open on:close
attr Badezimmer_RL expert 2_full
attr Badezimmer_RL firmware 1.6
attr Badezimmer_RL group Badezimmer_Rollladen
attr Badezimmer_RL icon fts_shutter_updown@black
attr Badezimmer_RL model HM-LC-BL1-PB-FM
attr Badezimmer_RL peerIDs 00000000,
attr Badezimmer_RL room H-OG-R-Badezimmer
attr Badezimmer_RL serialNr HEQ0503629
attr Badezimmer_RL subType blindActuator
attr Badezimmer_RL webCmd close:open:stop


Über meine CSS-Datei kommt die Annimation:
/* next lines are for status shutter icons       */
svg.icon.fts_shutter_down {
    display:block;
    border-style:ridge;
    border-color:#3C6585;
    border-radius:3px;
    border-width:1px;
    background-color:#9CB4C7;
    width:50px !important;
    -webkit-animation-name: flash-shutter;
    -webkit-animation-duration: 1s;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: ease-in-out;
    -webkit-animation-direction: alternate;
    animation-name: color-pulse;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    animation-direction: alternate;
}
svg.icon.fts_shutter_up {
    display:block;
    border-style:ridge;
    border-color:#3C6585;
    border-radius:3px;
    border-width:1px;
    background-color:#9CB4C7;
    width:50px !important;
    -webkit-animation-name: flash-shutter;
    -webkit-animation-duration: 1s;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: ease-in-out;
    -webkit-animation-direction: alternate;
    animation-name: color-pulse;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    animation-direction: alternate;
}
@-webkit-keyframes flash-shutter {
  0% { fill:orange; }
  100% { opacity:0; }
}
@keyframes flash-shutter {
  0% { fill:orange; }
  100% { opacity:0; }


Was noch unschön ist, dass kurzzeitig nach dem Betätigen der Steuer-Icons ein 'set_...' (z.B. 'set_on') auftaucht. Woher kommt dies. Es scheint nicht zu 'state' zugehören.

DAnke und ciao
walter
Titel: Antw:Woher kommt set_...?
Beitrag von: justme1968 am 21 Dezember 2014, 22:05:55
homematic setzt state auf set_... nach dem das kommando abgeschickt wurde und es bleibt so lange bis die erste antwort vom
device kommt.

wenn es dich stört leg einfach zusätzliches icon dafür an.

gruß
  andre
Titel: [gelöst] Antw:Woher kommt set_...?
Beitrag von: wkarl am 22 Dezember 2014, 10:09:43
Hallo,

habe die Lösung dazu. set_on und set_off sind nicht auf readingsGroup-Ebene in valueIcon, sondern auf device-Ebene in devStateIcon zu definieren. Dann habe ich in der CSS-Datei den Filter svg.icon.fts_shutter_on bzw _off auf svg[class$=fts_shutter_on] bzw svg[class$=fts_shutter_off] geändert.

ciao walter