mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 07:16:03 +00:00
mqtt2.template: add tasmota-cct; some changes in several template files wrt speech recogn
git-svn-id: https://svn.fhem.de/fhem/trunk@21384 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b5ccafcbda
commit
db58a50774
@ -424,6 +424,7 @@ attr DEVICE devicetopic BASE_TOPIC/DEV_ID
|
|||||||
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
|
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
|
||||||
attr DEVICE jsonMap contact:state
|
attr DEVICE jsonMap contact:state
|
||||||
deletereading -q DEVICE (?!associatedWith).*
|
deletereading -q DEVICE (?!associatedWith).*
|
||||||
|
set DEVICE attrTemplate speech_recognition_gdt_and_mapping GENERICDEVTYPE=contact HOMEBRIDGEMAPPING= "ContactSensorState=state,values=closed:CONTACT_DETECTED;;open:CONTACT_NOT_DETECTED"
|
||||||
attr DEVICE model zigbee2mqtt_ContactSensor
|
attr DEVICE model zigbee2mqtt_ContactSensor
|
||||||
|
|
||||||
name:zigbee2mqtt_TempHumHpaSensor
|
name:zigbee2mqtt_TempHumHpaSensor
|
||||||
@ -1207,6 +1208,40 @@ attr DEVICE webCmdLabel Helligkeit\
|
|||||||
set DEVICE attrTemplate speech_recognition_type_light
|
set DEVICE attrTemplate speech_recognition_type_light
|
||||||
attr DEVICE model tasmota_rgbwct_led
|
attr DEVICE model tasmota_rgbwct_led
|
||||||
|
|
||||||
|
name:tasmota_cct_led
|
||||||
|
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
|
||||||
|
desc:Tasmota CCT bulb or CCT LED controller
|
||||||
|
order:A_05a3
|
||||||
|
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\
|
||||||
|
CT:colorpicker,CT,153,5,500 CMNDTOPIC/CT\
|
||||||
|
pct:colorpicker,BRI,0,5,100 CMNDTOPIC/DIMMER
|
||||||
|
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/RESULT:.* { $EVENT =~ m,HSBColor...(\d+)\,(\d+)\,(\d+), ? $2 eq ReadingsVal($NAME,"saturation","unknown") ? undef :{"saturation"=>$2} : undef }\
|
||||||
|
STATTOPIC/POWER1:.* state
|
||||||
|
attr DEVICE jsonMap POWER1:0 Dimmer:pct Channel_4:0 Channel_1:0 Channel_2:0 Channel_3:0 HSBColor:0
|
||||||
|
attr DEVICE webCmd pct:CT
|
||||||
|
|
||||||
|
attr DEVICE devStateIcon {Color::devStateIcon($name,"dimmer",undef,"pct","state")}
|
||||||
|
attr DEVICE setStateList on off toggle
|
||||||
|
set DEVICE attrTemplate speech_recognition_type_light
|
||||||
|
attr DEVICE model tasmota_cct_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).*
|
||||||
|
@ -70,6 +70,7 @@ desc:Applies to standard relay actuator sketch
|
|||||||
attr DEVICE setCommands on:status1:on off:status1:off
|
attr DEVICE setCommands on:status1:on off:status1:off
|
||||||
attr DEVICE setExtensionsEvent 1
|
attr DEVICE setExtensionsEvent 1
|
||||||
attr DEVICE devStateIcon .*on:on .*off:off on.(for.timer|till.*):on-for-timer:off off.(for.timer|till.*):off-for-timer:on blink.*:light_toggle:off
|
attr DEVICE devStateIcon .*on:on .*off:off on.(for.timer|till.*):on-for-timer:off off.(for.timer|till.*):off-for-timer:on blink.*:light_toggle:off
|
||||||
|
set DEVICE attrTemplate speech_recognition_type_switch
|
||||||
attr DEVICE model A_24a_Relay_Actuator
|
attr DEVICE model A_24a_Relay_Actuator
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ desc:template to set speech recognition attributes for genericDeviceType switch
|
|||||||
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
|
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
|
||||||
attr DEVICE genericDeviceType switch
|
attr DEVICE genericDeviceType switch
|
||||||
option:TYPE=siri
|
option:TYPE=siri
|
||||||
option:TYPE=alexa
|
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
|
||||||
option:TYPE=gassistant
|
option:TYPE=gassistant
|
||||||
|
|
||||||
name:speech_recognition_type_light
|
name:speech_recognition_type_light
|
||||||
@ -30,7 +30,7 @@ desc:template to set speech recognition attributes for genericDeviceType light
|
|||||||
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
|
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
|
||||||
attr DEVICE genericDeviceType light
|
attr DEVICE genericDeviceType light
|
||||||
option:TYPE=siri
|
option:TYPE=siri
|
||||||
option:TYPE=alexa
|
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
|
||||||
option:TYPE=gassistant
|
option:TYPE=gassistant
|
||||||
|
|
||||||
name:speech_recognition_type_light_255
|
name:speech_recognition_type_light_255
|
||||||
@ -44,7 +44,7 @@ attr DEVICE genericDeviceType light
|
|||||||
attr DEVICE homebridgeMapping Brightness=brightness::brightness,maxValue=100,factor=0.39216,delay=true
|
attr DEVICE homebridgeMapping Brightness=brightness::brightness,maxValue=100,factor=0.39216,delay=true
|
||||||
#attr DEVICE userReadings NEWUSERREADINGS
|
#attr DEVICE userReadings NEWUSERREADINGS
|
||||||
option:TYPE=siri
|
option:TYPE=siri
|
||||||
option:TYPE=alexa
|
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
|
||||||
option:TYPE=gassistant
|
option:TYPE=gassistant
|
||||||
|
|
||||||
name:speech_recognition_type_blind
|
name:speech_recognition_type_blind
|
||||||
@ -54,7 +54,7 @@ desc:template to set speech recognition attributes for genericDeviceType blind
|
|||||||
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
|
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
|
||||||
attr DEVICE genericDeviceType blind
|
attr DEVICE genericDeviceType blind
|
||||||
option:TYPE=siri
|
option:TYPE=siri
|
||||||
option:TYPE=alexa
|
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
|
||||||
option:TYPE=gassistant
|
option:TYPE=gassistant
|
||||||
|
|
||||||
name:speech_recognition_type_thermostate
|
name:speech_recognition_type_thermostate
|
||||||
@ -64,7 +64,7 @@ desc:template to set speech recognition attributes for genericDeviceType thermos
|
|||||||
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
|
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
|
||||||
attr DEVICE genericDeviceType thermostate
|
attr DEVICE genericDeviceType thermostate
|
||||||
option:TYPE=siri
|
option:TYPE=siri
|
||||||
option:TYPE=alexa
|
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
|
||||||
option:TYPE=gassistant
|
option:TYPE=gassistant
|
||||||
|
|
||||||
name:speech_recognition_gdt_only
|
name:speech_recognition_gdt_only
|
||||||
@ -75,27 +75,27 @@ option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $
|
|||||||
par:GENERICDEVTYPE;GENERICDEVTYPE <genericDeviceType>, defaults to contact;{ "contact" }
|
par:GENERICDEVTYPE;GENERICDEVTYPE <genericDeviceType>, defaults to contact;{ "contact" }
|
||||||
attr DEVICE genericDeviceType GENERICDEVTYPE
|
attr DEVICE genericDeviceType GENERICDEVTYPE
|
||||||
option:TYPE=siri
|
option:TYPE=siri
|
||||||
option:TYPE=alexa
|
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
|
||||||
option:TYPE=gassistant
|
option:TYPE=gassistant
|
||||||
|
|
||||||
name:speech_recognition_gdt_and_mapping
|
name:speech_recognition_gdt_and_mapping
|
||||||
filter:NAME=speechrecognTesting
|
filter:NAME=speechrecognTesting
|
||||||
order:100007
|
order:100007
|
||||||
desc:generic template to set speech recognition attributes for to any genericDeviceType including full mapping, call e.g. with set xy attrTemplate speech_recognition_gdt_and_mapping GENERICDEVTYPE=Security HOMEBRIDGEMAPPING= "ContactSensorState=state,values=closed:CONTACT_DETECTED;;open:CONTACT_NOT_DETECTED"
|
desc:generic template to set speech recognition attributes for to any genericDeviceType including full mapping, call e.g. with set xy attrTemplate speech_recognition_gdt_and_mapping GENERICDEVTYPE=contact HOMEBRIDGEMAPPING= "ContactSensorState=state,values=closed:CONTACT_DETECTED;;open:CONTACT_NOT_DETECTED"
|
||||||
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
|
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
|
||||||
par:GENERICDEVTYPE;GENERICDEVTYPE <genericDeviceType>, defaults to contact;{ "contact" }
|
par:GENERICDEVTYPE;GENERICDEVTYPE <genericDeviceType>, defaults to contact;{ "contact" }
|
||||||
par:HOMEBRIDGEMAPPING;HOMEBRIDGEMAPPING, defaults to "some split-by-semicolon-compatible represantation or the expression to the right";{ 'ContactSensorState=state,values=closed:CONTACT_DETECTED;;open:CONTACT_NOT_DETECTED' }
|
par:HOMEBRIDGEMAPPING;HOMEBRIDGEMAPPING, defaults to "some split-by-semicolon-compatible represantation or the expression to the right";{ 'ContactSensorState=state,values=closed:CONTACT_DETECTED;;open:CONTACT_NOT_DETECTED' }
|
||||||
attr DEVICE genericDeviceType GENERICDEVTYPE
|
attr DEVICE genericDeviceType GENERICDEVTYPE
|
||||||
attr DEVICE homebridgeMapping HOMEBRIDGEMAPPING
|
attr DEVICE homebridgeMapping HOMEBRIDGEMAPPING
|
||||||
option:TYPE=siri
|
option:TYPE=siri
|
||||||
option:TYPE=alexa
|
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
|
||||||
option:TYPE=gassistant
|
option:TYPE=gassistant
|
||||||
|
|
||||||
name:speech_recognition_alaxaName_firstrun
|
name:speech_recognition_alaxaName_firstrun
|
||||||
filter:NAME=speechrecognTesting
|
filter:NAME=speechrecognTesting
|
||||||
order:1000020a
|
order:1000020a
|
||||||
desc:generic template to set speech recognition attribute alexaName, call e.g. with set xy attrTemplate speech_recognition_alaxaName_firstrun ALEXANAME=myAlexaName
|
desc:generic template to set speech recognition attribute alexaName, call e.g. with set xy attrTemplate speech_recognition_alaxaName_firstrun ALEXANAME=myAlexaName
|
||||||
option:TYPE=alexa
|
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
|
||||||
par:ALEXANAME;Please enter alexaName;{ AttrVal("DEVICE","alexaName",undef) }
|
par:ALEXANAME;Please enter alexaName;{ AttrVal("DEVICE","alexaName",undef) }
|
||||||
attr DEVICE alexaName ALEXANAME
|
attr DEVICE alexaName ALEXANAME
|
||||||
set DEVICE attrTemplate speech_recognition_alaxaName_secondrun ALEXAISNAME=ALEXANAME
|
set DEVICE attrTemplate speech_recognition_alaxaName_secondrun ALEXAISNAME=ALEXANAME
|
||||||
@ -104,12 +104,12 @@ name:speech_recognition_alaxaName_secondrun
|
|||||||
filter:NAME=speechrecognTesting
|
filter:NAME=speechrecognTesting
|
||||||
order:1000020b
|
order:1000020b
|
||||||
desc:generic template to doublecheck alexaName attribute setting to avoid doubletes , call e.g. with set xy attrTemplate speech_recognition_alaxaName_secondrun ALEXAISNAME=myAlexaName
|
desc:generic template to doublecheck alexaName attribute setting to avoid doubletes , call e.g. with set xy attrTemplate speech_recognition_alaxaName_secondrun ALEXAISNAME=myAlexaName
|
||||||
option:TYPE=alexa
|
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
|
||||||
par:ALEXAISNAME;Please enter alexaName;{ AttrVal("DEVICE","alexaName",undef) }
|
par:ALEXAISNAME;Please enter alexaName;{ AttrVal("DEVICE","alexaName",undef) }
|
||||||
option:{my @devices=devspec2array("alexaName=ALEXAISNAME");; $devices[1] ? return 1 : return 0}
|
option:{my @devices=devspec2array("alexaName=ALEXAISNAME");; $devices[1] ? return 1 : return 0}
|
||||||
par:ALEXANAME;Please enter alexaName (you may be asked multiple times to avoid already existing names);{undef) }
|
par:ALEXANAME;Please enter alexaName (you may be asked multiple times to avoid already existing names);{undef) }
|
||||||
attr DEVICE alexaName ALEXANAME
|
attr DEVICE alexaName ALEXANAME
|
||||||
option:TYPE=alexa
|
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
|
||||||
#set DEVICE attrTemplate speech_recognition_alaxaName_firstrun
|
#set DEVICE attrTemplate speech_recognition_alaxaName_firstrun
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user