defmod 26_WandStripes MQTT2_DEVICE shellyrgbw2_6EAB2B
attr 26_WandStripes IODev MQTT2
attr 26_WandStripes alias Stripes Wand
attr 26_WandStripes devStateIcon devStateIcon A_WW_on:hue_filled_lightstrip@orangered:A_WW_off \
A_WW_off:hue_filled_lightstrip@navajowhite:A_WW_on \
A_CW_on:hue_filled_lightstrip@midnightblue:A_CW_off \
A_CW_off:hue_filled_lightstrip@lightblue:A_CW_on \
A_on:on@OrangeRed:A_off \
A_off:off:A_off\
B_WW_on:hue_filled_lightstrip@orangered:B_WW_off \
B_WW_off:hue_filled_lightstrip@navajowhite:B_WW_on \
B_CW_on:hue_filled_lightstrip@midnightblue:B_CW_off \
B_CW_off:hue_filled_lightstrip@lightblue:B_CW_on \
B_on:on@OrangeRed:B_off \
B_off:off:B_off\
WW_on:hue_filled_lightstrip@orangered:A_WW_off \
WW_off:hue_filled_lightstrip@navajowhite:A_WW_on \
CW_on:hue_filled_lightstrip@midnightblue:A_CW_off \
CW_off:hue_filled_lightstrip@lightblue:A_CW_on \
on:on@OrangeRed:off \
off:off:off \
info:rc_INFO@Darkblue \
true:10px-kreis-gruen \
false:10px-kreis-rot \
veraltet:refresh@OrangeRed:Upgrade \
aktuell:rc_BLANK\
attr 26_WandStripes devStateStyle style="text-align:right"
attr 26_WandStripes icon light_led_stripe
attr 26_WandStripes jsonMap brightness:pct
attr 26_WandStripes readingList shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/0:.* A_CW\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/0/status:.* { json2nameValue($EVENT, 'A_CW_', $JSONMAP) }\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/1:.* A_WW\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/1/status:.* { json2nameValue($EVENT, 'A_WW_', $JSONMAP) }\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/2:.* B_CW\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/2/status:.* { json2nameValue($EVENT, 'B_CW_', $JSONMAP) }\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/3:.* B_WW\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/white/3/status:.* { json2nameValue($EVENT, 'B_WW_', $JSONMAP) }\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/online:.* online\
shellyrgbw2_6EAB2B:shellies/26_shellyrgbw2-6EAB2B_AB/announce:.* { json2nameValue($EVENT, '', $JSONMAP) } \
shellies/announce:.* { $EVENT =~ m,..id...26_shellyrgbw2-6EAB2B_AB...mac.*, ? json2nameValue($EVENT) : undef }\
attr 26_WandStripes room temp,99_MQTT2_DEVICE
attr 26_WandStripes setList A_CW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command off \
A_CW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/0/command on \
A_CW_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"mode":"white","brightness":"$EVTPART1"} \
A_CW_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/0/set {"turn":"on","brightness":"$EVTPART1"} \
A_WW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command off \
A_WW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/1/command on \
A_WW_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"mode":"white","brightness":"$EVTPART1"} \
A_WW_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/1/set {"turn":"on","brightness":"$EVTPART1"} \
B_CW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/2/command off \
B_CW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/2/command on \
B_CW_pct:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/2/set {"mode":"white","brightness":"$EVTPART1"} \
B_CW_pct_on:colorpicker,BRI,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/2/set {"turn":"on","brightness":"$EVTPART1"} \
B_WW_off:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/3/command off \
B_WW_on:noArg shellies/26_shellyrgbw2-6EAB2B_AB/white/3/command on \
B_WW_pct:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/3/set {"mode":"white","brightness":"$EVTPART1"} \
B_WW_pct_on:colorpicker,CT,0,1,100 shellies/26_shellyrgbw2-6EAB2B_AB/white/3/set {"turn":"on","brightness":"$EVTPART1"} \
A_on:noArg {fhem "set $NAME A_CW_on;;set $NAME A_WW_on;;";;} \
A_off:noArg {fhem "set $NAME A_CW_off;;set $NAME A_WW_off;;";;} \
B_on:noArg {fhem "set $NAME B_CW_on;;set $NAME B_WW_on;;";;} \
B_off:noArg {fhem "set $NAME B_CW_off;;set $NAME B_WW_off;;";;} \
on:noArg {fhem "set $NAME A_CW_on;;set $NAME A_WW_on;;set $NAME B_CW_on;;set $NAME B_WW_on;;";;} \
off:noArg {fhem "set $NAME A_CW_off;;set $NAME A_WW_off;;set $NAME B_CW_off;;set $NAME B_WW_off;;";;} \
WW_pct:colorpicker,CT,0,1,100 {fhem "set $NAME A_WW_pct $EVTPART1;;set $NAME B_WW_pct $EVTPART1;;";;} \
WW_pct_on:colorpicker,CT,0,1,100 {fhem "set $NAME A_WW_pct_on $EVTPART1;;set $NAME B_WW_pct_on $EVTPART1;;";;} \
CW_pct:colorpicker,BRI,0,1,100 {fhem "set $NAME A_CW_pct $EVTPART1;;set $NAME B_CW_pct $EVTPART1;;";;} \
CW_pct_on:colorpicker,BRI,0,1,100 {fhem "set $NAME A_CW_pct_on $EVTPART1;;set $NAME B_CW_pct_on $EVTPART1;;";;} \
x_mqttcom shellies/26_shellyrgbw2-6EAB2B_AB/command $EVTPART1 \
x_httpcom { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVTPART1.",".ReadPassword($defs{$NAME})) } \
x_httpcom_login {StorePassword($defs{$NAME},$EVTPART1) } \
x_update:noArg shellies/26_shellyrgbw2-6EAB2B_AB/command update_fw \
reboot:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }\
status:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }\
settings:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }\
shelly:noArg { X_PerformShellyHttpRequest($NAME,ReadingsVal($NAME,"ip","").",".$EVENT.",".ReadPassword($defs{$NAME})) }\
attr 26_WandStripes stateFormat StatusText\
SystemState\
state\
connection
attr 26_WandStripes userReadings consumption\
{ \
return (ReadingsNum($NAME,"A_WW_power",0) + ReadingsNum($NAME,"A_CW_power",0) + ReadingsNum($NAME,"B_WW_power",0) + ReadingsNum($NAME,"B_CW_power",0)) \
},\
state\
{\
if (ReadingsVal($NAME,"A_CW","off") eq "off") {\
if (ReadingsVal($NAME,"A_WW","off") eq "off") {\
if (ReadingsVal($NAME,"B_CW","off") eq "off") {\
if (ReadingsVal($NAME,"B_WW","off") eq "off") {\
return "off";;\
}\
}\
}\
}\
return "on";; \
},\
WW_pct\
{\
if (ReadingsVal($NAME,"A_WW_pct","A") eq ReadingsVal($NAME,"B_WW_pct","B")) {\
return ReadingsVal($NAME,"A_WW_pct","A");;\
}\
return "0";;\
},\
CW_pct\
{\
if (ReadingsVal($NAME,"A_CW_pct","A") eq ReadingsVal($NAME,"B_CW_pct","B")) {\
return ReadingsVal($NAME,"A_CW_pct","0");;\
}\
return "0";;\
},\
StatusText \
{\
my $result = "";;\
if (uc(ReadingsVal($NAME,"state","")) eq "OFF") {\
$result = 'ist aus';;\
}\
else {\
$result = ' ist an (ACW='.ReadingsVal($NAME,"A_CW","").'/AWW='.ReadingsVal($NAME,"A_WW","").'/BCW='.ReadingsVal($NAME,"B_CW","").'/BWW='.ReadingsVal($NAME,"B_WW","").")";;\
}\
return AttrVal($NAME,"alias","")." ".$result."!";;\
},\
SystemState \
{\
if ( ReadingsVal($NAME,"new_fw","false") ne "false") {\
return "veraltet";;\
}\
else {\
return "aktuell";;\
}\
},\
connection \
{\
if ( ReadingsVal($NAME,"online","") eq "true") {\
return "<a href='http://".ReadingsVal($NAME,"ip","")."' target='_blank'>".FW_makeImage("10px-kreis-gruen","true")."</a>";;\
}\
else {\
return "<a href='http://".ReadingsVal($NAME,"ip","")."' target='_blank'>".FW_makeImage("10px-kreis-rot","false")."</a>";;\
}\
\
}
attr 26_WandStripes webCmd WW_pct:CW_pct
Alles anzeigen