Geofancy / Roommate - Best practice

Begonnen von 87insane, 11 April 2019, 09:39:00

Vorheriges Thema - Nächstes Thema

87insane

Hallo zusammen,

aktuell versuche ich mich an geofancy und roommate. An sich läuft das ganz gut und es gibt viele Beispiele im Netz. Fragen habe ich trotzdem. Sowohl das comref als auch Wiki und co. beantworten mir nicht alles.

Ich habe 1xResidents + 2xRoommate und die zugehörigen rr_geofenceUUIDs gesetzt. Nun ist es so, das ab und zu auch mal kein Empfang am Smartphone ist und somit auch keine Serververbindung. Dann weiß das Modul also auch nicht das ich meine Standort geändert habe. Da dachte ich mir, ich richte verschiedene Orte ein. Also habe ich die Orte eingerichtet die ich am häufigsten besuche.
- home
- work
- sport
- schule

So wie ich das verstehe müsste ich die Orte, die nicht = home sind in rr_locationUnderway mit "," getrennt eingeben. Das habe ich getan. Somit müsste dann bei erreichen einer der anderen Orte, dann wiederum die Location an den Server gesendet werden. Dann habe ich zwar im schlimmsten Fall ein delay und bin zuhause bis zum nächsten Trigger-Ort aber das wäre egal. Die beiden Smartphones sind mit EgiGeoZone ausgestattet und die Orte sind alle angelegt.

Nun ist es heute mal wieder so, das mein Gerät den Status beim verlassen von zuhause nicht senden konnte (kein Netz). Ich fuhr zur Arbeit und das wiederum hat geofancy auch mitbekommen. Allerdings steht im Status des entsprechenden Roommates noch immer "home". rr_locationUnderway habe ich vorhin (also nachträglich) erst eingefügt.

Wie macht Ihr das?
Wie macht man es am besten?
Habe ich ggf. was vertauscht?

Anbei mal Lists:

- Geofancy
Internals:
   CFGFN      ./FHEM/Anwesenheit.cfg
   DEF        geo
   FUUID      5ca9a926-f33f-fcb4-8d30-643c7993841172af
   FVERSION   98_GEOFANCY.pm:0.189950/2019-03-22
   NAME       geofancy
   NR         148
   ROOMMATES  rr_Anastasia,rr_Kai
   STATE      id:f3cccc37-1a4c-3d1b-8794-173d980b9fa9 trig:1 date:1554966569 lat:51.4389632 long:6.6487113 dev:f3cccc37-1a4c-3d1b-8794-173d980b9fa9 devAlias=rr_Kai
   TYPE       GEOFANCY
   READINGS:
     2019-04-11 07:40:02   currLocAddr_rr_Anastasia -
     2019-04-11 09:09:29   currLocAddr_rr_Kai -
     2019-04-11 07:40:02   currLocLat_rr_Anastasia -
     2019-04-11 09:09:29   currLocLat_rr_Kai 51.4389632
     2019-04-11 07:40:02   currLocLong_rr_Anastasia -
     2019-04-11 09:09:29   currLocLong_rr_Kai 6.6487113
     2019-04-11 07:40:02   currLocRadius_rr_Anastasia 0
     2019-04-11 09:09:29   currLocRadius_rr_Kai 0
     2019-04-11 07:40:02   currLocTime_rr_Anastasia 2019-04-11 07:40:02
     2019-04-11 09:09:29   currLocTime_rr_Kai 2019-04-11 09:09:29
     2019-04-11 07:40:02   currLocTravDist_rr_Anastasia 0.00
     2019-04-11 09:09:29   currLocTravDist_rr_Kai 0.00
     2019-04-11 07:40:02   currLoc_rr_Anastasia underway
     2019-04-11 09:09:29   currLoc_rr_Kai  Arbeit
     2019-04-11 07:40:02   currPosAddr_rr_Anastasia -
     2019-04-11 09:09:29   currPosAddr_rr_Kai -
     2019-04-11 07:40:02   currPosBSSID_rr_Anastasia
     2019-04-11 09:09:29   currPosBSSID_rr_Kai
     2019-04-11 07:40:02   currPosBeaconUUID_rr_Anastasia
     2019-04-11 09:09:29   currPosBeaconUUID_rr_Kai
     2019-04-11 07:40:02   currPosDistHome_rr_Anastasia 0.05
     2019-04-11 09:09:29   currPosDistHome_rr_Kai 7.36
     2019-04-11 07:40:02   currPosDistLoc_rr_Anastasia 0.00
     2019-04-11 09:09:29   currPosDistLoc_rr_Kai 0.00
     2019-04-11 07:40:02   currPosLat_rr_Anastasia 51.436408
     2019-04-11 09:09:29   currPosLat_rr_Kai 51.4389632
     2019-04-11 07:40:02   currPosLong_rr_Anastasia 6.542764
     2019-04-11 09:09:29   currPosLong_rr_Kai 6.6487113
     2019-04-11 07:40:02   currPosMotion_rr_Anastasia
     2019-04-11 09:09:29   currPosMotion_rr_Kai
     2019-04-11 07:40:02   currPosSSID_rr_Anastasia
     2019-04-11 09:09:29   currPosSSID_rr_Kai
     2019-04-11 07:40:02   currPosTime_rr_Anastasia 2019-04-11 07:40:02
     2019-04-11 09:09:29   currPosTime_rr_Kai 2019-04-11 09:09:29
     2019-04-11 07:40:02   currPosTravDist_rr_Anastasia 0.00
     2019-04-11 09:09:29   currPosTravDist_rr_Kai 0.00
     2019-04-11 09:09:29   lastArr         rr_Kai Arbeit
     2019-04-11 08:03:00   lastDep         rr_Kai Arbeit
     2019-04-11 09:09:29   lastDevice      rr_Kai
     2019-04-11 09:09:29   lastDeviceUUID  f3cccc37-1a4c-3d1b-8794-173d980b9fa9
     2019-04-11 07:40:02   lastLocAddr_rr_Anastasia
     2019-04-11 08:03:00   lastLocAddr_rr_Kai
     2019-04-11 07:40:02   lastLocArr_rr_Anastasia 2019-04-10 13:41:38
     2019-04-11 08:03:00   lastLocArr_rr_Kai 2019-04-11 07:59:52
     2019-04-11 07:40:02   lastLocDep_rr_Anastasia 2019-04-11 07:40:02
     2019-04-11 08:03:00   lastLocDep_rr_Kai 2019-04-11 08:03:00
     2019-04-11 07:40:02   lastLocDur_rr_Anastasia 64704
     2019-04-11 08:03:00   lastLocDur_rr_Kai 188
     2019-04-11 07:40:02   lastLocLat_rr_Anastasia 51.436408
     2019-04-11 08:03:00   lastLocLat_rr_Kai 51.4389632
     2019-04-11 07:40:02   lastLocLong_rr_Anastasia 6.542764
     2019-04-11 08:03:00   lastLocLong_rr_Kai 6.6487113
     2019-04-11 07:40:02   lastLocRadius_rr_Anastasia 0
     2019-04-11 09:09:29   lastLocRadius_rr_Kai 0
     2019-04-11 07:40:02   lastLocTravDist_rr_Anastasia 0.00
     2019-04-11 09:09:29   lastLocTravDist_rr_Kai 0.00
     2019-04-11 07:40:02   lastLoc_rr_Anastasia home
     2019-04-11 08:03:00   lastLoc_rr_Kai  Arbeit
     2019-04-11 07:40:02   lastPosAddr_rr_Anastasia -
     2019-04-11 09:09:29   lastPosAddr_rr_Kai -
     2019-04-11 07:40:02   lastPosArr_rr_Anastasia 2019-04-10 13:41:38
     2019-04-11 09:09:29   lastPosArr_rr_Kai 2019-04-11 09:09:29
     2019-04-11 07:40:02   lastPosBSSID_rr_Anastasia
     2019-04-11 09:09:29   lastPosBSSID_rr_Kai
     2019-04-11 07:40:02   lastPosBeaconUUID_rr_Anastasia
     2019-04-11 09:09:29   lastPosBeaconUUID_rr_Kai
     2019-04-11 07:40:02   lastPosDep_rr_Anastasia 2019-04-11 07:40:02
     2019-04-11 09:09:29   lastPosDep_rr_Kai 2019-04-11 09:09:29
     2019-04-11 07:40:02   lastPosDistHome_rr_Anastasia 0.05
     2019-04-11 09:09:29   lastPosDistHome_rr_Kai 7.36
     2019-04-11 07:40:02   lastPosDistLoc_rr_Anastasia 0.00
     2019-04-11 09:09:29   lastPosDistLoc_rr_Kai 0.00
     2019-04-11 07:40:02   lastPosDur_rr_Anastasia 64704
     2019-04-11 09:09:29   lastPosDur_rr_Kai 0
     2019-04-11 07:40:02   lastPosLat_rr_Anastasia 51.436408
     2019-04-11 09:09:29   lastPosLat_rr_Kai 51.4389632
     2019-04-11 07:40:02   lastPosLong_rr_Anastasia 6.542764
     2019-04-11 09:09:29   lastPosLong_rr_Kai 6.6487113
     2019-04-11 07:40:02   lastPosMotion_rr_Anastasia
     2019-04-11 09:09:29   lastPosMotion_rr_Kai
     2019-04-11 07:40:02   lastPosSSID_rr_Anastasia
     2019-04-11 09:09:29   lastPosSSID_rr_Kai
     2019-04-11 07:40:02   lastPosTravDist_rr_Anastasia 0.00
     2019-04-11 09:09:29   lastPosTravDist_rr_Kai 0.00
     2019-04-11 07:40:02   rr_Anastasia    left home
     2019-04-11 09:09:29   rr_Kai          arrived Arbeit
     2019-04-11 09:09:29   state           id:f3cccc37-1a4c-3d1b-8794-173d980b9fa9 trig:1 date:1554966569 lat:51.4389632 long:6.6487113 dev:f3cccc37-1a4c-3d1b-8794-173d980b9fa9 devAlias=rr_Kai
   fhem:
     infix      geo
   helper:
     device_aliases:
       ecba26bd-cd79-3dc2-a2e2-c619f60869b8 Anastasia
       f3cccc37-1a4c-3d1b-8794-173d980b9fa9 Kai
     device_names:
       Anastasia  ecba26bd-cd79-3dc2-a2e2-c619f60869b8
       Kai        f3cccc37-1a4c-3d1b-8794-173d980b9fa9
Attributes:
   devAlias   f3cccc37-1a4c-3d1b-8794-173d980b9fa9:Kai ecba26bd-cd79-3dc2-a2e2-c619f60869b8:Anastasia
   event-on-change-reading .*
   room       Anwesenheit


Ein Roommate:
Internals:
   CFGFN      ./FHEM/Anwesenheit.cfg
   DEF        rgr_Residents
   DURATIONTIMER 1554968273.00383
   FUUID      5ca9b7f8-f33f-fcb4-ccfd-cc831e41d63baba7
   FVERSION   20_ROOMMATE.pm:0.189950/2019-03-22
   NAME       rr_Kai
   NOTIFYDEV  global,
   NR         150
   NTFY_ORDER 50-rr_Kai
   READY      1
   RESIDENTGROUPS rgr_Residents
   STATE      home
   TYPE       ROOMMATE
   READINGS:
     2019-04-10 16:34:46   durTimerAbsence 00:00:00
     2019-04-10 16:34:46   durTimerAbsence_cr 0
     2019-04-11 09:36:53   durTimerPresence 17:02:07
     2019-04-11 09:36:53   durTimerPresence_cr 1022
     2019-04-07 12:25:48   durTimerSleep   00:00:00
     2019-04-07 12:25:48   durTimerSleep_cr 0
     2019-04-10 16:34:46   lastArrival     2019-04-10 16:34:46
     2019-04-10 07:39:32   lastDeparture   2019-04-10 07:39:32
     2019-04-10 16:34:46   lastDurAbsence  08:55:14
     2019-04-10 16:34:46   lastDurAbsence_cr 535
     2019-04-10 07:39:32   lastDurPresence 12:24:49
     2019-04-10 07:39:32   lastDurPresence_cr 745
     2019-04-11 09:09:29   lastLocation    Arbeit
     2019-04-11 09:09:29   lastLocationAddr -
     2019-04-11 09:09:29   lastLocationLat 51.4389632
     2019-04-11 09:09:29   lastLocationLong 6.6487113
     2019-04-11 09:09:29   lastLocationRadius 0
     2019-04-11 09:09:29   lastLocationTravDistance 0.00
     2019-04-10 07:39:32   lastMood        calm
     2019-04-11 09:09:29   lastPositionAddr -
     2019-04-11 09:09:29   lastPositionBSSID
     2019-04-11 09:09:29   lastPositionBeaconUUID
     2019-04-11 09:09:29   lastPositionDistHome 7.36
     2019-04-11 09:09:29   lastPositionDistLocation 0.00
     2019-04-11 09:09:29   lastPositionLat 51.4389632
     2019-04-11 09:09:29   lastPositionLong 6.6487113
     2019-04-11 09:09:29   lastPositionMotion
     2019-04-11 09:09:29   lastPositionSSID
     2019-04-11 09:09:29   lastPositionTravDistance 0.00
     2019-04-10 16:34:46   lastState       absent
     2019-04-11 09:09:29   location        Arbeit
     2019-04-11 09:09:29   locationAddr    -
     2019-04-11 09:09:29   locationLat     51.4389632
     2019-04-11 09:09:29   locationLong    6.6487113
     2019-04-11 09:09:29   locationPresence present
     2019-04-11 09:09:29   locationRadius  0
     2019-04-11 09:09:29   locationTravDistance 0.00
     2019-04-10 16:34:46   mood            calm
     2019-04-11 09:09:29   positionAddr    -
     2019-04-11 09:09:29   positionBSSID   
     2019-04-11 09:09:29   positionBeaconUUID
     2019-04-11 09:09:29   positionDistHome 7.36
     2019-04-11 09:09:29   positionDistLocation 0.00
     2019-04-11 09:09:29   positionLat     51.4389632
     2019-04-11 09:09:29   positionLong    6.6487113
     2019-04-11 09:09:29   positionMotion 
     2019-04-11 09:09:29   positionSSID   
     2019-04-11 09:09:29   positionTravDistance 0.00
     2019-04-10 16:34:46   presence        present
     2019-04-10 16:34:46   state           home
     2019-04-07 12:27:29   wayhome         0
   TIMER:
     rr_Kai_DurationTimer:
       HASH       rr_Kai
       MODIFIER   DurationTimer
       NAME       rr_Kai_DurationTimer
Attributes:
   alias      Kai
   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 .*
   group      Anwesenheit
   icon       people_sensor
   room       Anwesenheit
   rr_geofenceUUIDs f3cccc37-1a4c-3d1b-8794-173d980b9fa9
   rr_locationUnderway Sport,Arbeit
   rr_realname alias
   webCmd     state


PS: Am Ende würde ich das hier noch aufpeppen und eine Art "Noob-Guide" erstellen. So kann man alle Ideen bündeln und hat eine Anleitung, für Leute wie mich, die es einfach nicht verstehen wollen :-P

87insane


kadettilac89

egigeozone ist EOL, wird nicht mehr weiterentwickelt. Auf ein totes Pferd setzen ist gewagt. Selbst als es noch gepflegt wurde hatte ich damit keine zuverlässigen Events.

ich nutze owntracks über http und das läuft bei mir stabil. Alternativ kannst du das auch per MQTT anbinden. Modul dazu https://forum.fhem.de/index.php/topic,37412.0.html

Wenn du schon neu konfigurierst würde ich eines der 3 Tools nutzen die mit dem Modul von Markus abgedeckt sind.

87insane

Das ist schon mal ne Info mit der ich arbeiten kann! Hatte das auch gelesen aber mir erst mal nichts gedacht dabei. Werde es nachher direkt testen bzw. anpassen.

DANKE!

87insane

Gibt es hier Empfehlungen? In der Liste stehen vier Apps.
Für mich wäre wenig Akkuverbrauch wichtig. Hinzu brauche ich kein LiveTracking sonder nur Home/Work usw als Ort.

Nach einer Anleitung habe ich mich nun tot gesucht. Finde im Verbund mit geofance immer nur das was ich getan hatte. Auch die Verbindung gegen den MQTT müsste im Router durch eine Portfreigabe geschehen oder?

kadettilac89

Ich nutze owntracks in android  akkuverbrauch gering. In der app kannst du permanent loggen,  oder verlassen und betreten von Zonen. In der Doku zum Modul sollte alles stehen was du brauchst. Mqtt braucht port richtig.

Ich habe alles über https und perverse Proxy laufen. Läuft schon ne Weile.


87insane

Ich kämpfe gerade.... MQTT will leider bisher nicht wie ich.
Diese Doku habe ich dann bisher übersehen. Ich hab schon im Thread gemeckert :-\

Dein perverser Proxy scheint dir zu helfen :-P Spaß bei Seite - Ich habe da so meine Probleme bisher. Selbst wenn ich TLS bei MQTT in der App aus schalte, muss ich den ganzen Kram noch an Residents übergeben. Da bin ich auch noch unsicher. Will hier aber auch nicht doppelt posten. Ggf. kannst du ja weiter helfen :)

https://forum.fhem.de/index.php/topic,37412.msg929538.html#msg929538


Danke Dir aber bis hierher auf jeden Fall schon mal !!