2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

mqtt2.template: change deleteReading regexp (Forum #94060)

git-svn-id: https://svn.fhem.de/fhem/trunk@19297 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2019-04-30 08:38:45 +00:00
parent 5656628fdf
commit 46b513b5bc

View File

@ -34,9 +34,9 @@ attr DEVCID comment Do not use very open bridgeRegexp expressions! This might le
attr DEVCID room NEWDEVROOM attr DEVCID room NEWDEVROOM
attr DEVCID setStateList on off attr DEVCID setStateList on off
deleteAttr DEVICE readingList deleteAttr DEVICE readingList
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
deleteAttr DEVCID readingList deleteAttr DEVCID readingList
deletereading -q DEVCID [^(associatedWith)]* deletereading -q DEVCID (?!associatedWith).*
setreading DEVCID associatedWith DEVICE setreading DEVCID associatedWith DEVICE
{ fhem "trigger $FW_wname JS:location.href='$FW_ME?detail=DEVCID'" if($cl && $cl->{TYPE} eq "FHEMWEB") } { 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! farewell:template has been applied successfully. Be carefull when extending the brigeRegexp!
@ -291,7 +291,7 @@ attr DEVICE devStateIcon open:fts_window_1w_open@red close:fts_window_1w@green
#attr DEVICE genericDeviceType contact #attr DEVICE genericDeviceType contact
attr DEVICE eventMap true:close false:open attr DEVICE eventMap true:close false:open
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model L_06_zigbee2mqtt_ContactSensor attr DEVICE model L_06_zigbee2mqtt_ContactSensor
name:L_07_zigbee2mqtt_TempHumHpaSensor name:L_07_zigbee2mqtt_TempHumHpaSensor
@ -301,7 +301,7 @@ par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ 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 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) } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model L_07_TempHumHpa_TempSensor attr DEVICE model L_07_TempHumHpa_TempSensor
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198 #source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
@ -312,7 +312,7 @@ par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ 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 stateFormat Motion: occupancy Luminance: illuminance
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model L_08_Human_Motion_TempSensor attr DEVICE model L_08_Human_Motion_TempSensor
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198 #source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
@ -323,7 +323,7 @@ par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ 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 stateFormat Motion: action X: angle_x Y: angle_y Z: angle_z
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model L_09_Motion_Sensor attr DEVICE model L_09_Motion_Sensor
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198 #source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
@ -334,7 +334,7 @@ par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ 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 stateFormat Leak: water_leak
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model L_10_Water_Leak_Sensor attr DEVICE model L_10_Water_Leak_Sensor
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198 #source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
@ -345,7 +345,7 @@ par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ 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 stateFormat click
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model L_11_Light_Switch attr DEVICE model L_11_Light_Switch
#source post: https://forum.fhem.de/index.php/topic,94495.msg916789.html#msg916789 #source post: https://forum.fhem.de/index.php/topic,94495.msg916789.html#msg916789
@ -356,7 +356,7 @@ par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ 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 stateFormat Click: click Action: action
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model L_12_Wireless_Button attr DEVICE model L_12_Wireless_Button
name:L_13_zigbee2mqtt_wireless_button_old name:L_13_zigbee2mqtt_wireless_button_old
@ -366,7 +366,7 @@ par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ 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 stateFormat Click: click
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model L_13_wireless_button_old attr DEVICE model L_13_wireless_button_old
name:L_14_zigbee2mqtt_aqara_cube name:L_14_zigbee2mqtt_aqara_cube
@ -376,7 +376,7 @@ par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ 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 stateFormat Action: action
attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) } attr DEVICE readingList BASE_TOPIC/DEV_ID:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model L_14_aqara_cube attr DEVICE model L_14_aqara_cube
@ -404,7 +404,7 @@ attr DEVICE readingList \
tele/DEVNAME/SENSOR:.* { json2nameValue($EVENT) }\ tele/DEVNAME/SENSOR:.* { json2nameValue($EVENT) }\
tele/DEVNAME/INFO.:.* { json2nameValue($EVENT) }\ tele/DEVNAME/INFO.:.* { json2nameValue($EVENT) }\
stat/DEVNAME/RESULT:.* { json2nameValue($EVENT) } stat/DEVNAME/RESULT:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList on off toggle attr DEVICE setStateList on off toggle
attr DEVICE autocreate 0 attr DEVICE autocreate 0
attr DEVICE model A_01a_tasmota_basic_state_power1 attr DEVICE model A_01a_tasmota_basic_state_power1
@ -427,7 +427,7 @@ attr DEVICE readingList \
tele/DEVNAME/INFO.:.* { json2nameValue($EVENT) }\ tele/DEVNAME/INFO.:.* { json2nameValue($EVENT) }\
tele/DEVNAME/UPTIME:.* { json2nameValue($EVENT) }\ tele/DEVNAME/UPTIME:.* { json2nameValue($EVENT) }\
stat/DEVNAME/RESULT:.* { json2nameValue($EVENT) } stat/DEVNAME/RESULT:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
set IO_DEV publish cmnd/DEVNAME/Restart 1 set IO_DEV publish cmnd/DEVNAME/Restart 1
attr DEVICE autocreate 0 attr DEVICE autocreate 0
@ -438,7 +438,7 @@ par:DEVNAME;ESP's name in the topic;{ AttrVal("DEVICE","readingList","") =~ m,te
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev","")} par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev","")}
par:READINGLISTCLEARED;cleared from prefixes;{ AttrVal("DEVICE","readingList","") =~ s/, '[^_]+[_]'/, ''/g, ? $1 : undef } par:READINGLISTCLEARED;cleared from prefixes;{ AttrVal("DEVICE","readingList","") =~ s/, '[^_]+[_]'/, ''/g, ? $1 : undef }
attr DEVICE readingList READINGLISTCLEARED attr DEVICE readingList READINGLISTCLEARED
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
set IO_DEV publish cmnd/DEVNAME/Restart 1 set IO_DEV publish cmnd/DEVNAME/Restart 1
attr DEVICE autocreate 0 attr DEVICE autocreate 0
@ -594,7 +594,7 @@ attr DEVICE stateFormat <a href="http://IPAddress" target="_blank">\
LWT\ LWT\
</a>\ </a>\
state state
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList open close half stop pct attr DEVICE setStateList open close half stop pct
attr DEVICE comment After applying the template set SHUTTEROPENDURATION and SHUTTERCLOSEDURATION first.\ attr DEVICE comment After applying the template set SHUTTEROPENDURATION and SHUTTERCLOSEDURATION first.\
Use the "set x_configuration" Option. Example: "set x_configuration SHUTTEROPENDURATION 35"\ Use the "set x_configuration" Option. Example: "set x_configuration SHUTTEROPENDURATION 35"\
@ -689,7 +689,7 @@ attr DEVICE readingList \
tele/DEVNAME/STATE:.* { json2nameValue($EVENT) }\ tele/DEVNAME/STATE:.* { json2nameValue($EVENT) }\
stat/DEVNAME/RESULT:.* { json2nameValue($EVENT) }\ stat/DEVNAME/RESULT:.* { json2nameValue($EVENT) }\
tele/DEVNAME/INFO.:.* { json2nameValue($EVENT) } tele/DEVNAME/INFO.:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE autocreate 0 attr DEVICE autocreate 0
attr DEVICE devStateIcon {Color::devStateIcon($name,"rgb","Color","state")} attr DEVICE devStateIcon {Color::devStateIcon($name,"rgb","Color","state")}
attr DEVICE icon light_control attr DEVICE icon light_control
@ -737,7 +737,7 @@ attr DEVICE readingList \
shellies/DEVNAME/input/0:.* input0\ shellies/DEVNAME/input/0:.* input0\
shellies/DEVNAME/online:.* online\ shellies/DEVNAME/online:.* online\
shellies/DEVNAME/announce:.* { json2nameValue($EVENT) } shellies/DEVNAME/announce:.* { json2nameValue($EVENT) }
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model A_10_shelly1 attr DEVICE model A_10_shelly1
# shellyplug using original firmware. # shellyplug using original firmware.
@ -779,7 +779,7 @@ Aktueller Verbrauch: relay_0_power\
<br>\ <br>\
Temperatur: temperature °C Temperatur: temperature °C
attr DEVICE webCmd : attr DEVICE webCmd :
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE model A_10b_shelly1pm attr DEVICE model A_10b_shelly1pm
@ -805,7 +805,7 @@ attr DEVICE readingList \
shellies/DEVNAME/input/0:.* input0 shellies/DEVNAME/input/0:.* input0
attr DEVICE devStateIcon 0:fts_shutter_100 100:fts_shutter_10 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 0\d.*:fts_shutter_100 set_.*:fts_shutter_updown attr DEVICE devStateIcon 0:fts_shutter_100 100:fts_shutter_10 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 0\d.*:fts_shutter_100 set_.*:fts_shutter_updown
attr DEVICE stateFormat pct attr DEVICE stateFormat pct
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList open close stop attr DEVICE setStateList open close stop
attr DEVICE model A_11b_shelly2_roller attr DEVICE model A_11b_shelly2_roller
@ -955,7 +955,7 @@ attr DEVICE readingList shellies/DEVNAME/white/0/status:.* {json2nameValue($EVEN
attr DEVICE setList off:noArg shellies/DEVNAME/white/0/command off\ attr DEVICE setList off:noArg shellies/DEVNAME/white/0/command off\
on:noArg shellies/DEVNAME/white/0/command on\ on:noArg shellies/DEVNAME/white/0/command on\
brightness:colorpicker,BRI,0,1,100 shellies/DEVNAME/white/0/set {"ison":"true","mode":"white","brightness":"$EVTPART1"} brightness:colorpicker,BRI,0,1,100 shellies/DEVNAME/white/0/set {"ison":"true","mode":"white","brightness":"$EVTPART1"}
deletereading -q DEVICE [^(associatedWith)]* deletereading -q DEVICE (?!associatedWith).*
setreading DEVICE associatedWith DEVICE_CH1,DEVICE_CH2,DEVICE_CH4 setreading DEVICE associatedWith DEVICE_CH1,DEVICE_CH2,DEVICE_CH4
attr DEVICE webCmd on:off:brightness attr DEVICE webCmd on:off:brightness
attr DEVICE model A_17a_shelly2rgbw_4w_split attr DEVICE model A_17a_shelly2rgbw_4w_split