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


Recommended Posts

Posted

I'm Implementing a HC3 QuickApp for my AC. I already have a simple implementation for one AC device and it works fine. I use `com.fibaro.hvacSystemCool` type and some additional buttons for custom modes (I used a configurator in the HC to configure them). Now I want to extend it and get the configuration for all devices and create them automatically as a child devices. I have a basic solution in place but I'm fighting with adding a custom view (additional buttons) to the child device. How I can achieve that? 

I already exported a UI JSON from my first solution but I can't find where I should put it. 

 

Posted


:)

  • Topic Author
  • Posted

    Ok, I found the solution.


    In the createChildDevice function you need to add uiView property with the code generated by 'Copy JSON view button' 

     

    Please login or register to see this code.

     

    And then you will see the custom UI elements, but the actions for the buttons won't work. What I've done (based on other posts on this forum) I've added QuickApp:UIHandler(ev) function to the main app:

    Please login or register to see this code.

     

    And uiCallbacks definitions to my Child app:

    Please login or register to see this code.

     

    • Like 3
  • Topic Author
  • Posted

    One more thing. Is there any way to update uiView of the child device when it's already created?

    Posted

    You can "PUT" the new view anytime :)

    Join the conversation

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

    Guest
    Reply to this topic...

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