[max] How to check Actual Temperature when window is open?

I have several rooms with just a radiator thermostat and a shutter contact. We sometimes leave the window open for too long, simply because we forget about it, and that lowers the temperature too much causing unnecessary heating afterwards. Therefore, I’ve had the idea to check the actual temperature and send an alert when it drops too low.

Unfortunately, radiator thermostats do not send their actual temperature regularly. I’ve read that they can be forced to do so by changing their mode and/or setpoint temperature, so I tried that, but whenever I try to send a command to the thermostat, I get

[WARN ] [nternal.handler.MaxCubeBridgeHandler] - Last Send Command discarded. Duty Cycle: 1, Free Memory Slots: 50

and the command is ignored.

After playing around for a while, I found out that commands always seem to get discarded as long as the thermostat is in window open mode. So:

  • Why is that so?
  • Is there any other way to get the actual temperature while in window open mode?

Thanks!

Set a timer with a reminder to close the window instead
Or even better, turn off the radiator valve when the window is opened, I do this with this rule:

rule "Generic Windows Changed"
when
    Member of HeatingWindows changed or
    Member of Radiators changed
then
    if (previousState == NULL || triggeringItem.state == UNDEF) return;
    val String room = triggeringItem.name.split("_").get(0)
    val GroupItem window = Windows.members.filter[ i | i.name.contains(room) ].head as GroupItem
    val SwitchItem radiator = Radiators.members.filter [ i | i.name.contains(room) ].head as SwitchItem
    if (radiator.state == ON) {
        if (window.state == OPEN) {
            sendCommand(room + "_RadiatorValve", "OFF")
            postUpdate(room + "_ThermostatMode", "off")
        }
    }
    if (radiator.state == OFF) {
        if (window.state == CLOSED) {
            val offset = House_HeatingOffset.getStateAs(QuantityType).doubleValue
            val target = (Targets.members.filter[ i | i.name.contains(room) ].head.state as QuantityType<Number>).doubleValue
            val ambient = (AmbientTemps.members.filter[ i | i.name.contains(room) ].head.state as QuantityType<Number>).doubleValue
            if (ambient <= (target - (offset / 2))) {
                sendCommand(room + "_RadiatorValve", "ON")
                postUpdate(room + "_ThermostatMode", "heat")
            }
        }
    }
end

This is a feature by design! Why should someone change the temperature while window is open. This makes IMHO no sense.

But you can create a rule to get informed that window is open since e.g. 30 minutes!

See here [max] How to check Actual Temperature when window is open?

@vzorglub @metin

This is not possible with Max!Cube Heating, because any temperature changes (or mode changes) are blocked (and the setpoint temperature is automatically set to 12° C)! The Max!Cube always will discard any change commands, as long as the window is still OPEN.

You better use a notification rule like this:

var Timer delayTimer = null

rule "Window Corridor OPEN since 15 minutes"
when
	Item Window_GF_Corridor changed from CLOSED to OPEN
then
	delayTimer = createTimer(now.plusMinutes(15), [|
		if (Window_GF_Corridor.state == OPEN) {
        sendBroadcastNotification("Window Corridor OPEN since 15 minutes")
		delayTimer = null
		}
		else if (Window_GF_Corridor.state == CLOSED) {
		delayTimer = null
		}	
    ])
end

.
.

Maybe you have a more elegant solution? Would be great!

Thanks to everyone for your proposals. However, I’m afraid they don’t really meet my requirements.

For one, I’m not looking for a way to close the valve. The thermostats’ window open mode works perfectly and well enough for the radiators to be turned off when the window is open. So that isn’t the problem that I want to solve.

It’s really just that I want a reminder when the window has been open for too long. A timer seems to be the obvious solution, but with a timer, I cannot take into account the fact that the effect of an open window differs significantly with the outside temperature (plus wind conditions, to be precise). If it’s around 0° C outside, a window should not be left open for a long time. On the other hand, if the outside temperature is around 15° C, the window can be left open for hours. Of course, one solution would be to use different timers depending on the outside temperature, but that would require a lot of guessing and a lot of code, yet be still far from exact. If I could get the actual temperature from the radiator, this would make things so much easier.

I wonder if the “Actual Temperature Refresh Rate” that can be set in the advanced settings will help. To reduce battery drain, my idea was to get the actual temperature only in window open mode, but as that seems to be impossible, I’m looking for an alternative. I don’t quite understand yet –is the cube that discards the commands in window open mode or is it the binding?

Before I used Openhab2 I had an APP called “Max!Remote”. It communicated directly with the Max!Cube. And if a window was OPEN, no changes were possible. So it seems the Max!Cube blocked/discarded it.

Maybe a Max! Cul is able to overrule this, but I don’t know this! Sorry!