diff --git a/fhem/FHEM/lib/AttrTemplate/mqtt2.template b/fhem/FHEM/lib/AttrTemplate/mqtt2.template
index a6c5d7cf8..7139366c2 100644
--- a/fhem/FHEM/lib/AttrTemplate/mqtt2.template
+++ b/fhem/FHEM/lib/AttrTemplate/mqtt2.template
@@ -9,16 +9,18 @@
# If undef, the user has to specify them (the comment is shown to the user)
###########################################
-name:0_00_General_Info
+name:General_Info
filter:TYPE=MQTT2_DEVICE
desc: Forum Thread for
- suggesting new templates
- bug reports on mqtt2.template
NOTE: Some templates are only visible in case the existing device configuration meets some minimum requirements, e.g. the CID starting with "zigbee"!
Have a look in the mqtt2.template file itself to get more info
+order:000000
###############
#MQTT2_CLIENT_Bridge
#
-name:A_00_MQTT2_CLIENT_general_bridge
+name:MQTT2_CLIENT_general_bridge
filter:TYPE=MQTT2_DEVICE
desc:recommended to use this as general bridgeing device when using MQTT2_CLIENT as IO to get around missing CID info for distinguishing different popular devices
NOTE:
This might create a new MQTT2-device or change existing ones, especially destroy readingList attributes!
+order:000001
par:IODEVNAME;Name of the IO-Device; { AttrVal("DEVICE","IODev",undef) }
par:DEVTYPE;TYPE of the device; { InternalVal("DEVICE","TYPE",undef)}
par:DEVCID;CID of the device as written in the DEF; { InternalVal(AttrVal("DEVICE","IODev",""),"clientId","mosquitto") eq InternalVal("DEVICE","DEF","mosquitto") ? "MQTT2_GeneralBridge" : InternalVal("DEVICE","DEF","mosquitto")}
@@ -39,14 +41,15 @@ deletereading -q DEVCID (?!associatedWith).*
setreading DEVCID associatedWith DEVICE
{ fhem "trigger $FW_wname JS:location.href='$FW_ME?detail=DEVCID'" if($cl && $cl->{TYPE} eq "FHEMWEB") }
farewell:template has been applied successfully. Be carefull when extending the brigeRegexp!
-attr DEVCID model A_00_MQTT2_CLIENT_general_bridge
+attr DEVCID model MQTT2_CLIENT_general_bridge
###########################################
# zigbee2mqtt
# The zigbee2mqtt bridge device (entire hex id of devices as bridgeRegexp)
-name:L_01_zigbee2mqtt_bridge
+name:zigbee2mqtt_bridge
desc:The zigbee2mqtt bridge device
filter:TYPE=MQTT2_DEVICE
+order:L_01
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^:]+:([^/]+)[/].*:, ? $1 : undef }
attr DEVICE bridgeRegexp\
BASE_TOPIC/([A-Za-z0-9._]*)[/]?.*:.* "zigbee_$1"
@@ -85,30 +88,14 @@ attr DEVICE setList\
z_rename:textField BASE_TOPIC/bridge/config/rename {"old":"$EVTPART1","new":"$EVTPART2"}\
z_reset_CC:noArg BASE_TOPIC/bridge/config/reset
attr DEVICE setStateList on off
-attr DEVICE model L_01_zigbee2mqtt_bridge
+attr DEVICE model zigbee2mqtt_bridge
# Based on https://forum.fhem.de/index.php/topic,94060.msg872371.html#msg872371
-name:L_01a_zigbee2mqtt_bridge_0x
-desc:The zigbee2mqtt bridge device
Outdated version, using entire device name including "0x".
Kept in repo for compability reasons.
-filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
-par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^:]+:([^/]+)[/].*:, ? $1 : undef }
-set DEVICE attrTemplate L_01_zigbee2mqtt_bridge
-attr DEVICE bridgeRegexp BASE_TOPIC/(0x[A-Za-z0-9]*)[/]?.*:.* "zigbee_$1"
-attr DEVICE model L_01a_zigbee2mqtt_bridge_0x
-
-# The zigbee2mqtt bridge device
-name:L_01x_zigbee2mqtt_bridge_outdated
-desc:The zigbee2mqtt bridge device
Original version, kept in repo for compability reasons.
Truncs device name from "0x"
-filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
-par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
-set DEVICE attrTemplate L_01_zigbee2mqtt_bridge
-attr DEVICE bridgeRegexp BASE_TOPIC/0x([A-Za-z0-9]*)[/]?.*:.* "zigbee_$1"
-attr DEVICE model L_01x_zigbee2mqtt_bridge_outdated
-
# A dimmable light connected via zigbee2mqtt
-name:L_02a_zigbee2mqtt_light_dimmer
+name:zigbee2mqtt_light_dimmer
desc: A dimmable light connected via zigbee2mqtt
Tested with: Tradfri LED1650R5, Osram Lightify W32
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_02a
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE icon light_control
@@ -120,12 +107,13 @@ 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
-attr DEVICE model L_02a_zigbee2mqtt_light_dimmer
+attr DEVICE model zigbee2mqtt_light_dimmer
# A dimmable color light connected via zigbee2mqtt
-name:L_02b_zigbee2mqtt_light_cct
+name:zigbee2mqtt_light_cct
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
desc: A dimmable light with color temperature via zigbee2mqtt
+order:L_02b
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE icon light_control
@@ -136,12 +124,13 @@ 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"}
-attr DEVICE model L_02b_zigbee2mqtt_light_cct
+attr DEVICE model zigbee2mqtt_light_cct
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
-name:L_02c_zigbee2mqtt_light_rgb_hex
+name:zigbee2mqtt_light_rgb_hex
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
desc: A dimmable rgb light connected via zigbee2mqtt
rgb value is encoded as HEX value
Experimental, still untested
+order:L_02c
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE icon hue_filled_white_and_color_e27_b22
@@ -155,11 +144,12 @@ 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))}
-attr DEVICE model L_02c_zigbee2mqtt_light_rgb_hex
+attr DEVICE model zigbee2mqtt_light_rgb_hex
-name:L_02c_zigbee2mqtt_light_rgb_rgb
+name:zigbee2mqtt_light_rgb_rgb
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
desc: A dimmable rgb light connected via zigbee2mqtt
rgb values will be sent as individual values r,g and b
Experimental, still untested
+order:L_02c
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE icon hue_filled_white_and_color_e27_b22
@@ -172,12 +162,13 @@ 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)}
-attr DEVICE model L_02c_zigbee2mqtt_light_rgb_rgb
+attr DEVICE model zigbee2mqtt_light_rgb_rgb
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
-name:L_02d_zigbee2mqtt_light_rgbw_hex
+name:zigbee2mqtt_light_rgbw_hex
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
desc: A dimmable rgbw light connected via zigbee2mqtt
rgb value is encoded as HEX value
tested with Mueller Light tint RGBW bulb
+order:L_02d
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE icon hue_filled_white_and_color_e27_b22
@@ -194,11 +185,12 @@ 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))}
-attr DEVICE model L_02d_zigbee2mqtt_light_rgbw_hex
+attr DEVICE model zigbee2mqtt_light_rgbw_hex
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
-name:L_02d_zigbee2mqtt_light_rgbw_rgb
+name:zigbee2mqtt_light_rgbw_rgb
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_02d1
desc: A dimmable rgbw light connected via zigbee2mqtt
rgb values will be sent as individual values r,g and b
Experimental, still untested
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
@@ -213,12 +205,13 @@ 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)}
-attr DEVICE model L_02d_zigbee2mqtt_light_rgbw_rgb
+attr DEVICE model zigbee2mqtt_light_rgbw_rgb
#source post: https://forum.fhem.de/index.php/topic,96985.msg902627.html#msg902627
-name:L_02e_zigbee2mqtt_light_rgbcct_hex
+name:zigbee2mqtt_light_rgbcct_hex
desc: A dimmable rgb light connected via zigbee2mqtt
rgb value is encoded as HEX value
Experimental, still untested
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_02e
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE icon hue_filled_white_and_color_e27_b22
@@ -232,11 +225,12 @@ 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"}}
-attr DEVICE model L_02e_zigbee2mqtt_light_rgbcct_hex
+attr DEVICE model zigbee2mqtt_light_rgbcct_hex
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
-name:L_02e_zigbee2mqtt_light_rgbcct_rgb
+name:zigbee2mqtt_light_rgbcct_rgb
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_02e1
desc: A dimmable rgb-cct light connected via zigbee2mqtt
rgb values will be sent as individual values r,g and b
Tested with: RGB-CCT GL-C-008
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
@@ -251,26 +245,29 @@ 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)}
-attr DEVICE model L_02e_zigbee2mqtt_light_rgbcct_rgb
+attr DEVICE model zigbee2mqtt_light_rgbcct_rgb
-name:L_03_zigbee2mqtt_smokeDetector
+name:zigbee2mqtt_smokeDetector
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_03
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
attr DEVICE icon secur_smoke_detector
attr DEVICE stateFormat smoke
-attr DEVICE model L_03_zigbee2mqtt_smokeDetector
+attr DEVICE model zigbee2mqtt_smokeDetector
-name:L_04_zigbee2mqtt_hueMotionSensor
+name:zigbee2mqtt_hueMotionSensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_04
attr DEVICE stateFormat T: temperature_weather B: illuminance L: linkquality
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
attr DEVICE userReadings temperature_weather { sprintf("%.1f",ReadingsVal($name,"temperature","")+2.5) }
-attr DEVICE model L_04_zigbee2mqtt_hueMotionSensor
+attr DEVICE model zigbee2mqtt_hueMotionSensor
-name:L_05_zigbee2mqtt_smart+plug
+name:zigbee2mqtt_smart+plug
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_05
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE eventMap { dev=>{ON=>'on',OFF=>'off'} }
@@ -278,11 +275,12 @@ attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
attr DEVICE setList \
off BASE_TOPIC/DEV_ID/set OFF\
on BASE_TOPIC/DEV_ID/set ON
-attr DEVICE model L_05_zigbee2mqtt_smart+plug
+attr DEVICE model zigbee2mqtt_smart+plug
-name:L_06_zigbee2mqtt_ContactSensor
+name:zigbee2mqtt_ContactSensor
desc: Contact sensor via zigbee2mqtt
Tested with: Xiaomi models Aqara and Mijia
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_06
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE stateFormat contact
@@ -291,115 +289,125 @@ attr DEVICE devStateIcon open:fts_window_1w_open@red close:fts_window_1w@green
attr DEVICE eventMap true:close false:open
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model L_06_zigbee2mqtt_ContactSensor
+attr DEVICE model zigbee2mqtt_ContactSensor
-name:L_07_zigbee2mqtt_TempHumHpaSensor
+name:zigbee2mqtt_TempHumHpaSensor
desc: Temp/hum/hpa sensor via zigbee2mqtt
Tested with: Xiaomi Aqara WSDCGQ11LM Temperature Humidity Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_07
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE stateFormat {sprintf ("Temperature: %.1f°C Humidity: %.1f%% Pressure: %.1fhpa", ReadingsVal($name,"temperature",0), ReadingsVal($name,"humidity",0), ReadingsVal($name,"pressure",0)) }
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model L_07_TempHumHpa_TempSensor
+attr DEVICE model zigbee2mqtt_TempHumHpaSensor
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
-name:L_07a_zigbee2mqtt_TempHumSensor
+name:zigbee2mqtt_TempHumSensor
desc: Temp/hum sensor via zigbee2mqtt
Tested with: Xiaomi MiJia WSDCGQ01LM Temperature Humidity Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_07a
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE stateFormat T: temperature H: humidity
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model L_07a_TempHumSensor
+attr DEVICE model zigbee2mqtt_TempHumSensor
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
-name:L_08_zigbee2mqtt_Human_Motion_Sensor
+name:zigbee2mqtt_Human_Motion_Sensor
desc: Human motion sensor via zigbee2mqtt
Tested with: Xiaomi Aqara RTCGQ11LM Human Motion Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_08
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE stateFormat Motion: occupancy Luminance: illuminance
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model L_08_Human_Motion_TempSensor
+attr DEVICE model zigbee2mqtt_Human_Motion_Sensor
#source post: https://forum.fhem.de/index.php/topic,94495.msg975785.html#msg975785
# Osram Lightify, Smart+ Motion Sensor
-name:L_08a_zigbee2mqtt_TempMotion_sensor
+name:zigbee2mqtt_TempMotion_sensor
desc: Temperature and motion sensor via zigbee2mqtt
Tested with: Osram Lightify Motion Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_08a
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE stateFormat Motion: occupancy T: temperature
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model L_08a_zigbee2mqtt_TempMotion_sensor
+attr DEVICE model zigbee2mqtt_TempMotion_sensor
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
-name:L_09_zigbee2mqtt_Motion_Sensor
+name:zigbee2mqtt_Motion_Sensor
desc: Smart motion sensor via zigbee2mqtt
Tested with: Xiaomi Aqara DJT11LM Smart Motion Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_09
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE stateFormat Motion: action X: angle_x Y: angle_y Z: angle_z
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model L_09_Motion_Sensor
+attr DEVICE model zigbee2mqtt_Motion_Sensor
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
-name:L_10_zigbee2mqtt_Water_Leak_Sensor
+name:zigbee2mqtt_Water_Leak_Sensor
desc: Water leak sensor via zigbee2mqtt
Tested with: Xiaomi Aqara SJCGQ11LM Water Leak Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_10
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/](.*):, ? $1 : undef }
attr DEVICE stateFormat Leak: water_leak
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model L_10_Water_Leak_Sensor
+attr DEVICE model zigbee2mqtt_Water_Leak_Sensor
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
-name:L_11_zigbee2mqtt_Light_Switch
+name:zigbee2mqtt_Light_Switch
desc: Smart light switch 2btn via zigbee2mqtt
Tested with: Xiaomi Aqara WXKG02LM 2btn Smart Light Switch
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_11
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE stateFormat click
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model L_11_Light_Switch
+attr DEVICE model zigbee2mqtt_Light_Switch
#source post: https://forum.fhem.de/index.php/topic,94495.msg916789.html#msg916789
-name:L_12_zigbee2mqtt_Wireless_Button
+name:zigbee2mqtt_Wireless_Button
desc: Wireless button via zigbee2mqtt
Tested with: Xiaomi Aqara WXKG12LM wireless switch with gyroscope
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_12
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE stateFormat Click: click Action: action
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model L_12_Wireless_Button
+attr DEVICE model zigbee2mqtt_Wireless_Button
-name:L_13_zigbee2mqtt_wireless_button_old
+name:zigbee2mqtt_wireless_button_old
desc: Wireless button without gyro via zigbee2mqtt
Tested with: Xiaomi Aqara WXKG11LM wireless button
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_13
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE stateFormat Click: click
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model L_13_wireless_button_old
+attr DEVICE model zigbee2mqtt_wireless_button_old
-name:L_14_zigbee2mqtt_aqara_cube
+name:zigbee2mqtt_aqara_cube
desc: Aqara smarthome cube via zigbee2mqtt
Tested with: Xiaomi Aqara MFKZQ01LM smarthome cube
filter:TYPE=MQTT2_DEVICE:FILTER=CID=zigbee.*
+order:L_14
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge in the topics;{ AttrVal("DEVICE","readingList","") =~ m,([^/]+)[/].*:, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef }
attr DEVICE stateFormat Action: action
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model L_14_aqara_cube
+attr DEVICE model zigbee2mqtt_aqara_cube
@@ -408,14 +416,15 @@ attr DEVICE model L_14_aqara_cube
# The regexp must handle
# - tele/sonoff/LWT: => cmnd/sonoff/
# - DVES_XXXXXX:/SmartHome/Esszimmer/Stehlampe/tele/LWT: => /SmartHome/Esszimmer/Stehlampe/cmnd/
-name:A_01a_tasmota_basic_state_power1
+name:tasmota_basic_state_power1
filter:TYPE=MQTT2_DEVICE
desc:Applies to Sonoff Basic, S20 using POWER1-topic for relay state
NOTE: The format the device is sending data will also be changed to lowercase!
NOTE: This template is intended to configure also channel one of multi-channel tasmota devices
+order:A_01a
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 stateFormat POWER1
-set DEVICE attrTemplate A_01z_tasmota_set_lowercase_texts_and_state1
+set DEVICE attrTemplate tasmota_set_lowercase_texts_and_state1
attr DEVICE setList \
off:noArg CMNDTOPIC/POWER1 0\
on:noArg CMNDTOPIC/POWER1 1\
@@ -431,17 +440,19 @@ deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList on off toggle
attr DEVICE comment NOTE: on-for-timer is limited to 18h max duration!
attr DEVICE autocreate 0
-attr DEVICE model A_01a_tasmota_basic_state_power1
+attr DEVICE model tasmota_basic_state_power1
# sonoff 1 channel device flashed with Tasmota.
-name:A_01_tasmota_basic
+name:tasmota_basic
filter:TYPE=MQTT2_DEVICE
-desc:Applies to Sonoff 1 Channel devices using POWER-topic for relay state
NOTE:
- Power topic will be set to POWER1;
- the format the device is sending data will also be changed to lowercase!
- finally, you'll see the device as model A_01a_tasmota_basic_state_power1.
-set DEVICE attrTemplate A_01a_tasmota_basic_state_power1
+desc:Applies to Sonoff 1 Channel devices using POWER-topic for relay state
NOTE:
- Power topic will be set to POWER1;
- the format the device is sending data will also be changed to lowercase!
- finally, you'll see the device as model tasmota_basic_state_power1.
+order:A_01
+set DEVICE attrTemplate tasmota_basic_state_power1
-name:A_01x_tasmota_clear_readings_reset_readingsList_and_reboot
+name:tasmota_clear_readings_reset_readingsList_and_reboot
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc: replaces the readingList with defaults, clears the readingList and reboots to get all readings
+order:A_01x
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 }
@@ -457,9 +468,10 @@ deletereading -q DEVICE (?!associatedWith).*
set IO_DEV publish CMNDTOPIC/Restart 1
attr DEVICE autocreate 0
-name:A_01x_tasmota_prefix_clearing_and_reboot
+name:tasmota_prefix_clearing_and_reboot
filter:TYPE=MQTT2_DEVICE::FILTER=readingList=.*(tele|cmnd|stat).*
desc:Applies to all tasmota devices
NOTE: This template will delete some readings and clear the readingList from prefix use when expanding json.
When applying the template the tasmota device is rebooted to get all readings
+order:A_01x1
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
par:READINGLISTCLEARED;cleared from prefixes;{ AttrVal("DEVICE","readingList","") =~ s/, '[^_]+[_]'/, ''/g, ? $1 : undef }
@@ -469,10 +481,11 @@ set IO_DEV publish CMNDTOPIC/Restart 1
attr DEVICE autocreate 0
# tasmota device with one relay, one motion sensor via switch
-name:A_01b_tasmota_1ch+motion+SI7021
+name:tasmota_1ch+motion+SI7021
desc:tasmota device with one relay, one motion sensor via switch and one SI7021 combined temperature and humidity sensor.
Configures a single device including all readings
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
-set DEVICE attrTemplate A_01a_tasmota_basic_state_power1
+order:A_01b
+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 setList \
off:noArg CMNDTOPIC/POWER1 0\
@@ -497,13 +510,14 @@ attr DEVICE devStateIcon {\
ReadingsVal($name,"SI7021_Humidity",0)\
) . ""\
}
-attr DEVICE model A_01b_tasmota_1ch+motion+SI7021
+attr DEVICE model tasmota_1ch+motion+SI7021
-name:A_01c_tasmota_POW
+name:tasmota_POW
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc:Applies to Sonoff POW devices
NOTE: Power topic will be set to POWER1; the format the device is sending data will also be changed to lowercase!
+order:A_01c
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
-set DEVICE attrTemplate A_01a_tasmota_basic_state_power1
+set DEVICE attrTemplate tasmota_basic_state_power1
attr DEVICE setList \
off:noArg CMNDTOPIC/POWER1 0\
on:noArg CMNDTOPIC/POWER1 1\
@@ -513,13 +527,14 @@ attr DEVICE stateFormat {sprintf("aktuell: %.1f W Tag: %.2f kWh Gestern: %.3f kW
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList on off toggle
attr DEVICE webCmd :
-attr DEVICE model A_01c_tasmota_POW
+attr DEVICE model tasmota_POW
#tasmota device with Infrared-circuit
-name:A_01d_tasmota_ir
+name:tasmota_ir
desc:Demonstrates multiple options how to configure tasmota devices as IR remote control extension.
Forum Thread
Tasmota IRremote Commands
Simple IR-circuit
set
Forum Thread
NOTE: still widely untested...
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
+order:A_01d1
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:POWERCMD;needed command to be sent like in example dec '{"protocol":"NEC","bits":32,"data":551489775}' (without '');{ undef }
@@ -563,13 +579,14 @@ attr DEVICE stateFormat state\
\
IPAddress
attr DEVICE event-on-change-reading .*
-attr DEVICE model A_01d_tasmota_rf
+attr DEVICE model tasmota_rf
# tasmota 2ch as one FHEM device.
-name:A_02a_tasmota_2ch_unified
+name:tasmota_2ch_unified
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc:Configures a single device including all readings
-set DEVICE attrTemplate A_01a_tasmota_basic_state_power1
+order:A_02a
+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 }
@@ -593,13 +610,14 @@ attr DEVICE stateFormat LWT\
\
IPAddress
attr DEVICE webCmd POWER1:POWER2
-attr DEVICE model A_02a_tasmota_2ch_unified
+attr DEVICE model tasmota_2ch_unified
# sonoff 2 channel device flashed with Tasmota.
-name:A_02_tasmota_2channel_split
+name:tasmota_2channel_split
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc:sonoff 2 channel device flashed with Tasmota.
NOTE: a second device will be created for the second channel
-set DEVICE attrTemplate A_01a_tasmota_basic_state_power1
+order:A_02
+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
copy DEVICE DEVICE_CH2
@@ -611,19 +629,20 @@ attr DEVICE_CH2 setList \
on:noArg CMNDTOPIC/POWER2 1\
toggle:noArg CMNDTOPIC/POWER2 2
attr DEVICE_CH2 setStateList on off toggle
-attr DEVICE model A_02_tasmota_2channel_split
-attr DEVICE_CH2 model A_02_tasmota_2channel_split
+attr DEVICE model tasmota_2channel_split
+attr DEVICE_CH2 model tasmota_2channel_split
#contributed by 87insane
# tasmota 2ch as shutter device.
-name:A_02b_tasmota_2ch_shutter_invert_1
+name:tasmota_2ch_shutter_invert_1
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
-desc:Configures a dual chanel tasmota device as shutter; needs a special firmware version to operate.
Forum Thread
NOTE: This template will configure the shutter in ROLLO style with pct 0% = open shutter. Use template A_02b_tasmota_2ch_shutter_invert_0, if you need a Homematic-style device pct 100% = open.
+desc:Configures a dual chanel tasmota device as shutter; needs a special firmware version to operate.
Forum Thread
NOTE: This template will configure the shutter in ROLLO style with pct 0% = open shutter. Use template tasmota_2ch_shutter_invert_0, if you need a Homematic-style device pct 100% = open.
+order:A_02b
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:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
-set DEVICE attrTemplate A_01z_tasmota_set_lowercase_texts_and_state1
+set DEVICE attrTemplate tasmota_set_lowercase_texts_and_state1
set IO_DEV publish CMNDTOPIC/Backlog LedState 2; SetOption80 1; Interlock0 1; SetOption81 1; switchmode1 3; switchmode2 3; SaveData 1;
set IO_DEV publish CMNDTOPIC/Restart 1
defmod configure_DEVICEattrTemplate_at at +00:00:20 set IO_DEV publish CMNDTOPIC/Backlog SHUTTEROPENDURATION 20;; SHUTTERCLOSEDURATION 20;; SHUTTERINVERT 1;; GROUPTOPIC Rollos;; SaveData 1;;
@@ -664,25 +683,27 @@ Shutter specific commands available: SHUTTEROPENDURATION, SHUTTERCLOSEDURATION,
commands may need restart to take effect.\
For calibration and further information on the available commands see https://github.com/stefanbode/Sonoff-Tasmota/wiki/Shutter-blinds-working-with-two-relays.
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
firmware contributor's wiki.
-attr DEVICE model A_02b_tasmota_2ch_shutter_invert_1
+attr DEVICE model tasmota_2ch_shutter_invert_1
# tasmota 2ch as shutter device.
-name:A_02b_tasmota_2ch_shutter_invert_0
+name:tasmota_2ch_shutter_invert_0
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
-desc:Configures a dual chanel tasmota device as shutter; needs a special firmware version to operate.
Forum Thread
NOTE: This template will configure the shutter in Homematic-style with pct 100% = open. For ROLLO style device with pct 0% = open shutter. Use template A_02b_tasmota_2ch_shutter_invert_1 instead.
+desc:Configures a dual chanel tasmota device as shutter; needs a special firmware version to operate.
Forum Thread
NOTE: This template will configure the shutter in Homematic-style with pct 100% = open. For ROLLO style device with pct 0% = open shutter. Use template tasmota_2ch_shutter_invert_1 instead.
+order:A_02b1
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
-set DEVICE attrTemplate A_02b_tasmota_2ch_shutter_invert_1
+set DEVICE attrTemplate tasmota_2ch_shutter_invert_1
defmod configure_DEVICEattrTemplate_at at +00:00:20 set IO_DEV publish CMNDTOPIC/Backlog SHUTTEROPENDURATION 20;; SHUTTERCLOSEDURATION 20;; SHUTTERINVERT 0;; GROUPTOPIC Rollos;; SaveData 1;;
attr DEVICE devStateIcon opening:fts_shutter_up@red closing:fts_shutter_down@red Online:10px-kreis-gruen Offline:10px-kreis-rot 100:fts_shutter_10 0:fts_shutter_100 9\d.*:fts_shutter_10 8\d.*:fts_shutter_20 7\d.*:fts_shutter_30 6\d.*:fts_shutter_40 5\d.*:fts_shutter_50 4\d.*:fts_shutter_60 3\d.*:fts_shutter_70 2\d.*:fts_shutter_80 1\d.*:fts_shutter_90 \b\d\b.*:fts_shutter_90
-attr DEVICE model A_02b_tasmota_2ch_shutter_invert_0
+attr DEVICE model tasmota_2ch_shutter_invert_0
# sonoff 4 channel device flashed with Tasmota.
# contributed by Blauhorn, https://forum.fhem.de/index.php/topic,94495.msg976113.html#msg976113
-name:A_04_tasmota_4channel_split
+name:tasmota_4channel_split
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc:sonoff 4 channel device flashed with Tasmota.
NOTE: a second, third and fourth device will be created for each additional channel
-set DEVICE attrTemplate A_01a_tasmota_basic_state_power1
+order:A_04
+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, DEVICE_CH3 and DEVICE_CH4
setreading DEVICE associatedWith DEVICE_CH2,DEVICE_CH3,DEVICE_CH4
@@ -717,16 +738,17 @@ attr DEVICE_CH4 setList \
toggle:noArg CMNDTOPIC/POWER4 2
attr DEVICE_CH4 setStateList on off toggle
#set the model attr for all new devices
-attr DEVICE model A_04_tasmota_4channel_split
-attr DEVICE_CH2 model A_04_tasmota_4channel_split
-attr DEVICE_CH3 model A_04_tasmota_4channel_split
-attr DEVICE_CH4 model A_04_tasmota_4channel_split
+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
# tasmota 4ch as one FHEM device.
-name:A_04b_tasmota_4ch_unified_icon
+name:tasmota_4ch_unified_icon
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc:Configures a single device including all readings
NOTE: Clicking on icons will issue a corresponding toggle command
-set DEVICE attrTemplate A_01a_tasmota_basic_state_power1
+order:A_04b
+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 }
@@ -755,13 +777,14 @@ attr DEVICE stateFormat LWT\
\
IPAddress
attr DEVICE webCmd POWER1:POWER2:POWER3:POWER4
-attr DEVICE model A_04b_tasmota_4ch_unified_icon
+attr DEVICE model tasmota_4ch_unified_icon
# tasmota 4ch as one FHEM device.
-name:A_04a_tasmota_4ch_unified_basic_text
+name:tasmota_4ch_unified_basic_text
desc:Configures a single device
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
-set DEVICE attrTemplate A_01a_tasmota_basic_state_power1
+order:A_04a1
+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 }
@@ -779,13 +802,14 @@ attr DEVICE setList \
attr DEVICE setStateList on off toggle
attr DEVICE stateFormat P1: POWER1 P2: POWER2 P3: POWER3 P4: POWER4
attr DEVICE webCmd POWER1 toggle:POWER2 toggle:POWER3 toggle:POWER4 toggle
-attr DEVICE model A_04a_tasmota_4ch_unified_basic_text
+attr DEVICE model tasmota_4ch_unified_basic_text
#source post: https://forum.fhem.de/index.php/topic,94495.msg899041.html#msg899041
-name:A_05a_tasmota_rgb_led_controller
+name:tasmota_rgb_led_controller
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc:Tasmota RGB controller tested with RGB variant of Magichome, arilux LC-01 ,etc... -> https://github.com/arendst/Sonoff-Tasmota/wiki/MagicHome-LED-strip-controller
-set DEVICE attrTemplate A_01a_tasmota_basic_state_power1
+order:A_05a
+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 }
@@ -808,26 +832,29 @@ attr DEVICE devStateIcon {Color::devStateIcon($name,"rgb","Color","Dimmer","POWE
attr DEVICE icon light_control
attr DEVICE stateFormat POWER1
attr DEVICE webCmd Color:Color ff0000:Color 00ff00:Color 0000ff:toggle:on:off
-attr DEVICE model A_05a_tasmota_rgb_led_controller
+attr DEVICE model tasmota_rgb_led_controller
-name:A_01z_tasmota_set_lowercase_texts_and_state1
+name:tasmota_set_lowercase_texts_and_state1
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc:Applies to all tasmota devices
NOTE: This template will change ON, OFF etc. sent from tasmota side to lowercase.
After applying the template you might consider to delete or change stateFormat, eventMap and/or userReadings attribute values
+order:A_01z
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
set IO_DEV publish CMNDTOPIC/Backlog StateText1 off; StateText2 on; StateText3 toggle; StateText4 hold; SetOption26 1; SaveData 1
-name:A_01z_tasmota_set_uppercase_texts_and_state1
+name:tasmota_set_uppercase_texts_and_state1
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc:Applies to all tasmota devices
NOTE: This template will change on, off etc. sent from tasmota side to uppercase. NOTE: this template only exists for compability reasons to older MQTT implementations; not recommended for other user groups
+order:A_01z1
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef) }
set IO_DEV publish CMNDTOPIC/Backlog StateText1 OFF; StateText2 ON; StateText3 TOGGLE; StateText4 HOLD; SetOption26 1
attr DEVICE userReadings state:POWER1:.* { lc(ReadingsVal($name,"POWER1","")) }
-name:A_01z_tasmota_set_power1_state_to_power
+name:tasmota_set_power1_state_to_power
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc:Applies to single relay tasmota devices
NOTE: this template only exists for compability reasons to other HA solutions; not recommended for usage in FHEM context
+order:A_01z2
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
set IO_DEV publish CMNDTOPIC/SetOption26 0
@@ -838,9 +865,10 @@ attr DEVICE userReadings state:POWER:.* { lc(ReadingsVal($name,"POWER","")) }
# SHELLY
#
# shelly1 using original firmware.
-name:A_10_shelly1
+name:shelly1
filter:TYPE=MQTT2_DEVICE
par:DEVNAME;Shelly1 name in the topic;{ AttrVal("DEVICE","readingList","") =~ m,shellies/([^/]*)/, ? $1 : undef }
+order:A_10
attr DEVICE setList\
off:noArg shellies/DEVNAME/relay/0/command off\
on:noArg shellies/DEVNAME/relay/0/command on\
@@ -854,20 +882,22 @@ attr DEVICE readingList \
shellies/DEVNAME/announce:.* { json2nameValue($EVENT) }\
shellies/announce:.* { $EVENT =~ m,..id...DEVNAME...mac.*, ? json2nameValue($EVENT) : undef }
deletereading -q DEVICE (?!associatedWith).*
-attr DEVICE model A_10_shelly1
+attr DEVICE model shelly1
# shellyplug using original firmware.
-name:A_10a_shellyplug
+name:shellyplug
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*shellies.*
+order:A_10a
par:DEVNAME;ShellyPlug name in the topic;{ AttrVal("DEVICE","readingList","") =~ m,shellies/([^/]*)/, ? $1 : undef }
-set DEVICE attrTemplate A_10_shelly1
+set DEVICE attrTemplate shelly1
attr DEVICE getList power:noArg shellies/DEVNAME/relay/power power
-attr DEVICE model A_10a_shellyplug
+attr DEVICE model shellyplug
#contributed by 87insane, https://forum.fhem.de/index.php/topic,94060.msg934614.html#msg934614
# shelly1pm using original firmware.
-name:A_10b_shelly1_w_energy_meassuring
+name:shelly1_w_energy_meassuring
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*shellies.*
+order:A_10b
desc:Applies to single relay Shelly devices offering energy meassuring like Shelly 1PM or Shelly Plug S
par:DEVNAME;Shelly1 name in the topic;{ AttrVal("DEVICE","readingList","") =~ m,shellies/([^/]*)/, ? $1 : undef }
attr DEVICE setList\
@@ -891,12 +921,13 @@ attr DEVICE readingList \
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,"relay_0_power","unknown");; my $temp = ReadingsVal($name,"temperature","-100");;"".FW_makeImage($onl)." ".FW_makeImage($light)."