From 9a1651da15ca1f28e755ae784e0f03136cebcc68 Mon Sep 17 00:00:00 2001 From: Beta-User <> Date: Sat, 18 Dec 2021 05:17:18 +0000 Subject: [PATCH] mqtt_generic_bridge.template: adopt to new IODev handling git-svn-id: https://svn.fhem.de/fhem/trunk@25352 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- .../lib/AttrTemplate/mqtt_generic_bridge.template | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fhem/FHEM/lib/AttrTemplate/mqtt_generic_bridge.template b/fhem/FHEM/lib/AttrTemplate/mqtt_generic_bridge.template index 1061ab32f..65393d047 100644 --- a/fhem/FHEM/lib/AttrTemplate/mqtt_generic_bridge.template +++ b/fhem/FHEM/lib/AttrTemplate/mqtt_generic_bridge.template @@ -24,13 +24,13 @@ prereq:{my @devices=devspec2array("TYPE=MQTT_GENERIC_BRIDGE");return 1 if $devic filter:TYPE=MQTT_GENERIC_BRIDGE desc:This template is proposal to fullfill requirements for the rest of the s some basic configuration on the MQTT_GENERIC_BRIDGE side itself, especially different topic structures for sending readings values and receiving commands and/or reading values.
Note: All outgoing messages will be sent without retain flag; change this to 1, if you absulutely need values stored on your MQTT server (e.g. if your clients are not always connected). order:000001 -par:IODEVNAME;Name of the IO-Device; { AttrVal("DEVICE","IODev",undef) } -par:SUBSCRIPTIONS;Current subscription attribute value of the IO-Device, defaults to 'setByTheProgram';{ AttrVal("DEVICE",'subscriptions','setByTheProgram') } -par:RADIO_SETCLIENTODERMGB_M2D;Set clientOrder on IODev to "MQTT_GENERIC_BRIDGE MQTT2_DEVICE" (recommended);{ my $io = AttrVal("DEVICE","IODev",""); return 0 if InternalVal($io,"TYPE","MQTT") eq "MQTT"; AttrVal($io,"clientOrder",undef) } -par:RADIO_SETCLIENTODERMGB_ONLY;Set clientOrder on IODev to "MQTT_GENERIC_BRIDGE" (MGB only mode);{ my $io = AttrVal("DEVICE",'IODev',""); return 0 if InternalVal($io,'TYPE','MQTT') eq 'MQTT'; AttrVal($io,"clientOrder",undef) } -par:RADIO_SETCLIENTODERM2D_MGB;Set clientOrder on IODev to "MQTT2_DEVICE MQTT_GENERIC_BRIDGE" (default, may cause unintended autocreates);{ my $io = AttrVal('DEVICE','IODev',""); return 0 if InternalVal($io,'TYPE','MQTT') eq 'MQTT'; AttrVal($io,'clientOrder',undef) } -par:RADIO_DONTSETCLIENTODER;Leave clientOrder on IODev (default is "MQTT2_DEVICE MQTT_GENERIC_BRIDGE", may cause unintended autocreates);{ my $io = AttrVal("DEVICE","IODev",""); return 0 if InternalVal($io,'TYPE','MQTT') eq 'MQTT'; AttrVal($io,'clientOrder',undef) } -par:ATTRTVERSION;Version of attrTemplate;{ '20210222' } +par:IODEVNAME;Name of the IO-Device; { AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME}) } +par:SUBSCRIPTIONS;Current subscription attribute value of the IO-Device, defaults to 'setByTheProgram';{ my $io = AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME}); AttrVal($io,'subscriptions','setByTheProgram') } +par:RADIO_SETCLIENTODERMGB_M2D;Set clientOrder on IODev to "MQTT_GENERIC_BRIDGE MQTT2_DEVICE" (recommended);{ my $io = AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME}); return 0 if InternalVal($io,'TYPE','MQTT') eq 'MQTT'; AttrVal($io,'clientOrder',undef) } +par:RADIO_SETCLIENTODERMGB_ONLY;Set clientOrder on IODev to "MQTT_GENERIC_BRIDGE" (MGB only mode);{ my $io = AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME}); return 0 if InternalVal($io,'TYPE','MQTT') eq 'MQTT'; AttrVal($io,'clientOrder',undef) } +par:RADIO_SETCLIENTODERM2D_MGB;Set clientOrder on IODev to "MQTT2_DEVICE MQTT_GENERIC_BRIDGE" (default, may cause unintended autocreates);{ my $io = AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME}); return 0 if InternalVal($io,'TYPE','MQTT') eq 'MQTT'; AttrVal($io,'clientOrder',undef) } +par:RADIO_DONTSETCLIENTODER;Leave clientOrder on IODev (default is "MQTT2_DEVICE MQTT_GENERIC_BRIDGE", may cause unintended autocreates);{ my $io = AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME}); return 0 if InternalVal($io,'TYPE','MQTT') eq 'MQTT'; AttrVal($io,'clientOrder',undef) } +par:ATTRTVERSION;Version of attrTemplate;{ '20211208' } attr DEVICE globalDefaults sub:base=DEVICE/set pub:base=DEVICE setreading DEVICE attrTemplateVersion ATTRTVERSION_MQTT option:{ RADIO_SETCLIENTODERMGB_M2D }