mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
mqtt2.template: restructure OMG BT
git-svn-id: https://svn.fhem.de/fhem/trunk@25795 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4ba806ef6b
commit
713c3c4475
@ -4307,25 +4307,56 @@ name:OpenMQTTGateway_MCU
|
||||
filter:TYPE=MQTT2_DEVICE
|
||||
desc:Use this with an OpenMQTTGateway. This template is meant to configure a bridge device showing some basic info about the microcontroller (mcu) itself. For further details visit https://github.com/1technophile/OpenMQTTGateway/wiki<br>Recommended structure of the topic pattern home/OpenMQTTGateway/.*.<br>NOTE: Early user version, not yet fully tested, just build according to https://forum.fhem.de/index.php/topic,103737.0.html<br>Adopt it to your needs!
|
||||
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',InternalVal('DEVICE','IODev',undef)->{NAME}),'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") }
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<([^:]+)/O[^/]*M[^/]*G[^/]*> ? $1 : undef }
|
||||
par:DEVNAME;DEVNAME typically contains OpenMQTTGateway;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<[^:]+/(O[^/]*M[^/]*G[^/]*)> ? $1 : undef }
|
||||
par:DEV_TPC;base and device name in the topic;{ my $dt = AttrVal('DEVICE','devicetopic',undef); defined $dt ? $dt : AttrVal('DEVICE','readingList','') =~ m<([^:]+/O[^/]*M[^/]*G[^/]*)/LWT> ? $1 : undef }
|
||||
par:RADIO_HASBT;MCU uses a BT interface;{ undef }
|
||||
par:RADIO_NOBT;MCU does not use any BT interface;{ undef }
|
||||
par:ICON;ICON as set, defaults to MQTT;{ AttrVal('DEVICE','icon','mqtt') }
|
||||
deletereading -q DEVICE (?!associatedWith|IODev).*
|
||||
attr DEVICE devicetopic DEV_TPC
|
||||
option:{ RADIO_HASBT }
|
||||
attr DEVICE bridgeRegexp\
|
||||
BASE_ID/DEVNAME/BTtoMQTT/([0-9A-Z]+)[:/].* "oMQTTgw_BT"\
|
||||
BASE_ID/DEVNAME/433toMQTT[:/].* "oMQTTgw_433"\
|
||||
BASE_ID/DEVNAME/IRtoMQTT[:/].* "oMQTTgw_IR"\
|
||||
BASE_ID/DEVNAME/CLIMAtoMQTT/([a-zA-Z0-9]+)[:/].* "DEVNAME_$1"
|
||||
$\DEVICETOPIC/433toMQTT[:/].* 'oMQTTgw_433'\
|
||||
$\DEVICETOPIC/IRtoMQTT[:/].* 'oMQTTgw_IR'\
|
||||
$\DEVICETOPIC/CLIMAtoMQTT/([a-zA-Z0-9]+)[:/].* "DEVNAME_$1"
|
||||
attr DEVICE readingList\
|
||||
BASE_ID/DEVNAME/LWT:.* LWT\
|
||||
BASE_ID/DEVNAME/version:.* version\
|
||||
BASE_ID/DEVNAME/SYStoMQTT[:/].* { json2nameValue($EVENT,'Sys_')}\
|
||||
BASE_ID/home_presence/.* {}\
|
||||
homeassistant/.+?/config:.* { }
|
||||
$\DEVICETOPIC/LWT:.* LWT\
|
||||
$\DEVICETOPIC/version:.* version\
|
||||
$\DEVICETOPIC/SYStoMQTT[:/].* { json2nameValue($EVENT,'Sys_')}\
|
||||
$\DEVICETOPIC/BTtoMQTT/([0-9A-Z]+):.* { $TOPIC =~ m,BTtoMQTT/([0-9A-Z]+),; json2nameValue($EVENT,"${1}_") }\
|
||||
$\DEVICETOPIC/BTtoMQTT/([0-9A-Z]+)/[^:]+:.* { $TOPIC =~ m,BTtoMQTT/([0-9A-Z]+)/([^:]+),; { "${1}_$2"=>$EVENT }}\
|
||||
BASE_ID/home_presence/DEVNAME:.* { return if $EVENT !~ m,(..):(..):(..):(..):(..):(..),; {last => uc($1.$2.$3.$4.$5.$6)}}\
|
||||
homeassistant/.+?/config:.* {}
|
||||
attr DEVICE setList\
|
||||
restart:noArg BASE_ID/DEVNAME/commands/MQTTtoSYS/config {"cmd":"restart"}\
|
||||
update { my $payload = $EVENT; $payload =~ s/$EVTPART0 //; qq(BASE_ID/DEVNAME/commands/firmware_update $payload) }
|
||||
restart:noArg $\DEVICETOPIC/commands/MQTTtoSYS/config {"cmd":"restart"}\
|
||||
update { my $payload = $EVENT; $payload =~ s/$EVTPART0 //; qq($\DEVICETOPIC/commands/firmware_update $payload) }\
|
||||
BT_config { my $payload = $EVENT; $payload =~ s/$EVTPART0 //; qq($\DEVICETOPIC/commands/MQTTtoBT/config $payload) }\
|
||||
BT_scan_now:noArg $\DEVICETOPIC/commands/MQTTtoBT/config {"interval":0}\
|
||||
BT_scan_interval:textField $\DEVICETOPIC/commands/MQTTtoBT/config {"interval":$EVTPART1}\
|
||||
BT_blacklist:textField $\DEVICETOPIC/commands/MQTTtoBT/config {"black-list":[$EVTPART1]}\
|
||||
BT_whitelist:textField $\DEVICETOPIC/commands/MQTTtoBT/config {"white-list":[$EVTPART1]}\
|
||||
BT_minrssi:slider,-110,1,0 $\DEVICETOPIC/commands/MQTTtoBT/config {"minrssi":$EVTPART1}}\
|
||||
deleteReadings:noArg {fhem "deletereading -q $NAME (?!associatedWith|attrTemplateVersion|last|LWT|version|Sys_).* 86400"}
|
||||
attr DEVICE periodicCmd deleteReadings:1440
|
||||
attr DEVICE comment For syntax wrt. update and BT commands see https://github.com/1technophile/OpenMQTTGateway/releases/tag/v0.9.7
|
||||
attr DEVICE event-on-change-reading last,LWT,version,Sys_.*
|
||||
option:{ RADIO_NOBT }
|
||||
attr DEVICE bridgeRegexp\
|
||||
$\DEVICETOPIC/BTtoMQTT/([0-9A-Z]+)[:/].* "oMQTTgw_BT"\
|
||||
$\DEVICETOPIC/433toMQTT[:/].* "oMQTTgw_433"\
|
||||
$\DEVICETOPIC/IRtoMQTT[:/].* "oMQTTgw_IR"\
|
||||
$\DEVICETOPIC/CLIMAtoMQTT/([a-zA-Z0-9]+)[:/].* "DEVNAME_$1"
|
||||
attr DEVICE readingList\
|
||||
$\DEVICETOPIC/LWT:.* LWT\
|
||||
$\DEVICETOPIC/version:.* version\
|
||||
$\DEVICETOPIC/SYStoMQTT[:/].* { json2nameValue($EVENT,'Sys_')}\
|
||||
BASE_ID/home_presence/.* {}\
|
||||
homeassistant/.+?/config:.* {}
|
||||
attr DEVICE setList\
|
||||
restart:noArg $\DEVICETOPIC/commands/MQTTtoSYS/config {"cmd":"restart"}\
|
||||
update { my $payload = $EVENT; $payload =~ s/$EVTPART0 //; qq($\DEVICETOPIC/commands/firmware_update $payload) }
|
||||
option:global
|
||||
attr DEVICE stateFormat <a href="http://Sys_ip" target="_blank">\
|
||||
LWT\
|
||||
</a>Version: version
|
||||
@ -4333,7 +4364,7 @@ attr DEVICE icon ICON
|
||||
attr DEVICE comment For syntax wrt. update and BT commands see https://github.com/1technophile/OpenMQTTGateway/releases/tag/v0.9.7
|
||||
attr DEVICE devStateIcon online:10px-kreis-gruen offline.*:10px-kreis-rot
|
||||
attr DEVICE model OpenMQTTGateway_MCU
|
||||
setreading DEVICE attrTemplateVersion 20220218
|
||||
setreading DEVICE attrTemplateVersion 20220307
|
||||
{ AttrTemplate_Initialize() }
|
||||
|
||||
name:OpenMQTTGateway_BT_scanner
|
||||
@ -4341,8 +4372,8 @@ prereq:{my @devices=devspec2array("model=OpenMQTTGateway_MCU");return 1 if $devi
|
||||
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*/O[^/]*M[^/]*G[^/]*/.*
|
||||
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.
|
||||
order:X_02a
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/]O[^/]*M[^/]*G[^/]*[/].*:, ? $1 : undef }
|
||||
par:DEVNAME;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/](O[^/]*M[^/]*G[^/]*)[/].*:, ? $2 : undef }
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<([^:]+)/O[^/]*M[^/]*G[^/]*> ? $1 : undef }
|
||||
par:DEVNAME;DEVNAME typically contains OpenMQTTGateway;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<[^:]+/(O[^/]*M[^/]*G[^/]*)> ? $1 : undef }
|
||||
par:ICON;ICON as set, defaults to bluetooth;{ AttrVal("DEVICE","icon","bluetooth") }
|
||||
attr DEVICE readingList\
|
||||
BASE_ID/DEVNAME/BTtoMQTT/([0-9A-Z]+):.* { $TOPIC =~ m,BTtoMQTT/([0-9A-Z]+),; json2nameValue($EVENT,"$1"."_") }\
|
||||
@ -4364,26 +4395,31 @@ setreading DEVICE attrTemplateVersion 20220306
|
||||
name:OpenMQTTGateway_BT_gtag
|
||||
prereq:{my @devices=devspec2array("model=OpenMQTTGateway_MCU");return 1 if $devices[0];return 0}
|
||||
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*/O[^/]*M[^/]*G[^/]*/.*
|
||||
desc:For detection of a bluetooth precence dongle like the gtag via OpenMQTTGateway. For further details visit https://github.com/1technophile/OpenMQTTGateway/wiki<br>Recommended structure of the topic pattern home/OpenMQTTGateway/.*.<br>NOTE: You'll be asked to provide the HEX address of your gtag. Best start with looking at what "OpenMQTTGateway_BT_scanner" povides, e.g. if you have a reading name like "6C697244245E_id", "6C697244245E" (without quotes) is what you want to enter...<br>NOTE: this will create a new device!
|
||||
desc:For detection of a bluetooth precence dongle like the gtag via OpenMQTTGateway. For further details visit https://github.com/1technophile/OpenMQTTGateway/wiki<br>Recommended structure of the topic pattern home/OpenMQTTGateway/.*.<br>NOTE: You'll be asked to provide the HEX address of your gtag. Best start with looking at what "OpenMQTTGateway_MCU" povides, e.g. if you have a reading name like "6C697244245E_id", "6C697244245E" (without quotes) is what you want to enter...<br>NOTE: this will create a new device!
|
||||
order:X_02a1
|
||||
par:ICON;ICON as set, defaults to rfid_tag;{ AttrVal("DEVICE","icon","rfid_tag") }
|
||||
par:ICON;ICON as set, defaults to rfid_tag;{ AttrVal('DEVICE','icon','rfid_tag') }
|
||||
par:BT_ID;Pls. enter your bluetooth device ID; {return}
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/]O[^/]*M[^/]*G[^/]*[/].*:, ? $1 : return }
|
||||
par:NEWDEVROOM;Room of the calling device; {AttrVal("DEVICE","room","MQTT2_\DEVICE" )}
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<([^:]+)/O[^/]*M[^/]*G[^/]*> ? $1 : undef }
|
||||
par:DEV_TPC;base and device name in the topic;{ my $dt = AttrVal('DEVICE','devicetopic',undef); defined $dt ? $dt : AttrVal('DEVICE','readingList','') =~ m<([^:]+/O[^/]*M[^/]*G[^/]*)/LWT> ? $1 : undef }
|
||||
par:NEWDEVROOM;Room of the calling device; {AttrVal('DEVICE','room','MQTT2_\DEVICE')}
|
||||
defmod OMG_BT_ID MQTT2_\DEVICE BT_ID
|
||||
#attr OMG_BT_ID readingList READINGLISTOLD
|
||||
deletereading -q OMG_BT_ID (?!associatedWith|IODev).*
|
||||
attr OMG_BT_ID devicetopic DEV_TPC
|
||||
attr OMG_BT_ID autocreate 0
|
||||
attr OMG_BT_ID readingList\
|
||||
BASE_ID/(O[^/]*M[^/]*G[^/]*)/BTtoMQTT/BT_ID:.* { $EVENT =~ m,characteristic...0x2a19.*read[^\d]+([\d]+), ? return { batteryPercent => hex($1) } : $TOPIC =~ m,home/(O[^/]*M[^/]*G[^/]*)/BTtoMQTT,; my $rets = json2nameValue($EVENT, "${1}_"); $rets->{last_IO} = $1; return $rets}
|
||||
BASE_ID/(O[^/]*M[^/]*G[^/]*)/BTtoMQTT/BT_ID:.* { $EVENT =~ m,characteristic...0x2a19.*read[^\d]+([\d]+), ? return { batteryPercent => hex($1) } : $TOPIC =~ m,home/(O[^/]*M[^/]*G[^/]*)/BTtoMQTT,; my $rets = json2nameValue($EVENT); $rets->{last_IO} = $1, $rets->{"rssi_$1"} = $rets->{rssi}; return $rets}
|
||||
attr OMG_BT_ID getList batteryPercent:noArg batteryPercent { my $id = ReadingsVal($NAME,'id','BT_ID'); qq($\DEVICETOPIC/commands/MQTTtoBT/config {"ble_read_address":"$id","ble_read_service":"180f","ble_read_char":"2a19","value_type":"HEX"}) }
|
||||
attr OMG_BT_ID setList beep:noArg { my $id = ReadingsVal($NAME,'id','BT_ID'); qq($\DEVICETOPIC/commands/MQTTtoBT/config {"ble_read_address":"$id","ble_read_service":"180f","ble_read_char":"2a19","value_type":"HEX","immediate":true}) }
|
||||
attr OMG_BT_ID event-on-change-reading .*
|
||||
attr OMG_BT_ID event-min-interval .*:300
|
||||
attr OMG_BT_ID icon ICON
|
||||
attr OMG_BT_ID stateFormat Last IO: last_IO
|
||||
attr OMG_BT_ID room NEWDEVROOM
|
||||
{ fhem "trigger $FW_wname JS:location.href='$FW_ME?detail=OMG_BT_ID'" if($cl && $cl->{TYPE} eq "FHEMWEB") }
|
||||
{ fhem "trigger $FW_wname JS:location.href='$FW_ME?detail=OMG_BT_ID'" if($cl && $cl->{TYPE} eq 'FHEMWEB') }
|
||||
attr OMG_BT_ID model OpenMQTTGateway_BT_gtag
|
||||
set DEVICE attrTemplate set_IODev_in_channels SUBCHANNELS=OMG_BT_ID
|
||||
setreading OMG_BT_ID attrTemplateVersion 20220306
|
||||
setreading OMG_BT_ID attrTemplateVersion 20220307
|
||||
|
||||
|
||||
name:OpenMQTTGateway_BT_mi_flora_sensor
|
||||
@ -4392,8 +4428,8 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*/O[^/]*M[^/]*G[^/]*/.*
|
||||
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: You'll be asked to provide the HEX address of your mi flora device. Best start with looking at what "OpenMQTTGateway_BT_scanner" povides, e.g. if you have a reading name like "6C697244245E_id", "6C697244245E" (without quotes) is what you want to enter...<br>NOTE: this will create a new device!
|
||||
order:X_02a2
|
||||
par:BT_ID;Pls. enter your bluetooth device ID; {undef}
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/]O[^/]*M[^/]*G[^/]*[/].*:, ? $1 : undef }
|
||||
par:NEWDEVROOM;Room of the calling device; {AttrVal("DEVICE","room","MQTT2_\DEVICE" )}
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<([^:]+)/O[^/]*M[^/]*G[^/]*> ? $1 : undef }
|
||||
par:NEWDEVROOM;Room of the calling device; {AttrVal('DEVICE','room','MQTT2_\DEVICE')}
|
||||
defmod OMG_BT_ID MQTT2_\DEVICE BT_ID
|
||||
deletereading -q OMG_BT_ID (?!associatedWith|IODev).*
|
||||
attr OMG_BT_ID autocreate 0
|
||||
@ -4408,7 +4444,7 @@ attr OMG_BT_ID room NEWDEVROOM
|
||||
{ fhem "trigger $FW_wname JS:location.href='$FW_ME?detail=OMG_BT_ID'" if($cl && $cl->{TYPE} eq "FHEMWEB") }
|
||||
attr OMG_BT_ID model OpenMQTTGateway_BT_mi_flora_sensor
|
||||
set DEVICE attrTemplate set_IODev_in_channels SUBCHANNELS=OMG_BT_ID
|
||||
setreading OMG_BT_ID attrTemplateVersion 20220220
|
||||
setreading OMG_BT_ID attrTemplateVersion 20220307
|
||||
|
||||
|
||||
name:OpenMQTTGateway_simple_RF433_switch
|
||||
@ -4420,10 +4456,10 @@ par:ONCOMMANDREGEX;ONCOMMANDREGEX typically is one or more Codes like 13027392|1
|
||||
par:ON_COMMAND;ON_COMMAND typically is a set of parameters like "value":"13027392","protocol":4,"length":24,"delay":350;undef
|
||||
par:OFFCOMMANDREGEX;OFFCOMMANDREGEX typically is one or more Codes like 13381408|13226144|13381408|13599888;undef
|
||||
par:OFF_COMMAND;ON_COMMAND typically is a set of parameters like "value":"13381408","protocol":4,"length":24,"delay":350;undef
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/]O[^/]*M[^/]*G[^/]*[/].*:, ? $1 : undef }
|
||||
par:DEVNAME;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/](O[^/]*M[^/]*G[^/]*)[/].*:, ? $2 : undef }
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<([^:]+)/O[^/]*M[^/]*G[^/]*> ? $1 : undef }
|
||||
par:DEVNAME;DEVNAME typically contains OpenMQTTGateway;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<[^:]+/(O[^/]*M[^/]*G[^/]*)> ? $1 : undef }
|
||||
par:DEVCID;CID of the new device - try to read the last RF value; { ReadingsVal("DEVICE","value","unknown") }
|
||||
par:NEWDEVROOM;Room of the calling device; {AttrVal("DEVICE","room","MQTT2_\DEVICE" )}
|
||||
par:NEWDEVROOM;Room of the calling device; {AttrVal('DEVICE','room','MQTT2_\DEVICE')}
|
||||
defmod OMG_DEVCID MQTT2_\DEVICE DEVCID
|
||||
deletereading -q OMG_DEVCID (?!associatedWith|IODev).*
|
||||
defmod OMG_DEVCID MQTT2_\DEVICE DEVCID
|
||||
@ -4447,8 +4483,8 @@ prereq:{my @devices=devspec2array("model=OpenMQTTGateway_MCU");return 1 if $devi
|
||||
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*/O[^/]*M[^/]*G[^/]*/.*
|
||||
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,([^:]+)[/]O[^/]*M[^/]*G[^/]*[/].*:, ? $1 : undef }
|
||||
par:DEVNAME;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/](O[^/]*M[^/]*G[^/]*)[/].*:, ? $2 : undef }
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<([^:]+)/O[^/]*M[^/]*G[^/]*> ? $1 : undef }
|
||||
par:DEVNAME;DEVNAME typically contains OpenMQTTGateway;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<[^:]+/(O[^/]*M[^/]*G[^/]*)> ? $1 : undef }
|
||||
deletereading -q DEVICE (?!associatedWith|IODev).*
|
||||
attr DEVICE autocreate 0
|
||||
attr DEVICE readingList\
|
||||
@ -4463,8 +4499,8 @@ prereq:{my @devices=devspec2array("model=OpenMQTTGateway_MCU");return 1 if $devi
|
||||
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*/O[^/]*M[^/]*G[^/]*/.*
|
||||
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_02c
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/]O[^/]*M[^/]*G[^/]*[/].*:, ? $1 : undef }
|
||||
par:DEVNAME;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/](O[^/]*M[^/]*G[^/]*)[/].*:, ? $2 : undef }
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<([^:]+)/O[^/]*M[^/]*G[^/]*> ? $1 : undef }
|
||||
par:DEVNAME;DEVNAME typically contains OpenMQTTGateway;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<[^:]+/(O[^/]*M[^/]*G[^/]*)> ? $1 : undef }
|
||||
deletereading -q DEVICE (?!associatedWith|IODev).*
|
||||
attr DEVICE autocreate 0
|
||||
attr DEVICE readingList\
|
||||
@ -4480,8 +4516,8 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*/O[^/]*M[^/]*G[^/]*/.*
|
||||
desc:use this with an OpenMQTTGateway for temp/hum sensors like LYWSD03MMC and LYWSDCGQ. For further details visit https://github.com/1technophile/OpenMQTTGateway/wiki<br>Recommended structure of the topic pattern home/OpenMQTTGateway/.*.<br>NOTE: You'll be asked to provide the HEX address of your sensor. Best start with looking at what "OpenMQTTGateway_BT_scanner" povides, e.g. if you have a reading name like "6C697244245E_id", "6C697244245E" (without quotes) is what you want to enter...<br>NOTE: this will create a new device!
|
||||
order:X_02d
|
||||
par:BT_ID;Pls. enter your bluetooth device ID; {undef}
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/]O[^/]*M[^/]*G[^/]*[/].*:, ? $1 : undef }
|
||||
par:NEWDEVROOM;Room of the calling device; {AttrVal("DEVICE","room","MQTT2_\DEVICE" )}
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<([^:]+)/O[^/]*M[^/]*G[^/]*> ? $1 : undef }
|
||||
par:NEWDEVROOM;Room of the calling device; {AttrVal('DEVICE','room','MQTT2_\DEVICE')}
|
||||
defmod OMG_BT_ID MQTT2_\DEVICE BT_ID
|
||||
deletereading -q OMG_BT_ID (?!associatedWith|IODev).*
|
||||
attr OMG_BT_ID autocreate 0
|
||||
@ -4504,7 +4540,7 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*/O[^/]*M[^/]*G[^/]*/.*
|
||||
desc:use this with an OpenMQTTGateway for scales like Xiaomi Mi Scale. For further details visit https://github.com/1technophile/OpenMQTTGateway/wiki<br>Recommended structure of the topic pattern home/OpenMQTTGateway/.*.<br>NOTE: You'll be asked to provide the HEX address of your scale. Best start with looking at what "OpenMQTTGateway_BT_scanner" povides, e.g. if you have a reading name like "6C697244245E_id", "6C697244245E" (without quotes) is what you want to enter...<br>NOTE: this will create a new device!
|
||||
order:X_02e
|
||||
par:BT_ID;Pls. enter your bluetooth device ID; {undef}
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','readingList','') =~ m,([^:]+)[/]O[^/]*M[^/]*G[^/]*[/].*:, ? $1 : undef }
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<([^:]+)/O[^/]*M[^/]*G[^/]*> ? $1 : undef }
|
||||
par:NEWDEVROOM;Room of the calling device; {AttrVal('DEVICE','room','MQTT2_\DEVICE')}
|
||||
defmod OMG_BT_ID MQTT2_\DEVICE BT_ID
|
||||
deletereading -q OMG_BT_ID (?!associatedWith|IODev).*
|
||||
@ -4528,7 +4564,7 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*/O[^/]*M[^/]*G[^/]*/.*
|
||||
desc:use this with an OpenMQTTGateway to get an "empty" device for further adoptions to your needs. For further details visit https://github.com/1technophile/OpenMQTTGateway/wiki<br>NOTE: You'll be asked to provide the HEX address of your gadget. Best start with looking at what "OpenMQTTGateway_BT_scanner" povides, e.g. if you have a reading name like "6C697244245E_id", "6C697244245E" (without quotes) is what you want to enter...<br>NOTE: this will create a new device!
|
||||
order:X_02x
|
||||
par:BT_ID;Pls. enter your bluetooth device ID; {undef}
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','readingList','') =~ m,([^:]+)[/]O[^/]*M[^/]*G[^/]*[/].*:, ? $1 : undef }
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<([^:]+)/O[^/]*M[^/]*G[^/]*> ? $1 : undef }
|
||||
par:NEWDEVROOM;Room of the calling device; {AttrVal('DEVICE','room','MQTT2_\DEVICE')}
|
||||
defmod OMG_BT_ID MQTT2_\DEVICE BT_ID
|
||||
deletereading -q OMG_BT_ID (?!associatedWith|IODev).*
|
||||
|
Loading…
Reference in New Issue
Block a user