Hi,
zu meiner Frage hier (https://forum.fhem.de/index.php/topic,94494.msg1253668.html#msg1253668), hab ich bis jetzt nur die Erklärung das die CID mit Doppelpunkt beim automatischen anlegen nicht mehr vorhanden ist, warum ?, keine Ahnung ob das jetzt an der neuen Tasmota-Version liegt oder an FHEM.
Wenn ich im Beispiel-template das ${1} bei dem if der par-Zeilen CMNDTOPIC, TELETOPIC und STATTOPIC weglasse klappt das so:
name:bla
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
desc:bla
order:A_01b2
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "cmnd$3" : undef }
par:TELETOPIC;info topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "tele$3" : undef }
par:STATTOPIC;ack topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "stat$3" : undef }
par:IO_DEV;Currently used IO;{ AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME}) }
attr DEVICE readingList \
TELETOPIC/INFO.:.* {}\
TELETOPIC/LWT:.* LWT\
TELETOPIC/SENSOR:.* { json2nameValue($EVENT,'',$JSONMAP) }\
TELETOPIC/STATE:.* {}\
STATTOPIC/POWER:.* occupancy\
STATTOPIC/RESULT:.* {}
attr DEVICE devStateIcon Motion..true:people_sensor Motion..false:motion_detector
attr DEVICE event-on-change-reading occupancy
attr DEVICE icon people_sensor
attr DEVICE jsonMap Switch1:occupancy
attr DEVICE model bla
attr DEVICE stateFormat Motion: occupancy
attr DEVICE timestamp-on-change-reading occupancy
deletereading -q DEVICE .*
set IO_DEV publish CMNDTOPIC/Backlog SwitchMode1 1; StateText1 false; StateText2 true; TelePeriod 3600; savedata 1;
set IO_DEV publish CMNDTOPIC/Restart 1
setreading DEVICE attrTemplateVersion 202xxxxx
Was ich aber schon die ganze Zeit auch nicht verstehe, ist das es beim automatischen anlegen des Tasmota-Device zu diesen zwei Unknown-Meldungen im Logfile kommt:
2022.12.27 17:56:29 2: autocreate: define MQTT2_tasmota_55756B MQTT2_DEVICE tasmota_55756B MQTT2_Server
2022.12.27 17:56:29 2: autocreate: define FileLog_MQTT2_tasmota_55756B FileLog ./log/MQTT2_tasmota_55756B-%Y.log MQTT2_tasmota_55756B
2022.12.27 17:56:44 3: MQTT2_Server: Unknown code autocreate=simpleDVES_55756Btasmota/discovery/C45BBE55756B/config{"ip":"192.168.188.25","dn":"Tasmota","fn":["Tasmota",null,null,null,null,null,null,null],"hn":"tasmota-55756B-5483","mac":"C45BBE55756B","md":"Generic","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["false","true","toggle","hold"],"sw":"12.3.1","t":"tasmota_55756B","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[0,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null],"btn":[0,0,0,0,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"sho":[0,0,0,0],"sht":[[0,0,0],[0,0,0],[0,0,0],[0,0,0]],"ver":1}, help me!
2022.12.27 17:56:44 3: MQTT2_Server: Unknown code autocreate=simpleDVES_55756Btasmota/discovery/C45BBE55756B/sensors{"sn":{"Time":"2022-12-27T17:56:43","Switch1":"true"},"ver":1}, help me!
In der Konsole von Tasmota ist nach einem restart 1 nur das hier zu sehen:
00:00:00.001 HDW: ESP8266EX
00:00:00.050 CFG: Loaded from flash at FA, Count 394
00:00:00.055 QPC: Count 1
00:00:00.065 Project tasmota - Tasmota Version 12.3.1(tasmota)-2_7_4_9(2022-12-22T23:22:42)
00:00:00.555 WIF: Connecting to AP1 FBF Channel 3 BSSId 02:EC:DA:FD:26:1A in mode 11n as tasmota-55756B-5483...
00:00:01.755 WIF: Connected
00:00:02.009 HTP: Web server active on tasmota-55756B-5483 with IP address 192.168.188.25
17:56:34.011 MQT: Attempting connection...
17:56:34.049 MQT: Connected
17:56:34.052 MQT: tele/tasmota_55756B/LWT = Online (retained)
17:56:34.055 MQT: cmnd/tasmota_55756B/POWER =
17:56:34.066 MQT: tele/tasmota_55756B/INFO1 = {"Info1":{"Module":"Generic","Version":"12.3.1(tasmota)","FallbackTopic":"cmnd/DVES_55756B_fb/","GroupTopic":"cmnd/tasmotas/"}}
17:56:34.071 MQT: tele/tasmota_55756B/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"tasmota-55756B-5483","IPAddress":"192.168.188.25"}}
17:56:34.075 MQT: tele/tasmota_55756B/INFO3 = {"Info3":{"RestartReason":"Software/System restart","BootCount":134}}
17:56:37.440 QPC: Reset
17:56:38.405 MQT: tele/tasmota_55756B/STATE = {"Time":"2022-12-27T17:56:38","Uptime":"0T00:00:09","UptimeSec":9,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Wifi":{"AP":1,"SSId":"FBF","BSSId":"02:EC:DA:FD:26:1A","Channel":3,"Mode":"11n","RSSI":70,"Signal":-65,"LinkCount":1,"Downtime":"0T00:00:03"}}
17:56:38.411 MQT: tele/tasmota_55756B/SENSOR = {"Time":"2022-12-27T17:56:38","Switch1":"true"}
So sieht das automatisch angelegte Device aus:
define MQTT2_tasmota_55756B MQTT2_DEVICE tasmota_55756B
attr MQTT2_tasmota_55756B readingList stat/tasmota_55756B/RESULT:.* { json2nameValue($EVENT) }\
tele/tasmota_55756B/LWT:.* LWT\
tele/tasmota_55756B/INFO1:.* { json2nameValue($EVENT) }\
tele/tasmota_55756B/INFO2:.* { json2nameValue($EVENT) }\
tele/tasmota_55756B/INFO3:.* { json2nameValue($EVENT) }\
tele/tasmota_55756B/STATE:.* { json2nameValue($EVENT) }\
tele/tasmota_55756B/SENSOR:.* { json2nameValue($EVENT) }
attr MQTT2_tasmota_55756B room MQTT2_DEVICE
# CFGFN
# CID tasmota_55756B
# DEF tasmota_55756B
# FUUID 63ab23bd-f33f-78f5-fc58-92bb7775d55ac729
# IODev MQTT2_Server
# LASTInputDev MQTT2_Server
# MQTT2_Server_CONN MQTT2_Server_192.168.188.25_64141
# MQTT2_Server_MSGCNT 1
# MQTT2_Server_TIME 2022-12-27 17:56:34
# MSGCNT 1
# NAME MQTT2_tasmota_55756B
# NR 5485
# STATE ???
# TYPE MQTT2_DEVICE
# eventCount 8
# .DT:
# DEVICETOPIC MQTT2_tasmota_55756B
# .attraggr:
# .attrminint:
# READINGS:
# 2022-12-27 17:56:38 Heap 28
# 2022-12-27 17:56:29 IODev MQTT2_Server
# 2022-12-27 17:56:34 Info1_FallbackTopic cmnd/DVES_55756B_fb/
# 2022-12-27 17:56:34 Info1_GroupTopic cmnd/tasmotas/
# 2022-12-27 17:56:34 Info1_Module Generic
# 2022-12-27 17:56:34 Info1_Version 12.3.1(tasmota)
# 2022-12-27 17:56:34 Info2_Hostname tasmota-55756B-5483
# 2022-12-27 17:56:34 Info2_IPAddress 192.168.188.25
# 2022-12-27 17:56:34 Info2_WebServerMode Admin
# 2022-12-27 17:56:34 Info3_BootCount 134
# 2022-12-27 17:56:34 Info3_RestartReason Software/System restart
# 2022-12-27 17:56:34 LWT Online
# 2022-12-27 17:56:38 LoadAvg 19
# 2022-12-27 17:56:38 MqttCount 1
# 2022-12-27 17:56:30 Restart Restarting
# 2022-12-27 17:56:38 Sleep 50
# 2022-12-27 17:56:38 SleepMode Dynamic
# 2022-12-27 17:56:38 Switch1 true
# 2022-12-27 17:56:38 Time 2022-12-27T17:56:38
# 2022-12-27 17:56:38 Uptime 0T00:00:09
# 2022-12-27 17:56:38 UptimeSec 9
# 2022-12-27 17:56:38 Wifi_AP 1
# 2022-12-27 17:56:38 Wifi_BSSId 02:EC:DA:FD:26:1A
# 2022-12-27 17:56:38 Wifi_Channel 3
# 2022-12-27 17:56:38 Wifi_Downtime 0T00:00:03
# 2022-12-27 17:56:38 Wifi_LinkCount 1
# 2022-12-27 17:56:38 Wifi_Mode 11n
# 2022-12-27 17:56:38 Wifi_RSSI 70
# 2022-12-27 17:56:38 Wifi_SSId FBF
# 2022-12-27 17:56:38 Wifi_Signal -65
# 2022-12-27 17:56:38 associatedWith MQTT2_Owntracks_Bridge
#
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Heap 28
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:29 IODev MQTT2_Server
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:34 Info1_FallbackTopic cmnd/DVES_55756B_fb/
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:34 Info1_GroupTopic cmnd/tasmotas/
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:34 Info1_Module Generic
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:34 Info1_Version 12.3.1(tasmota)
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:34 Info2_Hostname tasmota-55756B-5483
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:34 Info2_IPAddress 192.168.188.25
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:34 Info2_WebServerMode Admin
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:34 Info3_BootCount 134
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:34 Info3_RestartReason Software/System restart
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:34 LWT Online
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 LoadAvg 19
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 MqttCount 1
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:30 Restart Restarting
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Sleep 50
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 SleepMode Dynamic
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Switch1 true
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Time 2022-12-27T17:56:38
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Uptime 0T00:00:09
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 UptimeSec 9
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Wifi_AP 1
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Wifi_BSSId 02:EC:DA:FD:26:1A
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Wifi_Channel 3
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Wifi_Downtime 0T00:00:03
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Wifi_LinkCount 1
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Wifi_Mode 11n
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Wifi_RSSI 70
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Wifi_SSId FBF
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 Wifi_Signal -65
setstate MQTT2_tasmota_55756B 2022-12-27 17:56:38 associatedWith MQTT2_Owntracks_Bridge
So das Device nachdem ich mein Template angewendet habe:
define MQTT2_tasmota_55756B MQTT2_DEVICE tasmota_55756B
attr MQTT2_tasmota_55756B devStateIcon Motion..true:people_sensor Motion..false:motion_detector
attr MQTT2_tasmota_55756B event-on-change-reading occupancy
attr MQTT2_tasmota_55756B icon people_sensor
attr MQTT2_tasmota_55756B jsonMap Switch1:occupancy
attr MQTT2_tasmota_55756B model tasmota_LD2410
attr MQTT2_tasmota_55756B readingList tele/tasmota_55756B/INFO.:.* {}\
tele/tasmota_55756B/LWT:.* LWT\
tele/tasmota_55756B/SENSOR:.* { json2nameValue($EVENT,'',$JSONMAP) }\
tele/tasmota_55756B/STATE:.* {}\
stat/tasmota_55756B/POWER:.* occupancy\
stat/tasmota_55756B/RESULT:.* {}
attr MQTT2_tasmota_55756B room MQTT2_DEVICE
attr MQTT2_tasmota_55756B stateFormat Motion: occupancy
attr MQTT2_tasmota_55756B timestamp-on-change-reading occupancy
# CFGFN
# CID tasmota_55756B
# DEF tasmota_55756B
# FUUID 63ab23bd-f33f-78f5-fc58-92bb7775d55ac729
# IODev MQTT2_Server
# LASTInputDev MQTT2_Server
# MQTT2_Server_CONN MQTT2_Server_192.168.188.25_51830
# MQTT2_Server_MSGCNT 16
# MQTT2_Server_TIME 2022-12-27 18:16:48
# MSGCNT 16
# NAME MQTT2_tasmota_55756B
# NR 5485
# STATE Motion: true
# TYPE MQTT2_DEVICE
# eventCount 9
# .DT:
# DEVICETOPIC MQTT2_tasmota_55756B
# .attraggr:
# .attreocr:
# occupancy
# .attrminint:
# .attrtocr:
# occupancy
# JSONMAP:
# Switch1 occupancy
# OLDREADINGS:
# READINGS:
# 2022-12-27 18:16:43 LWT Online
# 2022-12-27 18:16:48 Time 2022-12-27T18:16:47
# 2022-12-27 18:16:36 attrTemplateVersion 20221227
# 2022-12-27 18:16:37 occupancy true
#
setstate MQTT2_tasmota_55756B Motion: true
setstate MQTT2_tasmota_55756B 2022-12-27 18:16:43 LWT Online
setstate MQTT2_tasmota_55756B 2022-12-27 18:16:48 Time 2022-12-27T18:16:47
setstate MQTT2_tasmota_55756B 2022-12-27 18:16:36 attrTemplateVersion 20221227
setstate MQTT2_tasmota_55756B 2022-12-27 18:16:37 occupancy true
"...: Unknown code ... help me!" kommt dann, wenn ParseFn nichts, oder undef zurueckliefert.
Dafuer werden die ParseFn Funktionen aller Client Module aufgerufen, bei MQTT2_SERVER ist die Voreinstellung fuer Clients :MQTT2_DEVICE:MQTT_GENERIC_BRIDGE:, man kan sie aber aendern mit der clientOrder Attribut.
MQTT2_DEVICE_Parse versucht erst anhand der readingsList aller Geraete das Zugehoerige zu finden (geht wohl fuer tasmota/discovery/C45BBE55756B/config schief), dann anhand der bridgeRegexp was zu finden, und dann die Daten einem Geraet mit diesem ClientID (DVES_55756B) zuzuordnen: falls das Geraet noch nicht existiert, dann wird sie angelegt, sonst/danach readingList erweitert.
Nach Code-Studium meine ich zu wissen, dass die einzige Moeglichkeit ein "Help me!" mit MQTT2_DEVICE hinzukriegen ist entweder autocreate abzuschalten, oder ein bridgeRegexp, der matcht, und im eval 0/""/undef zurueckgibt.
ZitatNach Code-Studium meine ich zu wissen, dass die einzige Moeglichkeit ein "Help me!" mit MQTT2_DEVICE hinzukriegen ist entweder autocreate abzuschalten, oder ein bridgeRegexp, der matcht, und im eval 0/""/undef zurueckgibt.
Da abgeschaltetes autocreate ja nicht zutrifft, hab ich mal geschaut und bin fündig geworden, hier wird "" zurückgegeben:
define MQTT2_Owntracks_Bridge MQTT2_DEVICE
attr MQTT2_Owntracks_Bridge IODev mqtt2Cloud
attr MQTT2_Owntracks_Bridge autocreate 1
attr MQTT2_Owntracks_Bridge bridgeRegexp (tele|stat|shellies|valetudo|Advantech)/([^/]+)/.*:.* "$2"\
(shellyp(lus|ro4pm)[^/:_]{4,}+)/.*:.* "$1"\
zigbee2mqtt/bridge/.*:.* "zigbee2mqtt"\
sonos/connected.* "sonos"\
tvheadend/[^/:]+.* "tvheadend"\
milight/LWT:.* "milight"\
(ESPClient_[^/]+)/.*:.* "$1"\
(ebusd[^/]*)/global/.*:.* "$1"\
[^/]+/(ems-esp[^/]+)/start:.* "$1"\
(mygateway[\d]+)-(in|out)/.* "$1"\
(wallpanel|wled)/([^/]+)/.*:.* "$1_$2"\
go-eCharger/([^/]+)/.*:.* "go_eCharger_$1"\
owntracks/[^/]+/([^/:]+).* "owntracks_$1"\
home/(O[^/]*M[^/]*G[^/]*)/LWT:.* "$1"\
instar/([^/]+)/.*:.* "instar_$1"\
homeassistant/.*/config:.* ""\
tasmota/discovery/[^/:]+/(config|sensors):.* ""
attr MQTT2_Owntracks_Bridge comment Do not use very open bridgeRegexp expressions! This might lead to irritating results... Especially make sure to not have two regexpes that may both match!
attr MQTT2_Owntracks_Bridge group MQTT2_Bridges
attr MQTT2_Owntracks_Bridge icon mqtt_bridge_2
attr MQTT2_Owntracks_Bridge model MQTT2_CLIENT_general_bridge
attr MQTT2_Owntracks_Bridge room MQTT2_DEVICE
attr MQTT2_Owntracks_Bridge setList clear_all:noArg {fhem("deleteattr $NAME readingList;; deletereading -q $NAME (?!associatedWith|IODev).*");;return undef}
attr MQTT2_Owntracks_Bridge setStateList on off
# FUUID 61f3ffa8-f33f-78f5-d3aa-dffd10bd3d1b0076
# IODev mqtt2Cloud
# NAME MQTT2_Owntracks_Bridge
# NR 458
# STATE ???
# TYPE MQTT2_DEVICE
# .DT:
# DEVICETOPIC MQTT2_Owntracks_Bridge
# READINGS:
# 2022-12-27 19:58:31 IODev mqtt2Cloud
#
setstate MQTT2_Owntracks_Bridge 2022-12-27 19:58:31 IODev mqtt2Cloud
Und jetzt ?
Verschiebe den Teil (die letzten beiden Zeilen von bridgeRegexp) in ignoreRegexp am IO...
Mit dem homeassistant-Zweig, ja ???
Und nur um sicher zu sein, IO ist hier mqtt2Cloud !!! ?
Egal, über welches IO das reinkommt, in FHEM haben weder die homeassistant-config-Infos irgendeinen Sinn noch die, die über tasmota-discovery kommen...
Ok, Danke :-*, passt jetzt, ignoreRegexp greift, die Meldung Unknown code... kommt nicht mehr wenn das Device automatisch angelegt wird.
Zur Sicherheit ::) und zum nachvollziehen für jedermann der das mal liest und nur Bahnhof bisher verstanden hat.
Aus dem "Bridgedevice" hab ich diese beiden Einträge entfernt:
homeassistant/.*/config:.* ""
tasmota/discovery/[^/:]+/(config|sensors):.* ""
Und bei meiner MQTT2_SERVER-Definition tasmota/discovery/[^/:]+/(config|sensors) mit | ergänzt:
shellies/[^:"]+/command|shellies/[^:"]+/command|cmnd/[^:"]+:|homeassistant/[^:"]+/config|tasmota/discovery/[^/:]+/(config|sensors)
Nebenbei, der Trenner | wird in der "Attributhilfe" nicht erwähnt, ich wär dafür das zu ergänzen.
Danke nochmal, beiden.
Zitatin FHEM haben weder die homeassistant-config-Infos irgendeinen Sinn noch die, die über tasmota-discovery kommen...
Wenn mal Zeit ist kannst du die Templates order:000001 und order:0000021 ja mal entsprechend anpassen.
2 Dinge noch, die ich vergessen habe zu erwähnen:
Zitat
In der Konsole von Tasmota ist nach einem restart 1 nur das hier zu sehen:
Die Doku sagt:
MqttLog 0 = disable logging via MQTT (default)
1 = show only error messages
2 = show error and info messages
3 = show error, info and debug messages
4 = show error, info and more debug messages
Weder mit 1, 2 oder 3 sieht man die discovery "Message" in der Konsole von Tasmota.
Nur mit 4:
00:00:00.001 HDW: ESP8266EX
00:00:00.050 CFG: Loaded from flash at FA, Count 578
00:00:00.055 SER: Set to 8N1 255900 bit/s
00:00:00.056 QPC: Count 1
00:00:00.066 Project tasmota - Tasmota Version 12.3.1(tasmota)-2_7_4_9(2022-12-22T23:22:42)
00:00:00.556 WIF: Connecting to AP1 FBF Channel 3 BSSId 02:EC:DA:FD:26:1A in mode 11n as tasmota-55756B-5483...
00:00:01.753 WIF: Connected
00:00:02.005 HTP: Web server active on tasmota-55756B-5483 with IP address 192.168.188.25
23:59:24.012 RSL: RESULT = {"POWER":"true"}
23:59:24.013 RSL: POWER = true
23:59:25.008 MQT: Attempting connection...
23:59:25.064 MQT: Connected
23:59:25.067 MQT: tele/tasmota_55756B/LWT = Online (retained)
23:59:25.070 MQT: cmnd/tasmota_55756B/POWER =
23:59:25.085 MQT: tele/tasmota_55756B/INFO1 = {"Info1":{"Module":"Generic","Version":"12.3.1(tasmota)","FallbackTopic":"cmnd/DVES_55756B_fb/","GroupTopic":"cmnd/tasmotas/"}}
23:59:25.090 MQT: tele/tasmota_55756B/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"tasmota-55756B-5483","IPAddress":"192.168.188.25"}}
23:59:25.095 MQT: tele/tasmota_55756B/INFO3 = {"Info3":{"RestartReason":"External System","BootCount":147}}
23:59:28.420 QPC: Reset
23:59:29.386 MQT: tele/tasmota_55756B/STATE = {"Time":"2022-12-28T23:59:29","Uptime":"0T00:00:09","UptimeSec":9,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Wifi":{"AP":1,"SSId":"FBF","BSSId":"02:EC:DA:FD:26:1A","Channel":3,"Mode":"11n","RSSI":70,"Signal":-65,"LinkCount":1,"Downtime":"0T00:00:03"}}
23:59:29.394 MQT: tele/tasmota_55756B/SENSOR = {"Time":"2022-12-28T23:59:29","Switch1":"true"}
23:59:34.431 MQT: tasmota/discovery/C45BBE55756B/config = {"ip":"192.168.188.25","dn":"Tasmota","fn":["Tasmota",null,null,null,null,null,null,null],"hn":"tasmota-55756B-5483","mac":"C45BBE55756B","md":"Generic","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["false","true","toggle","hold"],"sw":"12.3.1","t":"tasmota_55756B","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[0,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null],"btn":[0,0,0,0,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"sho":[0,0,0,0],"sht":[[0,0,0],[0,0,0],[0,0,0],[0,0,0]],"ver":1} (retained)
23:59:34.436 MQT: tasmota/discovery/C45BBE55756B/sensors = {"sn":{"Time":"2022-12-28T23:59:34","Switch1":"true"},"ver":1} (retained)
Die "Message" ist also eine "more debug messages".
Zitat von: Beta-User am 28 Dezember 2022, 14:27:49
Hmm, irgendwie irritierend, dass da bisher noch keiner drüber gestolpert ist...
Anscheinend muss die LWT-Zeile am Anfang stehen.
Bestätige mal hier. Der Grund ist was genau ? Habs versucht nachzuvollziehen, heute Nachmittag, und auch Vermutung(en), aber genau weiß ich es noch nicht und keine Ahnung obs mich
nochmal packt nach der Ursache zu "forschen".
Zitat von: TomLee am 28 Dezember 2022, 18:33:23
Wenn mal Zeit ist kannst du die Templates order:000001 und order:0000021 ja mal entsprechend anpassen.
Mal schauen; soweit ich das in Erinnerung habe, funktioniert aber das mit dem Ergänzungsmechanismus nicht so richtig. Bisher hat sich keiner beschwert, also ist es noch drin, vielleicht werfe ich das ganz raus?
@Rudi: Vielleicht wären diese beiden Topics ein (derzeit) gutes Beispiel für die Commandref?
Wegen dem LWT "first": Da scheint die regex zur Ermittlung der Parameter aus dem Tritt zu kommen, wenn das erst in einer anderen Zeile auftaucht. Auf die Schnelle bin ich auch nicht auf eine Lösung gekommen, also falls jemand Zeit und Lust hat: Gerne!
Zitat@Rudi: Vielleicht wären diese beiden Topics ein (derzeit) gutes Beispiel für die Commandref?
Hab den Faden verloren: was genau soll ich aendern?
Zitat von: rudolfkoenig am 29 Dezember 2022, 09:34:50
Hab den Faden verloren: was genau soll ich aendern?
Geht um TomLee's Vorschlag, da zu erwähnen, dass die allgemeinen regex-Regeln gelten.
Würde das eher so fassen (Vorschlag!):
ZitatignoreRegexp
if $topic:$message matches ignoreRegexp, then it will be silently ignored.
For general purpose servers, it might be a good idea to (at least) set it e.g. to "
homeassistant/[^:"]+/config|tasmota/discovery/[^/:]+/(config|sensors)", and also include the topics used to send commands towards your MQTT clients.
Da ist die "pipe" drin, und es "erschlägt" unsere (derzeit) häufigsten "Problemkinder", an denen viele User scheinbar hängen, wenn man nicht explizit erklärt, warum diese Topics für FHEM komplett irrelevant sind...
Für MQTT2_CLIENT gilt das mit der "command"-ignore-Geschichte übrigens noch viel mehr, weil man da ja auch die "eigenen Kommandos" (aus FHEM heraus) zurückbekommt (falls subscription paßt)!
Hab die Doku in MQTT2_CLIENT und MQTT2_SERVER mit dem Vorschlag ergaenzt.
Danke!