mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
mqtt2 + mgb.template: small changes
git-svn-id: https://svn.fhem.de/fhem/trunk@23804 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b924f4ab57
commit
50fc91215a
@ -542,18 +542,19 @@ par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devi
|
||||
par:ICON;ICON as set, defaults to fts_shutter_100;{ AttrVal("DEVICE","icon","fts_shutter_100") }
|
||||
attr DEVICE icon ICON
|
||||
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
|
||||
attr DEVICE webCmd open:close:pct
|
||||
attr DEVICE webCmd open:close:pct:speed
|
||||
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
|
||||
attr DEVICE jsonMap position:pct
|
||||
attr DEVICE jsonMap position:pct motor_speed:speed
|
||||
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
|
||||
attr DEVICE setList \
|
||||
open:noArg $\DEVICETOPIC/set {"state":"OPEN"}\
|
||||
close:noArg $\DEVICETOPIC/set {"state":"CLOSE"}\
|
||||
pct:slider,0,1,100 $\DEVICETOPIC/set {"position":"$EVTPART1"}
|
||||
pct:slider,0,1,100 $\DEVICETOPIC/set {"position":"$EVTPART1"}\
|
||||
speed:colorpicker,BRI,0,1,255 $\DEVICETOPIC/set {"options": {"motor_speed":"$EVTPART1"}}
|
||||
attr DEVICE stateFormat pct
|
||||
set DEVICE attrTemplate speechcontrol_type_blind
|
||||
attr DEVICE model zigbee2mqtt_blind_drive
|
||||
setreading DEVICE attrTemplateVersion 20210221
|
||||
setreading DEVICE attrTemplateVersion 20210222
|
||||
|
||||
|
||||
name:zigbee2mqtt_ContactSensor
|
||||
|
@ -25,18 +25,29 @@ 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 <b>different topic structures for sending readings values and receiving commands and/or reading values.</b><br>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' }
|
||||
attr DEVICE globalDefaults sub:base=DEVICE/set pub:base=DEVICE
|
||||
setreading DEVICE attrTemplateVersion ATTRTVERSION_MQTT
|
||||
option:{ RADIO_SETCLIENTODERMGB_M2D }
|
||||
attr IODEVNAME clientOrder MQTT_GENERIC_BRIDGE MQTT2_\DEVICE
|
||||
attr IODEVNAME subscriptions SUBSCRIPTIONS
|
||||
setreading DEVICE attrTemplateVersion ATTRTVERSION_MGB_M2D
|
||||
option:{ RADIO_SETCLIENTODERM2D_MGB }
|
||||
attr IODEVNAME clientOrder MQTT2_\DEVICE MQTT_GENERIC_BRIDGE
|
||||
attr IODEVNAME subscriptions SUBSCRIPTIONS
|
||||
setreading DEVICE attrTemplateVersion ATTRTVERSION_M2D_MGB
|
||||
option:{ RADIO_SETCLIENTODERMGB_ONLY }
|
||||
attr IODEVNAME clientOrder MQTT_GENERIC_BRIDGE
|
||||
attr IODEVNAME subscriptions SUBSCRIPTIONS
|
||||
setreading DEVICE attrTemplateVersion ATTRTVERSION_MGB_only
|
||||
farewell:Configuring MQTT_GENERIC_BRIDGE has been successful, now you can start to configure your devices to send and receive messages over MQTT!
|
||||
option:global
|
||||
|
||||
|
||||
##########
|
||||
## subordintated devices section
|
||||
|
Loading…
Reference in New Issue
Block a user