Fensterkontakt Menu Manual

Support for our english speaking visitors

Moderator: Co-Administratoren

Antworten
petitbarzun
Beiträge: 8
Registriert: 21.02.2010, 19:16
Wohnort: France
Kontaktdaten:

Fensterkontakt Menu Manual

Beitrag von petitbarzun » 03.03.2010, 18:39

Sorry for using English, but my German writing is not good enough.

I have connected both the "Fensterkontakt" and "Wandthermostat". There are two ways to let the "Wandthermostat" react to the open/close status of the Fensterkontakt.

In "Directe Verknüpfung", the thermostat shows the window open, but does not change set temperature when the thermostat is set to "manual". It does change temperature when set to "auto".

Alternatively, using a program to set the temperature does work both in manual and in auto mode, but it does not show the window "open" state in the display.

Is there a reason why "directe verknüpfung" does not work in manual mode?
Zuletzt geändert von Roland M. am 30.10.2018, 10:31, insgesamt 1-mal geändert.
Grund: Thema verschoben

teddy278

Re: Fensterkontakt Menu Manual

Beitrag von teddy278 » 03.03.2010, 19:53

Dieser Beitrag wurde durch den Autor entfernt.
Zuletzt geändert von teddy278 am 12.06.2011, 00:52, insgesamt 1-mal geändert.

petitbarzun
Beiträge: 8
Registriert: 21.02.2010, 19:16
Wohnort: France
Kontaktdaten:

Re: Fensterkontakt Menu Manual

Beitrag von petitbarzun » 06.03.2010, 22:12

Thanks Teddy!

To cope with the two modes, I made two scripts with the following purpose:
a) react to an open kontakt, set the temperature to a lower point
b) on close contact, set the temperature to the original value
c) do this both for "manual" and "auto" mode

First I configured a "Direkte Verknüpfung" between the Funk- Tür- / Fensterkontakt and the Funk- Wandthermostat. This will let the Wandthermostat react directly to open/close events. It will also show the Open Window symbol in the display when the contact is openened.
With just the directe verknüpfung, the behavior is as follows:
- Manual: the open window is shown, but the temperature does not change
- Auto: the open window is shown, temperature is lowered, but after closure it sets the temperature back to the default temperature, not the last set temperature.

So I did the following:
I created a System Variable that will hold the set temperature while the thermostat is set to low temperature. In my case, it is called PZSavTemp.

Next create a program that will react to the contact events:
Bild
I put in a delay in reacting to the close event, to make sure it does not happen before the close event of the direkte verknüpfung.

There are two scripts in this program:
Open:

Code: Alles auswählen

!Prive Zolder Kontakt open actie
var savTemp = dom.GetObject("PZSavTemp"); !Get the system variable that will hold the set temperature
var device = dom.GetObject("Prive Zolder Therm");!Name of the thermostat

real open_temp = 14; 	!temp open window
real set_current ;     ! Die aktuelle Solltemperatur im Raumthermostat
   
object  therm = dom.GetObject("BidCos-RF." # device.Address() # ":2.SETPOINT");  ! Datenobjekt des Reglers für die Solltemperatur (Kanal 2)
set_current = therm.Value();
if (set_current > open_temp) {
	savTemp.Variable(set_current);	!Save the set temp
}

if (open_temp <> set_current ) {
therm.State(open_temp);
}
and close, which uses the saved Set temperature

Code: Alles auswählen

!Prive Zolder Kontakt close action
var savTemp = dom.GetObject("PZSavTemp"); !System variable holding the Set temperature before opening
var device = dom.GetObject("Prive Zolder Therm");  !Name of the thermostat

!get the device value
object  therm = dom.GetObject("BidCos-RF." # device.Address() # ":2.SETPOINT");

real  set_new = savTemp.Variable();	!get the set temp
therm.State(set_new);

I am a newby, just got the HomeMatic last week, so any comments are welcome!
Dateianhänge
Kontakt.jpg

petitbarzun
Beiträge: 8
Registriert: 21.02.2010, 19:16
Wohnort: France
Kontaktdaten:

Re: Fensterkontakt Menu Manual

Beitrag von petitbarzun » 08.03.2010, 16:07

Version 2. :D

In manual mode, it takes often more than a minute before the changes are reflected in the Thermostat. I don't want to set the Thermostat to low when the door or window is already closed. Also when someone opens and immediately closes the door or window, there is no need to set it to low anyway. So I need to build in a long delay befor reacting to the door opening.

In auto mode, the lowering and rising of the Thermostat temperature will still be immediate (because of the "Directe verknüpfung"). If someone opens and closes a door or window, the temperature will be set back to the default temperature for the Auto Mode. After the delay, it will be set back again to the temperature that was used before the opening.

So now I have 3 scripts:
Bild

The first script is executed immediately, this saves the current value of the Thermostat:

Code: Alles auswählen

!Kontakt open actie 1
var savTemp = dom.GetObject("PZSavTemp"); !Get the system variable that will hold the set temperature
var Therm = "Prive Zolder Therm";!Name of the thermostat


var device = dom.GetObject(Therm);
object  therm = dom.GetObject("BidCos-RF." # device.Address() # ":2.SETPOINT");  ! Datenobjekt des Reglers für die Solltemperatur (Kanal 2)


savTemp.Variable( therm.State());	!Save the actual set temp
 
The second script is executed after a delay, so that no reaction is done if the window is closed before this time. This script sets the lower temperature. It checks whether the door is already closed, in which case it does not take any action. If the Thermostat is in Auto mode, the temperature is already lowered by the directe vernküpfung, so no action is taken either.

Code: Alles auswählen

!Kontakt open actie
var savTemp = dom.GetObject("PZSavTemp"); !Get the system variable that will hold the set temperature
string DeviceName = "Prive Zolder ";!Name of the room

real open_temp = 14; 	!temp bij open raam

var device = dom.GetObject(DeviceName + "Therm"); ! Thermostat is Room name + "Therm"
object  therm = dom.GetObject("BidCos-RF." # device.Address() # ":2.SETPOINT");  ! Datenobjekt des Reglers für die Solltemperatur (Kanal 2)
  
if ( therm.State() > open_temp) { 
	var k_device = dom.GetObject(DeviceName +"Kontakt");  ! Room Name + "Kontakt"
  
	boolean window_open = dom.GetObject("BidCos-RF." # k_device.Address() # ":1.STATE").State(); !Still Open after delay?
WriteLine(window_open);
       if (window_open) {	    
	     therm.State(open_temp);
     } 
}
The third script is used to set the temperature to the original temperature when the close event is fired. It resets the temperature as soon as possible. This may come before the execution of the second script, but that does not matter, the second script checks if the door is still open, so it does not lower the temperature if this is no longer needed.

Code: Alles auswählen

!Kontakt close action
var savTemp = dom.GetObject("PZSavTemp"); !System variable holding the Set temperature before opening
string Therm = "Prive Zolder Therm";

!get the device value
var device = dom.GetObject(Therm);
object  therm = dom.GetObject("BidCos-RF." # device.Address() # ":2.SETPOINT");  ! Object for the Set temperature (Channel 2)

! Set the temp that was there before opening:
therm.State(savTemp.Variable()); 
I will keep you posted on the progress on testing this.

Grüsse,

Petitbarzun
Dateianhänge
Kontakt1.jpg

Antworten

Zurück zu „HomeMatic - english“