I tried to execute this scripts: (device Piushaven - THB is a Wunderground weather station)
Code: Select all
return {
on = {
devices = {
'Piushaven - THB'
}
},
execute = function(domoticz, device)
local tempBlue = domoticz.devices('Piushaven - THB').temperature
local tempRed = domoticz.devices('Piushaven - THB').temperature
if (tempRed < 5) then tempRed = 5 end
if (tempRed > 25) then tempRed = 25 end
tempRed = tempRed - 5
tempRed = domoticz.round(tempRed * (256/20))
if (tempBlue < -5) then tempBlue = -5 end
if (tempBlue > 20) then tempBlue = 20 end
tempBlue = 0 - (tempBlue - 20)
tempBlue = domoticz.round(tempBlue * (256/25))
domoticz.log('Device ' .. device.name .. ' was changed. Attempting Blue to ' .. tempBlue .. ', Red to ' .. tempRed, domoticz.LOG_INFO)
domoticz.devices(89).setRGB(tempRed,0,tempBlue)
domoticz.log('Device ' .. device.name .. ' was changed. Succeeded Blue to ' .. tempBlue .. ', Red to ' .. tempRed, domoticz.LOG_INFO)
end
}Upon execution I get:
Code: Select all
2018-04-03 18:45:00.397 dzVents: Info: ------ Start internal script: testrgb:, trigger: every 1 minutes on mon,tue,wed,thu,fri
2018-04-03 18:45:00.402 dzVents: Error (2.4.1): Method setRGB is not available for device "RGBW-Overloopkast" (deviceType=Color Switch, deviceSubType=RGBWWZ). If you believe this is not correct, please report.
2018-04-03 18:45:00.402 dzVents: Info: Device was changed
2018-04-03 18:45:00.402 dzVents: Info: ------ Finished testrgbWhen I used the Fibaro RGBW the first time I know I had also a switch with an color palet to choose from. That has disapeared since. After which I reinstalled the RGBW dimmer.
Secondly, I should have a setRGBW command, but can't find that.