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


  • 0

Simple Virtual Button to Start a Scene?


Question

Posted

Sorry for this stupid question, but I couldn´t find anything fitting with the search function

Please login or register to see this image.

/emoticons/default_icon_curve.gif" alt=":-/" />

 

I created 3 scenes to check if doors or windows are still open when I want to leave the house and get a push notification for all open entries to my mobile phone (Scene 1), my wifes phone (Scene 2) or my sons phone (Scene 3). The scenes work prefectly when I start them via "Start"-Button on my Fibaro Dashboard.

 

Now I tried to create a Virtual Device with 3 Buttons to start every Scene (Home-Check 1.me, 2.my wife, 3.my son) but I didn´t find the command to start a scene from a virtual button (I tried fibaro:startScene(sceneID) but it didn´t work). So I created a variable called Push-Notifaction (1.me, 2.my wife, 3.my son) and changed the variable via the virtual button. But this only worked randomly.

 

Can I start a scene directly from a virtual button (so that I do not have to leave all 3 Scenes activated all the time and use a variable)? What else can I do if starting the scene directly works well but not via a virtual button?

Please login or register to see this image.

/emoticons/default_icon_eek.gif" alt=":shock:" />

 

 

5 answers to this question

Recommended Posts

  • 0
Posted

First of all why 3 scenes when you can do that with one scene? Secondly if scene does not have any triggers in header then it will never be started except when RUN button is pressed or called from another scene or VD. So, they must be checked as active scenes so that you can see them in mobile application if your HC is on latest 4.082 beta firmware. So check these scenes as ACTIVE and then they should start with command fibaro:startScene(ID) from another scene or VD.

 

I have only one scene called "Leaving house" which first checks if all windows and doors are closed and if not then we get notification with list of opened windows and doors. In other case if everything is closed then first turns off all lights, lower blinds and at the end after preset delay calls scene which arms alarm sensors and then sends us notification that alarm is armed.

 

I can post this scene here but I have to adapt it and translate first.

  • 0
Posted

@Sankotronic

I have plans to do something similar but a little bit simpler but I am new to LUA programming and I don't really know where to start.

I would really appreciate if you post your scene so I can be inspired.

  • 0
  • Inquirer
  • Posted

    @Sankotronic

    Yes please. I didn´t even think about it, but of course this is what I really want: A Minimum of active Scenes and an automatic check / push notification for open door / Windows.

     

    Therefore your solution is very much appreciated for a beginner like me :->  :->

    • 0
    Posted

    Ok, here is scene in LUA code:

    Please login or register to see this code.

    This scene we start by pushing RUN button on our phones. It is important that you define two global variables as instructed in code: 'PresentState' and 'HouseAlarm'. Also I use cag014 solution with table of all my device, scene, user and mobile phone IDs in global variable 'HomeTable' because in case that any of devices has to be excluded/included and change it's ID then I need to change only one scene which defines this table and not all scenes where this ID is used. Very convenient solution especially during setting up the automation system.

     

    Just make sure that scene is checked as ACTIVE and don't worry it will be executed only by pushing RUN button or by call from another scene or VD and will terminate after starting scene with the longest delay, in this case scene which arms alarm. The beauty is with this timeOut function that it will not stop this scene and you will get notifications before other scenes with delay are started.

     

    Define global variables before making this scene. Also you will need to define scenes to turn off all lights, lower blinds and arm burglar alarm. If need help with that just ask

    Please login or register to see this image.

    /emoticons/default_biggrin.png" alt=":D" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    • 0
  • Inquirer
  • Posted

    Thanks a lot for your work!!! This looks really impressive. I will try to use it for my system as well....

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...