Aller au contenu

jompa68

Membres confirmés
  • Compteur de contenus

    69
  • Inscription

  • Dernière visite

Tout ce qui a été posté par jompa68

  1. jompa68

    Support Gea

    So first task will stop if i turnoff coffee machine? Regards Jonny Larsson From my iPhone6+ med Tapatalk
  2. jompa68

    Support Gea

    So this will be good if i understand right. Second line will stop the first task if it uses less then 10watt or powered Off? local coffeeTask = GEA.add({"Sensor+", id["kaffebryggare"], 50}, 40*60, "", {{"turnOff", id["kaffebryggare"]}}) GEA.add({"Sensor-", id["kaffebryggare"], 10}, -1, "", {{"StopTask", coffeeTask}})
  3. jompa68

    Support Gea

    EN This do not work, why? Goal is to shut off the wall plug after 40min when it use more then 50watt GEA.add({"power+", id["kaffebryggare"], 50}, 40*60, "", {{"turnOff", id["kaffebryggare"]}}) Get this error msg [DEBUG] 10:53:59: line 2066: attempt to concatenate local 'name' (a nil value)
  4. jompa68

    Support Gea

    EN How is Group working? Is it associating? Or is something you set up in GEA? GEA.add(17, 5*60, "", {{"Group",1},{"Group",2}}) -- Lumière allumée depuis 5 mn. GEA.add(18, 5*60, "", {{"Group",1}}) -- Porte ouverte depuis 5 mn. GEA.add({"Group",1}, 5*60, "Porte ouverte et lampe allumé de puis plus de 5mn.")
  5. jompa68

    Support Gea

    EN have a question regarding my code. Can it be improved with some other functions in GEA? Code works but maybe it can be changed -- Turn off if no movement local koketmotion = id["mSensor_kok"] local koketTask = GEA.add(id["fonster_kok"], 10*60, "", {{"turnOff"}}) local koketTask2 = GEA.add(id["lilla_fonster_kok"], 10*60, "", {{"turnOff"}}) GEA.add(koketmotion, -1, "", {{"turnOn", id["lilla_fonster_kok"]},{"turnOn", id["fonster_kok"]}, {"RestartTask", koketTask}, {"RestartTask", koketTask2}}) GEA.add(id["fonster_kok"], -1, "", {{"Inverse"}, {"turnOff", id["fonster_kok"]}}) GEA.add(id["lilla_fonster_kok"], -1, "", {{"Inverse"}, {"turnOff", id["fonster_kok"]}})
  6. jompa68

    Support Gea

    EN thanks pepite, works perfectly
  7. jompa68

    Support Gea

    EN Need some help with this task. Want it to run only between time that i have specified but it runs always. local wcTask = GEA.add(id["wcTaklampa"], 10*60, "", {{"turnOff"}}) GEA.add(id["mSensor1wc"], -1, "", {{"If",{{"Days","Weekdays"},{"Time", "07:00", "22:00"}}},{"Function", function() fibaro:call(id["wcTaklampa"], "turnOn") end},{"Function", function() fibaro:call(id["wcSpegel"], "turnOn") end},{"RestartTask", wcTask}}) GEA.add(id["mSensor2wc"], -1, "", {{"If",{{"Days","Weekdays"},{"Time", "07:00", "22:00"}}},{"Function", function() fibaro:call(id["wcTaklampa"], "turnOn") end},{"Function", function() fibaro:call(id["wcSpegel"], "turnOn") end},{"RestartTask", wcTask}})
  8. Une autre Scène pour connaitre le nombre de "pas" / distance parcourue avec un Motion cookie : . --[[ %% autostart %% properties %% globals --]] ----------------------------------------------------------------- --[[ Mother and moion cookies scene by Jonny Larsson (jompa68) Scene that use a cookies to track your steps/walk Scene will run every 30 seconds. 2015-02-19 version 0.1 --]] local sourceTrigger = fibaro:getSourceTrigger(); function tempFunc() local currentDate = os.date("*t"); local cookieWalk = 'F6s7juyUKgpxxxxxxxxxxxxxxxxxxxx' local httpClient = net.HTTPClient(); httpClient:request('https://apis.sen.se/v2/feeds/'..cookieWalk..'/events/?format=json', { success = function(response) if tonumber(response.status) == 200 then local jsonData = json.decode(response.data) local total=0 for i = 1, #jsonData.objects do if jsonData.objects[i].profile == 'WalkStandard' then if string.sub(jsonData.objects[i].dateEvent,1,10) == os.date("%Y-%m-%d") then total = total + jsonData.objects[i].data.numberSteps end end end print('Total steps/walk today: '..total) fibaro:call(423, "setProperty", "ui.lblSteps.value", total) else print('call::checkUpdate ERROR [HTTPClient:request] status: ' .. response.status) end end, options = { headers = { ['Authorization'] = 'Basic xxxxxxxxxxxxxxxxxx' } } }); setTimeout(tempFunc, 30*1000) end if (sourceTrigger["type"] == "autostart") then tempFunc() else fibaro:debug("Set scene to %%autostart to have it run by automatic") end
  9. . Utiliser la Mother de Sense et les Motion Cookies comme détection de présence avec la HC2. Parametrer l'application "présence" en vous connectant sur le site "sen.se" Quand vous arrivez ou partez de votre domicile, l'application mettra à jour le "statut" du cookie Avec une scène en Lua et via l'Api de "sen.se", nous pouvons trouver la valeur de la "présence", envoyer une variable globale et l'utiliser dans d'autres scènes. Egalement afin d'utiliser des modules virtuels type "On/Off". ( ex: Allumer,éteindre la lumière / Mise en route ou arrêt de l'alarme....etc ) --[[ %% autostart %% properties %% globals --]] ----------------------------------------------------------------- --[[ Mother and moion cookies scene by Jonny Larsson (jompa68) An presence scene that use a cookies to track when arrive or leave home and set a global variable with the actual value, then you can use the variable as trigger to do other things with your HC2 like turnOn a lamp, turnOff alarm etc. Scene will run every 30 seconds. Change this to rows: local cookiePresence = 'D6se3zRof0bAB5Mxxxxxxxxxxxxxxxx' <--- id of cookie ['Authorization'] = 'Basic xxxxxxxxxxxxxxxx' <--- encoded user and password for apis.sen.se login 2015-02-19 version 0.1 --]] local sourceTrigger = fibaro:getSourceTrigger(); function tempFunc() local currentDate = os.date("*t"); local cookiePresence = 'D6se3zRofxxxxxxxxxxxxxxxx' local httpClient = net.HTTPClient(); httpClient:request('https://apis.sen.se/v2/feeds/'..cookiePresence..'/events/?limit=1&format=json', { success = function(response) if tonumber(response.status) == 200 then local jsonData = json.decode(response.data) local total=0 for i = 1, #jsonData.objects do if jsonData.objects[i].profile == 'WalkStandard' then if string.sub(jsonData.objects[i].dateEvent,1,10) == os.date("%Y-%m-%d") then presence = jsonData.objects[i].data.body end end end print('Presence: '..presence) fibaro:call(423, "setProperty", "ui.lblPresence.value", presence) fibaro:setGlobal("cookie_Jonny", presence) else print('call::checkUpdate ERROR [HTTPClient:request] status: ' .. response.status) end end, options = { headers = { ['Authorization'] = 'Basic xxxxxxxxxxxxxxxxxxxx' } } }); setTimeout(tempFunc, 30*1000) end if (sourceTrigger["type"] == "autostart") then tempFunc() else fibaro:debug("Set scene to %%autostart to have it run by automatic") end
  10. jompa68

    Support Gea

    En Steven, sorry but i did not ask for permission before i did share your script on forum.fibaro.com. http://forum.fibaro.com/index.php?/topic/17675-gea/#entry58065 My intention is not to take credit on your script. iPhone 6 Plus @ Tapatalk
  11. Merci beaucoup, ça marche
  12. Non, cela n'a pas fonctionné. EN No, that did not work.
  13. EN Krikroff, can you tell how to fix your VD to support swedish letters? If i test this in browser it says swedish à…à„à– letters correctly: http://translate.google.com/translate_tts?ie=UTF8&tl=sv&q=Smà¶rgà¥sbord But when i look at your VD i see that you use ie=UTF-8 instead. Did try to change to UTF8 but it does not work... Can you give me some hint? Please
  14. le script a été améliorée Skickat från min iPhone med Tapatalk
  15. jompa68

    Support Gea

    FR (google translate) im en utilisant un script Stevens GoogleCal2HC2 et créé une fonction dans GEA que seulement envoyer la chaîne de texte d'entrée de calandre à mes Sonos au moment spécifié de calendrier. EN im using Stevens GoogleCal2HC2 script and created a function in GEA that only send the text string of calender entry to my Sonos at specified time from calender. function isEventNow2TTS() local day = os.date("%d/%m %H:%M") for i = 1, 10 do local event = fibaro:getGlobalValue("Event"..i) if (string.find(event, day)) then TTStext = string.sub(event, 15) return true, TTStext end end return false end GEA.add({"Function", function() return isEventNow2TTS() end}, 30, "",{{"Global","SonosTTS","lng=en|dr=auto|vol=30|txt="..'#value#'..". . .|"}})
  16. EN did sort it out..
  17. EN Trying this code but when temperature is - values it will not work
  18. jompa68

    Showroom Configs Gea

    Function to compare lastseen with abscencetime. Create an variable, in my case "LastSeenJonny" then in your smartphone check device/scene add this code to set lastseen in unixtime. then function in GEA can compare if lastseens is more then for example 30minutes fibaro:setGlobal("LastSeenJonny",os.date(os.time())) Then put this in GEA local LastSeenJonny = 0+fibaro:getGlobal("LastSeenJonny"); -- == FUNCTIONS == -- -- AbsenceTime function isAbsence() local AbsenceTime = 30 --30 minutes local AbsenceTime = os.time() - (AbsenceTime * 60) fibaro:debug(AbsenceTime) if tonumber(LastSeenJonny) < AbsenceTime then fibaro:setGlobal("PresentState", "Away") local state = fibaro:getGlobalValue("PresentState") return true, state end return false end ------------------------ ABSENCE ------------------------------------ GEA.add({"Function", function() return isAbsence() end}, 30, "",{{"Days","Weekday"},{"Time", "06:00", "22:00"},{"Repeat"}}) GEA.add({"Global", "PresentState", "Away"}, -1, "#value#",{{"Days","Weekday"},{"Time", "06:00", "22:00"},{"Function", function() return isAbsence() end},{"Portable", 201},{"MaxTime", 1}})
  19. Qu'ai-je m'ennuie si je veux qu'il TurnON au coucher du soleil et bretelle de sortie au lever du soleil GEA.add(true, 60, "", {{"Time", "Sunset", "Sunrise"}, {"turnOn", id["LYKTSTOLPE"]}}) what have i miss if i want it to turnOn at sunset and turnOff at sunrise?
  20. jompa68

    Notification Center

    Toute personne qui utilise ce en 4.017? Anyone who uses this in 4.017?
  21. jompa68

    Support Gea

    Merci sebcbien
  22. jompa68

    Support Gea

    Comment puis-je envoyer poussée de conduire autre que celle spécifiée dans GEA.portables = {} 167. Pour envoyer une seule chose de GEA à ma femme, pas tout How can I send push to other device than that specified in GEA.portables = {167}. Want to send only one thing from GEA to my wife, not everything GEA.add({"Function", function() return isEventNow() end}, 30, "#value#")
  23. Je vais essayer de créer un plugin de cette Will try to make a plugin of this
  24. Merci beaucoup Shad
×
×
  • Créer...