Et voici le bout de code utilisé pour la scene :
--[[
%% properties
77 value
78 value
79 value
%% globals
–]]
local trigger = fibaro:getSourceTrigger()
if (trigger['type'] == 'property') then
fibaro:debug('Source device = ' .. trigger['deviceID'])
fibaro:setGlobal("dimmerStatusId", trigger['deviceID'])
fibaro:call(160, "pressButton", "1");
end
et le virtual device :
local id = fibaro:getGlobalValue("dimmerStatusId")
local value = fibaro:getValue(id, "value")
HC2 = Net.FHttp("192.168.1.24",8090);
response = HC2:GET("HC2#DIMMER#"..id..":"..value)
fibaro:debug("HC2#DIMMER#"..id..":"..value)