intergas script not working

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

intergas script not working

Post by Gravityz »

i am using this script to update the intergas gateway but it is not working.
it does not update the value in the gateway

if i however copy/paste the http string in a browser it works as expected.
can anybody see what is wrong?
i tried setting SetTemperature to 160 but that did not work either
it looks like nothing is send to the http page

Code: Select all

                                    -- DzVents script for updating setpoint of LAN2RF Incomfort Gateway Intergas
                                    -- V1.0 (september 2020)
                                    
local IPADDRESS = '192.168.1.80'   -- IP address of LAN2RF Gateway
local USER = 'admin'                -- login credentials LAN2RF Gateway
local PASSWORD = 'password'            -- login credentials LAN2RF Gateway
local THERMOSTAAT = 'Thermostaat'   -- Thermostaat domoticz device name


return {
	on = {
		devices = {
			THERMOSTAAT,
		}
	},
	execute = function(domoticz, device)
	    domoticz.log('Thermostaat setpoint was changed, updating LAN2RF Incomfort Gateway', domoticz.LOG_INFO)
        
        -- Calculating setpoint (see Intergas API documentation)
        local SetTemperature = (domoticz.devices(THERMOSTAAT).setPoint - 5) * 10
		-- Update LAN2RF Gateway
		domoticz.openURL({
			url = 'http://' .. USER .. ':' .. PASSWORD .. '@' .. IPADDRESS .. '/protect/data.json?heater=0&setpoint=' .. SetTemperature .. '&thermostat=0',
			method = 'GET',
			})		
	end
}
this string does work

Code: Select all

http://admin:[email protected]/protect/data.json?heater=0&setpoint=160&thermostat=0
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: intergas script not working

Post by Gravityz »

it looks like the script is not triggered when the thermostat value is changed.
User avatar
waltervl
Posts: 6691
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: intergas script not working

Post by waltervl »

It should be triggered if there is a change of device 'thermostaat'
Is that what you would expect?
Do you see the statement 'Thermostaat setpoint was changed, updating LAN2RF Incomfort Gateway' in the log file?
Else change in the on devices section the variable THERMOSTAAT by the idx or 'thermostaat'
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Gravityz
Posts: 652
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: intergas script not working

Post by Gravityz »

Hi waltervl
when changing the thermostat i only see this mesage

Code: Select all

Intergas InComfort: Setpoint of sensor with idx idx changed to temp
this device is a real device which was generated by the LAN2RF plugin.
also changing the trigger to the real name or IDX did not work.

you however gave me an idea.
I made a second dummy thermostat and that one is reacting and triggering like it should
i am now using the dummy thermostat to update the intergas incomfort gateway which in turn updates he real thermostat setpoint

so this is a workaround from domoticz to the real thermostat.
The other way around(changing the real thermostat) also changes the real thermostat in domoticz but does not update the dummy one.

i have to figur out a way to do that without causing a loop.

so bottomline. the Intergas InComfort LAN2RF Gateway plugin has a bug which prevents the thermostat setpoint being used(there is no feedback directly to the real thermostat)
as a workaround you need a script to update the real thermostat but since that script can not be triggered by the thermostat device in domoticz you need a second, dummy thermostat, to fix this.

a lot of workarounds but we are getting there
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest