[gelöst] Heating Control mit Devolo/Danfoss Thermostaten?

Begonnen von Ronaldo, 01 Dezember 2016, 21:50:10

Vorheriges Thema - Nächstes Thema

Ronaldo

Ein frohes neues Jahr wünsche ich. :)

Zitat von: Dietmar63 am 31 Dezember 2016, 18:34:44
Versuch es mal einfach mit einem Leerzeichen
Geht nicht, dann nimmt er keinen der beiden Fensterkontakte...

Apropro...
wie ist das, wenn mir nicht der state das open oder closed liefert, sondern das Reading alarm?
Hintergrund ist, dass ich die Tür-/Fensterkontakte von Fibaro habe. Werksseitig liefern die über das Reading state entweder "open" oder "closed".
Nun kann man die aber zusätzlich mit einem Temperatursensor bestücken, was ich bei beiden Kontakten im Kinderzimmer getan habe. Dann liefert das Reading state aber nur "wakeupInterval 86400 1" und das Reading alarm liefert mir " AccessControl: Window/Door is closed" bzw. " AccessControl: Window/Door is open".
Am besten das ganze dann über einen dummy laufen lassen, oder?

Dietmar63

auch ein frohes neues Jahr

  my %contacts =  ( "CUL_FHTTK"       => { "READING" => "Window",          "STATUS" => "(Open)",        "MODEL" => "r" },
                    "CUL_HM"          => { "READING" => "state",           "STATUS" => "(open|tilted)", "MODEL" => "r" },
                    "EnOcean"         => { "READING" => "state",           "STATUS" => "(open)",        "MODEL" => "r" },
                    "ZWave"           => { "READING" => "state",           "STATUS" => "(open)",        "MODEL" => "r" },
                    "MAX"             => { "READING" => "state",           "STATUS" => "(open.*)",      "MODEL" => "r" },
                    "WeekdayTimer"    => { "READING" => "delayedExecution","STATUS" => "^1\$",          "MODEL" => "a" },
                    "Heating_Control" => { "READING" => "delayedExecution","STATUS" => "^1\$",          "MODEL" => "a" }
                  );
                 
  my $fensterKontakte = AttrVal($hash->{NAME}, "windowSensor", "")." ".$hash->{NAME};
  $fensterKontakte =~ s/^\s+//;
  $fensterKontakte =~ s/\s+$//;
 
  Log3 $hash, 4, "[$name] list of window sensors found: '$fensterKontakte'";
  if ($fensterKontakte ne "" ) {
     my @kontakte = split("[ \t]+", $fensterKontakte);
     foreach my $fk (@kontakte) {


im obigen Code wird klar, dass nur bestimmte Fensterkontakttypen automatisch erkannt werden.
Die Liste der Fensterkontakte wir nach Leerzeichen gesplittet.

Schalte mal mit verbose 5 die Protokollierung ein, dann kannst du die Details besser verfolgen.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Dietmar63

98_WeekdayTimer, 98_Heating_Contorl:  a new try to use a new method to check if a device is a heating - the new method is very easy, it checks if a device understand desired-temp ....

The  first version, that was checked in, was causing errors.

Zwave, Devolo + FBDECT sollten nun erkannt werden. Bitte prüfen. Mangels Hardware kann ich nicht wirklich testen
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Ronaldo

#33
Hmm... :(

Habe das {fhem("set $NAME thermostatSetpointSet $EVENT")} im Bad wieder durch ein {Heating_Control_SetTemp("Heizung_Bad")} ersetzt gehabt und er schaltet aber das SetAllTemps() kommt im Thermostat nicht an.
2017.01.03 19:49:02 3: ZWave set Thermostat_WZ thermostatSetpointSet 17.0
2017.01.03 19:49:02 3: ZWave set Thermostat_Bad thermostatSetpointSet 17.0
2017.01.03 19:49:02 3: ZWave set Thermostat_KiZ thermostatSetpointSet 17.0
2017.01.03 19:49:52 3: Heating_Control_SetAllTemps() done on: Heizung_Bad Heizung_KiZ Heizung_WZ

Die ersten drei Zeilen sind das Ausschalten der Heizungsautomatik (dort werden die Temperaturen aber auch per ThermostatSetpointSet gesetzt. Die vierte Zeile ist dann das Wiedereinschalten.

Das HC_Bad im verbose 5:
2017.01.03 19:57:30 3: ZWave set Thermostat_WZ thermostatSetpointSet 17.0
2017.01.03 19:57:30 3: ZWave set Thermostat_Bad thermostatSetpointSet 17.0
2017.01.03 19:57:30 3: ZWave set Thermostat_KiZ thermostatSetpointSet 17.0
2017.01.03 19:57:35 4: Thermostat_Bad 2017-01-03 16:30:00 12455s
2017.01.03 19:57:35 5: [Heizung_Bad] setting  Timer: Heizung_Bad_3 2017-01-03 16:30:00
2017.01.03 19:57:35 4: [Heizung_Bad] device type heating recognized, setModifier:desired-temp
2017.01.03 19:57:35 4: [Heizung_Bad] time=16:30/1483457400 delay=12455, nextDelay=12540, nextRetry=1483469940
2017.01.03 19:57:35 4: [Heizung_Bad] delayedExecutionCond:0
2017.01.03 19:57:35 4: [Heizung_Bad] result of delayedExecutionCond:0
2017.01.03 19:57:35 4: [Heizung_Bad] list of window sensors found: 'Fenster_Bad Heizung_Bad'
2017.01.03 19:57:35 5: [Heizung_Bad] sensor 'Fenster_Bad' Reading/Attribute 'state' is 'wakeupInterval 86400 1'
2017.01.03 19:57:35 4: [Heizung_Bad] condition: - Tage:7,8
2017.01.03 19:57:35 5: [Heizung_Bad] condition: {my $days={};;map{$days->{$_}=1}();;;;( 1 && (defined $days->{$wday} ||  $we || !$we))}
2017.01.03 19:57:35 5: [Heizung_Bad] result of condition:1
2017.01.03 19:57:35 4: [Heizung_Bad] condition: - Tage:8
2017.01.03 19:57:35 5: [Heizung_Bad] condition: {my $days={};;map{$days->{$_}=1}();;;;( 1 && (defined $days->{$wday} || !$we))}
2017.01.03 19:57:35 5: [Heizung_Bad] result of condition:1
2017.01.03 19:57:35 4: [Heizung_Bad] Update   - past timer activated
2017.01.03 19:57:35 4: [Heizung_Bad] device type heating recognized, setModifier:desired-temp
2017.01.03 19:57:35 4: [Heizung_Bad] aktParam: newParam:21.0 - is  not disabled
2017.01.03 19:57:35 4: [Heizung_Bad] command: '{if (ReadingsVal("HeizungsAutomatik", "state", "") eq "on") {Heating_Control_SetTemp("Heizung_Bad")}}' executed with %EVENT=>21.0,%NAME=>Thermostat_Bad
2017.01.03 19:57:40 5: [Heizung_Bad] removing Timer: Heizung_Bad_4
2017.01.03 19:57:40 5: [Heizung_Bad] removing Timer: Heizung_Bad_3
2017.01.03 19:57:40 5: [Heizung_Bad] removing Timer: Heizung_Bad_7
2017.01.03 19:57:40 4: [Heizung_Bad] device type heating recognized, setModifier:desired-temp
2017.01.03 19:57:40 4: [Heizung_Bad] Heating recognized - switch in the past activated
2017.01.03 19:57:40 4: [Heizung_Bad] condition: - Tage:8
2017.01.03 19:57:40 5: [Heizung_Bad] condition: {my $days={};;map{$days->{$_}=1}();;;;( 1 && (defined $days->{$wday} || !$we))}
2017.01.03 19:57:40 5: [Heizung_Bad] result of condition:1
2017.01.03 19:57:40 4: [Heizung_Bad] condition: - Tage:8
2017.01.03 19:57:40 5: [Heizung_Bad] condition: {my $days={};;map{$days->{$_}=1}();;;;( 1 && (defined $days->{$wday} || !$we))}
2017.01.03 19:57:40 5: [Heizung_Bad] result of condition:1
2017.01.03 19:57:40 4: [Heizung_Bad] condition: - Tage:8
2017.01.03 19:57:40 5: [Heizung_Bad] condition: {my $days={};;map{$days->{$_}=1}();;;;( 1 && (defined $days->{$wday} || !$we))}
2017.01.03 19:57:40 5: [Heizung_Bad] result of condition:1
2017.01.03 19:57:40 4: [Heizung_Bad] condition: - Tage:8
2017.01.03 19:57:40 5: [Heizung_Bad] condition: {my $days={};;map{$days->{$_}=1}();;;;( 1 && (defined $days->{$wday} || !$we))}
2017.01.03 19:57:40 5: [Heizung_Bad] result of condition:1
2017.01.03 19:57:40 4: [Heizung_Bad] setTimer - timer seems to be active today: 8|22:00|18
2017.01.03 19:57:40 5: [Heizung_Bad] setting  Timer: Heizung_Bad_4 2017-01-03 22:00:00
2017.01.03 19:57:40 4: [Heizung_Bad] condition: - Tage:7
2017.01.03 19:57:40 5: [Heizung_Bad] condition: {my $days={};;map{$days->{$_}=1}();;;;( 1 && (defined $days->{$wday} ||  $we))}
2017.01.03 19:57:40 5: [Heizung_Bad] result of condition:0
2017.01.03 19:57:40 4: [Heizung_Bad] condition: - Tage:7
2017.01.03 19:57:40 5: [Heizung_Bad] condition: {my $days={};;map{$days->{$_}=1}();;;;( 1 && (defined $days->{$wday} ||  $we))}
2017.01.03 19:57:40 5: [Heizung_Bad] result of condition:0
2017.01.03 19:57:40 4: [Heizung_Bad] condition: - Tage:7
2017.01.03 19:57:40 5: [Heizung_Bad] condition: {my $days={};;map{$days->{$_}=1}();;;;( 1 && (defined $days->{$wday} ||  $we))}
2017.01.03 19:57:40 5: [Heizung_Bad] result of condition:0
2017.01.03 19:57:40 4: [Heizung_Bad] setTimer - timer seems to be NOT active today: 7|22:00|18
2017.01.03 19:57:40 5: [Heizung_Bad] setting  Timer: Heizung_Bad_7 2017-01-03 22:00:00
2017.01.03 19:57:40 4: [Heizung_Bad] time=16:30/1483457400 delay=12460, nextDelay=12540, nextRetry=1483469940
2017.01.03 19:57:40 4: [Heizung_Bad] delayedExecutionCond:0
2017.01.03 19:57:40 4: [Heizung_Bad] result of delayedExecutionCond:0
2017.01.03 19:57:40 4: [Heizung_Bad] list of window sensors found: 'Fenster_Bad Heizung_Bad'
2017.01.03 19:57:40 5: [Heizung_Bad] sensor 'Fenster_Bad' Reading/Attribute 'state' is 'wakeupInterval 86400 1'
2017.01.03 19:57:40 4: [Heizung_Bad] past timer on Thermostat_Bad at 2017-01-03 16:30:00 with  21 activated
2017.01.03 19:57:40 5: [Heizung_Bad] removing Timer: Heizung_Bad_delayed
2017.01.03 19:57:40 5: [Heizung_Bad] setting  Timer: Heizung_Bad_delayed 2017-01-03 19:57:45
2017.01.03 19:57:40 5: [Heizung_Bad] removing Timer: Heizung_Bad_delayed
2017.01.03 19:57:40 5: [Heizung_Bad] setting  Timer: Heizung_Bad_delayed 2017-01-03 19:57:45
2017.01.03 19:57:40 5: [Heizung_Bad] removing Timer: Heizung_Bad_delayed
2017.01.03 19:57:40 5: [Heizung_Bad] setting  Timer: Heizung_Bad_delayed 2017-01-03 19:57:45
2017.01.03 19:57:40 3: Heating_Control_SetAllTemps() done on: Heizung_Bad Heizung_KiZ Heizung_WZ

Der komplette [Heizung_Bad]-Block kommt im 5-Sekunden-Takt...
Als Window-Sensor ist übrigens nur Fenster_Bad eingetragen...

Wenn ich im HC das {fhem("set $NAME thermostatSetpointSet $EVENT")} drinstehen habe läuft eigentlich alles so wie es soll.

Dietmar63

wie hast du das gemacht?


Habe das {fhem("set $NAME thermostatSetpointSet $EVENT")} im Bad wieder durch ein {Heating_Control_SetTemp("Heizung_Bad")} ersetzt gehabt und er schaltet aber das SetAllTemps() kommt im Thermostat nicht an.


bitte den kompletten Code veröffentlichen
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Ronaldo

Das Heating Control:
Thermostat_Bad 8|04:44|22 8|06:30|18 8|16:30|21 8|22:00|18 7|05:55|22 7|09:00|21 7|22:00|18 {if (ReadingsVal("HeizungsAutomatik", "state", "") eq "on") {fhem("set $NAME thermostatSetpointSet $EVENT")}}

Der HC-Aktivator:
([HeizungsAutomatik] eq "on") ({Heating_Control_SetAllTemps()},set teleBot message Heizungsautomatik aktiv!) DOELSE (set Heizungsventile thermostatSetpointSet 17.0,set teleBot message Heizungsautomatik deaktiviert!)

Der Fensterkontakt:
([Fenster_Bad:alarm] eq "AccessControl: Window/Door is open") (set Thermostat_Bad thermostatSetpointSet 11) DOELSE ({Heating_Control_SetTemp("Heizung_Bad")})

Dietmar63

#36
Also das Problem, dass jetzt im 5-SekundenTakt immer wieder etwas geschaltet wird, liegt meiner Meinung nach an den DOIFs.
Ich kann dir aber nicht sagen was die wie machen.

Es handelt sich bei ihnen um so etwas wie Multinotify. Jedenfalls habe ich sie unter diesem Namen abgespeichert.
Mit anderen Worten - wenn irgendwie Ereignisse erzeugt werden, auf die die DOIFs reagieren, werden die THEN oder ELSE Zweige ausgeführt.

Man kann es sogar schaffen Zirkelbezüge(wie in Excel) zu erzeugen. Vielleicht ist das hier irgendwie der Fall.
Gruß Dietmar
FB7390, CUL, 2 FHT, FS20
modules: 98_WOL.pm, 98_Heating_Control.pm,   98_WeekdayTimer.pm, 98_RandomTimer.pm, 59_Twilight.pm

Ronaldo

Nagut, vielleicht nehme ich mich des Problems nochmal in einer ruhigeren Stunde an.
Momentan funktioniert ja alles genau so, wie es sein soll. ;)
In jedem Fall hast du mir sehr dabei geholfen nicht mit hunderten von ats arbeiten zu müssen. Danke!

Nun muss ich mir nur noch überlegen, wie ich meinen Urlaubs-dummy nutze um die Schaltzeiten entsprechend der vom Wochenende zu nutzen...