Aller au contenu

Alistair Crompton

Membres confirmés
  • Compteur de contenus

    12
  • Inscription

  • Dernière visite

Profile Information

  • Sexe :
    Homme
  • Ville :
    Thônes
  • Intéret :
    Informatique, Domotique, Hypnose, Magie, Science-fiction.
  • Box
    Home Center 2
  • Version
    4.511 beta

Visiteurs récents du profil

Le bloc de visiteurs récents est désactivé et il n’est pas visible pour les autres utilisateurs.

Alistair Crompton's Achievements

Newbie

Newbie (1/14)

3

Réputation sur la communauté

  1. Alistair Crompton

    Showroom Configs Gea

    Hello, j'ignorais totalement la présence de ce showroom, voici donc ma config GEA depuis quelques années, si cela peut aider certains ! --[[ %% autostart %% properties 105 value 82 value 90 value 100 value 72 value 264 value 237 value 296 value 300 value 335 value 278 value 361 value 74 value %% globals PlexTV GLOBAL_REQUEST ALPHONSE_BUSY MM_BLACK MM_WHITE --]] function setEvents() math.randomseed(os.time()) local devices = { HUE_SOFA = 136, HUE_BUFFET = 154, HUE_STAIRS = 157, HUE_CAB = 87, HUE_CHEM = 156, HUE_TV = 155, HUE_DESKTOP = 88, HUE_MEZ = 158, HUE_BROOM = 35, HUE_BUANDRIE = 34, HUE_SOFA_CAB = 189, HUE_ALL = 33, VMC = 42, BABY_FOOT = 74, -- WC = 72, SDB = 137, SDB_SHOWER = 139, SDB_T2 = 183, FOOD = 70, DRESSING = 100, DRESS_SEB = 133, DRESS_BIN = 135, PLUG_DOLL = 80, PLUG_KITCHEN = 40, PLUG_COMICS = 76, PLUG_LIVING = 80, -- PLUG_CAB = 78, RGB_CAB = 19, -- KITCHEN = 90, OUTSIDE = 92, OUTSIDE_CAB = 171, } local devicesEx = { SUN_SWITCH = 72, LIGHTS_GARAGE = 142, SONOS_KITCHEN = 194, SONOS_LIVING = 196, EYE_FOOD = 105, EYE_KITCHEN = 82, EYE_OUTSIDE = 335, EYE_LIVING = 5, EYE_T2 = 165, TEMP_CAB = 265, TEMP_KITCHEN = 83, TEMP_DRESS = 297, TEMP_BROOM = 6, -- TEMP_MEZ = 6, TEMP_LIVING = 301, TEMP_OUTSIDE = 58, TEMP_LIVING_T2 = 166, -- TEMP_LIVING_T2 = 238, -- temporary hack because of the dead living sensor TEMP_BEDROOM_T2 = 238, LUX_KITCHEN = 84, LUX_BEDROOM = 7, LUX_T2 = 167, PLUG_TV = 78, BELL = 337, VELUX_OPEN = 56, VELUX_CLOSE = 54, SHUTTERS_OPEN = 149, SHUTTERS_CLOSE = 151, CAB_CLOSE = 193, -- HEATER_SDB = 203, -- HEATER_SDB_T2 = 175, HEATER_LIVING_T2 = 171, HEATER_KITCHEN_T2 = 191, VD_HEATER_SDB = 216, VD_HEATER_KITCHEN_T2 = 354, -- 218, VD_HEATER_LIVING_T2 = 220, VD_HEATER_SDB_T2 = 221, VD_HEATER_BEDROOM_T2 = 219, VD_HEATER_CAB = 253, VD_HEATER_DRESSING = 260, VD_HEATER_BROOM = 329, VD_HEATER_KITCHEN = 273, VD_HEATER_BABY = 316, VD_HEATER_TV = 315, THERMOSTAT_T2 = 237, THERMOSTAT_CAB = 264, THERMOSTAT_DRESS = 296, THERMOSTAT_LIVING = 300, OUTSIDE_T2 = 177, LIVING_T2 = 176, T2_WINDOW = 278, --T2_DOOR = 278, -- temporary hack because of the dead living sensor T2_DOOR = 361, } local vd_heater_values = { CONF = "2", ECO = "5", HG = "6", STOP = "7", CONF_1 = "3", CONF_2 = "4" } local hm = { CONF = 99, ECO = 25, HG = 15, STOP = 0, CONF_1 = 50, CONF_2 = 35 } local shortcuts = { AUTO_LIGHTS = true, OUTSIDE_IS_COLD = {"Value-", devicesEx.TEMP_OUTSIDE, 15.5}, OUTSIDE_IS_HOT = {"Value+", devicesEx.TEMP_OUTSIDE, 16}, OUTSIDE_IS_VERY_HOT = {"Value+", devicesEx.TEMP_OUTSIDE, 40}, LIVING_IS_COLD = {"Value-", devicesEx.TEMP_LIVING, 17}, LIVING_IS_HOT = {"Value+", devicesEx.TEMP_LIVING, 17.5}, -- DRESSING_IS_COLD = {"Value-", devicesEx.TEMP_LIVING, 16}, -- DRESSING_IS_HOT = {"Value+", devicesEx.TEMP_LIVING, 16.5}, -- KITCHEN_IS_COLD = {"Value-", devicesEx.TEMP_KITCHEN, 12}, -- KITCHEN_IS_HOT = {"Value+", devicesEx.TEMP_KITCHEN, 12.5}, PERIOD_OVERNIGHT = {"Time", "Sunset>19:00", "Sunrise<06:00"}, PERIOD_WORKING_TIME = {"Time", "10:00", "18:00"}, PERIOD_MORNING_EVENING = {"Or",{"Time", "06:30", "10:00"}, {"Time", "17:30", "22:00"}}, -- LUX_BEDROOM_IS_WEAK = {"Value-", devicesEx.LUX_BEDROOM, 5}, LUX_KITCHEN_IS_WEAK = {"Value-", devicesEx.LUX_KITCHEN, 19}, -- LUX_BEDROOM_IS_OK = {"Value+", devicesEx.LUX_BEDROOM, 10}, LUX_KITCHEN_IS_OK = {"Value+", devicesEx.LUX_KITCHEN, 20}, LIVING_IS_ON = {"Or",{"Hue", devices.HUE_CHEM, "on", 1}, {"Hue", devices.HUE_BUFFET, "on", 1}}, -- HOLIDAYS_MODE_IS_ON = {"Global", "HOLIDAYS_MODE", "1"}, -- HOLIDAYS_MODE_IS_OFF = {"Global", "HOLIDAYS_MODE", "0"}, OPEN_HOUR_WD_7 = {"Global", "OPEN_HOUR_WD", "7:00"}, OPEN_HOUR_WD_8 = {"Global", "OPEN_HOUR_WD", "8:00"}, OPEN_HOUR_WD_9 = {"Global", "OPEN_HOUR_WD", "9:00"}, OPEN_HOUR_WD_10 = {"Global", "OPEN_HOUR_WD", "10:00"}, OPEN_HOUR_WD_11 = {"Global", "OPEN_HOUR_WD", "11:00"}, OPEN_HOUR_WE_7 = {"Global", "OPEN_HOUR_WE", "7:00"}, OPEN_HOUR_WE_8 = {"Global", "OPEN_HOUR_WE", "8:00"}, OPEN_HOUR_WE_9 = {"Global", "OPEN_HOUR_WE", "9:00"}, OPEN_HOUR_WE_10 = {"Global", "OPEN_HOUR_WE", "10:00"}, OPEN_HOUR_WE_11 = {"Global", "OPEN_HOUR_WE", "11:00"}, T2_IS_FREE = {"Global", "ALPHONSE_BUSY", "0"}, T2_IS_BUSY = {"Global", "ALPHONSE_BUSY", "1"}, CAB_IS_FREE = {"Global", "CAB_BUSY", "0"}, CAB_IS_BUSY = {"Global", "CAB_BUSY", "1"}, -- T2_WINDOW_OPENED = {"Global", "ALPHONSE_BUSY", "1"}, T2_WINDOW_CLOSED = {"Global", "T2_WINDOW", "0"}, T2_DOOR_CLOSED = {"Global", "T2_DOOR", "0"}, T2_DOOR_OPEN = {"Global", "T2_DOOR", "1"}, -- ACTION_PENDING = "ACTION_PENDING", SHUTTERS_ARE_CLOSED = {"Global", "SHUTTERS_CLOSED", "1"}, SHUTTERS_ARE_OPEN = {"Global", "SHUTTERS_CLOSED", "0"}, VELUX_ARE_CLOSED = {"Global", "VELUX_CLOSED", "1"}, VELUX_CAN_BE_OPENED = {"Value+", devicesEx.TEMP_OUTSIDE, 3.5}, -- VELUX_CAN_BE_OPENED = {"Global", "VELUX_CLOSED", "3"}, VELUX_ARE_OPEN = {"Global", "VELUX_CLOSED", "0"}, IAM_THERE = {"Global", "IAM_THERE", "1"}, AUTO_SHUTTERS = "AUTO_SHUTTERS", -- ACTION_CLOSE_SHUTTERS = {"Global", "ACTION_PENDING", "1"}, -- CONFIRM_BEFORE_CLOSING_SHUTTERS = {"Global", "AUTO_SHUTTERS", "0"}, AUTO_CLOSING_SHUTTERS = {"Global", "AUTO_SHUTTERS", "1"}, REQ_IS_AVAILABLE = {"Global", "GLOBAL_REQUEST", "0"}, REQ_ALL_OFF = {"Global", "GLOBAL_REQUEST", "ALLOFF"}, REQ_OPEN_SHUTTERS = {"Global", "GLOBAL_REQUEST", "SUP"}, REQ_CLOSE_SHUTTERS = {"Global", "GLOBAL_REQUEST", "SDOWN"}, REQ_NCLOSE_SHUTTERS = {"Global", "GLOBAL_REQUEST", "NSDOWN"}, REQ_OPEN_VELUX = {"Global", "GLOBAL_REQUEST", "VUP"}, REQ_CLOSE_VELUX = {"Global", "GLOBAL_REQUEST", "VDOWN"}, REQ_UPDATE_HEATING_T2 = {"Global", "GLOBAL_REQUEST", "UHEATINGT2"}, REQ_UPDATE_HEATING_CAB = {"Global", "GLOBAL_REQUEST", "UHEATINGCAB"}, REQ_UPDATE_HEATING_DRESS = {"Global", "GLOBAL_REQUEST", "UHEATINGDRESS"}, REQ_UPDATE_HEATING_KITCHEN = {"Global", "GLOBAL_REQUEST", "UHEATINGKITCHEN"}, REQ_UPDATE_HEATING_LIVING = {"Global", "GLOBAL_REQUEST", "UHEATINGLIVING"}, REQ_UPDATE_HEATING_BROOM = {"Global", "GLOBAL_REQUEST", "UHEATINGBROOM"}, REQ_UPDATE_HEATINGS = {"Global", "GLOBAL_REQUEST", "UHEATINGS"}, -- REQ_SOMEBODY_THERE = {"Global", "SOMEBODY_THERE", "1"}, SOMEBODY_THERE = "SOMEBODY_THERE", REQ_MM_BLACK_1 = {"Global", "MM_BLACK", "1"}, REQ_MM_BLACK_3 = {"Global", "MM_BLACK", "3"}, REQ_MM_BLACK_5 = {"Global", "MM_BLACK", "5"}, REQ_MM_BLACK_7 = {"Global", "MM_BLACK", "7"}, REQ_MM_BLACK_2 = {"Global", "MM_BLACK", "2"}, REQ_MM_BLACK_4 = {"Global", "MM_BLACK", "4"}, REQ_MM_BLACK_6 = {"Global", "MM_BLACK", "6"}, REQ_MM_BLACK_8 = {"Global", "MM_BLACK", "8"}, RESET_MM_BLACK = {"Global", "MM_BLACK", "0"}, REQ_MM_WHITE_1 = {"Global", "MM_WHITE", "1"}, REQ_MM_WHITE_3 = {"Global", "MM_WHITE", "3"}, REQ_MM_WHITE_5 = {"Global", "MM_WHITE", "5"}, REQ_MM_WHITE_7 = {"Global", "MM_WHITE", "7"}, REQ_MM_WHITE_2 = {"Global", "MM_WHITE", "2"}, REQ_MM_WHITE_4 = {"Global", "MM_WHITE", "4"}, REQ_MM_WHITE_6 = {"Global", "MM_WHITE", "6"}, REQ_MM_WHITE_8 = {"Global", "MM_WHITE", "8"}, RESET_MM_WHITE = {"Global", "MM_WHITE", "0"}, CONSIGNE_T2 = "CONSIGNE_T2", TEMP_MAX_T2 = "TEMP_MAX_T2", TEMP_MIN_T2 = "TEMP_MIN_T2", CONSIGNE_CAB = "CONSIGNE_CAB", TEMP_MAX_CAB = "TEMP_MAX_CAB", TEMP_MIN_CAB = "TEMP_MIN_CAB", CONSIGNE_LIVING = "CONSIGNE_LIVING", TEMP_MAX_LIVING = "TEMP_MAX_LIVING", TEMP_MIN_LIVING = "TEMP_MIN_LIVING", CONSIGNE_DRESS = "CONSIGNE_DRESS", TEMP_MAX_DRESS = "TEMP_MAX_DRESS", TEMP_MIN_DRESS = "TEMP_MIN_DRESS", CONSIGNE_BROOM = "CONSIGNE_BROOM", TEMP_MAX_BROOM = "TEMP_MAX_BROOM", TEMP_MIN_BROOM = "TEMP_MIN_BROOM", CONSIGNE_KITCHEN = "CONSIGNE_KITCHEN", TEMP_MAX_KITCHEN = "TEMP_MAX_KITCHEN", TEMP_MIN_KITCHEN = "TEMP_MIN_KITCHEN", T2_WINDOW = "T2_WINDOW", T2_DOOR = "T2_DOOR", ALPHONSE_BUSY = "ALPHONSE_BUSY", } local scenes = { ACTION_CLOSE_SHUTTERS = 36, GEA = 16, ALL_OFF = 25, -- IFTTT_BELL = 39, -- IFTTT_FRANCEINFO = 45, -- IFTTT_MY_FLOW = 42, -- IFTTT_SONOS_PAUSE = 43, } local heatingConf = { T2 = { LABEL = "ALPHONSE", TID = devicesEx.THERMOSTAT_T2, T = devicesEx.TEMP_LIVING_T2, TMAX = shortcuts.TEMP_MAX_T2, TMIN = shortcuts.TEMP_MIN_T2, C = shortcuts.CONSIGNE_T2, VDS = {devicesEx.VD_HEATER_KITCHEN_T2, devicesEx.VD_HEATER_LIVING_T2, devicesEx.VD_HEATER_BEDROOM_T2}, PRECOND = function () return tonumber(fibaro:getGlobalValue(shortcuts.ALPHONSE_BUSY)) == 1 and tonumber(fibaro:getGlobalValue(shortcuts.T2_DOOR)) == 0 and tonumber(fibaro:getGlobalValue(shortcuts.T2_WINDOW)) == 0 end, POSTFUNC = function (consigne) fibaro:setGlobal(shortcuts.TEMP_MIN_T2, consigne-2) end, }, CAB = { LABEL = "CABINET", TID = devicesEx.THERMOSTAT_CAB, T = devicesEx.TEMP_CAB, TMAX = shortcuts.TEMP_MAX_CAB, TMIN = shortcuts.TEMP_MIN_CAB, C = shortcuts.CONSIGNE_CAB, VDS = {devicesEx.VD_HEATER_CAB}, }, KITCHEN = { LABEL = "CUISINE", TID = nil, T = devicesEx.TEMP_KITCHEN, TMAX = shortcuts.TEMP_MAX_KITCHEN, TMIN = shortcuts.TEMP_MIN_KITCHEN, C = shortcuts.CONSIGNE_KITCHEN, VDS = {devicesEx.VD_HEATER_KITCHEN}, }, DRESS = { LABEL = "DRESSING", TID = devicesEx.THERMOSTAT_DRESS, T = devicesEx.TEMP_DRESS, TMAX = shortcuts.TEMP_MAX_DRESS, TMIN = shortcuts.TEMP_MIN_DRESS, C = shortcuts.CONSIGNE_DRESS, VDS = {devicesEx.VD_HEATER_DRESSING,devicesEx.VD_HEATER_SDB}, }, BROOM = { LABEL = "CHAMBRE", TID = nil, T = devicesEx.TEMP_BROOM, TMAX = shortcuts.TEMP_MAX_BROOM, TMIN = shortcuts.TEMP_MIN_BROOM, C = shortcuts.CONSIGNE_BROOM, VDS = {devicesEx.VD_HEATER_BROOM}, }, LIVING = { LABEL = "SALON", TID = devicesEx.THERMOSTAT_LIVING, T = devicesEx.TEMP_LIVING, TMAX = shortcuts.TEMP_MAX_LIVING, TMIN = shortcuts.TEMP_MIN_LIVING, C = shortcuts.CONSIGNE_LIVING, VDS = {devicesEx.VD_HEATER_TV,devicesEx.VD_HEATER_BABY}, } } local metricAlert=function( model ) -- fibaro:debug("metricAlert !!!!!") -- local messages = {"alerte:quelqu'un est dans l'escalier !"} -- local message = messages[math.random(#messages)] -- local alarms = {"alarm10","alarm12","alarm13"} -- local alarm = alarm[math.random(#alarms)] net.HTTPClient():request("http://" .. '192.168.1.23' .. ":8080/api/v2/device/notifications", {options = { method = 'POST', headers = { ['Content-Type'] = 'application/json', ['Authorization'] = 'Basic ' .. 'xxxxxxxxxxxxxxxx=', }, data = json.encode( { --icon_type = "alert", priority = "critical", model = model, cycles = 30 / 4.5 }) }, }) end local fns fns = { updateHeaters = function (conf) local consigne = tonumber(fibaro:getGlobalValue(conf.C)) if conf.PRECOND == nil then conf.PRECOND = function () return true end end if conf.PRECOND() then local T = tonumber(fibaro:getValue(conf.T, "value")) local value = vd_heater_values.CONF local text = " " .. conf.LABEL if T > consigne then value = vd_heater_values.HG end for _,v in ipairs(conf.VDS) do fibaro:call(v, "pressButton",value) end end end, updateConsigne = function (conf) local max = tonumber(fibaro:getGlobalValue(conf.TMAX)) local min = tonumber(fibaro:getGlobalValue(conf.TMIN)) local consigne if conf.TID == nil then consigne = tonumber(fibaro:getGlobalValue(conf.C)) if consigne > max then consigne = max end if consigne < min then consigne = min end else consigne = tonumber(fibaro:getValue(conf.TID, "value")) if consigne > max then consigne = max end if consigne < min then consigne = min end consigne = consigne -0.5 end fibaro:setGlobal(conf.C, consigne) if conf.POSTFUNC then conf.POSTFUNC (consigne) end fns.updateHeaters (conf) local T = tonumber(fibaro:getValue(conf.T, "value")) local text = "··· THERMOSTAT " .. conf.LABEL if T > consigne then text = text .. " : HG ··· consigne : " .. consigne .. " °C ··· temperature : " .. T .. " °C ··· HG" else text = text .. " : ON ··· consigne : " .. consigne .. " °C ··· temperature : " .. T .. " °C ··· ON" end metricAlert({ frames = { -- { icon = 7431, text = text }, { text = text }, }, }) end, resetRequests = function () fibaro:setGlobal ("GLOBAL_REQUEST", "0") -- fibaro:setGlobal ("ACTION_PENDING", "0") end, idFromNumber = function (number) local result = "UNKNOWN" for k,v in pairs(devices) do if v == number then result = k end end return result end, allOff = function () for k,v in pairs(devices) do fibaro:call(v, "turnOff") fibaro:sleep(100) end end, auto = function (operation, params) local seconds = 30 local deviceCond = params.id local deviceAction = {operation, params.id} if params.hue == true then deviceCond = {"Hue", params.id, "on", 1} if operation == "turnOff" then deviceCond = {"Hue", params.id, "on", 0} else deviceCond = {"Hue", params.id, "on", 1} end end if params.minutes then seconds = params.minutes *60 end return GEA.add(params.condition or deviceCond, seconds, "", deviceAction) end, autoOff = function (params) return fns.auto ("turnOff", params) end, autoOn = function (params) return fns.auto ("turnOn", params) end, onMotion = function (params) local c = { params.sensor } if params.condition then for _, v in pairs(params.condition) do table.insert (c, v) end end fns.autoOff({id=params.id,minutes=params.minutes,hue=params.hue}) GEA.add(params.sensor, -1, "", { "RestartTask", fns.autoOff({id=params.id,minutes=params.minutes,hue=params.hue}) } ) fns.autoOn({id=params.id,condition=c,minutes=-1/60,hue=params.hue}) end, } -- Modules qui doivent être réveillés de temps en temps... GEA.add( {"Dead", devices.DRESS_SEB}, 3600, "", {"Dead", devices.DRESS_SEB} ) GEA.add( {"Dead", devices.DRESS_BIN}, 3600, "", {"Dead", devices.DRESS_BIN} ) -- GEA.add( {"Dead", devices.PLUG_CAB}, 3600, "", {"Dead", devices.PLUG_CAB} ) GEA.add( {"Dead", devicesEx.TEMP_OUTSIDE}, 3600, "", {"Dead", devicesEx.TEMP_OUTSIDE} ) -- Update des radiateurs GEA.add( shortcuts.REQ_UPDATE_HEATINGS, -1 , "", {"Function", function() fns.resetRequests() fns.updateHeaters(heatingConf.T2) fns.updateHeaters(heatingConf.CAB) fns.updateHeaters(heatingConf.LIVING) fns.updateHeaters(heatingConf.DRESS) fns.updateHeaters(heatingConf.BROOM) fns.updateHeaters(heatingConf.KITCHEN) end} ) -- Gestion chauffage chez Alphonse -- Update du thermostat T2 GEA.add( devicesEx.THERMOSTAT_T2, -1 , "", {"Function", function() fns.updateConsigne(heatingConf.T2) end} ) -- Update du thermostat CAB GEA.add( devicesEx.THERMOSTAT_CAB, -1 , "", {"Function", function() fns.updateConsigne(heatingConf.CAB) end} ) -- Update du thermostat LIVING GEA.add( devicesEx.THERMOSTAT_LIVING, -1 , "", {"Function", function() fns.updateConsigne(heatingConf.LIVING) end} ) -- Update du thermostat DRESSING GEA.add( devicesEx.THERMOSTAT_DRESS, -1 , "", {"Function", function() fns.updateConsigne(heatingConf.DRESS) end} ) -- Update de la configuration chauffage T2 GEA.add( shortcuts.REQ_UPDATE_HEATING_T2, -1 , "", {"Function", function() fns.resetRequests() fns.updateConsigne(heatingConf.T2) end} ) -- Update de la configuration chauffage CAB GEA.add( shortcuts.REQ_UPDATE_HEATING_CAB, -1 , "", {"Function", function() fns.resetRequests() fns.updateConsigne(heatingConf.CAB) end} ) -- Update de la configuration chauffage CUISINE GEA.add( shortcuts.REQ_UPDATE_HEATING_KITCHEN, -1 , "", {"Function", function() fns.resetRequests() fns.updateConsigne(heatingConf.KITCHEN) end} ) -- Update de la configuration chauffage DRESSING GEA.add( shortcuts.REQ_UPDATE_HEATING_DRESS, -1 , "", {"Function", function() fns.resetRequests() fns.updateConsigne(heatingConf.DRESS) end} ) -- Update de la configuration chauffage CHAMBRE GEA.add( shortcuts.REQ_UPDATE_HEATING_BROOM, -1 , "", {"Function", function() fns.resetRequests() fns.updateConsigne(heatingConf.BROOM) end} ) -- Update de la configuration chauffage LIVING GEA.add( shortcuts.REQ_UPDATE_HEATING_LIVING, -1 , "", {"Function", function() fns.resetRequests() fns.updateConsigne(heatingConf.LIVING) end} ) -- Chauffages local HEATING_ON = true -- Durée cycle local HEATING_CYCLE = fibaro:getGlobalValue("HEATING_CYCLE") *60 -- minutes -- GESTION RADIATEURS ALPHONSE - BEGIN if (HEATING_ON) then -- GEA.add({ -- shortcuts.T2_IS_BUSY, -- {"Time", "06:00"}}, 30, "", {"ThermostatLevel", devicesEx.THERMOSTAT_T2, 20}) -- GEA.add({ -- shortcuts.T2_IS_FREE, -- {"Time", "08:02"}}, 30, "", {"ThermostatLevel", devicesEx.THERMOSTAT_T2, 16}) -- T < consigne pendant la nuit ? ECO (appartement BUSY) -- LIVING + CUISINE GEA.add({ shortcuts.T2_IS_BUSY, shortcuts.T2_WINDOW_CLOSED, shortcuts.T2_DOOR_CLOSED, {"Time", "23:31","6:14"}, {"Value-", devicesEx.TEMP_LIVING_T2, {"Global", shortcuts.TEMP_MIN_T2}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_LIVING_T2, vd_heater_values.ECO}, {"PressButton", devicesEx.VD_HEATER_KITCHEN_T2, vd_heater_values.ECO}, {"Repeat"}}) -- CHAMBRE GEA.add({ shortcuts.T2_IS_BUSY, shortcuts.T2_WINDOW_CLOSED, shortcuts.T2_DOOR_CLOSED, {"Time", "23:31","6:14"}, {"Value-", devicesEx.TEMP_BEDROOM_T2, {"Global", shortcuts.TEMP_MIN_T2}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_BEDROOM_T2, vd_heater_values.ECO}, {"Repeat"}}) -- T > consigne pendant la nuit ? HG (appartement BUSY) -- LIVING + CUISINE GEA.add({ shortcuts.T2_IS_BUSY, {"Time", "23:31","6:14"}, {"Value+", devicesEx.TEMP_LIVING_T2, {"Global", shortcuts.TEMP_MIN_T2}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_LIVING_T2, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_KITCHEN_T2, vd_heater_values.HG}, {"Repeat"}}) -- CHAMBRE GEA.add({ shortcuts.T2_IS_BUSY, {"Time", "23:31","6:14"}, {"Value+", devicesEx.TEMP_BEDROOM_T2, {"Global", shortcuts.TEMP_MIN_T2}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_BEDROOM_T2, vd_heater_values.HG}, {"Repeat"}}) -- LIVING + CUISINE -- T < consigne en journée ? CONF_1 (appartement BUSY) GEA.add({ shortcuts.T2_IS_BUSY, shortcuts.T2_WINDOW_CLOSED, shortcuts.T2_DOOR_CLOSED, -- shortcuts.OUTSIDE_IS_COLD, {"Time", "6:15","23:30"}, {"Value-", devicesEx.TEMP_LIVING_T2, {"Global", shortcuts.CONSIGNE_T2}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_LIVING_T2, vd_heater_values.CONF}, {"PressButton", devicesEx.VD_HEATER_KITCHEN_T2, vd_heater_values.CONF}, {"Repeat"}}) -- CHAMBRE -- T < consigne en journée ? CONF_2 (appartement BUSY) GEA.add({ shortcuts.T2_IS_BUSY, shortcuts.T2_WINDOW_CLOSED, shortcuts.T2_DOOR_CLOSED, -- shortcuts.OUTSIDE_IS_COLD, {"Time", "6:15","23:30"}, {"Value-", devicesEx.TEMP_BEDROOM_T2, {"Global", shortcuts.CONSIGNE_T2}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_BEDROOM_T2, vd_heater_values.CONF}, {"Repeat"}}) -- LIVING + CUISINE -- T > consigne ? appartement BUSY) GEA.add({ shortcuts.T2_IS_BUSY, {"Value+", devicesEx.TEMP_LIVING_T2, {"Global", shortcuts.CONSIGNE_T2}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_LIVING_T2, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_KITCHEN_T2, vd_heater_values.HG}, {"Repeat"}}) -- CHAMBRE -- T > consigne ? appartement BUSY) GEA.add({ shortcuts.T2_IS_BUSY, {"Value+", devicesEx.TEMP_BEDROOM_T2, {"Global", shortcuts.CONSIGNE_T2}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_BEDROOM_T2, vd_heater_values.HG}, {"Repeat"}}) -- La fenêtre de l'appartement est ouverte GEA.add( {devicesEx.T2_WINDOW}, -1, "", { {"Global", shortcuts.T2_WINDOW, "1"}, {"PressButton", devicesEx.VD_HEATER_KITCHEN_T2, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_LIVING_T2, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_BEDROOM_T2, vd_heater_values.HG}}) -- La porte de l'appartement est ouverte plus de 3 minutes GEA.add( {devicesEx.T2_DOOR}, 60 *3, "", { {"Global", shortcuts.T2_DOOR, "1"}, {"PressButton", devicesEx.VD_HEATER_KITCHEN_T2, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_LIVING_T2, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_BEDROOM_T2, vd_heater_values.HG}}) -- La porte de l'appartement est ouverte est ouverte plus de 5 minutes GEA.add( {shortcuts.T2_DOOR_OPEN}, 60 *5, "", {{"Function", function() metricAlert({ frames = { { text = " LA PORTE DU LIVING DE CHEZ ALPHONSE EST OUVERTE !" }, }, sound = { category = "notifications", id = "letter_email", }, }) end}, {"Repeat"} }) -- La fenêtre de l'appartement est fermée GEA.add( {devicesEx.T2_WINDOW}, -1, "", { {"Inverse"}, {"Global", shortcuts.T2_WINDOW, "0"}}) -- La porte de l'appartement est fermée GEA.add( {devicesEx.T2_DOOR}, -1, "", { {"Inverse"}, {"Global", shortcuts.T2_DOOR, "0"}}) -- L'appartement est FREE GEA.add( shortcuts.T2_IS_FREE, -1, "", { -- {"turnOff", devicesEx.LIGHTS_T2}, -- {"ThermostatLevel", devicesEx.THERMOSTAT_T2, {"Global", shortcuts.TEMP_MIN_T2}}, {"Global", shortcuts.TEMP_MIN_T2, "9"}, {"PressButton", devicesEx.VD_HEATER_KITCHEN_T2, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_LIVING_T2, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_SDB_T2, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_BEDROOM_T2, vd_heater_values.HG}}) -- L'appartement est BUSY -- GEA.add( -- shortcuts.T2_IS_BUSY, -1, "", { -- {"turnOn", devicesEx.LIGHTS_T2}, -- {"ThermostatLevel", devicesEx.THERMOSTAT_T2, {"Global", shortcuts.TEMP_MAX_T2}}}) -- T < consigne ? ECO (appartement FREE) GEA.add({ shortcuts.T2_IS_FREE, shortcuts.OUTSIDE_IS_COLD, shortcuts.T2_WINDOW_CLOSED, shortcuts.T2_DOOR_CLOSED, {"Value-", devicesEx.TEMP_LIVING_T2, {"Global", shortcuts.TEMP_MIN_T2}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_KITCHEN_T2, vd_heater_values.ECO}, {"PressButton", devicesEx.VD_HEATER_LIVING_T2, vd_heater_values.ECO}, {"PressButton", devicesEx.VD_HEATER_BEDROOM_T2, vd_heater_values.ECO}, {"Repeat"}}) -- T > consigne ? ECO (appartement FREE) GEA.add({ shortcuts.T2_IS_FREE, {"Or",{"Value+", devicesEx.TEMP_LIVING_T2, {"Global", shortcuts.TEMP_MIN_T2}},{"Value+", devicesEx.TEMP_BEDROOM_T2, {"Global", shortcuts.TEMP_MIN_T2}}} }, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_KITCHEN_T2, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_LIVING_T2, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_BEDROOM_T2, vd_heater_values.HG}, {"Repeat"}}) -- GESTION RADIATEURS ALPHONSE - END end -- Radiateur SDB - auto OFF quand douche éteinte GEA.add({"turnOff",devices.SDB_T2}, HEATING_CYCLE, "", {"PressButton", devicesEx.VD_HEATER_SDB_T2, vd_heater_values.HG},{"Repeat"}) -- Radiateur SDB - auto ON -- ...Quand la douche est allumée GEA.add({ shortcuts.T2_IS_BUSY, {"Time", "6:00", "23:00"}, {"turnOn",devices.SDB_T2}, -- shortcuts.OUTSIDE_IS_COLD }, 180, "", {"PressButton", devicesEx.VD_HEATER_SDB_T2, vd_heater_values.CONF}) -- Lumière living fns.autoOff({id=devicesEx.LIVING_T2, minutes=180}) -- Lumière terrasse fns.autoOff({id=devicesEx.OUTSIDE_T2, minutes=120}) fns.autoOff({id=devices.OUTSIDE_CAB, minutes=60}) if (shortcuts.AUTO_LIGHTS) then GEA.add({shortcuts.T2_IS_BUSY, {"Time", "Sunset"}}, 30, "", {"turnOn", devicesEx.OUTSIDE_T2}) GEA.add({shortcuts.T2_IS_BUSY, {"Time", "Sunset"}}, 30, "", {"turnOn", devices.OUTSIDE_CAB}) end -- Niveau supérieur -- Garage + VS -- GEA.add({"Power+", devicesEx.LIGHTS_GARAGE, 50}, 30, "Le vide sanitaire ou le garage sont allumés.") -- GESTION RADIATEURS CHALET - BEGIN if (HEATING_ON) then -- CABINET -- T < consigne pendant la nuit ? ECO GEA.add({ {"Time", "19:31","7:14"}, {"Value-", devicesEx.TEMP_CAB, {"Global", shortcuts.TEMP_MIN_CAB}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_CAB, vd_heater_values.ECO}, {"Repeat"}}) -- T > consigne pendant la nuit ? HG GEA.add({ {"Time", "19:31","7:14"}, {"Value+", devicesEx.TEMP_CAB, {"Global", shortcuts.TEMP_MIN_CAB}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_CAB, vd_heater_values.HG}, {"Repeat"}}) -- T < consigne en journée ? CONF GEA.add({ shortcuts.IAM_THERE, shortcuts.CAB_IS_BUSY, -- shortcuts.OUTSIDE_IS_COLD, {"Time", "7:15","19:30"}, {"Value-", devicesEx.TEMP_CAB, {"Global", shortcuts.CONSIGNE_CAB}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_CAB, vd_heater_values.CONF}, {"Repeat"}}) -- T > consigne ? GEA.add({ {"Or", {"Value+", devicesEx.TEMP_CAB, {"Global", shortcuts.CONSIGNE_CAB}}, shortcuts.OUTSIDE_IS_HOT, }}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_CAB, vd_heater_values.HG}, {"Repeat"}}) -- ENTRÉE -- T < consigne pendant la nuit ? ECO GEA.add({ {"Time", "21:31","6:14"}, {"Value-", devicesEx.TEMP_KITCHEN, {"Global", shortcuts.TEMP_MIN_KITCHEN}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_KITCHEN, vd_heater_values.ECO}, {"Repeat"}}) -- T > consigne pendant la nuit ? HG GEA.add({ {"Time", "21:31","6:14"}, {"Value+", devicesEx.TEMP_KITCHEN, {"Global", shortcuts.TEMP_MIN_KITCHEN}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_KITCHEN, vd_heater_values.HG}, {"Repeat"}}) -- T < consigne en journée ? CONF GEA.add({ shortcuts.IAM_THERE, shortcuts.OUTSIDE_IS_COLD, {"Time", "6:15","21:30"}, {"Value-", devicesEx.TEMP_KITCHEN, {"Global", shortcuts.CONSIGNE_KITCHEN}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_KITCHEN, vd_heater_values.CONF}, {"Repeat"}}) -- T > consigne ? GEA.add({ {"Or", {"Value+", devicesEx.TEMP_KITCHEN, {"Global", shortcuts.CONSIGNE_KITCHEN}}, shortcuts.OUTSIDE_IS_HOT, }}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_KITCHEN, vd_heater_values.HG}, {"Repeat"}}) -- CHAMBRE -- T < consigne pendant la nuit ? ECO GEA.add({ {"Time", "23:56","06:14"}, {"Value-", devicesEx.TEMP_BROOM, {"Global", shortcuts.TEMP_MIN_BROOM}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_BROOM, vd_heater_values.ECO}, {"Repeat"}}) -- T > consigne pendant la nuit ? HG GEA.add({ {"Or", {"Time", "23:56","06:14"}, {"Time", "09:01","20:14"}}, {"Value+", devicesEx.TEMP_BROOM, {"Global", shortcuts.TEMP_MIN_BROOM}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_BROOM, vd_heater_values.HG}, {"Repeat"}}) -- T < consigne en journée ? CONF GEA.add({ shortcuts.IAM_THERE, shortcuts.OUTSIDE_IS_COLD, {"Or", {"Time", "20:15","23:55"}, {"Time", "6:15","09:00"}}, {"Value-", devicesEx.TEMP_BROOM, {"Global", shortcuts.CONSIGNE_BROOM}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_BROOM, vd_heater_values.CONF}, {"Repeat"}}) -- T > consigne ? GEA.add({ {"Or", {"Value+", devicesEx.TEMP_BROOM, {"Global", shortcuts.CONSIGNE_BROOM}}, shortcuts.OUTSIDE_IS_HOT, }}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_BROOM, vd_heater_values.HG}, {"Repeat"}}) -- DRESSING -- T < consigne pendant la nuit ? ECO GEA.add({ {"Time", "21:31","6:14"}, {"Value-", devicesEx.TEMP_DRESS, {"Global", shortcuts.TEMP_MIN_DRESS}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_DRESSING, vd_heater_values.ECO}, -- {"PressButton", devicesEx.VD_HEATER_SDB, vd_heater_values.ECO}, {"Repeat"}}) -- T > consigne pendant la nuit ? HG GEA.add({ {"Time", "21:31","6:14"}, {"Value+", devicesEx.TEMP_DRESS, {"Global", shortcuts.TEMP_MIN_DRESS}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_DRESSING, vd_heater_values.HG}, -- {"PressButton", devicesEx.VD_HEATER_SDB, vd_heater_values.HG}, {"Repeat"}}) -- T < consigne en journée ? CONF GEA.add({ shortcuts.IAM_THERE, shortcuts.OUTSIDE_IS_COLD, {"Time", "6:15","21:30"}, {"Value-", devicesEx.TEMP_DRESS, {"Global", shortcuts.CONSIGNE_DRESS}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_DRESSING, vd_heater_values.CONF}, -- {"PressButton", devicesEx.VD_HEATER_SDB, vd_heater_values.CONF}, {"Repeat"}}) -- T > consigne ? GEA.add({ {"Or", {"Value+", devicesEx.TEMP_DRESS, {"Global", shortcuts.CONSIGNE_DRESS}}, shortcuts.OUTSIDE_IS_HOT, }}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_DRESSING, vd_heater_values.HG}, -- {"PressButton", devicesEx.VD_HEATER_SDB, vd_heater_values.HG}, {"Repeat"}}) -- LIVING -- T < consigne pendant la nuit ? ECO GEA.add({ {"Time", "21:31","6:14"}, {"Value-", devicesEx.TEMP_LIVING, {"Global", shortcuts.TEMP_MIN_LIVING}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_TV, vd_heater_values.ECO}, {"PressButton", devicesEx.VD_HEATER_BABY, vd_heater_values.ECO}, {"Repeat"}}) -- T > consigne pendant la nuit ? HG GEA.add({ {"Time", "21:31","6:14"}, {"Value+", devicesEx.TEMP_LIVING, {"Global", shortcuts.TEMP_MIN_LIVING}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_TV, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_BABY, vd_heater_values.HG}, {"Repeat"}}) -- T < consigne en journée ? CONF GEA.add({ shortcuts.IAM_THERE, shortcuts.OUTSIDE_IS_COLD, {"Time", "6:15","21:30"}, {"Value-", devicesEx.TEMP_LIVING, {"Global", shortcuts.CONSIGNE_LIVING}}}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_TV, vd_heater_values.CONF}, {"PressButton", devicesEx.VD_HEATER_BABY, vd_heater_values.CONF}, {"Repeat"}}) -- T > consigne ? GEA.add({ {"Or", {"Value+", devicesEx.TEMP_LIVING, {"Global", shortcuts.CONSIGNE_LIVING}}, shortcuts.OUTSIDE_IS_HOT, }}, HEATING_CYCLE, "", { {"PressButton", devicesEx.VD_HEATER_TV, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_BABY, vd_heater_values.HG}, {"Repeat"}}) end -- Radiateur SDB - auto OFF quand douche éteinte -- GEA.add({"turnOff",devices.SDB_SHOWER}, HEATING_CYCLE, "", {"PressButton", devicesEx.VD_HEATER_SDB, vd_heater_values.HG},{"Repeat"}) GEA.add({"turnOff",devices.SDB_SHOWER}, 60*15, "", {"PressButton", devicesEx.VD_HEATER_SDB, vd_heater_values.HG},{"Repeat"}) -- Radiateur SDB - auto OFF après 20 minutes -- ne fonctionne pas... -- GEA.add({vd_heater_values.CONF,devicesEx.VD_HEATER_SDB}, 60*1, "", {"PressButton", devicesEx.VD_HEATER_SDB, vd_heater_values.HG}) -- Radiateur SDB - auto ON -- ...Quand la douche est allumée GEA.add({ shortcuts.IAM_THERE, {"Time", "6:00", "23:30"}, devices.SDB_SHOWER -- shortcuts.OUTSIDE_IS_COLD }, 120, "", {"PressButton", devicesEx.VD_HEATER_SDB, vd_heater_values.CONF}, {"Repeat"}) -- ...à 7:30 heures du matin quand il fait froid GEA.add({ shortcuts.IAM_THERE, {"Time", "7:45"}, shortcuts.OUTSIDE_IS_COLD }, 30, "", {"PressButton", devicesEx.VD_HEATER_SDB, vd_heater_values.ECO}) -- ...et on éteint à 9:00 si la SDB est OFF GEA.add({ {"Time", "8:45"}, {"turnOff", devices.SDB_SHOWER}}, 30, "", {"PressButton", devicesEx.VD_HEATER_SDB, vd_heater_values.HG}) -- Minimote BLACK --[[GEA.add( shortcuts.REQ_MM_BLACK_1, -1 , "", {{"turnOn",devices.HUE_SOFA}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_3, -1 , "", {{"Switch",devices.PLUG_KITCHEN}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_5, -1 , "", {{"Switch",devices.OUTSIDE}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_7, -1 , "", {{"Scenario",scenes.ALL_OFF}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_2, -1 , "", {{"turnOff",devices.HUE_SOFA}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_4, -1 , "", {{"Switch",devices.PLUG_KITCHEN}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_6, -1 , "", {{"Switch",scenes.OUTSIDE}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_8, -1 , "", {{"Scenario",scenes.ALL_OFF}, shortcuts.RESET_MM_BLACK} )--]] local wiki=function(id,value) net.HTTPClient():request('https://wiki-pad.net/gandalf/$stories/'..id..'/'..value,{options={ method="GET", checkCertificate = false }}); end -- metricAlert() --[[GEA.add( shortcuts.REQ_MM_BLACK_1, -1 , "", {{"Function", function() wiki('personnage','terminator') end}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_3, -1 , "", {{"Function", function() wiki('personnage','jackson') end}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_5, -1 , "", {{"Function", function() wiki('personnage','marilyn') end}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_7, -1 , "", {{"Function", function() wiki('personnage','elvis') end}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_2, -1 , "", {{"Function", function() wiki('ville','sydney') end}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_4, -1 , "", {{"Function", function() wiki('ville','paris') end}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_6, -1 , "", {{"Function", function() wiki('ville','moscou') end}, shortcuts.RESET_MM_BLACK} ) GEA.add( shortcuts.REQ_MM_BLACK_8, -1 , "", {{"Function", function() wiki('ville','vegas') end}, shortcuts.RESET_MM_BLACK} -- Minimote WHITE GEA.add( shortcuts.REQ_MM_WHITE_1, -1 , "", {{"Switch",devices.PLUG_KITCHEN}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_WHITE_3, -1 , "", {{"Switch",devices.PLUG_KITCHEN}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_WHITE_5, -1 , "", {{"Switch",devices.OUTSIDE}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_WHITE_7, -1 , "", {{"Scenario",scenes.ALL_OFF}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_WHITE_2, -1 , "", {{"Switch",devices.PLUG_KITCHEN}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_WHITE_4, -1 , "", {{"Switch",devices.PLUG_KITCHEN}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_WHITE_6, -1 , "", {{"Switch",devices.OUTSIDE}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_WHITE_8, -1 , "", {{"Scenario",scenes.ALL_OFF}, shortcuts.RESET_MM_WHITE} )--]] -- Minimote BLACK GEA.add( shortcuts.REQ_MM_BLACK_1, -1 , "", {{"Switch",devices.PLUG_KITCHEN}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_BLACK_3, -1 , "", {{"Switch",devices.PLUG_KITCHEN}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_BLACK_5, -1 , "", {{"Switch",devices.OUTSIDE}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_BLACK_7, -1 , "", {{"Scenario",scenes.ALL_OFF}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_BLACK_2, -1 , "", {{"Switch",devices.PLUG_KITCHEN}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_BLACK_4, -1 , "", {{"Switch",devices.PLUG_KITCHEN}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_BLACK_6, -1 , "", {{"Switch",devices.OUTSIDE}, shortcuts.RESET_MM_WHITE} ) GEA.add( shortcuts.REQ_MM_BLACK_8, -1 , "", {{"Scenario",scenes.ALL_OFF}, shortcuts.RESET_MM_WHITE} )--]] -- GLOBAL REQUESTS -- Extinction générale GEA.add( shortcuts.REQ_ALL_OFF, -1 , "", {{"Function", function() fns.resetRequests() fns.allOff() end}} ) -- Ouverture des stores GEA.add( shortcuts.REQ_OPEN_SHUTTERS, -1 , "", {{"Function", function() fns.resetRequests() fibaro:setGlobal ("SHUTTERS_CLOSED", "0") fibaro:call(devicesEx.SHUTTERS_OPEN,"turnOn") end}} ) -- Fermeture des stores GEA.add( shortcuts.REQ_CLOSE_SHUTTERS, -1 , "", {{"Function", function() fns.resetRequests() fibaro:setGlobal ("SHUTTERS_CLOSED", "1") fibaro:call(devicesEx.SHUTTERS_CLOSE,"turnOn") end}} ) -- Fermeture des stores - notification GEA.add( shortcuts.REQ_NCLOSE_SHUTTERS, -1 , "", {{"Function", function() fns.resetRequests() metricAlert({ frames = { { icon = 23011, text = " BYE" }, -- { icon = 9219, text = " MOUVEMENT DANS L'ESCALIER EXTERIEUR !!!" }, }, sound = { category = "notifications", id = "win2", }, }) end}} ) -- Ouverture des velux GEA.add( shortcuts.REQ_OPEN_VELUX, -1 , "", {{"Function", function() fns.resetRequests() fibaro:setGlobal ("VELUX_CLOSED", "0") if tonumber(fibaro:getValue(devicesEx.TEMP_OUTSIDE, "value"))>2 then fibaro:call(devicesEx.VELUX_OPEN,"turnOn") end end}} ) -- Fermeture des velux GEA.add( shortcuts.REQ_CLOSE_VELUX, -1 , "", {{"Function", function() fns.resetRequests() fibaro:setGlobal ("VELUX_CLOSED", "1") if tonumber(fibaro:getValue(devicesEx.TEMP_OUTSIDE, "value"))>2 then fibaro:call(devicesEx.VELUX_CLOSE,"turnOn") end end}} ) -- Stores - fermeture interactive --[[GEA.add({ shortcuts.CONFIRM_BEFORE_CLOSING_SHUTTERS,shortcuts.SHUTTERS_ARE_OPEN, {"Time+", "20:00"}, {"Or",{"Time", "Sunset+180"},{"Time", "23:00"}}}, 60*10 , "", { shortcuts.ACTION_CLOSE_SHUTTERS, { "Ask", {140, 161}, "Repousser la fermeture des stores ?", scenes.ACTION_CLOSE_SHUTTERS }})--]] -- Stores - fermeture quand terrasse éteinte GEA.add({ shortcuts.SHUTTERS_ARE_OPEN, {"Time", "Sunset+40","Sunset+360"}, {"turnOff", devices.OUTSIDE}}, 60 *5 , "", { shortcuts.REQ_CLOSE_SHUTTERS}) -- Stores - fermeture quand terrasse éteinte - notification GEA.add({ shortcuts.SHUTTERS_ARE_OPEN, {"Time", "Sunset+40","Sunset+360"}, {"turnOff", devices.OUTSIDE}}, 60 *4 , "", { shortcuts.REQ_NCLOSE_SHUTTERS}) -- Fermeture des stores à 1:00 au plus tard GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.SHUTTERS_ARE_OPEN,{"Time", "1:00","3:00"}}, 30 , "", shortcuts.REQ_CLOSE_SHUTTERS) -- Fermeture des stores 10 minutes après la demande de confirmation --[[GEA.add({ shortcuts.REQ_IS_AVAILABLE, shortcuts.CONFIRM_BEFORE_CLOSING_SHUTTERS,shortcuts.SHUTTERS_ARE_OPEN, shortcuts.ACTION_CLOSE_SHUTTERS}, 600 , "", { {"Global", shortcuts.ACTION_PENDING, "0"}, shortcuts.REQ_CLOSE_SHUTTERS})--]] -- Stores - fermeture automatique si AUTO_CLOSING_SHUTTERS GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.AUTO_CLOSING_SHUTTERS,shortcuts.SHUTTERS_ARE_OPEN,{"Time", "Sunset+40","Sunset+360"}}, 30 , "", shortcuts.REQ_CLOSE_SHUTTERS) -- Stores - ouverture automatique GEA.add({shortcuts.IAM_THERE,shortcuts.REQ_IS_AVAILABLE,shortcuts.SHUTTERS_ARE_CLOSED,{"Days", "WeekDays"},shortcuts.OPEN_HOUR_WD_7,{"Time","7:00", "11:00"}}, 120 , "", shortcuts.REQ_OPEN_SHUTTERS) GEA.add({shortcuts.IAM_THERE,shortcuts.REQ_IS_AVAILABLE,shortcuts.SHUTTERS_ARE_CLOSED,{"Days", "WeekDays"},shortcuts.OPEN_HOUR_WD_8,{"Time","8:00", "11:00"}}, 120 , "", shortcuts.REQ_OPEN_SHUTTERS) GEA.add({shortcuts.IAM_THERE,shortcuts.REQ_IS_AVAILABLE,shortcuts.SHUTTERS_ARE_CLOSED,{"Days", "WeekDays"},shortcuts.OPEN_HOUR_WD_9,{"Time","9:00", "11:00"}}, 120 , "", shortcuts.REQ_OPEN_SHUTTERS) GEA.add({shortcuts.IAM_THERE,shortcuts.REQ_IS_AVAILABLE,shortcuts.SHUTTERS_ARE_CLOSED,{"Days", "WeekDays"},shortcuts.OPEN_HOUR_WD_10,{"Time","10:00", "11:00"}}, 120 , "", shortcuts.REQ_OPEN_SHUTTERS) -- GEA.add({shortcuts.IAM_THERE,shortcuts.REQ_IS_AVAILABLE,shortcuts.SHUTTERS_ARE_CLOSED,{"Days", "WeekDays"},shortcuts.OPEN_HOUR_WD_11,{"Time","11:00", "11:00"}}, 120 , "", shortcuts.REQ_OPEN_SHUTTERS) GEA.add({shortcuts.IAM_THERE,shortcuts.REQ_IS_AVAILABLE,shortcuts.SHUTTERS_ARE_CLOSED,{"Days", "WeekEnd"},shortcuts.OPEN_HOUR_WE_7,{"Time","7:00", "11:00"}}, 120 , "", shortcuts.REQ_OPEN_SHUTTERS) GEA.add({shortcuts.IAM_THERE,shortcuts.REQ_IS_AVAILABLE,shortcuts.SHUTTERS_ARE_CLOSED,{"Days", "WeekEnd"},shortcuts.OPEN_HOUR_WE_8,{"Time","8:00", "11:00"}}, 120 , "", shortcuts.REQ_OPEN_SHUTTERS) GEA.add({shortcuts.IAM_THERE,shortcuts.REQ_IS_AVAILABLE,shortcuts.SHUTTERS_ARE_CLOSED,{"Days", "WeekEnd"},shortcuts.OPEN_HOUR_WE_9,{"Time","9:00", "11:00"}}, 120 , "", shortcuts.REQ_OPEN_SHUTTERS) GEA.add({shortcuts.IAM_THERE,shortcuts.REQ_IS_AVAILABLE,shortcuts.SHUTTERS_ARE_CLOSED,{"Days", "WeekEnd"},shortcuts.OPEN_HOUR_WE_10,{"Time","10:00", "11:00"}}, 120 , "", shortcuts.REQ_OPEN_SHUTTERS) -- GEA.add({shortcuts.IAM_THERE,shortcuts.REQ_IS_AVAILABLE,shortcuts.SHUTTERS_ARE_CLOSED,{"Days", "WeekEnd"},shortcuts.OPEN_HOUR_WE_11,{"Time","11:00", "11:00"}}, 120 , "", shortcuts.REQ_OPEN_SHUTTERS) -- Velux - ouverture et fermeture automatique -- GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_OPEN,{"Days", "Friday", "Saturday"},{"Time", "Sunset+40"}}, 30 , "", shortcuts.REQ_CLOSE_VELUX) GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_OPEN,{"Or",{"Time", "Sunset+50", "Sunset+360"},shortcuts.OUTSIDE_IS_VERY_HOT}}, 30 , "", shortcuts.REQ_CLOSE_VELUX) GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_CLOSED,shortcuts.VELUX_CAN_BE_OPENED,{"Days", "WeekDays"},shortcuts.OPEN_HOUR_WD_7,{"Time","7:05", "12:00"}}, 120 , "", shortcuts.REQ_OPEN_VELUX) GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_CLOSED,shortcuts.VELUX_CAN_BE_OPENED,{"Days", "WeekDays"},shortcuts.OPEN_HOUR_WD_8,{"Time","8:05", "12:00"}}, 120 , "", shortcuts.REQ_OPEN_VELUX) GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_CLOSED,shortcuts.VELUX_CAN_BE_OPENED,{"Days", "WeekDays"},shortcuts.OPEN_HOUR_WD_9,{"Time","9:05", "12:00"}}, 120 , "", shortcuts.REQ_OPEN_VELUX) GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_CLOSED,shortcuts.VELUX_CAN_BE_OPENED,{"Days", "WeekDays"},shortcuts.OPEN_HOUR_WD_10,{"Time","10:05", "12:00"}}, 120 , "", shortcuts.REQ_OPEN_VELUX) -- GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_CLOSED,shortcuts.VELUX_CAN_BE_OPENED,{"Days", "WeekDays"},shortcuts.OPEN_HOUR_WD_11,{"Time","11:05", "12:00"}}, 120 , "", shortcuts.REQ_OPEN_VELUX) GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_CLOSED,shortcuts.VELUX_CAN_BE_OPENED,{"Days", "WeekEnd"},shortcuts.OPEN_HOUR_WE_7,{"Time","7:05", "12:00"}}, 120 , "", shortcuts.REQ_OPEN_VELUX) GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_CLOSED,shortcuts.VELUX_CAN_BE_OPENED,{"Days", "WeekEnd"},shortcuts.OPEN_HOUR_WE_8,{"Time","8:05", "12:00"}}, 120 , "", shortcuts.REQ_OPEN_VELUX) GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_CLOSED,shortcuts.VELUX_CAN_BE_OPENED,{"Days", "WeekEnd"},shortcuts.OPEN_HOUR_WE_9,{"Time","9:05", "12:00"}}, 120 , "", shortcuts.REQ_OPEN_VELUX) GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_CLOSED,shortcuts.VELUX_CAN_BE_OPENED,{"Days", "WeekEnd"},shortcuts.OPEN_HOUR_WE_10,{"Time","10:05", "12:00"}}, 120 , "", shortcuts.REQ_OPEN_VELUX) -- GEA.add({shortcuts.REQ_IS_AVAILABLE,shortcuts.VELUX_ARE_CLOSED,shortcuts.VELUX_CAN_BE_OPENED,{"Days", "WeekEnd"},shortcuts.OPEN_HOUR_WE_11,{"Time","11:05", "12:00"}}, 120 , "", shortcuts.REQ_OPEN_VELUX) -- Fermeture cabinet GEA.add({{"Days", "WeekDays"},{"Time", "20:30"}}, 30 , "", {"turnOn", devicesEx.CAB_CLOSE}) GEA.add({{"Days", "WeekEnd"},{"Time", "12:30"}}, 30 , "", {"turnOn", devicesEx.CAB_CLOSE}) -- Démarrage de Plex le soir : on tamise le living --[[GEA.add({shortcuts.LIVING_IS_ON,{"Time", "19:00", "6:00"}, {"Global", "PlexTV", "1"}}, -1, "", { {"turnOn",{devices.HUE_BUFFET, devices.HUE_CHEM}}, {"turnOff",{devices.HUE_SOFA, devices.HUE_BD, devices.HUE_DESKTOP, devices.BABY_FOOT}}, {"Hue", devices.HUE_BUFFET, "bri", 100}, {"Hue", devices.HUE_CHEM, "bri", 100}, } ) -- Arrêt de Plex le soir : on réallume les Hues GEA.add({shortcuts.LIVING_IS_ON,{"Time", "19:00", "6:00"}, {"Global", "PlexTV", "0"}}, -1, "", { {"turnOn",{devices.HUE_SOFA,devices.HUE_BUFFET,devices.HUE_BD,devices.HUE_CHEM}}, {"Hue", devices.HUE_SOFA, "bri", 150}, {"Hue", devices.HUE_BUFFET, "bri", 250}, {"Hue", devices.HUE_CHEM, "bri", 250}, {"Hue", devices.HUE_BD, "bri", 250}, } )--]] -- Extinction des Hues après micro coupure --[[GEA.add({ {"Hue", devices.HUE_SOFA_CAB, "on", 1}, {"Hue", devices.HUE_SOFA, "on", 1}, {"Hue", devices.HUE_CHEM, "on", 1}, {"Hue", devices.HUE_BUFFET, "on", 1}}, 30, "", {"turnOff", { devices.HUE_ALL } } )--]] -- Lumière garde-manger fns.onMotion({sensor=devicesEx.EYE_FOOD, id=devices.FOOD, minutes=5}) -- Lumière BABY_FOOT fns.autoOff({id=devices.BABY_FOOT, minutes=3*60}) GEA.add({"turnOff", devices.BABY_FOOT}, -1, "", {"turnOff", devices.PLUG_COMICS} ) GEA.add({"turnOn", devices.BABY_FOOT}, -1, "", {"turnOn", devices.PLUG_COMICS} ) -- Allumage HUE_DESKTOP si HUE_SOFA ON -- GEA.add({"Hue", devices.HUE_SOFA, "on", 1}, 30, "", {"turnOn", devices.HUE_DESKTOP} ) -- Extinction HUE_DESKTOP si HUE_SOFA OFF -- GEA.add({"Hue", devices.HUE_SOFA, "on", 0}, 30, "", {"turnOff", devices.HUE_DESKTOP} ) -- Lumière entrée (PLUG) fns.onMotion({sensor=devicesEx.EYE_KITCHEN, id=devices.PLUG_KITCHEN, minutes=10, condition={{ "turnOff", devices.PLUG_KITCHEN}, {"Time", "22:00", "10:00"} }}) fns.onMotion({sensor=devicesEx.EYE_KITCHEN, id=devices.PLUG_KITCHEN, minutes=60, condition={shortcuts.LUX_KITCHEN_IS_WEAK,{ "turnOff", devices.PLUG_KITCHEN}, {"Time", "17:00", "21:59"} }}) -- Lumière entrée (plafonnier) -- fns.onMotion({sensor=devicesEx.EYE_KITCHEN, id=devices.KITCHEN, minutes=5, condition={shortcuts.LUX_KITCHEN_IS_WEAK}}) -- Allumage initial entrée selon LUX en journée -- fns.autoOn({id=devices.PLUG_KITCHEN, minutes=60, condition={shortcuts.PERIOD_WORKING_TIME, shortcuts.LUX_KITCHEN_IS_WEAK}}) -- Extinction auto cuisine fns.autoOff({id=devices.PLUG_KITCHEN, minutes=60}) -- fns.autoOff({id=devices.KITCHEN, minutes=20}) -- Allumage PLUG_KITCHEN si KITCHEN ON -- GEA.add({"turnOn", devices.KITCHEN}, -1, "", {"turnOn", devices.PLUG_KITCHEN} ) -- Extinction PLUG_KITCHEN si KITCHEN OFF -- GEA.add({"turnOff", devices.KITCHEN}, -1, "", {"turnOff", devices.PLUG_KITCHEN} ) -- Sonos cuisine - informations du matin --[[GEA.add({shortcuts.HOLIDAYS_MODE_IS_OFF,{"Global", "SONOS_KITCHEN", "0"},{"Days", "WeekDays"},{"Time", "7:00", "9:00"},devicesEx.EYE_KITCHEN}, -1 , "", {{"Function", function() -- local state = fibaro:getValue(devicesEx.SONOS_KITCHEN,'state') -- fibaro:debug("SONOS STATE : "..state) fibaro:setGlobal("SONOS_KITCHEN", "1") fibaro:call(devicesEx.SONOS_KITCHEN, "setVolume", "15") fibaro:call(devicesEx.SONOS_KITCHEN, "play") end}} ) GEA.add({"Time", "9:00"}, 30 , "", {"Global", "SONOS_KITCHEN", "0"})--]] -- Mouvement escalier en bas GEA.add({ shortcuts.PERIOD_OVERNIGHT, {"turnOff", devices.OUTSIDE_CAB}, devicesEx.EYE_OUTSIDE}, -1, "", {{"Function", function() fibaro:call(devices.OUTSIDE_CAB, "turnOn") setTimeout(function() fibaro:call(devices.OUTSIDE_CAB, "turnOff") end, 300000) end}} ) -- Mouvement escalier en bas quand volets fermés GEA.add({ {"global", shortcuts.SOMEBODY_THERE, "0"}, shortcuts.SHUTTERS_ARE_CLOSED, {"turnOff", devices.OUTSIDE_CAB}, devicesEx.EYE_OUTSIDE}, -1, "", {{"global", shortcuts.SOMEBODY_THERE, "1"}, {"Function", function() fibaro:call(devices.OUTSIDE_CAB, "turnOn") setTimeout(function() fibaro:call(devices.OUTSIDE_CAB, "turnOff") end, 300000) setTimeout(function() fibaro:setGlobal (shortcuts.SOMEBODY_THERE, "0") end, 180000) end}} ) -- Mouvement escalier en bas quand volets ouverts GEA.add({{"global", shortcuts.SOMEBODY_THERE, "0"}, shortcuts.SHUTTERS_ARE_OPEN, devicesEx.EYE_OUTSIDE}, -1, "", {{"global", shortcuts.SOMEBODY_THERE, "1"}, {"Function", function() -- fibaro:setGlobal (shortcuts.SOMEBODY_THERE, "1") if fibaro:getGlobalValue("SONOS_ALARM") == "1" then metricAlert({ frames = { { icon = 2899, text = " ALERTE" }, -- { icon = 9219, text = " MOUVEMENT DANS L'ESCALIER EXTERIEUR !!!" }, }, sound = { category = "notifications", id = "positive"..math.random(1,6), }, }) elseif fibaro:getGlobalValue("SONOS_ALARM") == "666" then local getSonosObject = function ( id ) local o = { id = id, playing = false, play = function ( this ) if this.playing == true then fibaro:call(this.id, "setVolume", 0) else fibaro:call(this.id, "setVolume", 25) fibaro:call(this.id, "play") end end, restore = function ( this ) fibaro:call(this.id, "setVolume", this.volume) if this.playing == false then fibaro:call(this.id, "pause") end end } o.playing = fibaro:getValue(id, "state") == "PLAYING" o.volume = fibaro:getValue(id, "volume") return o end local KITCHEN = getSonosObject (devicesEx.SONOS_KITCHEN) local LIVING = getSonosObject (devicesEx.SONOS_LIVING) KITCHEN:play ( ) LIVING:play ( ) setTimeout(function() KITCHEN:restore ( ) LIVING:restore ( ) end, 10000) else fibaro:call(devicesEx.BELL, "turnOn") -- setTimeout(function() -- fibaro:call(devicesEx.BELL, "turnOn") -- end, 4000) end setTimeout(function() fibaro:setGlobal (shortcuts.SOMEBODY_THERE, "0") end, 120000) end}} ) GEA.add({"time","23:00"}, 30, "",{"global", shortcuts.SOMEBODY_THERE, "-1"} ) GEA.add({"time","7:00"}, 30, "",{"global", shortcuts.SOMEBODY_THERE, "0"} ) -- lumières extérieures fns.autoOff({id=devices.OUTSIDE, minutes=180, condition={{"turnOn", devices.OUTSIDE},{"time","17:00","8:00"}}}) fns.autoOff({id=devices.OUTSIDE, minutes=1, condition={{"turnOn", devices.OUTSIDE},{"time","8:01","17:01"}}}) if (shortcuts.AUTO_LIGHTS) then GEA.add({ {"Time", "Sunset-15"}}, 30, "", {"turnOn", devices.OUTSIDE}) end -- Lumière dressing+couloir WC -- fns.autoOff({id=devices.WC, minutes=10}) -- Lumière dressing fns.autoOff({id=devices.DRESSING, minutes=30}) -- Si le plafonnier du dressing est OFF, on éteint tout le dressing -- GEA.add({"turnOff", devices.DRESSING}, 30, "", {"turnOff", devices.WC} ) -- Extinction SDB si dressing OFF GEA.add({{"turnOff", devices.DRESSING}, {"Or", {"turnOn", devices.SDB_SHOWER}, {"turnOn", devices.SDB}}}, 60*15, "",{"turnOff", {devices.SDB, devices.SDB_SHOWER} } ) -- Allumage dressing si douche SDB ON GEA.add({"turnOn", devices.SDB_SHOWER}, 90, "",{"turnOn", devices.DRESSING } ) -- Allumage dressing SEB & SABINE si douche dressing ON GEA.add({{"turnOn", devices.DRESSING},{"time","6:00","23:00"}}, -1, "",{"turnOn", {devices.DRESS_SEB,devices.DRESS_BIN} } ) GEA.add({"turnOff", devices.DRESSING}, -1, "",{"turnOff", {devices.DRESS_SEB,devices.DRESS_BIN} } ) -- GEA.add({{"turnOn", devices.WC}}, -1, "",{"turnOn", devices.DRESSING } ) local turnOnSDB = function() setTimeout(function() fibaro:call(devicesEx.VD_HEATER_SDB, "pressButton", vd_heater_values.CONF) -- extinction après 15 minutes setTimeout(function() fibaro:call(devicesEx.VD_HEATER_SDB, "pressButton", vd_heater_values.HG) end, 1000 *60 *15) metricAlert({ frames = { { icon = 40847, text = " SÈCHE SERVIETTES ALUMÉ !" }, }, sound = { category = "notifications", id = "notification3", }, }) end) end GEA.add({{"Time", "07:00", "18:59"}, {"Switch", devicesEx.SUN_SWITCH}}, -1, "",{{"Function", function() local SHUTTERS_CLOSED = fibaro:getGlobalValue("SHUTTERS_CLOSED") == "1" if SHUTTERS_CLOSED then setTimeout(function() fibaro:setGlobal ("GLOBAL_REQUEST", "SUP") end, 1000) end if fibaro:getGlobalValue("VELUX_CLOSED") == "1" then setTimeout(function() fibaro:setGlobal ("GLOBAL_REQUEST", "VUP") end, 5000) end if (SHUTTERS_CLOSED) then metricAlert({ frames = { { icon = 36955, text = " HELLO!" }, }, sound = { category = "notifications", id = "notification3", }, }) else turnOnSDB() end end}} ) GEA.add({{"Time", "19:00", "02:00"}, {"Switch", devicesEx.SUN_SWITCH}}, -1, "",{{"Function", function() local SHUTTERS_OPEN = fibaro:getGlobalValue("SHUTTERS_CLOSED") == "0" if SHUTTERS_OPEN then setTimeout(function() fibaro:setGlobal ("GLOBAL_REQUEST", "SDOWN") end, 20000) end if fibaro:getGlobalValue("VELUX_CLOSED") == "0" then setTimeout(function() fibaro:setGlobal ("GLOBAL_REQUEST", "VDOWN") end, 30000) end --if (SHUTTERS_OPEN) then setTimeout(function() fns.allOff() end, 60000) metricAlert({ frames = { { icon = 23011, text = " BYE !" }, }, sound = { category = "notifications", id = "notification4", }, }) --else --turnOnSDB() --end end}} ) -- Lumières SDB fns.autoOff({id=devices.SDB, minutes=30}) fns.autoOff({id=devices.SDB_SHOWER, minutes=30}) -- Lumières SDB Alphonse fns.autoOff({id=devices.SDB_T2, minutes=30}) -- VMC SDB - auto ON selon horaires local sheduledVmc = fns.autoOn({id=devices.VMC, minutes=1, condition={ "Or",{"Time", "10:00", "12:00"},{"Time", "16:00", "18:00"}}}) -- VMC SDB haut - auto OFF selon horaires GEA.add( {{ "Or", {"Time", "10:00", "12:00"}, {"Time", "16:00", "18:00"}, }, {"turnOff", devices.SDB_SHOWER}}, 5*60, "", {{"Inverse"}, {"turnOff", devices.VMC }} ) -- VMC SDB haut - auto ON si lumière douche allumée fns.autoOn({id=devices.VMC, minutes=3, condition={"turnOn", devices.SDB_SHOWER}}) -- VMC SDB haut - auto OFF si lumière douche éteinte GEA.add({"turnOff", devices.SDB_SHOWER}, 5*60, "", {{"turnOff", devices.VMC}, { "RestartTask", sheduledVmc }} ) -- Lumières HUE - auto OFF fns.autoOff({id=devices.HUE_SOFA, minutes=180, hue=true}) fns.autoOff({id=devices.HUE_BUFFET, minutes=180, hue=true}) fns.autoOff({id=devices.HUE_CHEM, minutes=180, hue=true}) fns.autoOff({id=devices.HUE_TV, minutes=180, hue=true}) fns.autoOff({id=devices.HUE_DESKTOP, minutes=60, hue=true}) fns.autoOff({id=devices.HUE_MEZ, minutes=120, hue=true}) fns.autoOff({id=devices.HUE_BUANDRIE, minutes=60, hue=true}) fns.autoOff({id=devices.HUE_STAIRS, minutes=3, hue=true}) fns.autoOff({id=devices.HUE_CAB, minutes=45, hue=true}) fns.autoOff({id=devices.HUE_SOFA_CAB, minutes=120, hue=true}) fns.autoOff({id=devices.HUE_BROOM, minutes=20, hue=true}) -- Plug comics - auto OFF fns.autoOff({id=devices.PLUG_COMICS, minutes=120}) -- Plug living - auto OFF fns.autoOff({id=devices.PLUG_LIVING, minutes=60}) -- Plug cabinet - auto OFF -- fns.autoOff({id=devices.PLUG_CAB, minutes=120}) -- Plug DOLL - auto OFF fns.autoOff({id=devices.PLUG_DOLL, minutes=240}) -- RGB cabinet - auto OFF fns.autoOff({id=devices.RGB_CAB, minutes=180}) -- Allumage de la RGB_CAB si buffet allumé fns.autoOn({id=devices.RGB_CAB, minutes=3, condition={{"Hue", devices.HUE_STAIRS, "on", 1}}}) -- Allumage de la DOLL entre 20 heures et 23 heures si buffet allumé fns.autoOn({id=devices.PLUG_DOLL, minutes=1, condition={{"Hue", devices.HUE_BUFFET, "on", 1}, {"Time", "20:00", "23:00"}}}) -- Extinction de la DOLL si le buffet est éteint fns.autoOff({id=devices.PLUG_DOLL, minutes=1, condition={"Hue", devices.HUE_BUFFET, "on", 0}}) -- TV chambre - auto OFF fns.autoOff({id=devicesEx.PLUG_TV, minutes=240}) -- Allumage initial des lumières le soir à Sunset if (shortcuts.AUTO_LIGHTS) then GEA.add( { shortcuts.IAM_THERE, {"Time", "Sunset-15"}, -- {"Value-", devicesEx.LUX_BEDROOM, 20} }, 30, "", { {"turnOn", {devices.PLUG_KITCHEN,devices.PLUG_COMICS, devices.HUE_BUFFET, devices.HUE_CHEM}}, {"Hue", devices.HUE_BUFFET, "bri", 150}, {"Hue", devices.HUE_TV, "bri", 150}, {"Hue", devices.HUE_CHEM, "bri", 150}, } ) end -- Ajustement à SUNSET-30M si HUE_SOFA ou HUE_BUFFET sont allumés GEA.add( { {"Time", "Sunset"}, shortcuts.LIVING_IS_ON }, 30, "", { {"Hue", devices.HUE_CHEM, "bri", 250}, {"Hue", devices.HUE_TV, "bri", 250}, {"Hue", devices.HUE_BUFFET, "bri", 250}, } ) -- Global OFF - 01:30 GEA.add( {"Time", "01:30"}, 30 , "", {{"Function", function() fns.resetRequests() fns.allOff() end}, {"PressButton", devicesEx.VD_HEATER_SDB, vd_heater_values.HG}, {"PressButton", devicesEx.VD_HEATER_SDB_T2, vd_heater_values.HG}, {"turnOff", devicesEx.OUTSIDE_T2}, {"turnOff", devicesEx.LIVING_T2}, } ) -- GEA.add({{"Weather!", "Temperature" ,""},{"WeatherLocal!",""}}, 30, "", {"SonosTTS", devices.SONOS, 28, "Nous sommes le #datefull# il fait dehors #value[1]# degrer et le temps est #value[2]#", 100}) -- GEA.add( {"Hue", devices.HUE_SOFA, "on", 1}, 30, "", {"SonosTTS", devices.SONOS, 28, "Extinction des feux", 50} ) -- GEA.add(true, 30, "La température ext. est de {WeatherLocal, Temperature}° - météo : {WeatherLocal}") --]] -- -------------------------------------------------------- -- FIN DU CODE UTILISATEUR -- -------------------------------------------------------- end
  2. Bonjour, j'ai une dizaine de ZMNHJD1 à la maison, installés il y a 2 ans, et j'en ai un qui a cramé il y a 15 jours. À l'époque, aucune difficulté pour les inclure avec ma HC2. J'ai reçu un nouveau ZMNHJD1 que j'ai installé ce matin : problème d'inclusion en boucle. Après avoir lu vos retours, j'ai tenté 3 inclusions foireuses/exclusions et puis la quatrième a été la bonne Le module a bien été reconnu au bout de 10 minutes et fonctionne correctement en direct (via le dimmer) ou via mon VD de chauffage. Pas de souci au reboot non plus. (je suis en 4.530) J'ai l'impression que c'est bien aléatoire... Pendant les inclusions, mon module était à 50 cm de la box.
  3. Bonjour, j'ai pas mal cherché, fouiné et je n'ai toujours pas trouvé de solution pour dissocier le KLF-050 d'un velux ou d'un volet roulant IO. La manip décrite dans la doc, à savoir la même que pour l'association, ne produit aucun effet chez moi... (je me retrouve maintenant avec des volets qui sont pilotés par deux KLF-050... ) Quelqu'un a déjà réussi à dissocier un volet ou un velux d'un KLF-050 ?
  4. Alistair Crompton

    Support Gea

    On my side that's the opposite... My triggers run much quicker with this beta firmware (I had significative delays with the latest stable version...).
  5. Alistair Crompton

    Support Gea

    Le petit changement qui gère la création automatique de la variable globale plugin :
  6. Alistair Crompton

    Support Gea

    J'en ai une grosse dizaine (mix INNR et "vraies" HUEs) et tout marche bien chez moi. J'utilise la syntaxe de la doc 6.07.
  7. Alistair Crompton

    Support Gea

    Salut, j'avais exactement les mêmes symptômes quand j'avais les messages d'erreurs "API not found". Depuis que j'ai appliqué le fix, tout roule !
  8. Bonjour à tous, merci pour vos investigations. Les "API not found" commençaient à me polluer un peu et je n'avais pas eu encore le temps de mettre mon nez dedans... (à noter que chez moi, depuis quelques jours, les exceptions "API not found" ralentissaient le déclenchement de mes capteurs de présence...) Depuis application du fix, GEA tourne parfaitement bien (mon HC2 tourne sous 4.511 beta). MERCI !
  9. Bravo pour ce superbe client que je viens de découvrir. Merci au créateur !
  10. Bonjour à tous ! Utilisateur de X10 pendant des années, je suis ensuite passé au ZWave avec une Vera-lite pour laquelle j'ai écrit des kilomètres de LUA Je déménage cette année et c'est l'occasion pour moi de passer à la Fibaro HC2 que j'ai dégotée à un bon prix. Premières impressions excellentes, à part cette limitation qui empêche de partager des fonctions entre scénarios... Et pas de système ouvert comme sur Vera... Ce forum semble être une mine d'informations, je suis sûr d'y trouver mon bonheur ! Alistair
×
×
  • Créer...