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

API to upload QA to HC3


Question

Posted

Hi,

 

I'm stuggling to upload QAs via API. 

 

If I understand correctly, the first step is to do a POST on /devices to create the device. The second step ist to PUT an update with the acutal QA definition. I fail already at the first step. The arguments to this call are {"name": "name",  "type": "type"}. Regardless of the type I choose, the API responds that the a plugin for that type does not exits. For example:

 

Please login or register to see this attachment.

 

Any clues what "type" has to look like?

 

For the second step, do I have to put the complete content of the .fqa downloaded via the GUI, or just a subset? I also inspected fibaroapiHC3.lua and it seems to follow a different one-step approach, POSTing only parts of the fqa file. It didn't seem to work for me, either.

 

Appreciate your help,

 

cheers,

 

jayrock

 

 

 

 

5 answers to this question

Recommended Posts

  • 0
Posted (edited)
17 hours ago, jayrock said:

Hi,

 

I'm stuggling to upload QAs via API. 

 

If I understand correctly, the first step is to do a POST on /devices to create the device. The second step ist to PUT an update with the acutal QA definition. I fail already at the first step. The arguments to this call are {"name": "name",  "type": "type"}. Regardless of the type I choose, the API responds that the a plugin for that type does not exits. For example:

Any clues what "type" has to look like?

For the second step, do I have to put the complete content of the .fqa downloaded via the GUI, or just a subset? I also inspected fibaroapiHC3.lua and it seems to follow a different one-step approach, POSTing only parts of the fqa file. It didn't seem to work for me, either.

Appreciate your help,

cheers,

jayrock

 

No, you can't use /devices. 

Check createQuickApp() in fibaroapiHC3.lua. It's a bit more complex because I create the whole QA json structure instead of reading a .fqa,. However, the solution is at the end of the function...

Edited by jgab
  • Like 1
  • 0
  • Inquirer
  • Posted
    10 hours ago, jgab said:

     

    No, you can't use /devices. 

    Check createQuickApp() in fibaroapiHC3.lua. It's a bit more complex because I create the whole QA json structure instead of reading a .fqa,. However, the solution is at the end off the function...

     

    Thanks for your swift response! Had a look at createQuickApp() and will check it out later.

     

    I wasn't aware of /quickApp. Where can I find the docs? It's not in swagger.

     

    Cheers,

     

    jayrock

    • 0
    Posted

    they are not at swagger.

    you can watch them  at internet browser debug mode.

    • 0
  • Inquirer
  • Posted
    19 hours ago, jgab said:

     

    No, you can't use /devices. 

    Check createQuickApp() in fibaroapiHC3.lua. It's a bit more complex because I create the whole QA json structure instead of reading a .fqa,. However, the solution is at the end of the function...

    Got it to work. Thanks.

    • 1
    Posted
    7 hours ago, rangee said:

    they are not at swagger.

    you can watch them  at internet browser debug mode.

     

    e.g. /assets/docs/quickapp.json

    • Thanks 1

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