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

Virtual Device activating another Virtual Device


Question

Posted

Hi,

I'm just beginning to experiment with Virtual Devices (VDs) and I was wondering if it is possible to program in LUA a button in VD1 to press buttons in VD2 and VD3?

What I am trying to do is to use VD1 as sort of a Universal Remote to control my HT setup. I've successfully programmed other VDs to replicate the various remotes used in my HT and now I'm trying to put the frequent commands such as 'turn on all' and 'watch bluray' etc into the 'universal' vd. Is this possible?

I know it works when i use it as a scene, but rather than have 10 different scenes, i'd prefer to have it all on one VD for convenience. I copied and pasted the Lua from the scene into VD1 but it doesn't seem to work.. used the following code on VD1's 'Power All On' as a trial:

Please login or register to see this code.

What am i doing wrong?

4 answers to this question

Recommended Posts

  • 0
Posted

You can't use getSourceTrigger() in VD, you should try

Please login or register to see this code.

  • 0
  • Inquirer
  • Posted

    ahhh i see.. i'll try that when I get home.

    A few questions on VD buttons: From what I can tell, the buttons in the VDs are referenced by a button number, not the label, not the ID. Am i correct? And if so, is there an obvious way (other than physically counting) to get these numbers? What are the button IDs used for?

    Thanks!

    • 0
    Posted

    Yes, you can check json file from the api

    • 0
  • Inquirer
  • Posted

    Hmm ok that just went beyond my scope of expertise! Would you happen to know where I can start reading up on how to use json into my VDs and how to code? Would love to learn more.. Thanks!

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