intergas script not working
Posted: Friday 01 April 2022 19:40
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
this string does work
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
}Code: Select all
http://admin:[email protected]/protect/data.json?heater=0&setpoint=160&thermostat=0