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!



Smart Home Forum by FIBARO Team

  • 0

Press VD button from within the VD





I'm new to HC2 and getting HC2 to know little by little.


I have a VD to control my airco.

I have three buttons, Power toggle, Power on and Power off.

I have Power on and Power off working.


I use LUA for all three buttons.


Is it possible to control the Power on and Power off buttons from the Power toggle button?


If Yes, could someone please provide me with some sample code?



Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

local selfId = fibaro:getSelfId();

fibaro:call(selfId, "pressButton", "2")


2 is the id of the button (so if you only have 3 buttons like toggle, on and off, then on is 2, off is 3. If you have a label and 3 button like label, toggle, on and off. the on is 3 and off is 4.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Great,


    Tried it and it works, Thanks.


    Do I need to use the button number (2) or can I also use the ID which is a string ("ButtonDark")?



    Link to comment
    Share on other sites

    Join the conversation

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

    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...