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


Search the Community

Showing results for tags 'evening'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • FIBARO Community
    • FIBARO Portal and Forum policy
    • FIBARO
    • Say hello!
    • Off-topics
  • FIBARO Update
    • FIBARO System Update
    • FIBARO Mobile Update
  • FIBARO Community Support
    • Scenes and Interface
    • FIBARO Products
    • FIBARO Mobile
    • FIBARO HomeKit
    • FIBARO Assistant Integrations
    • Other Devices / Third-party devices
    • Tutorials and Guides
    • Home Automation
    • Suggestions
  • FIBARO Społeczność
    • FIBARO
    • Przywitaj się!
    • Off-topic
  • FIBARO Aktualizacja
    • FIBARO System Aktualizacja
    • FIBARO Mobile Aktualizacja
  • FIBARO Wsparcie Społeczności
    • Sceny i Interfejs
    • FIBARO Urządzenia
    • FIBARO Mobilnie
    • FIBARO HomeKit
    • Integracja z Amazon Alexa i Google Home
    • Urządzenia Firm Trzecich
    • Poradniki
    • Automatyka Domowa
    • Sugestie

Categories

  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Facebook


Google+


Skype


Website URL


WhatsApp


Country


Gateway/s


Interests

Found 2 results

  1. Hallo i need write into one scene more variables, how make this? For example scene for change Time Of Day (Morning, Day, Evening, Night) i need write - for every day when is 05:00 am than "TimeOfDay" = "Morning", when is 08:00 am than "TimeOfDay" = "Day", when is 17:00 than "TimeOfDay" = "Evening" and last when is 22:00 than "TimeOfDay" = "Night" yes it's easy to make 4 scenes for each command separately, but how write into one scene all 4 variables scenes? i have first -- Scene for Morning -- --[[ %% autostart %% properties %% weather %% events %% globals --]] local sourceTrigger = fibaro:getSourceTrigger(); function tempFunc() local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( ( ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "05:00") ) ) then fibaro:setGlobal("TimeOfDay", "Morning"); end setTimeout(tempFunc, 60*1000) end if (sourceTrigger["type"] == "autostart") then tempFunc() else local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( startSource["type"] == "other" ) then fibaro:setGlobal("TimeOfDay", "Morning"); end end Thank you
  2. Hi all, After a long time, i got it finally working. (my knowlegde go LUA is almost 0) I would like that the lights only getting on when the house is in evening or night status. Or maybe even better when also/or the LUX is getting below 60.. This code for updating my house state: [ %% properties %% autostart %% globals --]] -- Scene : Time of Day -- Version : 6.0.3 -- Release Date : 14 January 2016 -- Compatibility : Home Center 2, v4.030 to v4.063 Beta -- Purpose : Check time of day and Set global variable -- Trigger : None -- Contributors : Fibaro Forum - petergebruers, boerremk and many others who have shared bits of scripts in the forum -------------------- Configuration - Scene Info sceneName = "Time of Day"; sceneVersion = "6.0.3"; -------------------- Configuration - Time Offsets -- Set the offset time in minutes -- Set positive offset value for after Sun-rise/set, negative value for before Sun-rise/set, zero for no offset offsetSunrise = 0; offsetSunset = -50; -------------------- Configuration - Debug Parameters local dispExtDebug = false; -------------------- Script Functions -------------------- Function: Fibaro Debug Message with Color function fDebug(color, message) fibaro:debug(string.format('<%s style="color:%s;">%s</%s>', "span", color, message, "span")); end -------------------- Function: Fibaro Wait Time function fSleep(stime) fibaro:sleep(stime); end -------------------- Function: toTimestamp local function toTimestamp(time, offset) currDate = os.date("*t"); hours, minutes = time:match("^(%d+)%d+)"); return os.date("%H:%M", os.time({ year=currDate.year, month=currDate.month, day=currDate.day, hour=hours, min=minutes, sec=seconds }) + (offset*60)) end -------------------- Validate Source Trigger local sourceTrigger = fibaro:getSourceTrigger() fDebug("green", "Script started because of: " .. sourceTrigger["type"]); -------------------- Validate Number of Scene Instance fSleep(50); if (fibaro:countScenes()>1) then if (dispExtDebug) then fDebug("yellow", "Scene, " .. sceneName .. " is already running with " .. fibre:countScenes() .. " instances!"); fDebug("yellow", "Aborting additional instance(s)!"); end fibaro:abort(); end -------------------- Start of Scene Execution if (sourceTrigger["type"] == "autostart") then while true do local currDate = os.date("*t"); local currTime = os.date("%H:%M"); ---------------- Time-string Manipulation ---------------- %02u means unsigned int, 2 wide, leading zero currTimeAsString = string.format("%02u",currDate.hour) .. ":" .. string.format("%02u", currDate.min) varTimeOfDay = fibaro:getGlobalValue("TimeOfDay") if (dispExtDebug) then fDebug("Time of Sunrise: " .. fibaro:getValue(1, "sunriseHour")); fDebug("green", "Time of Sunset: " .. fibaro:getValue(1, "sunsetHour")); end fDebug("green", "Current Time: " .. currTimeAsString); if (dispExtDebug) then fDebug("green", "Current Time of Day: " .. varTimeOfDay); end if ---------------- Morning currTime == toTimestamp((fibaro:getValue(1, "sunriseHour")), offsetSunrise) then if (dispExtDebug) then fDebug("grey", "Time of Offset Sunrise: " .. toTimestamp((fibaro:getValue(1, "sunriseHour")), offsetSunrise)); end fDebug("grey", "Setting Time of Day as Morning"); fibaro:setGlobal("TimeOfDay", "Morning"); elseif ---------------- Afternoon currTime == "11:00" then fDebug("grey", "Setting Time of Day as Day"); fibaro:setGlobal("TimeOfDay", "Day"); elseif ---------------- Evening currTime == toTimestamp((fibaro:getValue(1, "sunsetHour")), offsetSunset) then if (dispExtDebug) then fDebug("grey", "Time of Offset Sunset: " .. toTimestamp((fibaro:getValue(1, "sunsetHour")), offsetSunset)); end fDebug("grey", "Setting Time of Day as Evening"); fibaro:setGlobal("TimeOfDay", "Evening"); elseif ---------------- Night currTime == "23:00" then fDebug("grey", "Setting Time of Day as Night"); fibaro:setGlobal("TimeOfDay", "Night"); elseif ---------------- Dawn currTime == "06:00" then fDebug("grey", "Setting Time of Day as Morning"); fibaro:setGlobal("TimeOfDay", "Morning"); else ---------------- No Match fDebug("orange", "Current time does not match any scenario."); end ------------------ Once Per 55 Seconds Wake-up fSleep(55*1000); end ---------------- End of Infinite While-loop fDebug("Scene not started, this is autostart-only!") end ------------------ End of sourceTrigger["type"] == "autostart"
×
×
  • Create New...