AVM Fritz! Binding does not recognize radiator mode "WINDOW_OPEN"

Hi everybody,

I try the whole day to set the radiator mode of my FRITZ!DECT300 to the string “WINDOW_OPEN” but without any success. It does not matter if I set the radiator mode via

  1. Paper UI
  2. HABPanel
  3. rules

After a few seconds the mode switches back to the mode set before. The other states ON, OFF, ECO, COMFORT work fine, except the one I like.

I use openHAB 2.4 on a Synology DS918+ with a FRITZ!BOX 7490 and FRITZ!OS: 07.01. The mode “WINDOW_OPEN” works when I push the button at my DECT300 manually. I bought some Magenta Smarthome optical window sensor to switch my DECT!300, everything works fine except the desired mode :frowning:

Has someone any idea?

Hi Matthias,

You cannot set the WINDOW_OPEN mode for the radiator. It is a read-only value which will only be set when the thermostat detects an open window.

Hello Christoph,

thanks for your immediate reply. What a pitty!

The thermostat is not very good in detecting an open window, but in checking what mode is currently required after switching back from open to closed window. Now I have to programm it by myself :confused: At the moment I do not know, how to switch back to the correct radiator mode, considering, that is not just to save the old state but to check, if there was a setpoint change during the “open hour”.

Hello Matthias,

i‘ve never seen these AVM (Smart) valves detecting an open window.

Idea:

  1. Persist the temperature reading from the valve
  2. Observing the temperature while opening the window in order to know: in which time which drop occours.
  3. Using a rule and this „deltasince“ function. If the drop is detectable, the window is open. Or you are having a cold shower. Read the old setpoint, store it, shut the valve. Again use deltasince to discover if there is a temperature increase. Then set back the old setpoint.

Perhaps we will get some help from others here. Would be a cool project and i could learn a lot.

Regards!

Hi Richard,

I think the second point is not trivial, as a drop of temperature will depend on individual weather conditions. That’s why the AVM valves are not good in detecting open windows. But I do not have to program so much, 'cause I installed Magenta Smarthome optical window sensors into my window frames, For a few days now, they work reliable.

The only difficulty is, and my programming skills are little, to switch back to the correct heating mode, as during “opening hours”, the automatic program is still running and can change the aimed temperature. I’ve got it working so far, that setpoint changes are reset to OFF as long as windows are open, but I have to track these aborted changes to know what temperature is needed at the end.

I will post the code, when I’m done, but need some spare time to do. Or maybe there is an elegant shortcut, to get data about the original scheduled temperature?

So I did some rookie coding, what realizes most of my wishes. Sorry for the nonstandardized naming, but through the years I developed a special convention for my household things :wink: Funny stands for the “HAN FUN Window Contact”, Thermy for the “DECT300 thermostat”.

var SetpointKitchen = 18 // default

// ** Funny Kitchen Changed *******************************

rule "Switch Radiator Kitchen to OFF when window is OPEN else to saved value"
when
	Item FunnyKitchen_ContactState changed
then
	if (FunnyKitchen_ContactState.state.toString == "OPEN") { 
		SetpointKitchen = ThermyKitchen_SetpointTemperature.state
		ThermyKitchen_RadiatorMode.sendCommand("OFF")
	} else {
		ThermyKitchen_SetpointTemperature.sendCommand(SetpointKitchen)
	}
end

// ** Thermy Kitchen Changed

rule "Switch Radiator Kitchen to OFF when window is still OPEN"
when
	Item ThermyKitchen_SetpointTemperature changed
then
	if (FunnyKitchen_ContactState.state.toString == "OPEN") { 
//		SetpointKitchen = ThermyKitchen_SetpointTemperature.state
		ThermyKitchen_RadiatorMode.sendCommand("OFF") 
	}

The first rule switches my radiator mode to OFF (6 °C) a few seconds after opening the window and remembers the set temperature before. When the window is closed again, the rule sets the memorized temperature back again.

The second rule interferes every change via user or programm and sets the mode always back to OFF as long the window is open. All that works great.

I would like to memorize these temperature changes via user or programm to set the desired temperature immediately after closing the window, but unfortunately saving the SetpointTemperature.state does not work here, that’s why the line is still in comments. When the second rule hooks into the change the value isn’t set yet, but about to be set, so I only get the current value of 6 °C not the desired value for example 18 °C.

My question is: How do I get the desired SetpointTemperature, when the scheduled programm or the user changes it during an open window, although I won’t let the desired SetpointTemperature apply?

watch the cooling pad on the sensor … they conclude this is only way to activate the „open window“ mode. :slight_smile:

:rofl: Did someone test the acustic sensors of the FRITZ!DECT200. They say, you could clasp with your hands to control the switch, but I have my doubts.

Yes, it is working. But you have to be patient and not too far away from the devices. I am not sure if it is an advantage or disadvantage if you have more than one device next to each other …

So I solved the problem by pausing some time. Stupid me, but I missed the fact, that controlling the change of SetpointTemperature starts already, when my code itself is changing it. That means, when I set any change back to OFF, because the window is still open, I overwrite any desired and saved temperature by myself with an OFF (6 °C).

So the line

Item ThermyKitchen_SetpointTemperature changed

must be more precise

Item ThermyKitchen_SetpointTemperature changed from OFF

and everythings runs smoothly.

i figured it out by reading the sourcecode

var actions = getActions("avmfritz", "avmfritz:FRITZ_DECT_301:fritz:bedroom-heater")

rule "Bedroom Heater Off"
when
    Item Bedroom_Window changed to OPEN
then
    actions.setWindowOpenMode(86400)
end

rule "Bedroom Heater On"
when
    Item Bedroom_Window changed to CLOSED
then
    actions.setWindowOpenMode(0)
end

rule "Bedroom Heater Force Off"
when
    Item Bedroom_Heater_radiator_mode changed
then
    if (Bedroom_Window.state == OPEN) {
        actions.setWindowOpenMode(86400)
    }
end

this was painful!

i almost thought about ditching fritz dect things all together… but this is kind of neat now.

Great, this make things much easier. I moved, so I have to newly setup my whole openhab, sensors and valves, but I will test it this winter for sure. Thanks for sharing!

does exactly that:

i moved to iobroker now.

this is my rule there:

const actor = "fritzdect.0.Comet_099950537836.mode";
const provider = "deconz.0.Sensors.12.open";

on(provider, ({state: {val: open}}) => {
    setState(actor, open ? 1 : 0);
});

on({id: actor, valNe: 1}, async () => {
    const {val: open} = await getStateAsync(provider);
    if (open) setState(actor, 1);
});

I tested it, and it works. Thanks for sharing the code. For people using old DECT300 valves: they can only be set to 120 minutes window open mode instead of 24 hours. For me it works fine. The only problem that still remains, is the slow reaction of the valves. Up to 15 minutes they need to check their programmed state. So it’s recommended to set the window open mode rather by hand and to control just start heating via window sensors.