Hallo zusammen,
ich verwende Geofancy zusammen mit egigeozone. Die Lokalisierung funktioniert auch:
Internals:
DEF geo
NAME geofancy
NR 380
STATE id:3efaa140-f12d-36c5-858d-e9d83c61ca77 name:home trig:1 date:2015-10-12T13:06:05Z lat:52.6047904 long:13.298567 dev:Michael
TYPE GEOFANCY
Readings:
2015-10-12 15:06:05 Michael arrived home
2015-10-12 15:06:05 currLocLat_Michael 52.6047904
2015-10-12 15:06:05 currLocLong_Michael 13.298567
2015-10-12 15:06:05 currLocTime_Michael 2015-10-12 15:06:05
2015-10-12 15:06:05 currLoc_Michael home
2015-10-12 15:06:05 lastArr Michael home
2015-10-12 14:07:20 lastDep Michael home
2015-10-12 15:06:05 lastDevice Michael
2015-10-12 14:07:20 lastLocArr_Michael 2015-10-12 13:48:39
2015-10-12 14:07:20 lastLocDep_Michael 2015-10-12 14:07:20
2015-10-12 14:07:20 lastLocLat_Michael 52.6047904
2015-10-12 14:07:20 lastLocLong_Michael 13.298567
2015-10-12 14:07:20 lastLoc_Michael home
2015-10-12 15:06:05 state id:3efaa140-xxxxxxxxxxx-7 name:home trig:1 date:2015-10-12T13:06:05Z lat:52.6047904 long:13.298567 dev:Michael
Fhem:
infix geo
Helper:
Device_aliases:
3efaaxxx61ca77 Michael
Device_names:
Michael 3efaa140-f12d-36c5-858d-e9d83c61ca77
Attributes:
devAlias 3efaaxxxxxca77:Michael
room Haus
Auch das notify bekommt die Daten:
Internals:
DEF geofancy:currLoc_Michael.* set location_michael:FILTER=location!=$EVTPART1 location $EVTPART
NAME Michael.location
NOTIFYDEV geofancy
NR 381
NTFY_ORDER 50-Michael.location
REGEXP geofancy:currLoc_Michael.*
STATE 2015-10-12 15:06:08
TYPE notify
Readings:
2015-10-12 11:09:16 state active
Attributes:
room Haus
Aber roommate bleibt auf absent
Internals:
DEF Bewohner,Eltern
NAME location_michael
NR 388
NTFY_ORDER 50-location_michael
RESIDENTGROUPS
STATE absent
TYPE ROOMMATE
Readings:
2015-10-12 15:42:34 durTimerAbsence 18:06:57
2015-10-12 15:42:34 durTimerAbsence_cr 1087
2015-10-11 21:35:37 durTimerPresence 00:00:00
2015-10-11 21:09:12 durTimerPresence_cr 0
2015-10-11 21:09:12 durTimerSleep 00:00:00
2015-10-11 21:09:12 durTimerSleep_cr 0
2015-10-11 21:35:25 lastArrival 2015-10-11 21:35:25
2015-10-11 21:35:37 lastDeparture 2015-10-11 21:35:37
2015-10-11 21:35:37 lastDurPresence 00:00:12
2015-10-11 21:35:37 lastDurPresence_cr 0
2015-10-11 21:35:37 lastLocation home
2015-10-11 21:35:37 lastMood sleepy
2015-10-11 21:39:24 lastState gone
2015-10-12 13:45:37 location $EVTPART
2015-10-11 21:35:37 mood -
2015-10-11 21:35:37 presence absent
2015-10-11 21:39:24 state absent
2015-10-12 08:15:03 wakeup 0
2015-10-11 21:35:25 wayhome 0
Timer:
Location_michael_autogone:
HASH location_michael
MODIFIER AutoGone
NAME location_michael_AutoGone
Location_michael_durationtimer:
HASH location_michael
MODIFIER DurationTimer
NAME location_michael_DurationTimer
Attributes:
alias Location Michael
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 location
icon people_sensor
room Haus,Residents
rr_realname group
sortby 1
webCmd state
Wobei mit location $EVTPART schon stutzig macht.
Gruß
Micha
geofancy:currLoc_Michael.* set location_michael:FILTER=location!=$EVTPART1 location $EVTPART
Du prüfst auf $EVTPART1 um dann EVTPART zu setzen? Ich glaube das geht so nicht
geofancy:currLoc_Michael.* set location_michael:FILTER=location!=$EVTPART1 location $EVTPART1
Das sollte aber gehen
Der Teufel steckt im Detail ;-) Ich habe wohl beim kopieren aus dem Wiki ein Zeichen übersehen . Das geht jetzt. Mein RESIDENTS Problem behebt sich dabei aber leider nicht. Ich bin immer davon ausgegangen, wenn einer von der Gruppe anwesend ist, das diese auch auf present gesetzt wird.
Das scheint aber bei mir nicht zu funktionieren.
Internals:
NAME Eltern
NR 390
NTFY_ORDER 50-Eltern
STATE absent
TYPE RESIDENTS
Readings:
2015-10-11 21:39:25 lastActivity absent
2015-10-11 21:39:25 lastActivityBy location_michael
2015-10-11 21:39:25 lastActivityByDev location_michael
2015-10-11 21:35:25 lastArrival 2015-10-11 21:35:25
2015-10-11 21:35:37 lastDeparture 2015-10-11 21:35:37
2015-10-11 21:35:37 lastDurPresence 00:00:12
2015-10-11 21:35:37 lastDurPresence_cr 0
2015-10-11 21:39:24 lastState gone
2015-10-11 21:35:37 presence absent
2015-10-11 21:39:24 residentsAbsent 1
2015-10-11 21:39:24 residentsAbsentDevs location_michael
2015-10-11 21:39:24 residentsAbsentNames location_michael
2015-10-11 21:35:25 residentsAsleep 0
2015-10-11 21:35:25 residentsAsleepDevs -
2015-10-11 21:35:25 residentsAsleepNames -
2015-10-11 21:35:25 residentsAwoken 0
2015-10-11 21:35:25 residentsAwokenDevs -
2015-10-11 21:35:25 residentsAwokenNames -
2015-10-11 21:39:24 residentsGone 0
2015-10-11 21:39:24 residentsGoneDevs -
2015-10-11 21:39:24 residentsGoneNames -
2015-10-11 21:35:37 residentsGotosleep 0
2015-10-11 21:35:37 residentsGotosleepDevs -
2015-10-11 21:35:37 residentsGotosleepNames -
2015-10-11 21:35:32 residentsHome 0
2015-10-11 21:35:32 residentsHomeDevs -
2015-10-11 21:35:32 residentsHomeNames -
2015-10-11 21:35:25 residentsTotal 1
2015-10-11 21:35:37 residentsTotalAbsent 1
2015-10-11 21:35:37 residentsTotalAbsentDevs location_michael
2015-10-11 21:35:37 residentsTotalAbsentNames location_michael
2015-10-11 21:35:25 residentsTotalGuests 0
2015-10-11 21:35:25 residentsTotalGuestsAbsent 0
2015-10-11 21:35:25 residentsTotalGuestsAbsentDevs -
2015-10-11 21:35:25 residentsTotalGuestsAbsentNames -
2015-10-11 21:35:25 residentsTotalGuestsPresent 0
2015-10-11 21:35:25 residentsTotalGuestsPresentDevs -
2015-10-11 21:35:25 residentsTotalGuestsPresentNames -
2015-10-11 21:35:37 residentsTotalPresent 0
2015-10-11 21:35:37 residentsTotalPresentDevs -
2015-10-11 21:35:37 residentsTotalPresentNames -
2015-10-11 21:35:25 residentsTotalWakeup 0
2015-10-11 21:35:25 residentsTotalWakeupDevs -
2015-10-11 21:35:25 residentsTotalWakeupNames -
2015-10-11 21:35:25 residentsTotalWayhome 0
2015-10-11 21:35:25 residentsTotalWayhomeDevs -
2015-10-11 21:35:25 residentsTotalWayhomeNames -
2015-10-11 21:39:24 state absent
Attributes:
alias Eltern
devStateIcon .*home:status_available:absent .*absent:status_away_1:home .*gone:status_standby:home .*none:control_building_empty .*gotosleep:status_night:asleep .*asleep:status_night:awoken .*awoken:status_available:home .*:user_unknown:home
group Home State
icon control_building_filled
room Haus,Residents
webCmd state
ich bin ja im home status
Internals:
DEF Bewohner,Eltern
NAME location_michael
NR 388
NTFY_ORDER 50-location_michael
RESIDENTGROUPS
STATE home
TYPE ROOMMATE
Readings:
2015-10-14 18:49:47 durTimerAbsence 00:00:00
2015-10-14 18:49:47 durTimerAbsence_cr 0
2015-10-14 19:32:47 durTimerPresence 00:43:00
2015-10-14 19:32:47 durTimerPresence_cr 43
2015-10-11 21:09:12 durTimerSleep 00:00:00
2015-10-11 21:09:12 durTimerSleep_cr 0
2015-10-14 18:49:47 lastArrival 2015-10-14 18:49:47
2015-10-14 06:57:38 lastDeparture 2015-10-14 06:57:38
2015-10-14 18:49:47 lastDurAbsence 11:52:09
2015-10-14 18:49:47 lastDurAbsence_cr 712
2015-10-14 06:57:38 lastDurPresence 07:56:36
2015-10-14 06:57:38 lastDurPresence_cr 477
2015-10-14 18:45:06 lastLocation Bus
2015-10-14 06:57:38 lastMood calm
2015-10-14 18:49:47 lastState absent
2015-10-14 18:49:47 location home
2015-10-14 18:49:47 mood calm
2015-10-14 18:49:47 presence present
2015-10-14 18:49:47 state home
2015-10-12 08:15:03 wakeup 0
2015-10-11 21:35:25 wayhome 0
Timer:
Location_michael_durationtimer:
HASH location_michael
MODIFIER DurationTimer
NAME location_michael_DurationTimer
Attributes:
alias Location Michael
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 location
icon people_sensor
room Haus,Residents
rr_realname group
sortby 1
webCmd state
Gruß
Micha
Deinem Residents Objekt fehlen die Roommates im Internal. So gibt es keine Zuordnung welche Roommates zu diesem Residentsobjekt gehören.
Habe ich hier (http://www.fhemwiki.de/wiki/Anwesenheitserkennungl) was überlesen oder versteckt sich die Lösung woanders?
Gruß
Micha
Zitat von: mfeske am 14 Oktober 2015, 20:17:24
Habe ich [ur=http://www.fhemwiki.de/wiki/Anwesenheitserkennungl]hier[/url] was überlesen oder versteckt sich die Lösung woanders?
Gruß
Micha
Lese mal die Commandref zu Roommate und Residents.
define <rr_FirstName> ROOMMATE [<Device Name der Bewohnergruppe>]
Hallo CoolTux,
danke für den Hinweis auf die commandref (http://fhem.de/commandref_DE.html#ROOMMATE) , das wiki beschreibt ja die Vorgehensweise und ich habe ja auch:
define location_michael ROOMMATE Bewohner,Eltern
attr location_michael alias Location Michael
attr location_michael 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
attr location_michael group location
attr location_michael icon people_sensor
attr location_michael room Haus,Residents
attr location_michael rr_realname group
attr location_michael sortby 1
attr location_michael webCmd state
gesetzt. Ich gehe mal davon aus, das Firstname nicht zwangsläufig mit rr_ beginnen muss ?! Roommate funktioniert ja jetzt und zeigt mir verschiedene Statis an. Aber RESIDENTSscheint diese nicht auszuwerten obwohl mit define location_michael ROOMMATE Bewohner,Eltern gesetzt.
define Eltern RESIDENTS
attr Eltern alias Eltern
attr Eltern devStateIcon .*home:status_available:absent .*absent:status_away_1:home .*gone:status_standby:home .*none:control_building_empty .*gotosleep:status_night:asleep .*asleep:status_night:awoken .*awoken:status_available:home .*:user_unknown:home
attr Eltern group Home State
attr Eltern icon control_building_filled
attr Eltern room Haus,Residents
attr Eltern webCmd state
define Bewohner RESIDENTS
attr Bewohner alias Bewohner
attr Bewohner devStateIcon .*home:status_available:absent .*absent:status_away_1:home .*gone:status_standby:home .*none:control_building_empty .*gotosleep:status_night:asleep .*asleep:status_night:awoken .*awoken:status_available:home .*:user_unknown:home
attr Bewohner group Home State
attr Bewohner icon control_building_filled
attr Bewohner room Haus,Residents
attr Bewohner webCmd state
Es scheinen ja auch mal Daten dort gelandet zu sein:
Internals:
NAME Eltern
NR 390
NTFY_ORDER 50-Eltern
STATE absent
TYPE RESIDENTS
Readings:
2015-10-11 21:39:25 lastActivity absent
2015-10-11 21:39:25 lastActivityBy location_michael
2015-10-11 21:39:25 lastActivityByDev location_michael
2015-10-11 21:35:25 lastArrival 2015-10-11 21:35:25
2015-10-11 21:35:37 lastDeparture 2015-10-11 21:35:37
2015-10-11 21:35:37 lastDurPresence 00:00:12
2015-10-11 21:35:37 lastDurPresence_cr 0
2015-10-11 21:39:24 lastState gone
2015-10-11 21:35:37 presence absent
2015-10-11 21:39:24 residentsAbsent 1
2015-10-11 21:39:24 residentsAbsentDevs location_michael
2015-10-11 21:39:24 residentsAbsentNames location_michael
2015-10-11 21:35:25 residentsAsleep 0
2015-10-11 21:35:25 residentsAsleepDevs -
2015-10-11 21:35:25 residentsAsleepNames -
2015-10-11 21:35:25 residentsAwoken 0
2015-10-11 21:35:25 residentsAwokenDevs -
2015-10-11 21:35:25 residentsAwokenNames -
2015-10-11 21:39:24 residentsGone 0
2015-10-11 21:39:24 residentsGoneDevs -
2015-10-11 21:39:24 residentsGoneNames -
2015-10-11 21:35:37 residentsGotosleep 0
2015-10-11 21:35:37 residentsGotosleepDevs -
2015-10-11 21:35:37 residentsGotosleepNames -
2015-10-11 21:35:32 residentsHome 0
2015-10-11 21:35:32 residentsHomeDevs -
2015-10-11 21:35:32 residentsHomeNames -
2015-10-11 21:35:25 residentsTotal 1
2015-10-11 21:35:37 residentsTotalAbsent 1
2015-10-11 21:35:37 residentsTotalAbsentDevs location_michael
2015-10-11 21:35:37 residentsTotalAbsentNames location_michael
2015-10-11 21:35:25 residentsTotalGuests 0
2015-10-11 21:35:25 residentsTotalGuestsAbsent 0
2015-10-11 21:35:25 residentsTotalGuestsAbsentDevs -
2015-10-11 21:35:25 residentsTotalGuestsAbsentNames -
2015-10-11 21:35:25 residentsTotalGuestsPresent 0
2015-10-11 21:35:25 residentsTotalGuestsPresentDevs -
2015-10-11 21:35:25 residentsTotalGuestsPresentNames -
2015-10-11 21:35:37 residentsTotalPresent 0
2015-10-11 21:35:37 residentsTotalPresentDevs -
2015-10-11 21:35:37 residentsTotalPresentNames -
2015-10-11 21:35:25 residentsTotalWakeup 0
2015-10-11 21:35:25 residentsTotalWakeupDevs -
2015-10-11 21:35:25 residentsTotalWakeupNames -
2015-10-11 21:35:25 residentsTotalWayhome 0
2015-10-11 21:35:25 residentsTotalWayhomeDevs -
2015-10-11 21:35:25 residentsTotalWayhomeNames -
2015-10-11 21:39:24 state absent
Attributes:
alias Eltern
devStateIcon .*home:status_available:absent .*absent:status_away_1:home .*gone:status_standby:home .*none:control_building_empty .*gotosleep:status_night:asleep .*asleep:status_night:awoken .*awoken:status_available:home .*:user_unknown:home
group Home State
icon control_building_filled
room Haus,Residents
webCmd state
Aber ich werde jetzt für roomate als home angzeigt:
Internals:
DEF Bewohner,Eltern
NAME location_michael
NR 388
NTFY_ORDER 50-location_michael
RESIDENTGROUPS
STATE home
TYPE ROOMMATE
Readings:
2015-10-16 16:13:45 durTimerAbsence 00:00:00
2015-10-16 16:13:45 durTimerAbsence_cr 0
2015-10-16 17:01:45 durTimerPresence 00:48:00
2015-10-16 17:01:45 durTimerPresence_cr 48
2015-10-11 21:09:12 durTimerSleep 00:00:00
2015-10-11 21:09:12 durTimerSleep_cr 0
2015-10-16 16:13:45 lastArrival 2015-10-16 16:13:45
2015-10-16 07:02:22 lastDeparture 2015-10-16 07:02:22
2015-10-16 16:13:45 lastDurAbsence 09:11:23
2015-10-16 16:13:45 lastDurAbsence_cr 551
2015-10-16 07:02:22 lastDurPresence 12:48:34
2015-10-16 07:02:22 lastDurPresence_cr 769
2015-10-16 16:11:30 lastLocation Bus
2015-10-16 07:02:22 lastMood calm
2015-10-16 16:13:45 lastState absent
2015-10-16 16:13:45 location home
2015-10-16 16:13:45 mood calm
2015-10-16 16:13:45 presence present
2015-10-16 16:13:45 state home
2015-10-12 08:15:03 wakeup 0
2015-10-11 21:35:25 wayhome 0
Timer:
Location_michael_durationtimer:
HASH location_michael
MODIFIER DurationTimer
NAME location_michael_DurationTimer
Attributes:
alias Location Michael
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 location
icon people_sensor
room Haus,Residents
rr_realname group
sortby 1
webCmd state
Was aber RESIDENTS nicht zu interessieren scheint.
Gruß
Micha
Ich habe jetzt alle ROOMMATE neu angelegt und es funktioniert. Wunderbare Welt, vermutlich hatte ich irgendwo einen Syntaxfehler.
Gruß
Micha
Rolle rückwärts,
sobald ich die group auf location und den Alias auf den Vornamen geändert habe. Funktioniert es nicht mehr.
Wenn du den Vornamen im Attribut 'alias' führst, dann musst du auch das Attribut rr_realname entsprechend auf 'alias' setzen, damit die Module wissen, woher sie den Vornamen nehmen sollen.
Der FHEM Gerätename kann heißen wie er will. Wenn man ein ROOMMATE oder GUEST Device mit Hilfe des set-Kommandos in einem RESIDENTS Device anlegt, dann übergibt man dort der Einfachheit halber den Vornamen und es wird automatisch das Format rr_Vorname für den Gerätenamen verwendet.
Ein GUEST Device hat den Vornamen dann per Default im alias-Attribut, ein ROOMMATE per Default im group-Attribut. Hintergrund ist, dass ich davon ausgehe, dass man für diesen Bewohner auch noch mehr Einstellungen hat (z.B. einen Wakeuptimer), welcher dann auch in diese Gruppe einsortiert und somit alles zusammen dargestellt wird. Das kann man nach dem anlegen eines Devices beliebig ändern wie man möchte, es ist nur eine initiale Voreinstellung.
Prima, danke. Den Hintergrund hatte ich so nicht gesehen. Jetzt funktioniert es zuverlässig. Zu mindest home und absent. Die Fehler die entstehen dürften eher gerätebedingt sein.
Wichtig war mir erstmal home / absent, wenn jetzt noch egiGeozone zuverlässig funktioniert bin ich glücklich und zufrieden :-)
Gruß
Micha