mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
mqtt2.template: add tasmota rgbw and rgbwct
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20844 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c4ce83872f
commit
7677f23cf7
@ -382,8 +382,8 @@ sub RandomTimer_setState($) {
|
|||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
|
|
||||||
if (RandomTimer_isDisabled($hash)) {
|
if (RandomTimer_isDisabled($hash)) {
|
||||||
#$hash->{STATE} = "disabled";
|
my $dotrigger = ReadingsVal($hash->{NAME},"state","none") ne "disabled" ? 1 : 0;
|
||||||
readingsSingleUpdate ($hash, "state", "disabled", 0);
|
readingsSingleUpdate ($hash, "state", "disabled", $dotrigger);
|
||||||
} else {
|
} else {
|
||||||
my $state = $hash->{helper}{active} ? "on" : "off";
|
my $state = $hash->{helper}{active} ? "on" : "off";
|
||||||
readingsSingleUpdate ($hash, "state", $state, 1);
|
readingsSingleUpdate ($hash, "state", $state, 1);
|
||||||
|
@ -1047,6 +1047,66 @@ attr DEVICE stateFormat POWER1
|
|||||||
attr DEVICE webCmd Color:Color ff0000:Color 00ff00:Color 0000ff:toggle:on:off
|
attr DEVICE webCmd Color:Color ff0000:Color 00ff00:Color 0000ff:toggle:on:off
|
||||||
attr DEVICE model tasmota_rgb_led_controller
|
attr DEVICE model tasmota_rgb_led_controller
|
||||||
|
|
||||||
|
name:tasmota_rgbw_led
|
||||||
|
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
|
||||||
|
desc:Tasmota RGBW bulb or RGBW LED controller
|
||||||
|
order:A_05a1
|
||||||
|
set DEVICE attrTemplate tasmota_basic_state_power1
|
||||||
|
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
|
||||||
|
par:TELETOPIC;info topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}tele$3" : undef }
|
||||||
|
par:STATTOPIC;ack topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}stat$3" : undef }
|
||||||
|
par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") }
|
||||||
|
attr DEVICE icon ICON
|
||||||
|
deletereading -q DEVICE (?!associatedWith).*
|
||||||
|
attr DEVICE setList\
|
||||||
|
off:noArg CMNDTOPIC/POWER1 0\
|
||||||
|
on:noArg CMNDTOPIC/POWER1 1\
|
||||||
|
toggle:noArg CMNDTOPIC/POWER1 2\
|
||||||
|
Color:colorpicker,RGB CMNDTOPIC/COLOR\
|
||||||
|
pct:colorpicker,BRI,0,5,100 CMNDTOPIC/DIMMER\
|
||||||
|
white:colorpicker,BRI,0,5,100 { "CMNDTOPIC/COLOR ". sprintf("000000%02X",$EVTPART1*2.55) }
|
||||||
|
attr DEVICE readingList \
|
||||||
|
TELETOPIC/LWT:.* LWT\
|
||||||
|
TELETOPIC/STATE:.* { json2nameValue($EVENT,'',$JSONMAP) }\
|
||||||
|
TELETOPIC/SENSOR:.* { json2nameValue($EVENT,'',$JSONMAP) }\
|
||||||
|
TELETOPIC/INFO.:.* { json2nameValue($EVENT,'',$JSONMAP) }\
|
||||||
|
TELETOPIC/UPTIME:.* { json2nameValue($EVENT,'',$JSONMAP) }\
|
||||||
|
STATTOPIC/RESULT:.* { json2nameValue($EVENT,'',$JSONMAP) }\
|
||||||
|
STATTOPIC/POWER1:.* state
|
||||||
|
attr DEVICE jsonMap POWER1:state Dimmer:pct Channel_4:white Channel_1:0 Channel_2:0 Channel_3:0 HSBColor:0
|
||||||
|
attr DEVICE webCmd pct:white:Color
|
||||||
|
attr DEVICE webCmdLabel Helligkeit\
|
||||||
|
:Weiss\
|
||||||
|
:Farbe:
|
||||||
|
attr DEVICE devStateIcon {Color::devStateIcon($name,"rgb","Color","pct","state")}
|
||||||
|
attr DEVICE setStateList on off toggle
|
||||||
|
attr DEVICE model tasmota_rgbw_led
|
||||||
|
|
||||||
|
name:tasmota_rgbwct_led
|
||||||
|
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
|
||||||
|
desc:Tasmota RGBW bulb with CT option like LSC Smart Connect Candle 400lm RGBW
|
||||||
|
order:A_05a2
|
||||||
|
set DEVICE attrTemplate tasmota_basic_state_power1
|
||||||
|
set DEVICE attrTemplate tasmota_rgbw_led
|
||||||
|
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
|
||||||
|
par:TELETOPIC;info topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}tele$3" : undef }
|
||||||
|
par:STATTOPIC;ack topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}stat$3" : undef }
|
||||||
|
attr DEVICE setList\
|
||||||
|
off:noArg CMNDTOPIC/POWER1 0\
|
||||||
|
on:noArg CMNDTOPIC/POWER1 1\
|
||||||
|
toggle:noArg CMNDTOPIC/POWER1 2\
|
||||||
|
Color:colorpicker,RGB CMNDTOPIC/COLOR\
|
||||||
|
pct:colorpicker,BRI,0,5,100 CMNDTOPIC/DIMMER\
|
||||||
|
white:colorpicker,BRI,0,5,100 { "CMNDTOPIC/COLOR ". sprintf("000000%02X",$EVTPART1*2.55) }\
|
||||||
|
CT:colorpicker,CT,153,5,500 CMNDTOPIC/CT
|
||||||
|
attr DEVICE jsonMap POWER1:state Dimmer:pct Channel_4:white Channel_1:0 Channel_2:0 Channel_3:0 HSBColor:0 Channel_5:0
|
||||||
|
attr DEVICE webCmd pct:white:Color:CT
|
||||||
|
attr DEVICE webCmdLabel Helligkeit\
|
||||||
|
:Weiss\
|
||||||
|
:Farbe\
|
||||||
|
:Temp
|
||||||
|
attr DEVICE model tasmota_rgbwct_led
|
||||||
|
|
||||||
#source post: https://forum.fhem.de/index.php/topic,105364.0.html
|
#source post: https://forum.fhem.de/index.php/topic,105364.0.html
|
||||||
name:tasmota_TuyaMCU_dimmer
|
name:tasmota_TuyaMCU_dimmer
|
||||||
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
|
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
|
||||||
|
@ -490,7 +490,7 @@ FHEM/98_GAEBUS.pm jamesgo Heizungssteuerung/Raumklima
|
|||||||
FHEM/98_GEOFANCY.pm loredo Unterstützende Dienste
|
FHEM/98_GEOFANCY.pm loredo Unterstützende Dienste
|
||||||
FHEM/98_GoogleAuth.pm betateilchen Unterstützende Dienste
|
FHEM/98_GoogleAuth.pm betateilchen Unterstützende Dienste
|
||||||
FHEM/98_GOOGLECAST.pm dominikkarall Multimedia
|
FHEM/98_GOOGLECAST.pm dominikkarall Multimedia
|
||||||
FHEM/98_Heating_Control.pm igami/Beta-User Unterstützende Dienste
|
FHEM/98_Heating_Control.pm Beta-User Unterstützende Dienste
|
||||||
FHEM/98_help.pm betateilchen Sonstiges
|
FHEM/98_help.pm betateilchen Sonstiges
|
||||||
FHEM/98_HMinfo.pm martinp876 HomeMatic
|
FHEM/98_HMinfo.pm martinp876 HomeMatic
|
||||||
FHEM/98_HourCounter.pm john MAX
|
FHEM/98_HourCounter.pm john MAX
|
||||||
|
Loading…
x
Reference in New Issue
Block a user