diff --git a/fhem/FHEM/lib/AttrTemplate/mqtt2.template b/fhem/FHEM/lib/AttrTemplate/mqtt2.template index 4347eb6de..df586edea 100644 --- a/fhem/FHEM/lib/AttrTemplate/mqtt2.template +++ b/fhem/FHEM/lib/AttrTemplate/mqtt2.template @@ -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 \ +attr DEVICE stateFormat \ LWT\ 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
Recommended structure of the topic pattern home/OpenMQTTGateway/.*.
NOTE: Initial version, not yet tested, just build according to https://forum.fhem.de/index.php/topic,103737.0.html
Adopt settings to your needs.
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
Recommended structure of the topic pattern home/OpenMQTTGateway/.*.
NOTE: Initial version, not yet tested, just build according to https://forum.fhem.de/index.php/topic,103737.0.html
Adopt settings to your needs.
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 +