mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-10 01:55:38 +00:00
PRESENCE: new reading "presence" which contains the current (or last known) presence state, which can be just "absent" or "present" (Forum: #29334)
git-svn-id: https://svn.fhem.de/fhem/trunk@7485 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2661c359f8
commit
da241c665a
@ -1,5 +1,7 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- feature: PRESENCE: new reading "presence" which contains the current (or last known)
|
||||
presence state (can be "absent" or "present")
|
||||
- bugfix: 70_Jabber.pm: hardening XML::Stream Process() call and fix of ssl_verify
|
||||
- feature: readingsGroup: allow devspec :FILTER= expressions in device selection
|
||||
- added: 73_km200.pm for the Buderus KM200 heating controller (Sailor)
|
||||
|
@ -423,10 +423,12 @@ PRESENCE_Read($)
|
||||
if($buf eq "absence")
|
||||
{
|
||||
readingsBulkUpdate($hash, "state", "absent");
|
||||
readingsBulkUpdate($hash, "presence", "absent");
|
||||
}
|
||||
elsif($buf =~ /present;(.+?)$/)
|
||||
{
|
||||
readingsBulkUpdate($hash, "state", "present");
|
||||
readingsBulkUpdate($hash, "presence", "present");
|
||||
|
||||
if($1 =~ /^(.*);(.+)$/)
|
||||
{
|
||||
@ -941,6 +943,7 @@ PRESENCE_ProcessLocalScan($)
|
||||
if($a[2] eq "present")
|
||||
{
|
||||
readingsBulkUpdate($hash, "state", "present");
|
||||
readingsBulkUpdate($hash, "presence", "present");
|
||||
readingsBulkUpdate($hash, "device_name", $a[3]) if(defined($a[3]) and $hash->{MODE} =~ /^(lan-bluetooth|local-bluetooth)$/ );
|
||||
|
||||
if($hash->{MODE} eq "fritzbox" and defined($a[4]))
|
||||
@ -951,7 +954,7 @@ PRESENCE_ProcessLocalScan($)
|
||||
elsif($a[2] eq "absent")
|
||||
{
|
||||
readingsBulkUpdate($hash, "state", "absent");
|
||||
|
||||
readingsBulkUpdate($hash, "presence", "absent");
|
||||
if($hash->{MODE} eq "fritzbox" and defined($a[4]))
|
||||
{
|
||||
readingsBulkUpdate($hash, "speed", $a[4]);
|
||||
@ -1243,7 +1246,8 @@ Options:
|
||||
<ul>
|
||||
<u>General Events:</u><br><br>
|
||||
<ul>
|
||||
<li><b>state</b>: $state (absent|present|disabled|error|timeout) - The state of the device or "disabled" when the disable attribute is enabled</li>
|
||||
<li><b>state</b>: (absent|present|disabled|error|timeout) - The state of the device or "disabled" when the disable attribute is enabled</li>
|
||||
<li><b>presence</b>: (absent|present) - The state of the device</li>
|
||||
<li><b>powerCmd</b>: (executed|failed) - power command was executed or has failed</li>
|
||||
</ul><br><br>
|
||||
<u>Bluetooth specific events:</u><br><br>
|
||||
@ -1488,7 +1492,8 @@ Options:
|
||||
<ul>
|
||||
<u>Generelle Events:</u><br><br>
|
||||
<ul>
|
||||
<li><b>state</b>: $state (absent|present|disabled|error|timeout) - Der Anwesenheitsstatus eine Gerätes (absent = abwesend; present = anwesend) oder "disabled" wenn das disable-Attribut aktiviert ist</li>
|
||||
<li><b>state</b>: (absent|present|disabled|error|timeout) - Der Anwesenheitsstatus eine Gerätes (absent = abwesend; present = anwesend) oder "disabled" wenn das disable-Attribut aktiviert ist</li>
|
||||
<li><b>presence</b>: (absent|present) - Der Anwesenheitsstatus eine Gerätes (absent = abwesend; present = anwesend)</li>
|
||||
<li><b>powerCmd</b>: (executed|failed) - Ausführung des power-Befehls war erfolgreich.</li>
|
||||
</ul><br><br>
|
||||
<u>Bluetooth-spezifische Events:</u><br><br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user