Hallo zusammen,
ich habe folgendes nachgebaut.
https://www.meintechblog.de/tag/geofency/
Hiermit kann ich die Anwesenheit und Abwesenheit über Geoinformationen über FHEM an den Loxone Miniserver übertragen.
Das ganze schicke ich über UDP von FHEM an den Miniserver.
Funktioniert tadellos.
Jetzt möchte ich alles per MQTT_GENERIC_BRIDGE auf http Eingänge Richtung Miniserver schicken und nicht mehr per UDP
Leider klappt das aber nur teilweise!
Von dem Device rgr_Residents (Definition im angefügten Bild ersichtlich) wird jedes Reading übertragen!
Vom Device rr_Christoph nur (Definition im angefügen Bild ersichtlich) werden nur 2 Readings übertragen: state und wayhome. Ich benötige aber alle Readings von dem Gerät!
Und in der MQTT_Generic_Bridge steht (siehe angefügtes Bild) -->
"globalPublish *:topic={"FHEM/$device/$reading"}"
Ich bin am verzweifeln warum das nicht funktioniert.....
Würde mich echt freuen, wenn ihr mir helft......
VG
Logol01
Mein Problem scheint schwierig zu sein!
Würde mich sehr über Rückmeldung freuen!
Zitat von: logol01 am 10 Januar 2019, 22:45:58
Mein Problem scheint schwierig zu sein!
Na ja,
vermutlich ist es eigentlich ganz einfach, aber in der Regel will keiner sich Bilder ansehen, sondern ein "llst" haben. Damit fängt es an...
Dann beziehst du dich als erstes auf einen Blog. Da gilt die Regel: Wer damit ein Problem hat, soll auch da nachfragen, siehe https://wiki.fhem.de/wiki/Dokumentationsstruktur. (Der Teil scheint ja aber zu funktionieren, oder?)
Vielleicht lieferst du erst mal die lists, vielleicht erbarmt sich dann ja einer ;) .
Vielleicht hängst du aber auch erst mal mosquitto_sub an deinen MQTT-Server und liest mit, was wann woher wohin geschickt wird, und nutzt mosquitto_pub, um nachzusehen, was das loxone-Dingens eigentlich haben will und pb das zu dem paßt, was du konfiguriert hast?
Hallo @Beta-User,
ja kann ich verstehen....
Das was ich gebaut habe ist von einem Blog - da kann ich nicht wirklich nachfragen da der Blog schon älter ist und sich da niemand meldet :-)
Tut mir leid....
nun meine List - seht es mir nach, dass ich die privaten Daten mit XXXXXX überschrieben habe....
Hier das Listing für "rr_Christoph"
Internals:
AUTOGONE 1547322417
CHANGED
DEF rgr_Residents
DURATIONTIMER 1547197737.69575
NAME rr_Christoph
NOTIFYDEV global,
NR 42
NTFY_ORDER 50-rr_Christoph
READY 1
RESIDENTGROUPS rgr_Residents
STATE absent
TYPE ROOMMATE
READINGS:
2019-01-11 10:07:57 durTimerAbsence 01:21:00
2019-01-11 10:07:57 durTimerAbsence_cr 81
2019-01-11 08:46:57 durTimerPresence 00:00:00
2019-01-11 08:46:57 durTimerPresence_cr 0
2018-10-26 18:50:17 durTimerSleep 00:00:00
2018-10-26 18:50:17 durTimerSleep_cr 0
2019-01-10 18:37:14 lastArrival 2019-01-10 18:37:14
2019-01-11 10:07:57 lastArrival2 1547141834
2019-01-11 08:46:57 lastDeparture 2019-01-11 08:46:57
2019-01-11 10:07:57 lastDeparture2 1547192817
2019-01-10 18:37:14 lastDurAbsence 01:58:32
2019-01-10 18:37:14 lastDurAbsence_cr 119
2019-01-11 08:46:57 lastDurPresence 14:09:43
2019-01-11 08:46:57 lastDurPresence_cr 850
2019-01-10 18:37:14 lastLocation wayhome
2019-01-10 18:37:14 lastLocationAddr XXXXXXXXXXXXXXXX
2019-01-10 18:37:14 lastLocationLat xxxxxxxxxxxxxxxxxx
2019-01-10 18:37:14 lastLocationLong xxxxxxxxxxxxxxxx
2019-01-10 18:37:14 lastLocationRadius 2000
2019-01-11 08:53:34 lastLocationTravDistance 0.00
2019-01-11 08:46:57 lastMood calm
2019-01-11 08:53:34 lastPositionAddr xxxxxxxxxxxxxxxx
2019-01-11 08:53:34 lastPositionBSSID
2019-01-11 08:53:34 lastPositionBeaconUUID
2019-01-11 08:53:34 lastPositionDistHome
2019-01-11 08:53:34 lastPositionDistLocation 0.00
2019-01-11 08:53:34 lastPositionLat xxxxxxxxxxxxxxxxxxxx
2019-01-11 08:53:34 lastPositionLong xxxxxxxxxxxxxxxxxx
2019-01-11 08:53:34 lastPositionMotion
2019-01-11 08:53:34 lastPositionSSID
2019-01-11 08:53:34 lastPositionTravDistance 0.00
2019-01-11 08:46:57 lastState home
2019-01-11 08:53:34 location wayhome
2019-01-11 08:53:34 locationAddr xxxxxxxxxxxxxxxxxxx
2019-01-11 08:53:34 locationLat xxxxxxxxxxxxxxxxxxx
2019-01-11 08:53:34 locationLong xxxxxxxxxxxxxxxxxxx
2019-01-11 08:53:34 locationPresence absent
2019-01-11 08:53:34 locationRadius 2000
2019-01-11 08:53:34 locationTravDistance 0.01
2019-01-11 08:46:57 mood -
2019-01-11 08:53:34 positionAddr xxxxxxxxxxxxxxxxxx
2019-01-11 08:53:34 positionBSSID
2019-01-11 08:53:34 positionBeaconUUID
2019-01-11 08:53:34 positionDistHome
2019-01-11 08:53:34 positionDistLocation 0.00
2019-01-11 08:53:34 positionLat xxxxxxxxxxxxxxxxx
2019-01-11 08:53:34 positionLong xxxxxxxxxxxxxxx
2019-01-11 08:53:34 positionMotion
2019-01-11 08:53:34 positionSSID
2019-01-11 08:53:34 positionTravDistance 0.01
2019-01-11 08:46:57 presence absent
2019-01-11 08:46:57 state absent
2019-01-10 18:37:14 wayhome 0
TIMER:
rr_Christoph_AutoGone:
HASH rr_Christoph
MODIFIER AutoGone
NAME rr_Christoph_AutoGone
rr_Christoph_DurationTimer:
HASH rr_Christoph
MODIFIER DurationTimer
NAME rr_Christoph_DurationTimer
Attributes:
alias Christoph
comment Auto-created by rgr_Residents
devStateIcon .*home:user_available:absent .*absent:user_away:home .*gone:user_ext_away:home .*gotosleep:scene_toilet:asleep .*asleep:scene_sleeping:awoken .*awoken:scene_sleeping_alternat:home .*:user_unknown:home
event-on-change-reading state,wayhome
group Anwesenheit
icon people_sensor
room Anwesenheit
rr_geofenceUUIDs 70332BE8-38B6-475E-xxxxxxxxxxxxxxx
rr_realname group
sortby 1
userReadings lastArrival2 {time_str2num(ReadingsVal("$name","lastArrival","-1"))}, lastDeparture2 {time_str2num(ReadingsVal("$name","lastDeparture","-1"))}
webCmd state
Hier das Listing für rgr_Residents
Internals:
DURATIONTIMER 1547208598.55263
NAME rgr_Residents
NOTIFYDEV global,rr_Christoph
NR 41
NTFY_ORDER 50-rgr_Residents
READY 1
ROOMMATES rr_Christoph
STATE absent
TYPE RESIDENTS
READINGS:
2019-01-11 13:08:58 durTimerAbsence 04:22:01
2019-01-11 13:08:58 durTimerAbsence_cr 262
2019-01-11 08:46:57 durTimerPresence 00:00:00
2019-01-11 08:46:57 durTimerPresence_cr 0
2018-10-26 18:37:32 durTimerSleep 00:00:00
2018-10-26 18:37:32 durTimerSleep_cr 0
2019-01-11 08:46:57 lastActivity absent
2019-01-11 08:46:57 lastActivityBy Anwesenheit
2019-01-11 08:46:57 lastActivityByDev rr_Christoph
2019-01-10 18:37:14 lastArrival 2019-01-10 18:37:14
2019-01-11 13:08:58 lastArrival2 1547141834
2019-01-11 08:46:57 lastDeparture 2019-01-11 08:46:57
2019-01-11 13:08:58 lastDeparture2 1547192817
2019-01-10 18:37:14 lastDurAbsence 01:58:32
2019-01-10 18:37:14 lastDurAbsence_cr 119
2019-01-11 08:46:57 lastDurPresence 14:09:43
2019-01-11 08:46:57 lastDurPresence_cr 850
2019-01-11 08:46:57 lastState home
2019-01-11 08:46:57 presence absent
2019-01-11 08:46:57 residentsAbsent 1
2019-01-11 08:46:57 residentsAbsentDevs rr_Christoph
2019-01-11 08:46:57 residentsAbsentNames Anwesenheit
2018-10-26 18:50:17 residentsAsleep 0
2018-10-26 18:50:17 residentsAsleepDevs -
2018-10-26 18:50:17 residentsAsleepNames -
2018-10-26 18:50:17 residentsAwoken 0
2018-10-26 18:50:17 residentsAwokenDevs -
2018-10-26 18:50:17 residentsAwokenNames -
2019-01-05 15:46:44 residentsGone 0
2019-01-05 15:46:44 residentsGoneDevs -
2019-01-05 15:46:44 residentsGoneNames -
2018-10-26 19:16:43 residentsGotosleep 0
2018-10-26 19:16:43 residentsGotosleepDevs -
2018-10-26 19:16:43 residentsGotosleepNames -
2019-01-11 08:46:57 residentsHome 0
2019-01-11 08:46:57 residentsHomeDevs -
2019-01-11 08:46:57 residentsHomeNames -
2018-10-26 18:50:17 residentsTotal 1
2019-01-11 08:46:57 residentsTotalAbsent 1
2019-01-11 08:46:57 residentsTotalAbsentDevs rr_Christoph
2019-01-11 08:46:57 residentsTotalAbsentNames Anwesenheit
2018-10-26 18:50:17 residentsTotalGuests 0
2018-10-26 18:50:17 residentsTotalGuestsAbsent 0
2018-10-26 18:50:17 residentsTotalGuestsAbsentDevs -
2018-10-26 18:50:17 residentsTotalGuestsAbsentNames -
2018-10-26 18:50:17 residentsTotalGuestsPresent 0
2018-10-26 18:50:17 residentsTotalGuestsPresentDevs -
2018-10-26 18:50:17 residentsTotalGuestsPresentNames -
2019-01-11 08:46:57 residentsTotalPresent 0
2019-01-11 08:46:57 residentsTotalPresentDevs -
2019-01-11 08:46:57 residentsTotalPresentNames -
2018-10-26 18:50:17 residentsTotalRoommates 1
2019-01-11 08:46:57 residentsTotalRoommatesAbsent 1
2019-01-11 08:46:57 residentsTotalRoommatesAbsentDevs rr_Christoph
2019-01-11 08:46:57 residentsTotalRoommatesAbsentNames Anwesenheit
2019-01-11 08:46:57 residentsTotalRoommatesPresent 0
2019-01-11 08:46:57 residentsTotalRoommatesPresentDevs -
2019-01-11 08:46:57 residentsTotalRoommatesPresentNames -
2018-10-26 18:50:17 residentsTotalWakeup 0
2018-10-26 18:50:17 residentsTotalWakeupDevs -
2018-10-26 18:50:17 residentsTotalWakeupNames -
2019-01-10 18:37:14 residentsTotalWayhome 0
2018-10-26 18:50:17 residentsTotalWayhomeDelayed 0
2018-10-26 18:50:17 residentsTotalWayhomeDelayedDevs -
2018-10-26 18:50:17 residentsTotalWayhomeDelayedNames -
2019-01-10 18:37:14 residentsTotalWayhomeDevs -
2019-01-10 18:37:14 residentsTotalWayhomeNames -
2019-01-11 08:46:57 state absent
TIMER:
rgr_Residents_DurationTimer:
HASH rgr_Residents
MODIFIER DurationTimer
NAME rgr_Residents_DurationTimer
Attributes:
alias Residents
devStateIcon .*home:user_available:absent .*absent:user_away:home .*gone:user_ext_away:home .*gotosleep:scene_toilet:asleep .*asleep:scene_sleeping:awoken .*awoken:scene_sleeping_alternat:home .*:user_unknown:home
group Anwesenheit
icon control_building_filled
rgr_showAllStates 1
rgr_states home,gotosleep,asleep,awoken,absent,gone
room Anwesenheit
userReadings lastArrival2 {time_str2num(ReadingsVal("$name","lastArrival","-1"))}, lastDeparture2 {time_str2num(ReadingsVal("$name","lastDeparture","-1"))}
webCmd state
Hier das listing für geofancy
Internals:
DEF geo
NAME geofancy
NR 40
ROOMMATES rr_Christoph
STATE id:44425C53-F5AA-436A-XXXXXXXXXXXXXXXXXXXXXXXXXX trig:0 date:1547193193 lat:xxxxx long:xxxxxx dev:70332BE8-38B6-475E-XXXXXXXXXXXXXXXXXXXXXXXXXX devAlias=rr_Christoph
TYPE GEOFANCY
READINGS:
2019-01-11 08:53:13 currLocAddr_rr_Christoph -
2019-01-11 08:53:13 currLocLat_rr_Christoph -
2019-01-11 08:53:13 currLocLong_rr_Christoph -
2019-01-11 08:53:13 currLocRadius_rr_Christoph 2000
2019-01-11 08:53:13 currLocTime_rr_Christoph 2019-01-11 08:53:13
2019-01-11 08:53:13 currLocTravDist_rr_Christoph 0.01
2019-01-11 08:53:13 currLoc_rr_Christoph underway
2019-01-11 08:53:13 currPosAddr_rr_Christoph XXXXXXXXXXXXXXXXXXXXXXXXXX
2019-01-11 08:53:13 currPosBSSID_rr_Christoph
2019-01-11 08:53:13 currPosBeaconUUID_rr_Christoph
2019-01-11 08:53:13 currPosDistHome_rr_Christoph
2019-01-11 08:53:13 currPosDistLoc_rr_Christoph 0.00
2019-01-11 08:53:13 currPosLat_rr_Christoph XXXXXXXXXXXXXXXXXXXXXXXXXX
2019-01-11 08:53:13 currPosLong_rr_Christoph XXXXXXXXXXXXXXXXXXXXXXXXXX
2019-01-11 08:53:13 currPosMotion_rr_Christoph
2019-01-11 08:53:13 currPosSSID_rr_Christoph
2019-01-11 08:53:13 currPosTime_rr_Christoph 2019-01-11 08:53:13
2019-01-11 08:53:13 currPosTravDist_rr_Christoph 0.01
2019-01-10 18:37:12 lastArr rr_Christoph home
2019-01-11 08:53:13 lastDep rr_Christoph wayhome
2019-01-11 08:53:13 lastDevice rr_Christoph
2019-01-11 08:53:13 lastDeviceUUID 70332BE8-38B6-475E-XXXXXXXXXXXX
2019-01-11 08:53:13 lastLocAddr_rr_Christoph XXXXXXXXXXXXXXXXXXXXXXXXXX
2019-01-11 08:53:13 lastLocArr_rr_Christoph 2019-01-11 08:46:35
2019-01-11 08:53:13 lastLocDep_rr_Christoph 2019-01-11 08:53:13
2019-01-11 08:53:13 lastLocDur_rr_Christoph 398
2019-01-11 08:53:13 lastLocLat_rr_Christoph XXXXXXXXXXXXXXXXXXXXXXXXXX
2019-01-11 08:53:13 lastLocLong_rr_Christoph XXXXXXXXXXXXXXXXXXXXXXXXXX
2019-01-11 08:53:13 lastLocRadius_rr_Christoph 100
2019-01-11 08:53:13 lastLocTravDist_rr_Christoph 0.00
2019-01-11 08:53:13 lastLoc_rr_Christoph underway
2019-01-11 08:53:13 lastPosAddr_rr_Christoph XXXXXXXXXXXXXXXXXXXXXXXXXX
2019-01-11 08:53:13 lastPosArr_rr_Christoph 2019-01-11 08:46:35
2019-01-11 08:53:13 lastPosBSSID_rr_Christoph
2019-01-11 08:53:13 lastPosBeaconUUID_rr_Christoph
2019-01-11 08:53:13 lastPosDep_rr_Christoph 2019-01-11 08:53:13
2019-01-11 08:53:13 lastPosDistHome_rr_Christoph
2019-01-11 08:53:13 lastPosDistLoc_rr_Christoph 0.00
2019-01-11 08:53:13 lastPosDur_rr_Christoph 398
2019-01-11 08:53:13 lastPosLat_rr_Christoph XXXXXXXXXXXXXXXXXXXXXXXXXX
2019-01-11 08:53:13 lastPosLong_rr_Christoph XXXXXXXXXXXXXXXXXXXXXXXXXX
2019-01-11 08:53:13 lastPosMotion_rr_Christoph
2019-01-11 08:53:13 lastPosSSID_rr_Christoph
2019-01-11 08:53:13 lastPosTravDist_rr_Christoph 0.00
2019-01-11 08:53:13 rr_Christoph left wayhome
2019-01-11 08:53:13 state id:44425C53-F5AA-436A-XXXXXXXXXXXXXXXXXXXXXXXXXX trig:0 date:1547193193 lat:xxxxx long:xxxxxx dev:70332BE8-38B6-XXXXXXXXXXXXXXXXXXXXXXXXXX devAlias=rr_Christoph
fhem:
infix geo
helper:
device_aliases:
Attributes:
room Anwesenheit
hier das listing für mqttGeneric
Internals:
IODev lb_mosquitto
NAME mqttGeneric
NR 19
NTFY_ORDER 50-mqttGeneric
STATE ???
TYPE MQTT_GENERIC_BRIDGE
devspec .*
prefix mqtt
READINGS:
2019-01-09 20:36:09 device-count 0
2019-01-09 20:35:57 incoming-count 0
2019-01-11 13:19:01 outgoing-count 470939
2019-01-11 13:19:01 transmission-state outgoing publish sent
2019-01-09 20:35:57 updated-reading-count 0
2019-01-09 20:35:57 updated-set-count 0
devices:
:global:
:defaults:
pub:pub:qos 0
pub:retain 0
pub:sub:qos 2
sub:pub:qos 0
sub:retain 0
sub:sub:qos 2
:publish:
*:
mode R
topic {"FHEM/$device/$reading"}
globalDeviceExcludes:
globalReadingExcludes:
globalTypeExcludes:
pub:
FHEMWEB *
Global *
MQTT transmission-state
MQTT_BRIDGE transmission-state
MQTT_DEVICE transmission-state
MQTT_GENERIC_BRIDGE *
telnet *
sub:
FHEMWEB *
Global *
MQTT transmission-state
MQTT_BRIDGE transmission-state
MQTT_DEVICE transmission-state
MQTT_GENERIC_BRIDGE *
telnet *
subscribe:
subscribeExpr:
subscribeQos:
Attributes:
IODev lb_mosquitto
globalDefaults sub:qos=2 pub:qos=0 retain=0
globalPublish *:topic={"FHEM/$device/$reading"}
Listing für lb_mosquitto
Internals:
DEF 192.168.178.246:1883
DeviceName 192.168.178.246:1883
FD 21
NAME lb_mosquitto
NOTIFYDEV global
NR 18
NTFY_ORDER 50-lb_mosquitto
PARTIAL
STATE opened
TYPE MQTT
buf
msgid 1
ping_received 1
timeout 60
READINGS:
2019-01-11 13:21:36 connection active
2019-01-09 20:36:09 state opened
messages:
Attributes:
ICH FREUE MICH SEHR AUF EURE HILFE!
LG
Logol01
OK, jetzt haben wir also lists.
Das erklärt aber doch noch nicht den Ablauf, oder?
Was funktioniert: Geofancy liefert Daten an FHEM (wie in dem Blog beschrieben, oder?); das roommate-Device rr_Christoph wird befüllt und "vererbt" das anstandslos an "rgr_Residents".
So, und nun?
Zitat von: Beta-User am 11 Januar 2019, 07:45:39
vielleicht hängst du aber auch erst mal mosquitto_sub an deinen MQTT-Server und liest mit, was wann woher wohin geschickt wird, und nutzt mosquitto_pub, um nachzusehen, was das loxone-Dingens eigentlich haben will und ob das zu dem paßt, was du konfiguriert hast?
Was soll aus den beiden Devices wie dann weitergesendet werden? Soweit ich erkennen kann, sind an keinem der beiden Geräte mqttPublish-Attribute gesetzt. Wie das geht, müßtest du in der cref zu MQTT_GENERIC_BRIDGE nachlesen, und welche Daten aus welchem Device hast du uns dann immer noch nicht verraten...
Noch was:
Das ist eine Frage zu MQTT; verschiebe den Thread daher am besten auch dahin (oder in den Anfängerbereich, cref lesen und verstehen, welche Daten wann wohin ist eigentlich was grundlegendes...).
Zitat von: logol01 am 11 Januar 2019, 13:22:49
nun meine List - seht es mir nach, dass ich die privaten Daten mit XXXXXX überschrieben habe....
und wie sollen wir jetzt wissen wo du wohnst?? ::) ::) :P
Zitat von: logol01 am 08 Januar 2019, 23:19:52
Von dem Device rgr_Residents (Definition im angefügten Bild ersichtlich) wird jedes Reading übertragen!
Vom Device rr_Christoph nur (Definition im angefügen Bild ersichtlich) werden nur 2 Readings übertragen: state und wayhome. Ich benötige aber alle Readings von dem Gerät!
das liegt - wahrscheinlich - an deinen event-on-* definitionen.
sind die so gewollt?? oder aus dem blog kopiert??
hab alles so aus dem Blog kopiert :-)
Was soll ich da ändern?
nunja, da steht:
event-on-change-reading state,wayhome
das erklärt ->
ZitatVom Device rr_Christoph nur (Definition im angefügen Bild ersichtlich) werden nur 2 Readings übertragen: state und wayhome. Ich benötige aber alle Readings von dem Gerät!
jetzt solltest du etwas lesen zu event-on-* :)
CommandRef oder Wiki
...war zu langsam, aber soweit fertig...
Aber doppelt genäht hält vielleicht besser:
Zitat von: logol01 am 11 Januar 2019, 13:51:58
hab alles so aus dem Blog kopiert :-)
Was soll ich da ändern?
Da solltest du vermutlich das Attribut löschen.
Aber mal was ganz grundsätzliches: Du solltest erst mal die Grundlagen verstehen, bevor du dich an so fortgeschrittene Sachen wagst.
Just my2ct und nicht böse gemeint.
Das Einsteiger-pdf hast du gelesen? Da steht sowas nämlich ziemlich sicher drin...