2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

mqtt2.template: small changes to some zigbee2mqtt (voltage)

git-svn-id: https://svn.fhem.de/fhem/trunk@23288 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2020-12-04 06:11:47 +00:00
parent 0aee167b70
commit 1668921619

View File

@ -543,12 +543,12 @@ name:zigbee2mqtt_human_body_movement
desc: Human motion sensor via zigbee2mqtt <br>Tested with: Xiaomi MiJia human RTCGQ01LM body movement sensor (occupancy)
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_08
set DEVICE attrTemplate zigbee2mqtt_Human_Motion_Sensor
attr DEVICE jsonMap battery:batteryPercent battery:batteryVoltage
set DEVICE attrTemplate zigbee2mqtt_human_body_movement_illuminance
attr DEVICE jsonMap battery:batteryPercent battery:batterymV
attr DEVICE stateFormat Motion: occupancy\
Battery: batteryPercent%
attr DEVICE model zigbee2mqtt_human_body_movement
setreading DEVICE attrTemplateVersion 20201202
setreading DEVICE attrTemplateVersion 20201203
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198, addon by TomLee, https://forum.fhem.de/index.php/topic,116310.msg1105927.html#msg1105927
name:zigbee2mqtt_human_body_movement_illuminance
@ -565,10 +565,10 @@ attr DEVICE jsonMap battery:batteryPercent battery:batteryVoltage illuminance_lu
attr DEVICE stateFormat Motion: occupancy\
Luminance: illuminance Battery: batteryPercent%
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE userReadings batteryVoltage:batteryVoltage.* {ReadingsNum($name,'batteryVoltage',0)/1000}
attr DEVICE userReadings batteryVoltage:batterymV.* {ReadingsNum($name,'batterymV',0)/1000}
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model zigbee2mqtt_human_body_movement_illuminance
setreading DEVICE attrTemplateVersion 20201202
setreading DEVICE attrTemplateVersion 20201203
name:zigbee2mqtt_Light_Intensity_Sensor
desc: Light Intensity Sensor via zigbee2mqtt <br>Tested with: Xiaomi MiJia light intensity sensor GZCGQ01LM
@ -649,9 +649,9 @@ set DEVICE attrTemplate speechcontrol_type_switch
attr DEVICE model zigbee2mqtt_Light_Switch
setreading DEVICE attrTemplateVersion 20200904
#source post: https://forum.fhem.de/index.php/topic,94495.msg916789.html#msg916789
name:zigbee2mqtt_Wireless_Button
desc: Wireless button via zigbee2mqtt <br>Tested with: Xiaomi Aqara WXKG12LM wireless switch with gyroscope
#contributed by Puccini, source post: https://forum.fhem.de/index.php/topic,108538.msg1106932.html#msg1106932
name:zigbee2mqtt_scene_controller
desc: Wireless button via zigbee2mqtt <br>Tested with: Xiaomi Aqara WXCJKG13LM wireless switch
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_12
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef }
@ -659,13 +659,33 @@ par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to control_home;{ AttrVal("DEVICE","icon","control_home") }
attr DEVICE icon ICON
attr DEVICE stateFormat Click: click Action: action
attr DEVICE stateFormat Action: action Batterie: battery %
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model zigbee2mqtt_Wireless_Button
attr DEVICE model zigbee2mqtt_scene_controller
setreading DEVICE attrTemplateVersion 20200904
#source post: https://forum.fhem.de/index.php/topic,94495.msg916789.html#msg916789
name:zigbee2mqtt_Wireless_Button
desc: Wireless button via zigbee2mqtt <br>Tested with: Xiaomi Aqara WXKG12LM wireless switch with gyroscope
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_12a
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef }
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to control_home;{ AttrVal("DEVICE","icon","control_home") }
attr DEVICE icon ICON
attr DEVICE stateFormat Click: click Action: action
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE jsonMap battery:batteryPercent battery:batterymV
attr DEVICE userReadings batteryVoltage:batterymV.* {ReadingsNum($name,'batterymV',0)/1000}
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model zigbee2mqtt_Wireless_Button
setreading DEVICE attrTemplateVersion 20201203
name:zigbee2mqtt_wireless_button_old
desc: Wireless button without gyro via zigbee2mqtt <br>Tested with: Xiaomi Aqara WXKG11LM wireless button
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
@ -1889,7 +1909,7 @@ attr DEVICE icon ICON
attr DEVICE comment For forther configuration use e.g. stateFormat attribtue like T: temperature°C | H: humidity% | B: batteryPercent%
attr DEVICE readingList \
TELETOPIC:.* { $EVENT =~ m,^.*(..Device.+)..$, ? json2nameValue($1,'',$JSONMAP) : $EVENT =~ m,0xDEV_ID.:(.*).., ? json2nameValue($1,'',$JSONMAP) : undef }
attr DEVICE jsonMap Device:0 Battery:0 BatteryPercentage:batteryPercent BatteryVoltage:batteryVoltage Temperature:temperature Humidity:humidity
attr DEVICE jsonMap Device:0 Battery:0 BatteryPercentage:batteryPercent BatteryVoltage:batterymV Temperature:temperature Humidity:humidity
deletereading -q DEVICE (?!associatedWith).*
option:{ CALLSPEECHRECOGN }
attr DEVICE model tasmota_zigbee2tasmota_generic_battery_sensor
@ -1907,7 +1927,7 @@ par:ICON;ICON as set, defaults to tradfri_remote;{ AttrVal("DEVICE","icon","trad
attr DEVICE icon ICON
attr DEVICE readingList \
TELETOPIC:.* { $EVENT =~ m,(([0-9])([0-9])([0-9])([0-9])!([0-9][0-9])), ? { 'state'=>"${5}${4}${3}${2}$6" } : $EVENT =~ m,^.*(..Device.+)..$, ? json2nameValue($1,'',$JSONMAP) : $EVENT =~ m,0xDEV_ID.:(.*).., ? json2nameValue($1,'',$JSONMAP) : undef }
attr DEVICE jsonMap Device:0 Battery:0 BatteryPercentage:batteryPercent BatteryVoltage:batteryVoltage Temperature:temperature
attr DEVICE jsonMap Device:0 Battery:0 BatteryPercentage:batteryPercent BatteryVoltage:batterymV Temperature:temperature
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model tasmota_zigbee2tasmota_remote_control
setreading DEVICE attrTemplateVersion 20201202