diff --git a/FHEM/lib/AttrTemplate/mqtt2.template b/FHEM/lib/AttrTemplate/mqtt2.template index 7139366c2..153bfe970 100644 --- a/FHEM/lib/AttrTemplate/mqtt2.template +++ b/FHEM/lib/AttrTemplate/mqtt2.template @@ -50,7 +50,7 @@ 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 } +par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } attr DEVICE bridgeRegexp\ BASE_TOPIC/([A-Za-z0-9._]*)[/]?.*:.* "zigbee_$1" attr DEVICE getList\ @@ -96,7 +96,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } attr DEVICE icon light_control attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)} @@ -114,7 +114,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } attr DEVICE icon light_control attr DEVICE webCmd toggle:on:off:brightness:color_temp @@ -131,7 +131,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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 attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} @@ -150,7 +150,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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 attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} @@ -169,7 +169,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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 attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} @@ -192,7 +192,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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 attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} @@ -212,7 +212,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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 attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} @@ -232,7 +232,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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 attr DEVICE stateFormat {lc ReadingsVal($name,"state",0)} @@ -250,7 +250,7 @@ attr DEVICE model zigbee2mqtt_light_rgbcct_rgb 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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 @@ -268,7 +268,7 @@ attr DEVICE model zigbee2mqtt_hueMotionSensor 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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'} } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } @@ -281,7 +281,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef } par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[^/]+[/]([^/]+).*:, ? $1 : undef } attr DEVICE stateFormat contact attr DEVICE devStateIcon open:fts_window_1w_open@red close:fts_window_1w@green @@ -295,7 +295,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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) } @@ -307,7 +307,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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) } @@ -319,7 +319,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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) } @@ -332,7 +332,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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) } @@ -344,7 +344,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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) } @@ -356,7 +356,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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) } @@ -368,7 +368,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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) } @@ -380,7 +380,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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) } @@ -391,7 +391,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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) } @@ -402,7 +402,7 @@ 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:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $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) }