Aller au contenu

Forall

Membres confirmés
  • Compteur de contenus

    7
  • Inscription

  • Dernière visite

Réputation sur la communauté

0 Neutral

À propos de Forall

  • Rang
    Nouveau
  • Date de naissance 21/03/1982

Contact Methods

  • Skype
    vare.daniel

Profile Information

  • Sexe :
    Homme
  • Ville :
    Stockholm
  • Intéret :
    Home automation, Music, Science
  • Box
    Home Center 2
  • Version
    4.530

Visiteurs récents du profil

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

  1. Forall

    Support Gea

    Dear @Steven, unfortionatly the log shows that each time i get movement it interperate the code as seting the varible to night instead of if night GEA.add(id["FramsidePIR"], -1, "", { {"Global", "Solen", "Natt"}, --if nighttime {"TurnOn", { id["UppfartenLampa"], id["EntreLampa"], id["GangLampa"] }} -- turn on lights } ) Best regards, Daniel
  2. Forall

    Support Gea

    Dear @Steven, Thank you for the explanation! I will correct this in the code and give it a new try
  3. Forall

    Support Gea

    Dear @pepite, Thank you so much for helping me out with this. Line 1921 is " message:gsub("({.-})", function(c) " from section " message:gsub("({.-})", function(c) local d = tools.split(c:gsub("{", ""):gsub("}", ""), ",") for i = 1, #d do d = tools.trim(d) if (tools.isNumber(d)) then d = tonumber(d) elseif (d:lower()=="true") then d = true elseif (d:lower()=="false") then d = false end end local res = GEA.getOption(d).getValue() if (type(res) == "nil") then res = "n/a" end message = message:gsub(c, tostring(res)) end) " Regarding Lux meter 167, I had it in the heading to collect the data but not started adding the code yet, so removing it and only adding the once i have a function ready for solved that one Are these correct functions? got a little confused with the multiple conditions structure with PIR activation: --Turn on outdoor lights on front side of the house PIR dependent during the night and turn of 5 min later GEA.add(id["FramsidePIR"], -1, "", {{"Global", "Solen", "Natt"}}, {{"turnOn", id["EntreLampa"]}, {"turnOn", id["UppfartenLampa"]},{"turnOn", id["GangLampa"]}}) -- when PIR notice movement, but only during night time, turn on 3 lamps GEA.add(id["FramsidePIR"], 5*60, "", {{"Global", "Solen", "Natt"}}, {{"turnOff", id["EntreLampa"]}, {"turnOff", id["UppfartenLampa"]}, {"turnOff", id["GangLampa"]}}) -- 5 min after the movement stops, still only during night time, turn of the affected lamps --Outdoor Lightning -- get variable Sun='Solen' through the day using timers to avoid LUX meters to activete the light on inproper times GEA.add( {{"Time", "05:00", "05:02"}}, 30 , {{"Global", "Solen", "Gryning"}}) - check every 30 sec and if time is between 05:00-05:02 state that it is twilight in the global variable GEA.add( {{"Time", "09:00", "09:02"}}, 30 , {{"Global", "Solen", "Dag"}, {"Global", "Pool", "Släck"}}) -- check every 30 sec and if time is between 09:00-09:02 state that it is daytime and the the pool light variable should be set to off GEA.add( {{"Time", "14:00", "14:02"}}, 30 , {{"Global", "Solen", "Eftermiddag"}}) GEA.add( {{"Time", "22:00", "22:02"}}, 30 , {{"Global", "Solen", "Sen kväll"}}) -- Control Variable 'Sun' (Solen)with LUX meeters morning and afternoon GEA.add( {{"Value+", id["FramsidanLUX"], 150} , {"Global", "Solen", "Gryning"}}, 30 , {{"Global", "Pool", "Släck"}, {"turnOFF", id["EntreLampa"]}, {"turnOff", id["UppfartenLampa"]}, {"turnOff", id["GangLampa"]}, {"turnOff", id["AltanLampa"]}, {"turnOff", id["PoolLampa"]}, {"Global", "Solen", "Dag"}}) --check every 30 sec and if the lux is above 150 and it is twilight turn of a bunch of lamps and state that it is daytime and pool lights off GEA.add( {{"Value+", id["BaksidanLUX"], 150} , {"Global", "Solen", "Gryning"}}, 30 , {{"Global", "Pool", "Släck"}, {"turnOFF", id["EntreLampa"]}, {"turnOff", id["UppfartenLampa"]}, {"turnOff", id["GangLampa"]}, {"turnOff", id["AltanLampa"]}, {"turnOff", id["PoolLampa"]}, {"Global", "Solen", "Dag"}}) -- same as above but on the other side of the house GEA.add( {{"Value-", id["FramsidanLUX"], 25} , {"Global", "Solen", "Eftermiddag"}}, 30, {{"Global", "Pool", "Tänd"}, {"turnOn", id["EntreLampa"]}, {"turnOn", id["UppfartenLampa"]}, {"turnOn", id["GangLampa"]}, {"turnOn", id["AltanLampa"]}, {"Global", "Solen", "Kväll"}}) ----check every 30 sec and if the lux is below 25 and it is afternoon turn on a bunch of lamps and state that it is evening and pool lights on GEA.add( {{"Value-", id["BaksidanLUX"], 25} , {"Global", "Solen", "Eftermiddag"}}, 30, {{"Global", "Pool", "Tänd"}, {"turnOn", id["EntreLampa"]}, {"turnOn", id["UppfartenLampa"]}, {"turnOn", id["GangLampa"]}, {"turnOn", id["AltanLampa"]}, {"Global", "Solen", "Kväll"}})
  4. Forall

    Support Gea

    Thank you @Steven and @pepite , The link to the new verion worked exelent and i have now change to that one. and with the explanation of multiple arguments for the new verion i have now started to clean up my functions. Unfortunately i may have done something wrong again of found a bug is i get this error in the "do not touch" code. Also ID 167 is my LUX sensor in the garage and at the moment is indicates zero but according to the event log if is operational and changes regularly. Best Regards, Daniel
  5. Forall

    Support Gea

    Dear all, I have resently started trying to transfeer som 30 scenes into GEA but i do not really understand a couple of things * how do i add multiple If arguments? E.g. when PIR is activated and Variable x is Y and Varible XX is YY then do this. * similar when both the PIR, door sensor and garagedoor tilt sensor should be safe for x min before turning the lights of. I have tried to do this in the following code but somehow only some commands are working and i can not understand what i am doing wrong Any help of pointing into the right direction would be very appreciated! Best regards! Daniel Ps. i have added the whole start just if i have messed up already in the initiation of GEA... PPS. anyone that can send me the latest version? the link to 6.11 in the GEA thread does not seem to work for me. --[[ %% autostart %% properties 8 value 9 value 33 value 79 value 89 value 91 value 98 value 158 value 167 value 169 value 170 value 172 value 187 value 222 value 224 value %% globals Solen Vakna --]] -- v 5.42 -- ================================================== -- GEA : Gestionnaire d'Evénements Automatique -- ================================================== -- [FR] Scénario permettant de contrôler si un périphérique est -- activé depuis trop longtemps ou lancer un push d'avertissement. -- Ce scénario permet une annotation plus simple que le code LUA -- il nécessite néanmoins quelques connaissances. -- -- [EN] This scene allow you to check every X second the status -- of a module and send actions if the module is activated since too long. -- This scene allow you a more simple annotation than LUA -- it requires some knowledge -- -- Auteur : Steven P. with modifications of Hansolo and Shyrka973 -- Version : 5.42 -- Special Thanks to : -- jompa68, Fredric, Diuck, Domodial, moicphil, lolomail, byackee, -- JossAlf, Did, sebcbien, chris6783, tibahut and all other guy from Domotique-fibaro.fr -- ------------------------------------------------------------ -- Historique / History -- ------------------------------------------------------------ -- L'historique complet est diponible ici / the full history is available here : -- http://www.domotique-fibaro.fr/index.php/topic/1082-gea-gestionnaire-dévénements-automatique/?p=12428 local id = { --Framsidan FramsidanLUX = 224 , EntreLampa = 25 , FramsidePIR = 222 , UppfartenLampa = 302 , GangLampa = 31 , Siren = 228 , -- Baksidan BaksidanLUX = 172 , AltanLampa = 19 , PoolLampa = 39 , BaksidanPIR = 170 , --Vardagsrum VardagsrumPIR = 98 , TV = 187 , VrumLampa = 306 , SoffbordLampa = 5 , FonsterLampa = 158 , Luftvarmepump = 28 , --KÖK MatbordLampa = 211 , DiskbankLampa = 213 , --Tvättstuga TvattstugaLampa = 29 , TvattstugaPIR = 89 , TvattstugaLUX = 91 , --Hall HallLampa = 44 , HallPIR = 79 , SovrumsBrandlarm = 9 , KoksBrandlarm = 8 , --Sovrum 1 - vuxna Sovrum1Lampa = 208 , --Sovrum 2 Barn Sovrum2Lampa = 197 , --Badrum --Krypgrund KrypgrundLampa = 209 , --Garage GaragePIR = 165 , GarageLUX = 167 , Garageport = 158 , GarageLampa = 301 , GarageBrandlarm = 33 , --Pumprum PumprumTemp = 41 , } -- Paramétrage de GEA / GEA configuration function config() GEA.isVersionFour = true -- On est en version 4.017 Beta ou supérieure / GEA.language = "EN" -- Votre langue : FR (default) / Your language : EN GEA.checkEvery = 30 -- On vérifie toutes les X secondes (default : 30) / Check every X seconds GEA.portables = {179} -- Liste des portables devant recevoir une notification {70, 71} / Smartphones you want to be notified GEA.debug = false -- Affichage des traces dans la console (default : false) / Show trace in the debug window -- GEA.getGlobalForActivation = {"SuspendreGEA", "non"} -- active ou désactive l'exécution de GEA via une variable globale / active or deactive GEA execution with a global variable -- GEA.catchError = false GEA.optimize = GEA.typeOptimize["IMMEDIATE_ONLY"] -- option : GEA.typeOptimize["NONE"], GEA.typeOptimize["IMMEDIATE_ONLY"], GEA.typeOptimize["ALL"] -- permet d'optimiser les soucis liés au getName et getRoom de fibaro mais n'affiche plus le nom des modules concernés. end -- Ajouter ici les événements à exécuter / Add here events to schedule -- Une liste d'exemples est disponible dans un fichier annexe samples.lua / A samples list is available in another file called samples.lua function setEvents() --Outdoor Lightning -- get variable Sun='Solen' through the day using timers to avoid LUX meters to activete the light on inproper times GEA.add(true, 30, "", { {"Time", "05:00", "05:02"}, {"Global", "Solen", "Gryning"} } ) GEA.add(true, 30, "", { {"Time", "09:00", "09:02"}, {"Global", "Solen", "Dag"}, {"Global", "Pool", "Släck"} } ) GEA.add(true, 30, "", { {"Time", "14:00", "14:02"}, {"Global", "Solen", "Eftermiddag"} } ) GEA.add(true, 30, "", { {"Time", "22:00", "22:02"}, {"Global", "Solen", "Sen kväll"} } ) -- Control Variable 'Sun' (Solen)with LUX meeters morning and afternoon GEA.add(id["FramsidanLUX"], -1, "", { {"If" ,{ {"Value+", id["FramsidanLUX"], 150} } }, {"IF", { {"Global", "Solen", "Gryning"} } }, {"Global", "Pool", "Släck"}, {"turnOFF", id["EntreLampa"]}, {"turnOff", id["UppfartenLampa"]}, {"turnOff", id["GangLampa"]}, {"turnOff", id["AltanLampa"]}, {"turnOff", id["PoolLampa"]}, {"Global", "Solen", "Dag"} } ) GEA.add(id["BaksidanLUX"], -1, "", {{"If" ,{{"Value+", id["BaksidanLUX"], 150}}}, {"IF", {{"Global", "Solen", "Gryning"}}}, {"Global", "Pool", "Släck"},{"turnOFF", id["EntreLampa"]}, {"turnOff", id["UppfartenLampa"]}, {"turnOff", id["GangLampa"]}, {"turnOff", id["AltanLampa"]},{"turnOff", id["PoolLampa"]}, {"Global", "Solen", "Dag"}}) GEA.add(id["FramsidanLUX"], -1, "", {{"If" ,{{"Value-", id["FramsidanLUX"], 25}}}, {"IF", {{"Global", "Solen", "Eftermiddag"}}}, {"Global", "Pool", "Tänd"},{"turnOn", id["EntreLampa"]}, {"turnOn", id["UppfartenLampa"]}, {"turnOn", id["GangLampa"]}, {"turnOn", id["AltanLampa"]}}) GEA.add(id["BaksidanLUX"], -1, "", {{"If" ,{{"Value-", id["BaksidanLUX"], 25}}}, {"IF", {{"Global", "Solen", "Eftermiddag"}}}, {"Global", "Pool", "Tänd"}, {"turnOn", id["EntreLampa"]}, {"turnOn", id["UppfartenLampa"]}, {"turnOn", id["GangLampa"]}, {"turnOn", id["AltanLampa"]}}) --Turn on Lights at Sunset GEA.add(true, 30, "", { {"Time", "Sunset+15", "Sunset+20"}, {"Global", "Solen", "Kväll"}, {"Global", "Pool", "Tänd"}, {"turnOn", id["EntreLampa"]}, {"turnOn", id["UppfartenLampa"]}, {"turnOn", id["GangLampa"]}, {"turnOn", id["AltanLampa"]} } ) --Turn of Lights at 22.00 if no motion indoors and lights/TV is turned of (Varable 'Vakna'=awake GEA.add(true, 30, "", { {"If", { "Global", "Vakna", "Stilla"}, { { "Time", "22:00", "22:02"}, {"Global", "Solen", "Natt"}, {"Global", "Pool", "Släck"}, {"turnOFF", id["EntreLampa"]}, {"turnOff", id["UppfartenLampa"]}, {"turnOff", id["GangLampa"]}, {"turnOff", id["AltanLampa"]}, {"turnOff", id["PoolLampa"]}, {"Global", "Solen", "Natt"} } } } ) -- Turn of outdoor light if they are on during wrong hours GEA.add(true, 15*60, "", {{"If", { "Global", "Solen", "Dag"}, {"Global", "Pool", "Släck"}, {"turnOFF", id["EntreLampa"]}, {"turnOff", id["UppfartenLampa"]}, {"turnOff", id["GangLampa"]}, {"turnOff", id["AltanLampa"]},{"turnOff", id["PoolLampa"]}}}) GEA.add(true, 15*60, "", {{"If", { "Global", "Solen", "Eftermiddag"}, {"Global", "Pool", "Släck"}, {"turnOFF", id["EntreLampa"]}, {"turnOff", id["UppfartenLampa"]}, {"turnOff", id["GangLampa"]}, {"turnOff", id["AltanLampa"]},{"turnOff", id["PoolLampa"]}}}) GEA.add(true, 30*60, "", {{"If", { "Global", "Solen", "Natt"}, {"Global", "Pool", "Släck"}, {"turnOFF", id["EntreLampa"]}, {"turnOff", id["UppfartenLampa"]}, {"turnOff", id["GangLampa"]}, {"turnOff", id["AltanLampa"]},{"turnOff", id["PoolLampa"]}}}) --Turn on outdoor lights weekdays at wake up time GEA.add(true, 30, "", {{"If", {"Global", "Solen", "Gryning"}, {{"Time", "05:45", "05:47"}, {"Days", "Weekday"}, {"turnOn", id["EntreLampa"]}, {"turnOn", id["UppfartenLampa"]}, {"turnOn", id["GangLampa"]}}}}) --Turn on outdoor lights on front side of the house PIR dependent during the night and turn of 5 min later GEA.add(id["FramsidePIR"], -1, "", {{"If",{{"Global", "Solen", "Natt"}}}, {"turnOn", id["EntreLampa"]}, {"turnOn", id["UppfartenLampa"]},{"turnOn", id["GangLampa"]}}) GEA.add(id["FramsidePIR"], 5*60, "", {{"If",{{"Global", "Solen", "Natt"}}}, {"turnOff", id["EntreLampa"]}, {"turnOff", id["UppfartenLampa"]}, {"turnOff", id["GangLampa"]}}) --Turn on outdoor lights on rear side of the house PIR dependent during the night and turn of 5 min later GEA.add(id["BaksidanPIR"], -1, "", {{"If",{{"Global", "Solen", "Natt"}}}, {"turnOn", id["AltanLampa"]}, {"turnOn", id["GangLampa"]}}) -- something wrong here ** GEA.add(id["BaksidanPIR"], 5*60, "", {{"Inverse"}, {{"If",{"Global", "Solen", "Natt"}, {"turnOff", id["AltanLampa"]}, {"turnOff", id["GangLampa"]}}}) --Lights Garage --Turn on Lights if movement in the Garage ??How do i add the two Garagedoors?? GEA.add(id["GaragePIR"], -1, "", {{"turnOn", id["GarageLampa"]}}) GEA.add(id["GaragePIR"], 5*60, "", {{"Inverse"}, {"Time", "23:00", "Sunrise"}, {"turnOff", id["GarageLampa"]}}) --Lights rear entrece -- is the room already bright? GEA.add(id["TvattstugaLUX"], -1, "", {{"If" ,{{"Value-", id["TvattstugaLUX"], 50}}}, {"Global", "tvattljus", "Mork"}}) GEA.add(id["TvattstugaLUX"], 1*60, "", {{"If" ,{{"Value+", id["TvattstugaLUX"], 75}}}, {"Global", "tvattljus", "Ljus"}}) -- if the room is dark and there is movement turn on the lights for 5 min GEA.add(id["TvattstugaPIR"], -1, "", {{"If",{{"Global", "tvattljus", "Mork"}}, {"turnOn", id["TvattstugaLampa"]}}}) GEA.add(id["TvattstugaPIR"], 5*60, "", {{"Inverse"}, {"turnOff", id["TvattstugaLampa"]}}) end
  6. Hi everyone and thanks for what seems to be the golden place to improve my home automation. Hi i am a happy DIY home automation kind of a person. I try to improve both my programming skills (that was almost non existent when i started) and try to get a functional and fun house. (according to my wife though not everything is improvements though ) I hope to reach the level where i can be of support as well for others my system: HC2, 9 built in power switches (double), 1 built in power switch single, 2 dimmers, 4 door sensors, 4 multi motion sensors, siren, 3 smoke alarms, 1 power strip, 2 fibaro universal sensors, 1 garage door sensor, 1 plug in power switch
×