Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Thomson

Member
  • Posts

    150
  • Joined

  • Last visited

About Thomson

  • Birthday 01/30/1981

Profile information

  • Gender
    Male
  • Country
    Polska
  • Gateway/s
    Home Center 3
    Home Center 3 Lite
    Home Center 2
    Google Home

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Thomson's Achievements

Learner

Learner (2/8)

2

Reputation

  1. powiedz mi proszę @A.Socha bo rzeczywiście google zaczął mówić po polsku i prawie wszystko śmiga, czy będzie możliwość by obsługiwał też swiche i termostaty? mam bramę na swichu i nie mogę asystentem otwierać
  2. @10der mam Twoją scenę, która teraz mi nie działa na HC3, jesteś w stanie mi pomóc w przerobieniu jej? --[[ %% properties %% events %% globals %% autostart --]] if fibaro == nil then fibaro = require("fibaro_emu") end local motionId = {164, 492} local powerId = {450} local luxId = {166} local lumen = 30 local timeout = 5 local manual_turnoff = true local timePeriod = { ["06:00-07:00"] = 25, ["07:00-08:00"] = 50, ["08:00-20:00"] = 99, ["20:00-21:00"] = 30, ["21:00-22:00"] = 20, } --====================================================================== if (fibaro:countScenes() > 1) then fibaro:abort() end function getLastBreach(dev) local breach = 0; for i, n in ipairs(dev) do local nBreach = tonumber(fibaro:getValue(n, "lastBreached")); if (nBreach > breach) then breach = nBreach; end end return breach; end function getMotionState(dev) for i, n in ipairs(dev) do if (tonumber(fibaro:getValue(n, "value")) > 0) then return 1; end end return 0; end function getLux(dev) local totalLux = 0; local averigeLux = 0; if #dev > 0 then for i = 1, #dev do totalLux = totalLux + tonumber(fibaro:getValue(dev[i], 'value')); end averigeLux = math.floor(totalLux / #dev); else averigeLux = 100000 -- Direct sunlight end return averigeLux; end function getPowerState(dev) for i, id in ipairs(dev) do local deviceState, deviceLastModification = fibaro:get(id, "value"); if (tonumber(deviceState) > 0) then return 1, deviceLastModification end end return 0, 0 end function setPowerState(dev, value) for i, id in ipairs(dev) do local lightType = fibaro:getType(id); if (lightType == "com.fibaro.multilevelSwitch" or lightType == "com.fibaro.FGWD111") then fibaro:call(id, "setValue", value); elseif (lightType == "com.fibaro.FGRGBW441M") then if type(value) == "string" then local r, g, b = hex2rgb(value) fibaro:call(id, "setColor", r, g, b, 0); else if value > 0 then fibaro:call(id, "setW", value); --fibaro:call(id, "setValue", value) else fibaro:call(id, "turnOff"); --fibaro:call(id, "setColor", 0, 0, 0, 0); end end else if value > 0 then fibaro:call(id, "turnOn"); else fibaro:call(id, "turnOff"); end end end end function between(str) local t = os.date("*t", os.time()); local h1, m1, h2, m2 = str:match("(%d+):(%d+)-(%d+):(%d+)") m1, m2, t = h1 * 60 + m1, h2 * 60 + m2, t.hour * 60 + t.min if (m1 <= m2) then return m1 <= t and t <= m2 -- 01:00-02:00 else return m1 <= t or t <= m2 -- 23:00-21:00 end end function checkTimePeriod(dev) if type(dev) == "table" then for t, level in pairs(dev) do if between(t) then return true, level end end return false, 0 else if between(dev) then return true, 99 else return false, 0 end end end fibaro:debug("Strated..."); local startSource = fibaro:getSourceTrigger(); local state = nil local mstate = -1 while true do -- power local powerState, powerLast = getPowerState(powerId) if (startSource["type"] == "property") then if state == nil and powerState > 0 then fibaro:debug("LAMP ALREADY ON"); break end else --fibaro:debug("Script can start only via property"); --break end -- our state state = state or powerState -- motion local motionState = getMotionState(motionId) local mstate_changed = mstate ~= motionState; mstate = motionState -- is motion here if motionState > 0 then -- only if state chaned! if mstate_changed then fibaro:debug("MOTION DETECTED!"); -- is not light if powerState == 0 then -- is time? local isTime, level = checkTimePeriod(timePeriod); if isTime then -- is darkness? if getLux(luxId) < lumen then -- is own marked? if state == 0 then state = 1 fibaro:debug("LAMP ON (MOTION)"); setPowerState(powerId, level) end else fibaro:debug("IS NOT DARK FOR LAMP"); if (startSource["type"] == "property") then break end end else fibaro:debug("IS NOT TIME FOR LAMP"); if (startSource["type"] == "property") then break end end end end else -- safe? -- is light? if powerState > 0 then -- is marked? if state == 1 then if os.time() - getLastBreach(motionId) > 60 * timeout then state = 0 fibaro:debug("LAMP OFF (NO MOTION)"); setPowerState(powerId, 0) if (startSource["type"] == "property") then break end end else -- manгal ON if manual_turnoff then -- when turned on? if os.time() - powerLast > 60 * timeout then -- double check if motions? if os.time() - getLastBreach(motionId) > 60 * timeout then state = 0 fibaro:debug("LAMP OFF (WAS ON MANUALLY)"); setPowerState(powerId, 0) if (startSource["type"] == "property") then break end end end end end else -- is not light? -- Opps! if state == 1 then state = 0 fibaro:debug("LAMP OFF (MANUALLY)"); if (startSource["type"] == "property") then break end end end end fibaro:sleep(1000); end fibaro:debug("End.");
  3. Mam obojętnie w którym miejscu wkleić ten kod @10der? --[[ %% properties %% events %% globals %% autostart --]] if fibaro == nil then fibaro = require("fibaro_emu") end local motionId = {164} local powerId = {450} local luxId = {166} local lumen = 30 local timeout = 5 local manual_turnoff = true local timePeriod = { ["06:00-07:00"] = 30, ["07:00-08:00"] = 50, ["08:00-20:00"] = 99, ["20:00-21:00"] = 30, ["21:00-22:00"] = 20, } --====================================================================== if (fibaro:countScenes() > 1) then fibaro:abort() end function getLastBreach(dev) local breach = 0; for i, n in ipairs(dev) do local nBreach = tonumber(fibaro:getValue(n, "lastBreached")); if (nBreach > breach) then breach = nBreach; end end return breach; end function getMotionState(dev) for i, n in ipairs(dev) do if (tonumber(fibaro:getValue(n, "value")) > 0) then return 1; end end return 0; end function getLux(dev) local totalLux = 0; local averigeLux = 0; if #dev > 0 then for i = 1, #dev do totalLux = totalLux + tonumber(fibaro:getValue(dev[i], 'value')); end averigeLux = math.floor(totalLux / #dev); else averigeLux = 100000 -- Direct sunlight end return averigeLux; end function getPowerState(dev) for i, id in ipairs(dev) do local deviceState, deviceLastModification = fibaro:get(id, "value"); if (tonumber(deviceState) > 0) then return 1, deviceLastModification end end return 0, 0 end function setPowerState(dev, value) for i, id in ipairs(dev) do local lightType = fibaro:getType(id); if (lightType == "com.fibaro.multilevelSwitch" or lightType == "com.fibaro.FGWD111") then fibaro:call(id, "setValue", value); elseif (lightType == "com.fibaro.FGRGBW441M") then if type(value) == "string" then local r, g, b = hex2rgb(value) fibaro:call(id, "setColor", r, g, b, 0); else if value > 0 then fibaro:call(id, "setW", value); --fibaro:call(id, "setValue", value) else fibaro:call(id, "turnOff"); --fibaro:call(id, "setColor", 0, 0, 0, 0); end end else if value > 0 then fibaro:call(id, "turnOn"); else fibaro:call(id, "turnOff"); end end end end function between(str) local t = os.date("*t", os.time()); local h1, m1, h2, m2 = str:match("(%d+):(%d+)-(%d+):(%d+)") m1, m2, t = h1 * 60 + m1, h2 * 60 + m2, t.hour * 60 + t.min if (m1 <= m2) then return m1 <= t and t <= m2 -- 01:00-02:00 else return m1 <= t or t <= m2 -- 23:00-21:00 end end function checkTimePeriod(dev) if type(dev) == "table" then for t, level in pairs(dev) do if between(t) then return true, level end end return false, 0 else if between(dev) then return true, 99 else return false, 0 end end end fibaro:debug("Strated..."); local startSource = fibaro:getSourceTrigger(); local state = nil local mstate = -1 while true do -- power local powerState, powerLast = getPowerState(powerId) if (startSource["type"] == "property") then if state == nil and powerState > 0 then fibaro:debug("LAMP ALREADY ON"); break end else --fibaro:debug("Script can start only via property"); --break end -- our state state = state or powerState -- motion local motionState = getMotionState(motionId) local mstate_changed = mstate ~= motionState; mstate = motionState -- is motion here if motionState > 0 then -- only if state chaned! if mstate_changed then fibaro:debug("MOTION DETECTED!"); -- is not light if powerState == 0 then -- is time? local isTime, level = checkTimePeriod(timePeriod); if isTime then -- is darkness? if getLux(luxId) < lumen then -- is own marked? if state == 0 then state = 1 fibaro:debug("LAMP ON (MOTION)"); setPowerState(powerId, level) end else fibaro:debug("IS NOT DARK FOR LAMP"); if (startSource["type"] == "property") then break end end else fibaro:debug("IS NOT TIME FOR LAMP"); if (startSource["type"] == "property") then break end end end end else -- safe? -- is light? if powerState > 0 then -- is marked? if state == 1 then if os.time() - getLastBreach(motionId) > 60 * timeout then state = 0 fibaro:debug("LAMP OFF (NO MOTION)"); setPowerState(powerId, 0) if (startSource["type"] == "property") then break end end else -- manгal ON if manual_turnoff then -- when turned on? if os.time() - powerLast > 60 * timeout then -- double check if motions? if os.time() - getLastBreach(motionId) > 60 * timeout then state = 0 fibaro:debug("LAMP OFF (WAS ON MANUALLY)"); setPowerState(powerId, 0) if (startSource["type"] == "property") then break end end end end end else -- is not light? -- Opps! if state == 1 then state = 0 fibaro:debug("LAMP OFF (MANUALLY)"); if (startSource["type"] == "property") then break end end end end fibaro:sleep(1000); end fibaro:debug("End.");
  4. @10der chciałbym zmodyfikować tak scenę, by w sobotę i niedzielę, światło włączało się od 9 na ruch, ponieważ w scenie, którą teraz mam włącza się od 7.
  5. Cześć @10der, od około tygodnia przyszedł mi pewien pomysł. Pytanie czy jest to możliwe. Czy jesteś wstanie mi pomóc by światło w week włączało się o innych porach dnia :), wiem to wyższy level
  6. Dziękuję, spróbuję jaka będzie reakcja Thank you, I will try what the reaction will be
  7. Witam Was, zwracał się do społeczności Fibaro o pomoc, a bardziej o Wasze doświadczenia. Mam w domu Wiszący gazowy kocioł kondensacyjny VITODENS 100-W, który ma regulowaną temperaturę wody oddzielnie na kaloryfery i ciepła woda w kranach. Macie może pomysły jak wpiąć go w system Fibaro? https://www.viessmann.pl/pl/budynki-mieszkalne/kotly-gazowe/gazowe-kotly-kondensacyjne/vitodens-100w.html
  8. @Bezan a dlaczego pod przyciski nie chcesz wpiąć Smart Implanta Fibaro?
  9. Tak też myślałem, że wspaniały support sobie nie poradzi, więc sam wziąłem się za backup, szkoda było marnować czas na wymianę zdań z inżynierami... life is brutal
  10. Panie @T.Konopka jakieś rozwiązanie na panujący tu problem? też mi wszystko działało ale po pewnym czasie przestało, irytuje mnie fakt wciśnięcia i nic się nie dzieje "...po wciśnięciu w zakładce Urządzenia pod ikonką przycisku wyświetlał się komunikat "komunikacja prawidłowa" ale nie wyświetla się ile razy był wciśnięty." mam nr seryny 45XXX
  11. żartujesz? musiałem postawić backupa
  12. Panowie kiedy w końcu oficjalne podejście do wersji polskiej? raz działa raz, nie Bardzo proszę zróbcie coś z tym @T.Konopka
×
×
  • Create New...