2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

mqtt2.template: add speech recognition extensions

git-svn-id: https://svn.fhem.de/fhem/trunk@21105 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2020-02-03 15:03:07 +00:00
parent 42ffed0323
commit 22ab4f0cfa
2 changed files with 96 additions and 13 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- feature mqtt2.template: add speech recognition extensions
- bugfix: 73_AutoShuttersControl: fix AntiFreeze_Fn
- feature 14_SD_UT: new model remote control Novy_840039
- bugfix: 88_Timer: fix2 list "Probably associated with" Forum: #1015549

View File

@ -51,6 +51,58 @@ setreading DEVCID associatedWith DEVICE
farewell:template has been applied successfully. Be carefull when extending the brigeRegexp!
attr DEVCID model MQTT2_CLIENT_general_bridge
###########################################
# speech recognition extensions
# see forum thread here: https://forum.fhem.de/index.php/topic,99195.0.html
name:mqtt2_speech_recognition_type_switch
filter:TYPE=MQTT2_DEVICE:FILTER=CID=speechrecognTesting
order:100001
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
attr DEVICE genericDeviceType switch
option:TYPE=siri
option:TYPE=alexa
option:TYPE=gassistant
name:mqtt2_speech_recognition_type_light
filter:TYPE=MQTT2_DEVICE:FILTER=CID=speechrecognTesting
order:100002
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
attr DEVICE genericDeviceType light
option:TYPE=siri
option:TYPE=alexa
option:TYPE=gassistant
name:mqtt2_speech_recognition_type_light_255
filter:TYPE=MQTT2_DEVICE:FILTER=CID=speechrecognTesting
order:100003
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
set DEVICE attrTemplate mqtt2_speech_recognition_type_light
attr DEVICE genericDeviceType light
attr DEVICE homebridgeMapping Brightness=brightness::brightness,minValue=0,maxValue=255
option:TYPE=siri
option:TYPE=alexa
option:TYPE=gassistant
name:mqtt2_speech_recognition_type_blind
filter:TYPE=MQTT2_DEVICE:FILTER=CID=speechrecognTesting
order:100004
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
attr DEVICE genericDeviceType blind
option:TYPE=siri
option:TYPE=alexa
option:TYPE=gassistant
name:mqtt2_speech_recognition_type_thermostate
filter:TYPE=MQTT2_DEVICE:FILTER=CID=speechrecognTesting
order:100005
option:{my @devices=devspec2array("TYPE=(siri|alexa|gassistant)");;return 1 if $devices[0];;return 0}
attr DEVICE genericDeviceType thermostate
option:TYPE=siri
option:TYPE=alexa
option:TYPE=gassistant
###########################################
# zigbee2mqtt
# The zigbee2mqtt bridge device (entire hex id of devices as bridgeRegexp)
@ -136,6 +188,7 @@ attr DEVICE setList \
off:noArg BASE_TOPIC/DEV_ID/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 BASE_TOPIC/DEV_ID/set {"state":"on","$EVTPART0":"$EVTPART1"}
attr DEVICE setStateList on off
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model zigbee2mqtt_light_dimmer
# A dimmable color light connected via zigbee2mqtt
@ -154,6 +207,7 @@ attr DEVICE setList \
off:noArg BASE_TOPIC/DEV_ID/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 BASE_TOPIC/DEV_ID/set {"state":"on","$EVTPART0":"$EVTPART1"}\
color_temp:colorpicker,CT,154,2,500 BASE_TOPIC/DEV_ID/set {"$EVTPART0":"$EVTPART1"}
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model zigbee2mqtt_light_cct
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
@ -175,6 +229,7 @@ attr DEVICE setList \
brightness:colorpicker,BRI,0,5,255 BASE_TOPIC/DEV_ID/set {"state":"on","$EVTPART0":"$EVTPART1"}\
hex:colorpicker,HEX,0,15,255 BASE_TOPIC/DEV_ID/set {"color":{"$EVTPART0":"#$EVTPART1"}}
attr DEVICE userReadings hex:color_y.* {Color::xyY2hex(ReadingsVal($name,"color_x",0),ReadingsVal($name,"color_y",0),ReadingsVal($name,"brightness",254))}
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model zigbee2mqtt_light_rgb_hex
name:zigbee2mqtt_light_rgb_rgb
@ -194,6 +249,7 @@ attr DEVICE setList \
off:noArg BASE_TOPIC/DEV_ID/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 BASE_TOPIC/DEV_ID/set {"state":"on","$EVTPART0":"$EVTPART1"}\
color:colorpicker,RGB {"BASE_TOPIC/DEV_ID/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model zigbee2mqtt_light_rgb_rgb
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
@ -218,6 +274,7 @@ attr DEVICE setList \
brightness:colorpicker,BRI,0,5,255 BASE_TOPIC/DEV_ID/set {"state":"on","$EVTPART0":"$EVTPART1"}\
hex:colorpicker,HEX,0,15,255 BASE_TOPIC/DEV_ID/set {"color":{"$EVTPART0":"#$EVTPART1"}}
attr DEVICE userReadings hex:color_y.* {Color::xyY2hex(ReadingsVal($name,"color_x",0),ReadingsVal($name,"color_y",0),ReadingsVal($name,"brightness",254))}
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model zigbee2mqtt_light_rgbw_hex
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
@ -239,6 +296,7 @@ attr DEVICE setList \
white:noArg BASE_TOPIC/DEV_ID/set {"color_temp": 154 , "color_temp": 500}\
brightness:colorpicker,BRI,0,5,255 BASE_TOPIC/DEV_ID/set {"state":"on","$EVTPART0":"$EVTPART1"}\
color:colorpicker,RGB {"BASE_TOPIC/DEV_ID/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model zigbee2mqtt_light_rgbw_rgb
#source post: https://forum.fhem.de/index.php/topic,96985.msg902627.html#msg902627
@ -260,6 +318,7 @@ attr DEVICE setList \
brightness:colorpicker,BRI,0,5,255 BASE_TOPIC/DEV_ID/set {"state":"on","$EVTPART0":"$EVTPART1"}\
color_temp:colorpicker,CT,154,2,500 BASE_TOPIC/DEV_ID/set {"$EVTPART0":"$EVTPART1"}\
hex:colorpicker,HEX,0,15,255 BASE_TOPIC/DEV_ID/set {"color":{"$EVTPART0":"#$EVTPART1"}}
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model zigbee2mqtt_light_rgbcct_hex
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
@ -281,6 +340,7 @@ attr DEVICE setList \
brightness:colorpicker,BRI,0,5,255 BASE_TOPIC/DEV_ID/set {"state":"on","$EVTPART0":"$EVTPART1"}\
color_temp:colorpicker,CT,154,2,500 BASE_TOPIC/DEV_ID/set {"$EVTPART0":"$EVTPART1"}\
color:colorpicker,RGB {"BASE_TOPIC/DEV_ID/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model zigbee2mqtt_light_rgbcct_rgb
name:zigbee2mqtt_smokeDetector
@ -318,6 +378,7 @@ attr DEVICE setList \
on:noArg BASE_TOPIC/DEV_ID/set {"state":"ON"}\
off:noArg BASE_TOPIC/DEV_ID/set {"state":"OFF"}\
attr DEVICE setStateList on off
set DEVICE attrTemplate mqtt2_speech_recognition_type_switch
attr DEVICE model zigbee2mqtt_plug
name:zigbee2mqtt_plug_w_energy_measuring
@ -331,6 +392,7 @@ attr DEVICE icon ICON
set DEVICE attrTemplate zigbee2mqtt_smart+plug
#missing readingList with sth. comparable to shellies/shellyplug-s-123456/relay/0/power:.* { my $limit = 100;; my $compare = $EVTPART0<$limit ? "off":"on";; ReadingsVal($NAME,"loadState","on") eq $compare ? undef: {loadState => $compare} }
#and additional devStateIcon
set DEVICE attrTemplate mqtt2_speech_recognition_type_switch
attr DEVICE model zigbee2mqtt_plug_w_energy_measuring
# zigbee2mqtt 2 channel device
@ -352,6 +414,7 @@ attr DEVICE setStateList on off
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE comment Channel 1 for DEVICE, see also DEVICE_CH2
setreading DEVICE associatedWith DEVICE_CH2
set DEVICE attrTemplate mqtt2_speech_recognition_type_switch
attr DEVICE model zigbee2mqtt_2channel_split
copy DEVICE DEVICE_CH2
attr DEVICE_CH2 comment Channel 2 for DEVICE
@ -362,6 +425,7 @@ attr DEVICE_CH2 setList \
attr DEVICE_CH2 setStateList on off toggle
deletereading -q DEVICE_CH2 (?!associatedWith).*
attr DEVICE_CH2 jsonMap state_l1:0 state_l2:state state:0 consumption:0 linkquality:0 power:0 temperature:0
set DEVICE_CH2 attrTemplate mqtt2_speech_recognition_type_switch
attr DEVICE_CH2 model zigbee2mqtt_2channel_split
# zigbee2mqtt 2 channel device with buttons, forum #102866
@ -492,6 +556,7 @@ attr DEVICE icon ICON
attr DEVICE stateFormat click
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
set DEVICE attrTemplate mqtt2_speech_recognition_type_switch
attr DEVICE model zigbee2mqtt_Light_Switch
#source post: https://forum.fhem.de/index.php/topic,94495.msg916789.html#msg916789
@ -583,6 +648,7 @@ deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList on off toggle
attr DEVICE comment NOTE: For on-for-timer SetExtensions are used. You may add on-for-timer option running on the device. The following is limited to 1h max duration, but will not affect future simple "on" commands:<br>on-for-timer {my $duration = $EVTPART1*10; 'cmnd/CMNDTOPIC/Backlog POWER1 1; delay '.$duration.'; POWER1 0'}<br>See the "Praxisbeispiele" in the wiki for "pulseTime1" alternative option and it's restrictions.
attr DEVICE autocreate 0
set DEVICE attrTemplate mqtt2_speech_recognition_type_switch
attr DEVICE model tasmota_basic_state_power1
# sonoff 1 channel device flashed with Tasmota.
@ -699,8 +765,8 @@ attr DEVICE_CH2 comment Channel 2 (USB outlets) for DEVICE
setreading DEVICE_CH2 associatedWith DEVICE
attr DEVICE_CH2 devStateIcon on:usb:off off:usb@red:on
attr DEVICE_CH2 setStateList on off toggle
attr DEVICE model tasmota_POW_USB_split
attr DEVICE_CH2 model tasmota_POW_USB_split
set DEVICE_CH2 attrTemplate mqtt2_speech_recognition_type_switch
attr DEVICE,DEVICE_CH2 model tasmota_POW_USB_split
# plug with LED flashed with Tasmota.
name:tasmota_plug_with_rgbw_split
@ -738,8 +804,8 @@ attr DEVICE_CH2 webCmdLabel Helligkeit\
attr DEVICE_CH2 devStateIcon {Color::devStateIcon($name,"rgb","Color","pct","state")}
attr DEVICE_CH2 setStateList on off toggle
deletereading -q DEVICE_CH2 (?!associatedWith).*
attr DEVICE model tasmota_plug_with_rgbw_split
attr DEVICE_CH2 model tasmota_plug_with_rgbw_split
set DEVICE_CH2 attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE,DEVICE_CH2 model tasmota_plug_with_rgbw_split
#tasmota device with Infrared-circuit
name:tasmota_ir
@ -847,6 +913,7 @@ 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 }
attr DEVICE comment Channel 1 for DEVICE, see also DEVICE_CH2
setreading DEVICE associatedWith DEVICE_CH2
set DEVICE attrTemplate mqtt2_speech_recognition_type_switch
copy DEVICE DEVICE_CH2
attr DEVICE_CH2 readingList \
STATTOPIC/POWER2:.* state
@ -858,8 +925,7 @@ attr DEVICE_CH2 setList \
on:noArg CMNDTOPIC/POWER2 1\
toggle:noArg CMNDTOPIC/POWER2 2
attr DEVICE_CH2 setStateList on off toggle
attr DEVICE model tasmota_2channel_split
attr DEVICE_CH2 model tasmota_2channel_split
attr DEVICE,DEVICE_CH2 model tasmota_2channel_split
#contributed by 87insane
# tasmota 2ch as shutter device.
@ -911,6 +977,7 @@ Use the "set x_configuration" Option. Example: "set x_configuration ShutterOpenD
Shutter specific commands available: ShutterOpenDuration1, ShutterCloseDuration1, ShutterRelay1, ShutterSetHalfway1, ShutterSetClose1, ShutterInvert1, ShutterMotordelay1, ShutterCalibration1; you may use this for general setOptions in tasmota also.\
commands may need restart to take effect.\
For calibration, use of more than one shutter device and further information on the available commands see <a href="https://github.com/arendst/Tasmota/wiki/blinds-and-roller-shades">Tasmota wiki</a>.
set DEVICE attrTemplate mqtt2_speech_recognition_type_blind
farewell:template has been applied successfully. Now it's recommended to set shutter's open and close duration and 50% position, see short instruction in comment attribute or the <br><a href="https://github.com/arendst/Tasmota/wiki/blinds-and-roller-shades">Tasmota wiki</a>.
attr DEVICE model tasmota_2ch_shutter_invert_1
@ -963,10 +1030,7 @@ attr DEVICE_CH4 readingList \
STATTOPIC/POWER4:.* state
attr DEVICE_CH4 setStateList on off toggle
#set the model attr for all new devices
attr DEVICE model tasmota_4channel_split
attr DEVICE_CH2 model tasmota_4channel_split
attr DEVICE_CH3 model tasmota_4channel_split
attr DEVICE_CH4 model tasmota_4channel_split
attr DEVICE,DEVICE_CH2,DEVICE_CH3,DEVICE_CH4 model tasmota_4channel_split
# tasmota 4ch as one FHEM device.
name:tasmota_4ch_unified_icon
@ -1050,6 +1114,7 @@ deletereading -q DEVICE (?!associatedWith).*
attr DEVICE autocreate 0
attr DEVICE devStateIcon {Color::devStateIcon($name,"rgb","Color","Dimmer","state")}
attr DEVICE webCmd Color:Color ff0000:Color 00ff00:Color 0000ff:toggle:on:off
set DEVICE attrTemplate mqtt2_speech_recognition_type_light
attr DEVICE model tasmota_rgb_led_controller
name:tasmota_rgbw_led
@ -1085,6 +1150,7 @@ attr DEVICE webCmdLabel Helligkeit\
:Farbe:
attr DEVICE devStateIcon {Color::devStateIcon($name,"rgb","Color","pct","state")}
attr DEVICE setStateList on off toggle
set DEVICE attrTemplate mqtt2_speech_recognition_type_light
attr DEVICE model tasmota_rgbw_led
name:tasmota_rgbwct_led
@ -1110,6 +1176,7 @@ attr DEVICE webCmdLabel Helligkeit\
:Weiss\
:Farbe\
:Temp
set DEVICE attrTemplate mqtt2_speech_recognition_type_light
attr DEVICE model tasmota_rgbwct_led
#source post: https://forum.fhem.de/index.php/topic,105364.0.html
@ -1134,6 +1201,7 @@ attr DEVICE devStateIcon off:light_light_dim_00:on on:light_light_dim_90:off
attr DEVICE webCmd Dimmer
attr DEVICE comment After applying the template, the device to be controlled needs further configuration. For the necessary steps see <a href="https://github.com/arendst/Tasmota/wiki/TuyaMCU-Configurations#dimmer">Tasmota wiki</a> instructions.
farewell:template has been applied successfully. Now it's recommended to do some configruation, see <a href="https://github.com/arendst/Tasmota/wiki/TuyaMCU-Configurations#dimmer">Tasmota wiki</a> instructions.
set DEVICE attrTemplate mqtt2_speech_recognition_type_light
attr DEVICE model tasmota_TuyaMCU_dimmer
name:tasmota_set_lowercase_texts_and_state1
@ -1185,6 +1253,7 @@ attr DEVICE readingList \
attr DEVICE devStateIcon {my $onl = ReadingsVal($name,"online","false") eq "false" ? "rot" : ReadingsVal($name,"new_fw","false") eq "true" ? "gelb" : "gruen";; my $light = ReadingsVal($name,"state","off");; my $show = '<a href="';;$show .= $onl eq "gelb" ? "/fhem?cmd.dummy=set $name x_update&XHR=1\">" : "http://".ReadingsVal($name,"ip","none").' "target="_blank">';;$show .= FW_makeImage("10px-kreis-".$onl)."</a>";; "<div> $show <a href=\"/fhem?cmd.dummy=set $name toggle&XHR=1\">".FW_makeImage($light)."</a></div>" }
deletereading -q DEVICE (?!associatedWith).*
set DEVICE x_mqttcom announce
set DEVICE attrTemplate mqtt2_speech_recognition_type_switch
attr DEVICE model shelly1
name:shelly_announces
@ -1241,6 +1310,7 @@ attr DEVICE comment To get appropriate loadState values: Change the default limi
attr DEVICE webCmd :
deletereading -q DEVICE (?!associatedWith).*
set DEVICE x_mqttcom announce
set DEVICE attrTemplate mqtt2_speech_recognition_type_switch
attr DEVICE model shelly1_w_energy_meassuring
name:shelly1_w_energy_meassuring_washer_example
@ -1283,6 +1353,7 @@ attr DEVICE stateFormat pct
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList open close stop
set DEVICE x_mqttcom announce
set DEVICE attrTemplate mqtt2_speech_recognition_type_blind
attr DEVICE model shelly2_roller
# shelly25 using original firmware in roller mode.
@ -1328,6 +1399,7 @@ state
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList open close half stop pct
set DEVICE x_mqttcom announce
set DEVICE attrTemplate mqtt2_speech_recognition_type_blind
attr DEVICE model shelly25_roller_invert_0
name:shelly25_roller_invert_1
@ -1371,6 +1443,7 @@ state
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList open close half stop pct
set DEVICE x_mqttcom announce
set DEVICE attrTemplate mqtt2_speech_recognition_type_blind
attr DEVICE model shelly25_roller_invert_1
# shelly2 using original firmware.
@ -1555,6 +1628,7 @@ attr DEVICE webCmd on:off:pct:ct:rgb
#attr DEVICE genericDeviceType light
attr DEVICE jsonMap brightness:pct
set DEVICE x_mqttcom announce
set DEVICE attrTemplate mqtt2_speech_recognition_type_light
attr DEVICE model shellybulb
# shellyht using original firmware
@ -1623,6 +1697,7 @@ attr DEVICE webCmd on:off:white:gain:rgb:effect
attr DEVICE setStateList on off
attr DEVICE devStateIcon {my $onl = ReadingsVal($name,"online","false") eq "true"?"10px-kreis-gruen":"10px-kreis-rot";; my $light = ReadingsVal($name,"state","off");; my $cons = ReadingsVal($name,"power","unknown");; "<a href=\"http://".ReadingsVal($name,"ip","none")." \"target=\"_blank\">".FW_makeImage($onl)."</a> <a href=\"/fhem?cmd.dummy=set $name toggle&XHR=1\">".FW_makeImage($light)."</a><div>Verbrauch: $cons</div>"}
set DEVICE x_mqttcom announce
set DEVICE attrTemplate mqtt2_speech_recognition_type_light
attr DEVICE model shelly2rgbw_color
#contributed by user sledge
@ -1649,6 +1724,7 @@ setreading DEVICE associatedWith DEVICE_CH1,DEVICE_CH2,DEVICE_CH4
attr DEVICE webCmd on:off:pct
set DEVICE x_mqttcom announce
attr DEVICE jsonMap brightness:pct
set DEVICE attrTemplate mqtt2_speech_recognition_type_light
attr DEVICE model shelly2rgbw_4w_split
attr DEVICE comment Channel 1 for DEVICE, see also DEVICE_CH2, DEVICE_CH3 and DEVICE_CH4
attr DEVICE autocreate 0
@ -1714,6 +1790,7 @@ attr DEVICE webCmd pct:on:off
attr DEVICE jsonMap brightness:pct
attr DEVICE devStateIcon {my $lderr = ReadingsVal($name,"loaderror","true") eq "true"?"10px-kreis-rot":"10px-kreis-gruen";; my $light = ReadingsVal($name,"ison","false") eq "true"?"on":"off";; my $cons = ReadingsVal($name,"light_0_power","unknown");; FW_makeImage($lderr)."<a href=\"/fhem?cmd.dummy=set $name toggle&XHR=1\">".FW_makeImage($light)."</a><div>Leistung: $cons</div>"}
set DEVICE x_mqttcom announce
set DEVICE attrTemplate mqtt2_speech_recognition_type_light
attr DEVICE model shellydimmer
###############
@ -1823,6 +1900,7 @@ attr DEVICE setStateList on off
attr DEVICE stateFormat mode\
desired-temp °C
attr DEVICE webCmd mode:desired-temp
set DEVICE attrTemplate mqtt2_speech_recognition_type_thermostate
attr DEVICE model ems-esp_thermostat_simple
name:ems-esp_thermostat_RC35_type
@ -1836,12 +1914,10 @@ attr DEVICE setList mode:uzsuSelectRadio,auto,manual BASEPATH/thermostat_cmd_mod
daytemp:slider,15.0,0.5,30.0,1 BASEPATH/thermostat_cmd_daytemp1 $EVTPART1\
nighttemp:slider,15.0,0.5,30.0,1 BASEPATH/thermostat_cmd_nighttemp1 $EVTPART1\
holidaytemp:slider,15.0,0.5,30.0,1 BASEPATH/thermostat_cmd_holidayttemp1 $EVTPART1
set DEVICE attrTemplate mqtt2_speech_recognition_type_thermostate
attr DEVICE model ems-esp_thermostat_RC35_type
###############
#ESP Milight Hub
#use this with Chris Mullins ESP-Milight-Hub. for further details visit https://github.com/sidoh/esp8266_milight_hub
@ -1898,6 +1974,7 @@ attr DEVICE userReadings hex:color_r.* {Color::rgb2hex(ReadingsVal($name,"color_
attr DEVICE setStateList on off
attr DEVICE comment To switch device also on when changing brightness, change payload pattern to {"status":"ON","$EVTPART0":"$EVTPART1"} or add a new element to setList, similar to brightness, e.g.brightness_on and change payload pattern as described.
attr DEVICE setExtensionsEvent 1
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model esp_milight_hub_rgbw_bulb
#rgbw-group
@ -1927,6 +2004,7 @@ attr milight_REMOTE_ID_0 setList\
attr milight_REMOTE_ID_0 setStateList on off
#attr milight_REMOTE_ID_0 userReadings rgb:color_r.* {sprintf("%02X%02X%02X", ReadingsVal($name,"color_r",255), ReadingsVal($name,"color_g",255), ReadingsVal($name,"color_b",255))}
modify milight_REMOTE_ID_0 milight_REMOTE_ID_0
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr milight_REMOTE_ID_0 model esp_milight_hub_make_rgbw_group
#rgbw_cct-bulb
@ -1969,6 +2047,7 @@ attr DEVICE webCmdLabel brightness:dim\
attr DEVICE setStateList on off
# computed_color will send RGB = 255,255,255 when in white mode. This is useful for HomeAssistant where it always expects the color to be set.
attr DEVICE comment To switch device also on when changing brightness, change payload pattern to {"status":"ON","$EVTPART0":"$EVTPART1"} or add a new element to setList, similar to brightness, e.g.brightness_on and change payload pattern as described.
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model esp_milight_hub_rgb_cct_bulb
#cct-only-bulb
@ -2004,6 +2083,7 @@ attr DEVICE webCmdLabel :dim\
:::
attr DEVICE setStateList on off
attr DEVICE comment To switch device also on when changing brightness, change payload pattern to {"status":"ON","$EVTPART0":"$EVTPART1"} or add a new element to setList, similar to brightness, e.g.brightness_on and change payload pattern as described.
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model esp_milight_hub_cct_only_bulb
#rgbw-bulb
@ -2046,6 +2126,7 @@ attr DEVICE webCmdLabel An:Aus\
:Sättigung:Modus
attr DEVICE eventMap /set_white:Weiss/night_mode:Nacht/white_mode:white/on:on/off:off/ON:on/OFF:off/next_mode:Mode/mode_speed_up:Faster/mode_speed_down:Slower/level_up:Up/level_down:Down/
attr DEVICE comment To switch device also on when changing brightness, change payload pattern to {"status":"ON","$EVTPART0":"$EVTPART1"} or add a new element to setList, similar to brightness, e.g.brightness_on and change payload pattern as described.
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model esp_milight_hub_max_features_bulb
#remote for event generation only
@ -2327,6 +2408,7 @@ deletereading -q DEVICE (?!associatedWith).*
attr DEVICE devStateIcon {Color::devStateIcon( $name, "rgb", "rgb", "brightness", "state" )}
attr DEVICE webCmd rgb:brightness
attr DEVICE comment For questions about the use of different widgets for color selection see discussion at https://forum.fhem.de/index.php/topic,98880.msg995308.html
set DEVICE attrTemplate mqtt2_speech_recognition_type_light_255
attr DEVICE model wled_controller
#source post: https://forum.fhem.de/index.php/topic,105457.msg993924.html#msg993924