Beleuchtung einschalten wenn ich nach Hause komme

Begonnen von reimundko, 16 Dezember 2017, 14:50:56

Vorheriges Thema - Nächstes Thema

CoolTux

Wie Otto schon sagt, es geht nicht darum ins Log zu schreiben sondern wann wie ein Event erzeugt werden soll auf das Dein DOIF am Ende triggert (anspricht)
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Caleus

OK ich danke euch

also am besten unter PRESENCE absencetimeout setzen.

Caleus

Otto123

Kenne ich (noch) nicht, aber wenn ich die Doku lese:
Zitatevent - A presence check by listening to FHEM events of other definitions.
...
absenceTimeout

(only in mode "event" applicable)
The timeout after receiving an "absent" event, before the state of the PRESENCE definition is switched to "absent". This can be used to verify the permanent absence by waiting a specific time frame to not receive an "present" event. If this timeout is reached with no "present" event received in the meantime, the presence state will finally be set to "absent". The timeout is given in HH:MM:SS format, where hours and minutes are optional. If this attribute is set to a valid value, the reading state and presence will be set to "maybe absent" during the absence verification.

Default Value is 0 (no absence verification)
Bist Du im event Mode?
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Caleus

Tja du da bin ich überfragt. Ich wüste nicht mal wo man das einstellt ?

Caleus

Otto123

"eingestellt" wird das nicht, das ist eine Frage Deiner Definition / des Modus:
ZitatThe PRESENCE module provides several possibilities to check the presence of mobile phones or similar mobile devices such as tablets.

This module provides several operational modes to serve your needs. These are:

lan-ping - A presence check of a device via network ping in your LAN/WLAN.
fritzbox - A presence check by requesting the device state from the FritzBox internals (only available when running FHEM on a FritzBox!).
local-bluetooth - A presence check by searching directly for a given bluetooth device nearby.
function - A presence check by using your own perl function which returns a presence state.
shellscript - A presence check by using an self-written script or binary which returns a presence state.
event - A presence check by listening to FHEM events of other definitions.
lan-bluetooth - A presence check of a bluetooth device via LAN network by connecting to a presenced or collectord instance.

Each mode can be optionally configured with a specific check interval and a present check interval.

check-interval - The interval in seconds between each presence check. Default value: 30 seconds
present-check-interval - The interval in seconds between each presence check in case the device is present. Otherwise the normal check-interval will be used.


Define

Mode: lan-ping

define <name> PRESENCE lan-ping <ip-address> [ <check-interval> [ <present-check-interval> ] ]

Checks for a network device via PING requests and reports its presence state.

Example

define iPhone PRESENCE lan-ping 192.168.179.21
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Caleus

Ich habe keine Ahnung sorry.

Aber hier mal die RAW Definition

defmod PBT PRESENCE local-bluetooth 1C:23:2C:xx:xx:xx
attr PBT userattr presence presence_map structexclude
attr PBT event-on-change-reading state
attr PBT presence Anwesenheit

setstate PBT present
setstate PBT 2018-10-16 21:02:46 .absenceThresholdCounter 0
setstate PBT 2018-10-16 21:02:46 .presenceThresholdCounter 0
setstate PBT 2018-10-16 21:02:46 device_name Samsung Galaxy S7 P
setstate PBT 2018-10-13 15:21:44 model local-bluetooth
setstate PBT 2018-10-16 21:02:46 presence present
setstate PBT 2018-10-16 21:02:46 state present


und 2 Bilder im Anhang.

Caleus

Otto123

Ich habe auch keine Ahnung aber
Zitatdefmod PBT PRESENCE local-bluetooth 1C:23:2C:xx:xx:xx
Du verwendest local-bluetooth und nicht event.

Zumindest verstehe ich die Doku so  8)
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

CoolTux

Mach mal so


defmod PBT PRESENCE local-bluetooth 1C:23:2C:xx:xx:xx 10 60
attr PBT absenceThreshold 24

Bei Abwesenheit prüft er alle 10s auf Anwesenheit und bei Anwesenheit alle 60s ob Du Abwesend bist.
Ausserdem wechselt er erst nach 24x10s Abwesenheit tatsächlich in den absent, vorher bist Du maybe absent
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Caleus

Leider klapt es bis jetzt nicht, es triggert auch wenn wir zu hause sind.

CoolTux

Ein list aller presence Device und des DOIF bitte.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net