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


10der

Member
  • Posts

    3,516
  • Joined

  • Last visited

Everything posted by 10der

  1. sorry idk. but this app use connection API to UNIFI controller. AFAIK UDx (UDR/UDM) have their own application controller and no clue about compatible. Sorry.
  2. i think no. just only btw: fscking russian!!! 😢
  3. local ids = fibaro.getDevicesID( { interfaces = {"light"}, properties = {dead = false, isLight = "true", categories = '["lights"]' }, enabled = true, visible = true, } ) fibaro.call(ids, "turnOff")
  4. no 404 IMHO somebody compiled LESS css with wrong files
  5. io for id = 773, 2000 do api.delete("/devices/" .. id) end btw, exposing devices to HASS it's a good idea, but not visa-verse IMHO.
  6. Strong DO NOT RECOMMEND this sh1t. Yes, no alternative here, but this russian development device is DANGER for using.
  7. Can you put any plug(s) between your devices? for example Tuya Smart Zigbee Plug Socket 3680W 16A Power Energy Monitoring Timer Switch EU Outlet Work With Tuya Hub Zigbee2mqtt UPD: in my lost occupied house, I had Zbmini outside the house in an garden alcove. No issues. hc3 on that moment doesn't have zigbee - it was z2m and ZigBee CC2652 USB stick, but IMHO do not care in this situation.
  8. witam https://manuals.fibaro.com/home-center-3-lua-scenes/ blisko konca jest to, czego szukasz lub: function between(timestr) local dayMap = {["1"] = 1, ["2"] = 2, ["3"] = 3, ["4"] = 4, ["5"] = 5, ["6"] = 6, ["7"] = 7} local smap = { ["Sunset"] = "sunsetHour", ["Sunrise"] = "sunriseHour", ["Evening"] = "sunsetHour", -- SunsetTwilight ["Morning"] = "sunriseHour" } local function getGlobalVariable(v) local value = fibaro.getGlobalVariable(v) return value end local function split(pString, pPattern) local Table = {} -- NOTE: use {n = 0} in Lua-5.0 local fpat = "(.-)" .. pPattern local last_end = 1 local s, e, cap = pString:find(fpat, 1) while s do if s ~= 1 or cap ~= "" then table.insert(Table, cap) end last_end = e + 1 s, e, cap = pString:find(fpat, last_end) end if last_end <= #pString then cap = pString:sub(last_end) table.insert(Table, cap) end return Table end local function trim(s) return (string.gsub(s, "^%s*(.-)%s*$", "%1")) end local function offset(s, o, p) if (not (o and p)) or o == "" then return s end local h, m = s:match("(%d+):(%d+)") local t = 60 * h + m + (o == "+" and p or -tonumber(p)) return string.format("%02d:%02d", math.floor(t / 60), t % 60) end local function sec2hmStr(hms) local h, m, s = math.floor(hms / 3600), math.floor((hms % 3600) / 60), hms % 60 return string.format("%02d:%02d", h, m) end local function isnull(name, val, action) if (val == nil) then if (_ENV[name] ~= nil) then local result = _ENV[name]() if type(result) == "boolean" and result then val = os.date("%H:%M", os.time()) elseif result then val = result else val = "" end end end return val end local function betw(interv) local dt, start, stop = os.date("*t"), interv:match("^([%S%a0-9%.%:]+) ?(.*)") if not start then return false end stop = stop == "" and start or stop local d1, h1, m1 = start:match("^([%S%a%.]-)%.?(%d+):(%d+)$") local d2, h2, m2 = stop:match("^([%S%a]-)%.?(%d+):(%d+)$") d1 = d1 == "" and (dt.wday == 1 and 7 or dt.wday - 1) or dayMap[d1] d2 = d2 == "" and d1 or dayMap[d2] local d = dt.wday == 1 and 7 or dt.wday - 1 if not (d >= d1 and d <= d2) then return false end m1, m2, t = h1 * 60 + m1, h2 * 60 + m2, dt.hour * 60 + dt.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 timestr = timestr:gsub( "$(%w+)([%+%-]?)(%d*)", function(s, o, p) return offset(isnull(s, smap[s] and fibaro.getValue(1, smap[s]) or getGlobalVariable(s), o, p)) end ) for _, interv in ipairs(split(timestr, ",")) do if betw(trim(string.gsub(interv, "%.%.", " "))) then return true end end return false end if between("$Sunset..$SunsetTwilight") then end lub if between("19:00..06:00") then end
  9. The King is dead. Long live the King. print(json.encode(sourceTrigger))
  10. thinking out loud... have asked GPT to solve easy solution fizzbuzz (just googling if you do not know what is). this task I am always asking on code interviewing any Middle developers... so, GPT provide me code... So, right now I am really can relax... With this code I will have my job at least until old age. just crazy to think what can provide GPT for Fibaro LUA scripting 😃
  11. Sorry. Ring was sold in September 2021 and replaced by UniFi doorbell Now I haven’t ring, I haven’t unifi, I haven’t anything cuz I am homeless sorry
  12. 10der

    HC3 and MQTT in QA

    .publish != :publish so please replace self.client.publish self.client:publish
  13. Not sure what comparing values (I am talking about global vats) in left block a good idea
  14. 10der

    Just proposition

    Hi friends! Right now I haven’t house (I am homeless) and HC3 as well. but if somebody wants or needs helps in HC3 / LUA QA / scenes - feel free to ask, I’ll trying to help you just by buying me the cup of coffee. thank you
  15. UPDATED in header how to call? local id = 1816 fibaro.call(id, "showNotification", json.encode({"Hello World!", "Glory to Ukraine!"}), "i188", "notification4") IMG_0470.MOV
  16. find icon and sound in LUA text PS: can't help right now. i think u understand what happened in my country and my city
  17. sky must be upper not down. wheat grows on the ground not under sky. wrong. but thank you for support UA
  18. I think russia trying to erase UA right now Please help us pleeeease we r under dead help
  19. can promise you. if UA win the war - i'll update this topic as well! please stay tuned
  20. Peter we are locked by Russian army right now, so I can’t thank you
  21. Added to HC3 mode when all power and lighting turned off when air raid alert and Russia bomb us my brain would never have thought that I would need it Crazy europe 2022 year
×
×
  • Create New...