mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +00:00
mqtt2.template: missing IODev attribute related changes
git-svn-id: https://svn.fhem.de/fhem/trunk@24516 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dd0a078da0
commit
6de03da5ee
@ -22,7 +22,7 @@ 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<br>NOTE:<br>This might create a new MQTT2-device or change existing ones, especially destroy readingList attributes!
|
||||
order:000001
|
||||
farewell:As you are using MQTT2_CLIENT, you should consider also setting an appropriate ignoreRegexp attribute to the MQTT2_CLIENT device! See attrTemplate MQTT2_IO_ignoreRegexp_basic for details.
|
||||
#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")}
|
||||
#par:DEVCID;CID of the device as written in the DEF; { InternalVal(AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev','')),'clientId','mosquitto') eq InternalVal('DEVICE','DEF','mosquitto') ? 'MQTT2_GeneralBridge'" : InternalVal('DEVICE','DEF','mosquitto')}
|
||||
par:ICON;ICON as set, defaults to mqtt_bridge_2;{ AttrVal("DEVICE","icon","mqtt_bridge_2") }
|
||||
attr DEVICE icon ICON
|
||||
attr DEVICE bridgeRegexp \
|
||||
@ -56,17 +56,17 @@ name:MQTT2_IO_ignoreRegexp_basic
|
||||
filter:TYPE=MQTT2_DEVICE
|
||||
desc:Adds a new ignoreRegexp to the courrent IO device of device it is applied to. This will prevent evaluation of incoming messages typically meant to go towards the hardware including branches with "cmnd" tasmota and "command" for shelly. <br>Additionally homeassistat discovery branch will be deactivated. <br>NOTE: early experimental version...
|
||||
order:000002
|
||||
par:IODEVNAME;Name of the IO-Device; { InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)) }
|
||||
par:IODEVNAME;Name of the IO-Device; { InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',''))) }
|
||||
set DEVICE attrTemplate MQTT2_IO_ignoreRegexp_shelly \IODEVNAME=IODEVNAME
|
||||
set DEVICE attrTemplate MQTT2_IO_ignoreRegexp_tasmota \IODEVNAME=IODEVNAME
|
||||
set DEVICE attrTemplate MQTT2_IO_ignoreRegexp_homeassistant \IODEVNAME=IODEVNAME
|
||||
setreading IODEVNAME attrTemplateVersion 20200701
|
||||
setreading IODEVNAME attrTemplateVersion 20210528
|
||||
|
||||
name:MQTT2_IO_ignoreRegexp_tasmota
|
||||
filter:TYPE=MQTT2_DEVICE
|
||||
desc:Adds a new ignoreRegexp to the courrent IO device of device it is applied to. This will prevent evaluation of incoming messages typically meant to go towards the hardware including branches with "cmnd" tasmota. <br>NOTE: early experimental version...
|
||||
order:0000021
|
||||
par:IODEVNAME;Name of the IO-Device; { InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)) }
|
||||
par:IODEVNAME;Name of the IO-Device; { InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',''))) }
|
||||
par:NEWIGNOREREGEXP;NEWIGNOREREGEXP as set if expression is already included, otherwise it will be added;{ my $old = AttrVal(InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)),"ignoreRegexp",'cmnd/[^:"]+:'); 'cmnd/[^:"]+:' =~ m/$old/ ? $old : $old.'|cmnd/[^:"]+:' }
|
||||
attr IODEVNAME ignoreRegexp NEWIGNOREREGEXP
|
||||
|
||||
@ -74,9 +74,9 @@ name:MQTT2_IO_ignoreRegexp_shelly
|
||||
filter:TYPE=MQTT2_DEVICE
|
||||
desc:Adds a new ignoreRegexp to the courrent IO device of device it is applied to. This will prevent evaluation of incoming messages typically meant to go towards the hardware including branches with "command" for shelly. <br>NOTE: early experimental version!!! <b>This is known for some strange effects, so make sure to have a copy of the existing one, of it's already sophisticated...</b>
|
||||
order:0000022
|
||||
par:IODEVNAME;Name of the IO-Device; { InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)) }
|
||||
par:IODEVNAME;Name of the IO-Device; { InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',''))) }
|
||||
par:NEWIGNOREREGEXP;NEWIGNOREREGEXP as set if shelly is included, otherwise it will be added;{ my $old = AttrVal(InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)),'ignoreRegexp','shellies/[^:"]+/command'); 'shellies/[^:"]+/command' =~ m{$old} ? $old : $old.'|shellies/[^:"]+/command' }
|
||||
option:{return 1 if 'NEWIGNOREREGEXP' ne AttrVal(AttrVal(InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)),'ignoreRegexp','not_set');return 0}
|
||||
option:{return 1 if 'NEWIGNOREREGEXP' ne AttrVal(InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef))),'ignoreRegexp','not_set');return 0}
|
||||
attr IODEVNAME ignoreRegexp NEWIGNOREREGEXP
|
||||
|
||||
|
||||
@ -85,9 +85,9 @@ filter:TYPE=MQTT2_DEVICE
|
||||
desc:Expands existing or adds a ignoreRegexp to the courrent IO device of device it is applied to. This will prevent evaluation of incoming messages meant for homeassistant for auto-discovery of devices. You are strongly encouraged to not use homeassistant autodiscovery at all, but in case you need it for some reason, adding this ignoreRegexp-expression might help to avoid confusion!<br>NOTE: early experimental version...
|
||||
order:000002a
|
||||
farewell:template has been applied successfully. If you will not be redirected to IODev detail page, no changes have been made.<br>Check further extending the ignoreRegexp by yourself!
|
||||
par:IODEVNAME;Name of the IO-Device; { InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)) }
|
||||
par:NEWIGNOREREGEXP;NEWIGNOREREGEXP as set if homeassistant is included, otherwise it will be added;{ my $old = AttrVal(InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)),"ignoreRegexp",'homeassistant/[^:"]+/config'); 'homeassistant/[^:"]+/config' =~ m/$old/ ? $old : $old.'|homeassistant/[^:"]+/config' }
|
||||
option:{return 1 if 'NEWIGNOREREGEXP' ne AttrVal(InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)),'ignoreRegexp','not_set');return 0}
|
||||
par:IODEVNAME;Name of the IO-Device; { InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',''))) }
|
||||
par:NEWIGNOREREGEXP;NEWIGNOREREGEXP as set if homeassistant is included, otherwise it will be added;{ my $old = AttrVal(InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef))),'ignoreRegexp','homeassistant/[^:"]+/config'); 'homeassistant/[^:"]+/config' =~ m/$old/ ? $old : $old.'|homeassistant/[^:"]+/config' }
|
||||
option:{return 1 if 'NEWIGNOREREGEXP' ne AttrVal(InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef))),'ignoreRegexp','not_set');return 0}
|
||||
attr IODEVNAME ignoreRegexp NEWIGNOREREGEXP
|
||||
{ fhem "trigger $FW_wname JS:location.href='$FW_ME?detail=IODEVNAME'" if($cl && $cl->{TYPE} eq "FHEMWEB") }
|
||||
|
||||
@ -96,7 +96,7 @@ filter:NAME=speechrecognTesting
|
||||
order:000002b
|
||||
desc:template to do some cleanup especially to a MQTT2_CLIENT_general_bridge device (if existant)...
|
||||
#and set ignoreRegexp that may help in case MQTT commands may be issued from not within this FHEM server; call e.g. with ADD_TO_IO_IGNOREREGEXP=milight/0x[0-9a-fA-F]{1,4}[/].*/[0-8].
|
||||
par:IODEVNAME;Name of the IO-Device; { InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)) }
|
||||
par:IODEVNAME;Name of the IO-Device; { InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',''))) }
|
||||
par:ADD_TO_IO_IGNOREREGEXP;add ignoreRegexp to be attached to the current one, defaults to "";{ "" }
|
||||
deletereading -q TYPE=MQTT2_\DEVICE:FILTER=model=MQTT2_CLIENT_general_bridge (?!associatedWith).*
|
||||
deleteattr TYPE=MQTT2_\DEVICE:FILTER=model=MQTT2_CLIENT_general_bridge readingList
|
||||
@ -980,7 +980,7 @@ 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 }
|
||||
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
|
||||
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)) }
|
||||
attr DEVICE readingList \
|
||||
TELETOPIC/LWT:.* LWT\
|
||||
TELETOPIC/STATE:.* { json2nameValue($EVENT,'',$JSONMAP) }\
|
||||
@ -1045,13 +1045,13 @@ attr DEVICE setList \
|
||||
off:noArg CMNDTOPIC/POWER1 0\
|
||||
on:noArg CMNDTOPIC/POWER1 1\
|
||||
toggle:noArg CMNDTOPIC/POWER1 2
|
||||
attr DEVICE devStateIcon {my $text = ' uptime: '.ReadingsVal($name,"Uptime","unknown").sprintf(" aktuell: %.1f W Tag: %.2f kWh Gestern: %.3f kWh Gesamt: %.4f kWh", ReadingsVal($name,"ENERGY_Power","-1"), ReadingsVal($name,"ENERGY_Today","-1"), ReadingsVal($name,"ENERGY_Yesterday","-1"), ReadingsVal($name,"ENERGY_Total","-1"));; my $onl = ReadingsVal($name,"LWT","false") eq "Online"?"10px-kreis-gruen":"10px-kreis-rot";; my $light = ReadingsVal($name,"state","off");;"<div><a href=\"http://".ReadingsVal($name,"IPAddress",ReadingsVal($name,"Info2_IPAddress","none"))." \"target=\"_blank\">".FW_makeImage($onl).'</a> <a href="/fhem?cmd.dummy=set '.$name.' toggle&XHR=1">'.FW_makeImage($light)."</a>$text"}
|
||||
attr DEVICE devStateIcon {my $text = ' uptime: '.ReadingsVal($name,"Uptime","unknown").sprintf(" aktuell: %.1f W Tag: %.2f kWh Gestern: %.3f kWh Gesamt: %.4f kWh", ReadingsVal($name,"ENERGY_Power","-1"), ReadingsVal($name,"ENERGY_Today","-1"), ReadingsVal($name,"ENERGY_Yesterday","-1"), ReadingsVal($name,"ENERGY_Total","-1"));; my $onl = ReadingsVal($name,"LWT","false") eq "Online"?"10px-kreis-gruen":"10px-kreis-rot";; my $light = ReadingsVal($name,"state","off");;"<div><a href=\"http://".ReadingsVal($name,"IPAddress",ReadingsVal($name,"Info2_IPAddress","none"))." \"target=\"_blank\">".FW_makeImage($onl).'</a> <a href="/fhem?cmd.dummy=set '.$name.' toggle&XHR=1">'.FW_makeImage($light)."</a>$text<b></b>"}
|
||||
attr DEVICE stateFormat {sprintf("aktuell: %.1f W Tag: %.2f kWh Gestern: %.3f kWh Gesamt: %.4f kWh", ReadingsVal($name,"ENERGY_Power","-1"), ReadingsVal($name,"ENERGY_Today","-1"), ReadingsVal($name,"ENERGY_Yesterday","-1"), ReadingsVal($name,"ENERGY_Total","-1"))}
|
||||
deletereading -q DEVICE (?!associatedWith).*
|
||||
attr DEVICE setStateList on off toggle
|
||||
attr DEVICE webCmd :
|
||||
attr DEVICE model tasmota_POW
|
||||
setreading DEVICE attrTemplateVersion 20210521
|
||||
setreading DEVICE attrTemplateVersion 20210526
|
||||
|
||||
|
||||
# sonoff 1 channel + USB device flashed with Tasmota.
|
||||
@ -1284,7 +1284,7 @@ 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)}
|
||||
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)) }
|
||||
par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 }
|
||||
par:BCKLGCMND;Send out configuration command via backlog?;{ 1 }
|
||||
par:ICON;ICON as set, defaults to fts_shutter_updown;{ AttrVal("DEVICE","icon","fts_shutter_updown") }
|
||||
@ -1333,7 +1333,7 @@ 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://tasmota.github.io/docs/Blinds-and-Shutters/</a>.
|
||||
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://tasmota.github.io/docs/Blinds-and-Shutters/">Tasmota wiki</a>.
|
||||
attr DEVICE model tasmota_2ch_shutter_invert_1
|
||||
setreading DEVICE attrTemplateVersion 20210515
|
||||
setreading DEVICE attrTemplateVersion 20210526
|
||||
option:{ CALLSPEECHRECOGN }
|
||||
set DEVICE attrTemplate speechcontrol_type_blind
|
||||
|
||||
@ -1343,7 +1343,7 @@ 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 some configuration of firmware compilation to operate, see <a href="https://tasmota.github.io/docs/Blinds-and-Shutters/">Tasmota wiki</a><br> and <a href="https://forum.fhem.de/index.php/topic,98366.msg917091.html#msg917091">Forum Thread</a><br>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:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
|
||||
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)) }
|
||||
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
|
||||
par:BCKLGCMND;Send out configuration command via backlog?;{ 1 }
|
||||
set DEVICE attrTemplate tasmota_2ch_shutter_invert_1 \BCKLGCMND=0
|
||||
@ -1353,7 +1353,7 @@ set IO_DEV publish CMNDTOPIC/Restart 1
|
||||
option:global
|
||||
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 tasmota_2ch_shutter_invert_0
|
||||
setreading DEVICE attrTemplateVersion 20201221
|
||||
setreading DEVICE attrTemplateVersion 20210526
|
||||
|
||||
|
||||
# tasmota 4ch as double shutter device.
|
||||
@ -1363,7 +1363,7 @@ desc:Configures a four channel tasmota device as two shutters; needs some additi
|
||||
order:A_02b2
|
||||
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$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)}
|
||||
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)) }
|
||||
par:BCKLGCMND;Send out configuration command via backlog?;{ 1 }
|
||||
set DEVICE attrTemplate tasmota_2ch_shutter_invert_1 \BCKLGCMND=0
|
||||
option:{BCKLGCMND}
|
||||
@ -1390,7 +1390,7 @@ attr DEVICE_CH2 readingList \
|
||||
STATTOPIC/SHUTTER2:.* state\
|
||||
STATTOPIC/SHUTTER2:.* pct
|
||||
attr DEVICE,DEVICE_CH2 model tasmota_4ch_two_shutters_invert_0
|
||||
setreading DEVICE,DEVICE_CH2 attrTemplateVersion 20201221
|
||||
setreading DEVICE,DEVICE_CH2 attrTemplateVersion 20210526
|
||||
set DEVICE,DEVICE_CH2 attrTemplate speechcontrol_type_blind
|
||||
|
||||
# based on a proposal by twdotnet, https://forum.fhem.de/index.php/topic,94495.msg1137400.html#msg1137400
|
||||
@ -1411,7 +1411,7 @@ par:TELETOPIC;info topic prefix, without trailing /;{ AttrVal("DEVICE","readingL
|
||||
par:STATTOPIC;ack topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}stat$3" : undef }
|
||||
par:SETCHANNELINFO;Set this to 0 to not set channelinfo;{ 1 }
|
||||
par:ICON;ICON as set, defaults to taster;{ AttrVal("DEVICE","icon","taster") }
|
||||
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
|
||||
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)) }
|
||||
# autoconfigure device
|
||||
option:{RADIO_NO_TEMPLATE}
|
||||
set IO_DEV publish CMNDTOPIC/Backlog StateText1 off; StateText2 on; StateText3 toggle; StateText4 hold; SwitchMode1 SWITCHMODE1; SwitchMode2 SWITCHMODE2; SwitchMode3 SWITCHMODE3; SetOption26 1; SetOption114 1; SaveData 1
|
||||
@ -1455,7 +1455,7 @@ attr DEVICE_CH3 setList \
|
||||
option:{SETCHANNELINFO}
|
||||
set DEVICE attrTemplate set_associatedWith \CHANNELS=3
|
||||
attr DEVICE,DEVICE_CH2,DEVICE_CH3 model tasmota_shelly_i3
|
||||
setreading DEVICE,DEVICE_CH2,DEVICE_CH3 attrTemplateVersion 20210321
|
||||
setreading DEVICE,DEVICE_CH2,DEVICE_CH3 attrTemplateVersion 20210526
|
||||
|
||||
|
||||
# sonoff 4 channel device flashed with Tasmota.
|
||||
@ -1503,7 +1503,7 @@ par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readi
|
||||
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:ICON;ICON as set, defaults to hue_filled_outlet;{ AttrVal("DEVICE","icon","hue_filled_outlet") }
|
||||
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
|
||||
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)) }
|
||||
par:LONGITUDE;Read longitude set in FHEM;{ AttrVal("global","longitude","8.686")}
|
||||
par:LATITUDE;Read latitude set in FHEM;{ AttrVal("global","latitude","50.112")}
|
||||
par:ALTITUDE;Read altitude set in FHEM;{ AttrVal("global","altitude","0")}
|
||||
@ -1622,7 +1622,7 @@ set IO_DEV publish CMNDTOPIC/status
|
||||
set IO_DEV publish CMNDTOPIC/restart 1
|
||||
farewell:Template has been applied successfully. Wait some seconds for reboot to complete and watch readings get populated.
|
||||
attr DEVICE,DEVICE_CH2,DEVICE_CH3,DEVICE_USB model tasmota_3socketUSB_channel_split
|
||||
setreading DEVICE,DEVICE_CH2,DEVICE_CH3,DEVICE_USB attrTemplateVersion 20210515
|
||||
setreading DEVICE,DEVICE_CH2,DEVICE_CH3,DEVICE_USB attrTemplateVersion 20210526
|
||||
|
||||
|
||||
# tasmota 4ch as one FHEM device.
|
||||
@ -1961,7 +1961,7 @@ order:A_05c
|
||||
attr DEVICE icon tuer_fenster_kontakt
|
||||
attr DEVICE jsonMap TuyaReceived_Cmnd:0 TuyaReceived_CmndData:0 TuyaReceived_Data:0
|
||||
attr DEVICE autocreate 0
|
||||
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
|
||||
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)) }
|
||||
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 }
|
||||
@ -1984,7 +1984,7 @@ attr DEVICE readingList \
|
||||
attr DEVICE stateFormat LWT\
|
||||
state
|
||||
attr DEVICE model tasmota_window_sensor_MC400A
|
||||
setreading DEVICE attrTemplateVersion 20210515
|
||||
setreading DEVICE attrTemplateVersion 20210526
|
||||
|
||||
|
||||
name:tasmota_set_lowercase_texts_and_state1
|
||||
@ -1992,7 +1992,7 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
|
||||
desc:Applies to all tasmota devices <br>NOTE: This template will change ON, OFF etc. sent from tasmota side to lowercase. <br>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)}
|
||||
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)) }
|
||||
set IO_DEV publish CMNDTOPIC/Backlog StateText1 off; StateText2 on; StateText3 toggle; StateText4 hold; SetOption26 1; SaveData 1
|
||||
|
||||
name:tasmota_set_uppercase_texts_and_state1
|
||||
@ -2000,7 +2000,7 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
|
||||
desc:Applies to all tasmota devices <br>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) }
|
||||
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('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","")) }
|
||||
|
||||
@ -2009,7 +2009,7 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
|
||||
desc:Applies to single relay tasmota devices <br>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)}
|
||||
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)) }
|
||||
set IO_DEV publish CMNDTOPIC/SetOption26 0
|
||||
attr DEVICE userReadings state:POWER:.* { lc(ReadingsVal($name,"POWER","")) }
|
||||
|
||||
@ -2024,7 +2024,7 @@ farewell:template has been applied successfully. <br>Note: some changes have bee
|
||||
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;{ InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)) }
|
||||
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)) }
|
||||
set IO_DEV publish CMNDTOPIC/Backlog StateText1 off; StateText2 on; StateText3 toggle; StateText4 hold; SetOption26 1; SetOption89 1; SetOption83 1; SaveData 1
|
||||
par:ICON;ICON as set, defaults to MQTT;{ AttrVal("DEVICE","icon","mqtt") }
|
||||
attr DEVICE icon ICON
|
||||
@ -2053,7 +2053,7 @@ attr DEVICE devStateIcon Online:10px-kreis-gruen@green Offline:10px-kreis-rot@re
|
||||
set IO_DEV publish CMNDTOPIC/restart 1
|
||||
attr DEVICE model tasmota_zigbee2tasmota_bridge
|
||||
deletereading -q DEVICE (?!associatedWith).*
|
||||
setreading DEVICE attrTemplateVersion 20210515
|
||||
setreading DEVICE attrTemplateVersion 20210526
|
||||
{ AttrTemplate_Initialize() }
|
||||
|
||||
|
||||
@ -3884,7 +3884,7 @@ desc:Use this with an OpenMQTTGateway. This template is meant to configure a bri
|
||||
order:X_02
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/]O[^/]*M[^/]*G[^/]*[/].*:, ? $1 : undef }
|
||||
par:DEVNAME;DEVNAME typically contains OpenMQTTGateway;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/](O[^/]*M[^/]*G[^/]*)[/].*:, ? $2 : undef }
|
||||
par:DEVCID;CID of the device as written in the DEF; { InternalVal(AttrVal("DEVICE","IODev",""),"clientId","mosquitto") eq InternalVal("DEVICE","DEF","mosquitto") ? "oMQTTgw_MCU" : InternalVal("DEVICE","DEF","mosquitto")}
|
||||
par:DEVCID;CID of the device as written in the DEF; { InternalVal(AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)),'clientId','mosquitto') eq InternalVal('DEVICE','DEF','mosquitto') ? 'oMQTTgw_MCU' : InternalVal('DEVICE','DEF','mosquitto')}
|
||||
par:ICON;ICON as set, defaults to MQTT;{ AttrVal("DEVICE","icon","mqtt") }
|
||||
deletereading -q DEVICE (?!associatedWith).*
|
||||
attr DEVICE bridgeRegexp\
|
||||
|
Loading…
x
Reference in New Issue
Block a user