Zonen-basierte Anwesenheitserkennung und -steuerung

Begonnen von KernSani, 15 März 2019, 19:06:04

Vorheriges Thema - Nächstes Thema

slor

So siehts aus, wenn ich Einschalte:
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS hmstate: off
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS 4.STATE: on
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS control: on
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS on
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS 3.STATE: on
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS 5.STATE: off
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS hmstate: on
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS 6.STATE: off
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS hmstate: on


So beim Ausschalten:
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS hmstate: on
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS 4.STATE: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS control: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS 3.STATE: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS 5.STATE: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS hmstate: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS 6.STATE: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS hmstate: off
Fhem auf Raspberry Pi 4
CCU3 mit RaspberryMatic mit HMCCU an FHEM
HMCCU, Telegram, Conbee2 und Hue/Tradfri/Osram Lampen AQARA Sensoren, HomeConnect

slor

Zitat von: KernSani am 14 April 2021, 23:48:55
Neue Version mit Implementierung eines "doAlways" Attributes ist am ersten Post angehängt. Doku des Attributes ist ebenfalls im ersten Post.

Cool, dass es so schnell weiter geht hier!
Ich teste morgen mal.
Könntest du noch einen Zeitstempel an deine Versionsnummern machen? So kann man nach längerer Zeit sehen ob man die neuste Version hat (Ohne sein Fhem prüfen zu müssen :-))

Für den Haussegen wäre jetzt die Tageszeit abhängigen CMDs wichtig :-)
Fhem auf Raspberry Pi 4
CCU3 mit RaspberryMatic mit HMCCU an FHEM
HMCCU, Telegram, Conbee2 und Hue/Tradfri/Osram Lampen AQARA Sensoren, HomeConnect

binford6000

Zitat von: slor am 15 April 2021, 00:00:18
Cool, dass es so schnell weiter geht hier!

Finde ich auch!
Was mir noch aufgefallen ist: ein
reload 98_homezone.pm
genügt anscheinend nicht um die neue Version anzuzeigen. Erst ein shutdown restart zeigt auch die korrekte Version an. Ist das nur kosmetisch im Internal oder benötigt homezone tatsächlich einen Neustart?

VG Sebastian

KernSani

Zitat von: binford6000 am 15 April 2021, 09:56:48
Finde ich auch!
Was mir noch aufgefallen ist: ein
reload 98_homezone.pm
genügt anscheinend nicht um die neue Version anzuzeigen. Erst ein shutdown restart zeigt auch die korrekte Version an. Ist das nur kosmetisch im Internal oder benötigt homezone tatsächlich einen Neustart?
VG Sebastian
Nee, Neustart ist nicht notwendig. Ich setze die Versionsnummer allerdings im DEFINE, daher wird die bei einem reload nicht aktualisiert (wenn du wert darauf legst, sollte ein DEFMOD aber ausreichen).

Ich bin gerade noch dran, die commandref fertig zu machen und dann würde ich das Ding auch endlich mal ins SVN einchecken, dann wird das mit der Versionierung auch wieder einfacher/weniger relvant...


RasPi: RFXTRX, HM, zigbee2mqtt, mySensors, JeeLink, miLight, squeezbox, Alexa, Siri, ...

binford6000

ZitatNee, Neustart ist nicht notwendig. Ich setze die Versionsnummer allerdings im DEFINE, daher wird die bei einem reload nicht aktualisiert (wenn du wert darauf legst, sollte ein DEFMOD aber ausreichen).

Ah OK. Wie gesagt ist mir nur aufgefallen.

ZitatIch bin gerade noch dran, die commandref fertig zu machen und dann würde ich das Ding auch endlich mal ins SVN einchecken, dann wird das mit der Versionierung auch wieder einfacher/weniger relvant...

Das wird auch wirklich mal Zeit  ;D ;D

VG Sebastian

KernSani

Zitat von: slor am 14 April 2021, 23:57:18
So siehts aus, wenn ich Einschalte:
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS hmstate: off
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS 4.STATE: on
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS control: on
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS on
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS 3.STATE: on
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS 5.STATE: off
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS hmstate: on
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS 6.STATE: off
2021-04-14 23:51:55 HMCCUDEV DG_AZ_WS hmstate: on


So beim Ausschalten:
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS hmstate: on
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS 4.STATE: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS control: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS 3.STATE: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS 5.STATE: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS hmstate: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS 6.STATE: off
2021-04-14 23:54:50 HMCCUDEV DG_AZ_WS hmstate: off

Das ist ja total wirr... Da kann ja eigentlich kein notify/doif vernünftig funktionieren. Was ist denn das für ein Gerät?
RasPi: RFXTRX, HM, zigbee2mqtt, mySensors, JeeLink, miLight, squeezbox, Alexa, Siri, ...

slor

Es handet sich um einen HmIP-BSM and einer HMCCU.

Ich hab mal event-on-change-reading gesetzt.

Damit sieht ein und ausschalten viel besser aus.

2021-04-16 16:06:51 HMCCUDEV DG_AZ_WS on
2021-04-16 16:06:51 HMCCUDEV DG_AZ_WS 4.STATE: on
2021-04-16 16:06:51 HMCCUDEV DG_AZ_WS control: on
2021-04-16 16:06:51 HMCCUDEV DG_AZ_WS on
2021-04-16 16:06:51 HMCCUDEV DG_AZ_WS hmstate: on
2021-04-16 16:06:52 HMCCUDEV DG_AZ_WS 3.STATE: on


2021-04-16 16:06:55 HMCCUDEV DG_AZ_WS off
2021-04-16 16:06:56 HMCCUDEV DG_AZ_WS 4.STATE: off
2021-04-16 16:06:56 HMCCUDEV DG_AZ_WS control: off
2021-04-16 16:06:56 HMCCUDEV DG_AZ_WS off
2021-04-16 16:06:56 HMCCUDEV DG_AZ_WS hmstate: off
2021-04-16 16:06:57 HMCCUDEV DG_AZ_WS 3.STATE: off
Fhem auf Raspberry Pi 4
CCU3 mit RaspberryMatic mit HMCCU an FHEM
HMCCU, Telegram, Conbee2 und Hue/Tradfri/Osram Lampen AQARA Sensoren, HomeConnect

slor

Damit klappt das jetzt mit der Zone auch. Licht aus = Absence. Licht an = Licht an und sonst nix :-)

DoAlways klappt übrigens auch!
Fhem auf Raspberry Pi 4
CCU3 mit RaspberryMatic mit HMCCU an FHEM
HMCCU, Telegram, Conbee2 und Hue/Tradfri/Osram Lampen AQARA Sensoren, HomeConnect

KernSani

#188
und schon ist das Backlog (so gut wie) abgearbeitet. Am ersten Post hängt eine neue Version, die

* eine Doku hat
perl /opt/fhem/contrib/commandref_join.pl /opt/fhem/FHEM/98_homezone.pm ausführen, nach dem Upload
* es erlaubt tageszeitanhängige Befehle zu definieren, und zwar so:
attr hz_test hz_cmd_absent set hz_light off\
night:set hz_light 100

also: im jeweilgen Command-Attribut durch Zeilenumbruch getrennt und die jeweilige Tageszeit (mit ":") vor das Kommando gestellt. Die Zeile ohne Tageszeit wird ausgeführt, wenn keine passende tageszeit gefunden wird.

Bitte mal intensiv testen. Das ist der Release-Kandidat für ein Einchecken ins SVN (heißt, die offizielle FHEM Distribution)
RasPi: RFXTRX, HM, zigbee2mqtt, mySensors, JeeLink, miLight, squeezbox, Alexa, Siri, ...

enno

#189
Moin

habe die Version von heute eingebaut. Klappt bisher alles ohne Fehler :) Vielen Dank!!

Eine Wunsch rein optischer Natur. Kannst du den Attribut Felder die Option "textField-long" mitgeben?

Ich habe das zur Zeit bei mir mit: widgetOverride hz_openEvent:textField-long

Frage: was bedeutet die Meldung im Log: "2021.04.17 09:11:22 1: [homezone - HAUS]: Commands extracted"

Gruss
  Enno
Einfacher FHEM Anwender auf Intel®NUC

KernSani

Moin Enno,
Danke für's testen. Textfield-long werde ich einbauen, wo es noch nicht der Fall ist.
Die Meldung kannst du ignorieren, da habe ich wohl vergessen eine Debug-Meldung auszubauen.
Schönes WE,
Oli
RasPi: RFXTRX, HM, zigbee2mqtt, mySensors, JeeLink, miLight, squeezbox, Alexa, Siri, ...

KernSani

Kleinigkeiten, die Enno festgestellt hat erledigt (1. Post)
RasPi: RFXTRX, HM, zigbee2mqtt, mySensors, JeeLink, miLight, squeezbox, Alexa, Siri, ...

binford6000

Zitat von: KernSani am 18 April 2021, 00:40:25
Kleinigkeiten, die Enno festgestellt hat erledigt (1. Post)

Moin Oli,
mit der letzten Version:
defmod master_zone homezone
kommt
Global symbol "$empty" requires explicit package name (did you forget to declare "my $empty"?) at ./FHEM/98_homezone.pm line 425.
Das Internal version ist auch tatsächlich ganz empty:
Internals:
   DEF       
   FUUID      5ee85396-f33f-0308-77d7-0def9be885317600
   FVERSION   98_homezone.pm:v0.0.17-s18522/2019-02-07
   NAME       master_zone
   NR         234
   NTFY_ORDER 50-master_zone
   STATE      inactive
   TYPE       homezone
   VERSION   
   READINGS:
     2021-04-17 12:41:50   associatedWith 
     2021-03-27 19:24:05   condition       closed
     2021-03-27 23:16:22   lastChild       bu_zone
     2021-03-27 23:16:22   lastDayTime     evening
     2021-03-27 23:16:22   lastLumi        6
     2021-03-27 23:16:22   lastZone        bu_zone
     2021-03-27 23:16:22   occupied        100
     2021-03-27 23:40:15   state           inactive


VG Sebastian

enno

Moin Oli,

wenn ich in Zeile 424
    if (    $leafChild eq $empty
in     if (    $leafChild eq $EMPTY
änder, läuft es mit der Version von heute Morgen.

Gruss
  Enno
Einfacher FHEM Anwender auf Intel®NUC

rippi46

Hi Oli,

wollte gerade die neue Version testen, bekomme aber folgende Fehlermeldung:

ERROR:
Global symbol "$empty" requires explicit package name (did you forget to declare "my $empty"?) at ./FHEM/98_homezone.pm line 425.


Gruß Hartmut
FHEM, LMS, VDR ,Dell 9010 Ubuntu 20.04,Raspimatic, HM/HMIP, Max, Elro, Brennenstuhl u. Intertechno mit Connair.
Picoreplayer, Raspi IR-Lanadapter, Firmata(wifi), LaCrosse,
nanocul433, nanocul868, Signalduino, Connexoon,
MySensor-GW+Sensoren, RGBWW, Zigbee2mqtt,Xiaomi,Nextion,LEDMatrix,Alexa