Intergas Incomfort Heater control

From Domoticz
Jump to navigation Jump to search

To connect the Intergas Incomfort LAN2RF Gateway, Domoticz includes standard support for the Incomfort.

From version 2022.2 the thermostat setting also works with the V2 gateway.

Prerequisites

Make sure the Gateway, app and thermostat work as they should, then you can get started with Domoticz.

Configure Domoticz

Navigate to Settings -> Hardware

Choose "Intergas InComfort LAN2RF Gateway" as Type and fill in the appropriate fields:

  • Name For example, type "Intergas InComfort"
  • Data Timeout: "Disabled".
  • Remote address: IP address of the LAN2RF Gateway.
  • Port: default: 80
  • username: admin
  • password: The password that is shown on the back of your gateway. (which you can change via the web interface if you point your browser at the IP address of the gateway)

Once Domoticz has successfully established contact with the gateway, it will automatically create all devices.

Under menu Settings -> Devices, there are now 10 new devices. Click on the green arrows to add the devices to your overview.

You can then adjust the names to what makes sense to you (as has already been done below)

After this, you can simply operate the thermostat (the setpoint device)


The setpoint device is sometimes set to 0 by the real thermostat or the app, which makes it unusable in domoticz.

  • So set Thermostat override to NOT ACTIVE (see the green arrow behind the device)
  • For this, create a dummy thermostat device and call it Thermostat.

This will be a dummy thermostat setpoint device (see picture above)

  • Rename the original SetPoint device 0030100 (in my case device 361) to Thermostat override
  • Rename Temp device 0002 (in my case device 360) to Thermostat Setpoint
  • Activate the DZvents scripts

Now you can use device Thermostat in Domoticz as Thermostat.

Thermostat Setpoint indicates what the real physical thermostat (slide on the wall) is set to

Thermostat override is not used because it is sometimes set to 0. Again, remove this from the active list by setting the arrow to green

DzVents script

-- DzVents script for setting new thermostat temperature and updating setpoint of LAN2RF Incomfort Gateway Intergas
-- V1.3 (oktober 2022. gateway thermostat override device does not update so using dummy thermostat)
-- original V1.0 script made by TheKraker. Changed by GravityZ
-- improvements:You now have a thermostat which keeps it's setting, script also works when the real thermostat on the wall is used
-- temperature can be changed from 3 locations (physical thermostat on wall, dummy thermostat from domoticz, Intergas app from phone
-- physical thermostat updates>>THERMOSTAATSETPOINT which updates>>dummy thermostat. (gateway setpoint override 1 gets zeroed)
-- app updates>>gateway setpoint override 1 which updates>>THERMOSTAATSETPOINT which updates>>dummy thermostat. (gateway setpoint override 1 gets zeroed)
-- dummy thermostat updates>>gateway setpoint override 1 through http which updates>>THERMOSTAATSETPOINT 

local IPADDRESS = '192.168.1.80'                        -- IP address of LAN2RF Gateway
local USER = 'admin'                                    -- login credentials LAN2RF Gateway
local PASSWORD = 'pppppppp'                             -- login credentials LAN2RF Gateway the password is on a sticker on the back of the gateway
local THERMOSTAAT = 'Thermostaat'                       -- Thermostaat domoticz device name in this case a dummy thermostat device, not Intergas version which is generated in domoticz
local THERMOSTAATSETPOINT = 'Thermostaat Setpoint'      -- Thermostat setpoint device which represents the current thermostat setting(this is an Intergas temp device, not the Intergas generated thermostat device)

return {
	on = {
		devices = {THERMOSTAAT,THERMOSTAATSETPOINT}
	},
	execute = function(domoticz, device)
        -- if there is a thermostat change coming from domoticz then update the gateway
	    if (device.name == THERMOSTAAT and domoticz.devices(THERMOSTAAT).setPoint ~= domoticz.devices(THERMOSTAATSETPOINT).temperature) then
	        -- Calculating setpoint (see Intergas API documentation)
            local SetTemperature = (domoticz.devices(THERMOSTAAT).setPoint - 5) * 10
		    domoticz.openURL('http://' .. USER .. ':' .. PASSWORD .. '@' .. IPADDRESS .. '/protect/data.json?heater=0&setpoint=' .. SetTemperature .. '&thermostat=0')
		end
        -- if there is a thermostat change coming from the physical thermostat/app then sync it with the dummy thermostat in domoticz
        if (device.name == THERMOSTAATSETPOINT and domoticz.devices(THERMOSTAATSETPOINT).temperature  ~= domoticz.devices(THERMOSTAAT).setPoint) then
            local SetTemperature = domoticz.devices(THERMOSTAATSETPOINT).temperature
                --we update silent otherwise the script gets triggered again  
                domoticz.devices(THERMOSTAAT).updateSetPoint(SetTemperature).silent()
        end

	end
}

Thanks to user Gravityz to create the original document.