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

Is it possible to create a child QA on an existing Fibaro device?


Question

Posted

Is it possible to create a child QuickApp of which the parent is an existing Fibaro device?

 

What I want to do is, to create a child on a Fibaro Binary Switch 2.

The child is of the Multilevel switch type.

You have those light bulbs that dim according to the number of switch clicks (1click = 100%, 2clicks = 50% and 3clicks =15%).

Now I have this in a separate QA, but I want this as an extension to the Binary switch on which the light bulb is mounted.

 

Is this possible?

thanks.

5 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    In this post jgap explained that a QA cannot be a child of a fibaro device.
    Unfortunately.

    Therefore I add the separate QA for such lamps.

     

    • 0
  • Inquirer
  • Posted

    You have those light bulbs that dim according to the number of switch clicks (1click = 100%, 2clicks = 50% and 3clicks =15%).

    By downloading the file and installing it, you can control such light bulb. with the QA.

     

    Download the file,

    Go to settings and divices,

    klick the Plus sign, to add a device,

    Select other device,

    Select upload file, and select the downloaded file.

     

    Go to the newly imported device (the QA or QD)

    go to variables, and change its value to the device to control..

     

    Go to the device where you entered the value from.

    and hide thad device.

    Please login or register to see this attachment.

    • Thanks 1
    • 0
  • Inquirer
  • Posted (edited)

    By fine-tuning the code, I changed the following code to an anonymous function (Lambda expression), 

    and the QA listens to his parent. As far as the setting of the switch value is concerned.

    Please login or register to see this code.

    to

    Please login or register to see this code.

    looks much cleaner now..

     

    and for the sake of completeness, the checkState code

    Please login or register to see this code.

     

    I also included the full QA.

     

    Please login or register to see this attachment.

    Edited by NLWaard
    • Like 1
    • 0
    Posted

    @NLWaard

     

    Thank you very much for creating something very useful as this. 

     

    I recently bought a HC3, and I am figuring out how I can use the quick app to my situation. I have created following quickapp view. 

     

    Please login or register to see this image.

    /monthly_2020_10/image.png.25530eaee29388af16f8b7ecb88d4e15.png" />

     

    I wanted to add my device to the code and made sure the buttons work. But i am afraid i am missing something. I created the button with certain ID, a label 15 % and than i have to add a value at onReleased. 

    Can you explain to me which values i have to add under the Controle part of the button? Or maybe i have to add something in the coding? 

     

    Please login or register to see this attachment.

     

     

    Thank you very much in advance.

     

     

    • 0
  • Inquirer
  • Posted (edited)
    On 10/27/2020 at 4:53 PM, JohanJD said:

    @NLWaard

     

    Thank you very much for creating something very useful as this. 

     

    I recently bought a HC3, and I am figuring out how I can use the quick app to my situation. I have created following quickapp view. 

     

    Please login or register to see this link.

     

    I wanted to add my device to the code and made sure the buttons work. But i am afraid i am missing something. I created the button with certain ID, a label 15 % and than i have to add a value at onReleased. 

    Can you explain to me which values i have to add under the Controle part of the button? Or maybe i have to add something in the coding? 

     

     

    Hi, no, the buildup seems good.

    You have a unique Id for the button and you refer to the function turnOn15.

    Can you indicate what does not work?

     

    B.T.W. Two buttons are sufficient.

    Because turnOff and turnOn are controlled with the main button of the QA itself.

    This leaves the two buttons for 15% (turnOn15) and 50% (turnOn50).

     

    I've included my latest version. Can you check it out?

    (I've made several quickApps that reinforce each other.

    I've put some code back for this stand-alone version).

     

    I also added two push buttons that switch the 20% and 50% illumination.

    (20% because Fibaro has an icon for this, now you'll see a difference to the 50% icon). 

     

     

    Please login or register to see this attachment.

    Edited by NLWaard

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