Intergas - disabling/enabling heater when door opens

For heating/cooling related questions in Domoticz

Moderator: leecollings

Post Reply
awtjes
Posts: 4
Joined: Friday 02 May 2025 16:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Intergas - disabling/enabling heater when door opens

Post by awtjes »

Hi all,

I have an Intergas LAN2RF gateway, version 1.3 (this one needs authenticating when you want set values)
I have Domoticz Version: 2025.1 (build 16657) on a Raspberry Pi

What I want to achieve is that when our sliding-door in the Livingroom is opened, the heating will be disabled, or set to a very low setpoint.
And when de door is closed again, the heating needs to be re-enabled.

I tried to change the temperature setpoints to 5 degrees when the door opens, and when the door closes to 22 degrees. That works.
By the way, I did that with Blockly, very easy to achieve, but scripting is also possible.

But there is a challenge: I am also using a pre-programmed week schedule in the room-thermostat.

So when the doors opens, the best action would be not only set the setpoint very low, but also disable the week-schedule.
For example: schedule says temperature set to 22 degrees at 15:00h, but I opened the door at 14:50h and it is still open.
Then the heating will be turned on, because the week schedule overrides the "manually" set setpoint.

My idea is this:
door open: After 30 seconds disable the week schedule and temperature setpoint at 5.0 degrees Celsius (lowest value)
door close: After 30 seconds enable the week schedule (setpoint is automatically set from the schedule then)

Time out of 30 seconds to avoid too much "switching" when the door is opened/closed in a short period of time.

I found several posts describing setting setpoints, reading out values, but I can't find the setting/syntax for the week schedule.

Does anybody have the API of the Intergas Gateway? (found a link in a post from 2015, but that link is broken)
Or does somebody know how to enable/disable the week schedule with a script?

Thanks!
User avatar
habahabahaba
Posts: 232
Joined: Saturday 18 March 2023 14:44
Target OS: Windows
Domoticz version: 2024.4
Contact:

Re: Intergas - disabling/enabling heater when door opens

Post by habahabahaba »

So you can change temp setpoint of thermostat from Domoticz.
and you have some door contact...

You need Dzvents script that is activated by door contact and by timer (5 min?)

1. the script is activated by sensor: means the door is open/close -> set temp to low/high or off/on heating
2. the script is activated by timer:
- check the state of the door sensor
- if it is open -> set temp to low or off heating
- if it is close -> set temp to high or on heating

In this case you dont need to operate by the shedule
HvdW
Posts: 600
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Intergas - disabling/enabling heater when door opens

Post by HvdW »

You can check the setpoint every 1, 2, 3, 5 minutes and act accordingly.

I'd say tell your story to AI, tell it which sensors you have, publish your posts here, say the magic word dzVents and you'll get your solution in seconds.
Bugs bug me.
awtjes
Posts: 4
Joined: Friday 02 May 2025 16:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Intergas - disabling/enabling heater when door opens

Post by awtjes »

HvdW wrote: Sunday 04 May 2025 15:42 You can check the setpoint every 1, 2, 3, 5 minutes and act accordingly.

I'd say tell your story to AI, tell it which sensors you have, publish your posts here, say the magic word dzVents and you'll get your solution in seconds.
I'ver tried this, but it returns direct http-requests which the Intergas Internet Gateway does not accept. Or am I missing something?
awtjes
Posts: 4
Joined: Friday 02 May 2025 16:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Intergas - disabling/enabling heater when door opens

Post by awtjes »

habahabahaba wrote: Sunday 04 May 2025 9:25 So you can change temp setpoint of thermostat from Domoticz.
and you have some door contact...

You need Dzvents script that is activated by door contact and by timer (5 min?)

1. the script is activated by sensor: means the door is open/close -> set temp to low/high or off/on heating
2. the script is activated by timer:
- check the state of the door sensor
- if it is open -> set temp to low or off heating
- if it is close -> set temp to high or on heating

In this case you dont need to operate by the shedule
Do you mean that domoticz will keep sending the new setpoint over and over again, untill the door is closed?
akamming
Posts: 364
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Intergas - disabling/enabling heater when door opens

Post by akamming »

Just for fun i asked this question to chatgpt using the following prompt:
Create a dzventz script based on the following info

So you can change temp setpoint of thermostat from Domoticz.
and you have some door contact...

You need Dzvents script that is activated by door contact and by timer (5 min?)

1. the script is activated by sensor: means the door is open/close -> set temp to low/high or off/on heating
2. the script is activated by timer:
- check the state of the door sensor
- if it is open -> set temp to low or off heating
- if it is close -> set temp to high or on heating

In this case you dont need to operate by the shedule
I did not right away like the outcome cause the script did not remember the previous setpoint setting, so i entered a 2nd prompt:
adjust the script so it remembers the setpoint value
And chatgpt created the solution:

Code: Select all

return {
    on = {
        devices = { 'Door Sensor' },  -- Replace with your door sensor name
        timer = { 'every 5 minutes' }
    },

    data = {
        lastDoorState = { initial = '' }
    },

    logging = {
        level = domoticz.LOG_INFO,
        marker = "DoorHeatingControl"
    },

    execute = function(domoticz, trigger)
        local door = domoticz.devices('Door Sensor')       -- Replace with your door sensor name
        local thermostat = domoticz.devices('Thermostat')  -- Replace with your thermostat name

        local tempLow = 15  -- Temperature to set when door is open

        -- Ensure the variable exists
        local savedVar = domoticz.variables('ThermoSavedSetpoint')
        if not savedVar then
            domoticz.variables.create('ThermoSavedSetpoint', 21)  -- Default to 21 if not set
            savedVar = domoticz.variables('ThermoSavedSetpoint')
        end

        if door.state == 'Open' then
            if domoticz.data.lastDoorState ~= 'Open' then
                -- Save the current setpoint only when door first opens
                savedVar.set(thermostat.setPoint)
                thermostat.updateSetPoint(tempLow)
                domoticz.log("Door opened -> saved setpoint (" .. savedVar.value .. ") and set thermostat to LOW (" .. tempLow .. "°C)", domoticz.LOG_INFO)
            end
            domoticz.data.lastDoorState = 'Open'

        elseif door.state == 'Closed' then
            if domoticz.data.lastDoorState ~= 'Closed' then
                -- Restore previous setpoint when door closes
                thermostat.updateSetPoint(savedVar.value)
                domoticz.log("Door closed -> restored thermostat to previous setpoint (" .. savedVar.value .. "°C)", domoticz.LOG_INFO)
            end
            domoticz.data.lastDoorState = 'Closed'
        else
            domoticz.log("Unknown door state: " .. door.state, domoticz.LOG_ERROR)
        end
    end
}
it also stated:

Code: Select all

Setup Checklist:
- Create a user variable in Domoticz named ThermoSavedSetpoint (type: Integer), or let the script create it automatically.
- Replace the device names (Door Sensor, Thermostat) accordingly.
- Optional: adjust tempLow for your "door open" fallback temperature.
I am impressed with chatgpt. I hope this helps @awtjes. And i will use chatgpt a lot more to create or modify my dzvents scripts...
awtjes
Posts: 4
Joined: Friday 02 May 2025 16:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Intergas - disabling/enabling heater when door opens

Post by awtjes »

@akamming

tnx! I did a similar request, but my result was something completely different, which didn't work obviously.
Your script is getting me in the right direction.

In the mean time I learned that a (week)schedule is generated and controlled by the room-thermostat.

And with this script to the Internet Gateway you control the boiler directly, by overriding the setpoint coming from the room-thermostat.
The challenge now is, if the room-thermostat needs to change the temperature because of a scheduled time, then it will override the setting made by Domoticz.

So, if I understand correctly, your script stores the previously set setpoint, and when the door closes, that setpoint is restored.
That will work without any problems, but what happens if the room-thermostat changes the setpoint because of the active schedule (e.g. at 15:00h setpoint becomes 22,5 degrees) but the door is opened at 14:50h, and is still open at 15:00h ?

When the door is still open, the setpoint needs to stay at "low", but when the door closes, the setpoint needs to be at the temperature according to the schedule. (which could be different than the previously set setpoint)

Or am I missing something?
User avatar
habahabahaba
Posts: 232
Joined: Saturday 18 March 2023 14:44
Target OS: Windows
Domoticz version: 2024.4
Contact:

Re: Intergas - disabling/enabling heater when door opens

Post by habahabahaba »

awtjes wrote: Tuesday 06 May 2025 11:12 Do you mean that domoticz will keep sending the new setpoint over and over again, untill the door is closed?
In the simplest way yes, you can do so.
But i gave you just a direction to think :)

Using user variables you can store as much setpoints as you need - for opened door, closed door, winter, summer... And chek all conditions before sending data to thermostat.

Or just force sendig data you need
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests