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 'block scene lua'.

  • 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 1 result

  1. Hi, I'm rather new to LUA programming, but learning every day. I have created several scenes that are working well, also with using variables and so on. However, everytime I want to have a scene starting at a certain time, I cannot do it in LUA as then it simply does not work somehow. Maybe there is something simple thatI forget, but after quite some time puzzling myself, I thought to post it here. I created a block scene and tested the functionality. It works as expected. Then I change the scene to LUA without actually modifying anything else and after that the scene is not working anymore. The reason to put it in LUA is to simply add more funtionality afterwards. The LUA script is like below. Can someone help me out here? Thank you very much in advance! Edwin --[[ %% properties %% events %% globals --]] local sourceTrigger = fibaro:getSourceTrigger(); function tempFunc() local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( ( ((currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "06:50") ) ) then fibaro:call(108, "setValue", "20"); -- keuken spoelbak fibaro:call(108, "turnOn"); -- keuken spoelbak fibaro:call(101, "setValue", "15"); -- eetkamer verlichting eettafel fibaro:call(101, "turnOn"); -- eetkamer verlichting eettafel fibaro:call(93, "turnOn"); -- woonkamer wandlamp trapkast fibaro:call(148, "turnOn"); -- woonkamer wandlamp links fibaro:call(149, "turnOn"); -- woonkamer wandlamp rechts fibaro:call(91, "turnOn"); -- eetkamer wandlamp links fibaro:call(92, "turnOn"); -- eetkamer wandlamp rechts fibaro:call(127, "setBrightness", "2"); -- keuken kastjes fibaro:call(120, "setBrightness", "2"); -- keuken vloer fibaro:debug("verlichting aangeschakeld") 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:call(108, "setValue", "20"); -- keuken spoelbak fibaro:call(108, "turnOn"); -- keuken spoelbak fibaro:call(101, "setValue", "15"); -- eetkamer verlichting eettafel fibaro:call(101, "turnOn"); -- eetkamer verlichting eettafel fibaro:call(93, "turnOn"); -- woonkamer wandlamp trapkast fibaro:call(148, "turnOn"); -- woonkamer wandlamp links fibaro:call(149, "turnOn"); -- woonkamer wandlamp rechts fibaro:call(91, "turnOn"); -- eetkamer wandlamp links fibaro:call(92, "turnOn"); -- eetkamer wandlamp rechts fibaro:call(127, "setBrightness", "2"); -- keuken kastjes fibaro:call(120, "setBrightness", "2"); -- keuken vloer fibaro:debug("verlichting aangeschakeld") end end
×
×
  • Create New...