mqtt2.template: extent OpenMQTTGateway

git-svn-id: https://svn.fhem.de/fhem/trunk@20274 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User
2019-09-29 08:53:06 +00:00
parent 96952774a9
commit 01dd951b38

View File

@@ -1595,24 +1595,27 @@ par:DEVCID;CID of the device as written in the DEF; { InternalVal(AttrVal("DEVIC
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE bridgeRegexp\
BASE_ID/DEVNAME/BTtoMQTT/([0-9A-Z]+):.* "oMQTTgw_BT_$1"\
BASE_ID/DEVNAME/433toMQTT:.* "oMQTTgw_433"
BASE_ID/DEVNAME/433toMQTT:.* "oMQTTgw_433"\
BASE_ID/DEVNAME/IRtoMQTT:.* "oMQTTgw_IR"\
BASE_ID/DEVNAME/CLIMAtoMQTT/(.*):.* "DEVNAME_$1"
attr DEVICE readingList\
BASE_ID/DEVNAME/LWT:.* LWT\
BASE_ID/DEVNAME/version:.* version
BASE_ID/DEVNAME/version:.* version\
BASE_ID/DEVNAME/SYStoMQTT:.* { json2nameValue($EVENT,'Sys_')}\
homeassistant/[^/]*sensor/[^/]+/config:.* { $EVENT =~ m,DEVNAME, ? json2nameValue($EVENT,"HASS_") : undef }
attr DEVICE setList\
BT_scan_now:noArg BASE_ID/DEVNAME/commands/MQTTtoBT/set {"interval":0}\
BT_scan_interval:textField BASE_ID/DEVNAME/commands/MQTTtoBT/set {"interval":$EVTPART1}\
BT_blacklist:textField BASE_ID/DEVNAME/commands/MQTTtoBT/set {"black-list":[$EVTPART1]}\
BT_whitelist:textField BASE_ID/DEVNAME/commands/MQTTtoBT/set {"white-list":[$EVTPART1]}
attr DEVICE stateFormat <a href="http://ip" target="_blank">\
attr DEVICE stateFormat <a href="http://Sys_ip" target="_blank">\
LWT\
</a>Version: version
attr DEVICE devStateIcon online:10px-kreis-gruen offline.*:10px-kreis-rot
attr DEVICE model OpenMQTTGateway_MCU
name:OpenMQTTGateway_simple_RF433_switch
filter:TYPE=MQTT2_DEVICE
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*OpenMQTTGateway.*
desc:use this with an OpenMQTTGateway. For further details visit https://github.com/1technophile/OpenMQTTGateway/wiki<br>Recommended structure of the topic pattern home/OpenMQTTGateway/.*.<br>NOTE: Initial version, not yet tested, just build according to https://forum.fhem.de/index.php/topic,103737.0.html<br>Adopt settings to your needs.<br>NOTE: this might create a new device!
order:X_02a
par:ONCOMMANDREGEX;ONCOMMANDREGEX typically is one or more Codes like 13027392|13519216|12585648|13349168;undef
@@ -1637,3 +1640,19 @@ attr OMG_DEVCID setList\
farewell:template has been applied successfully.
attr OMG_DEVCID room NEWDEVROOM
attr OMG_DEVCID model OpenMQTTGateway_simple_RF433_switch
name:OpenMQTTGateway_bme
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*OpenMQTTGateway.*
desc:use this with an OpenMQTTGateway. For further details visit https://github.com/1technophile/OpenMQTTGateway/wiki<br>Recommended structure of the topic pattern home/OpenMQTTGateway/.*.<br>NOTE: Initial version, not yet tested, just build according to https://forum.fhem.de/index.php/topic,103737.0.html<br>Adopt settings to your needs.<br>NOTE: this might create a new device!
order:X_02b
par:BASE_ID;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/]OpenMQTTGateway[^/]*[/].*:, ? $1 : undef }
par:DEVNAME;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/](OpenMQTTGateway[^/]*)[/].*:, ? $2 : undef }
deletereading -q DEVICE (?!associatedWith).*
defmod DEVICE MQTT2_\DEVICE DEVCID
attr DEVICE autocreate 0
attr DEVICE readingList\
BASE_ID/DEVNAME/CLIMAtoMQTT/bme:.* { json2nameValue($EVENT, 'BME_') }
attr DEVICE stateformat BME_tempc °C - BME_hum % - hpa hPa
attr DEVICE userReadings hpa:BME_hpa.* {ReadingsVal($name,"BME_pa",0)/100}
attr DEVICE model OpenMQTTGateway_bme