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

View, edit existing Quick App (.fqa) files ?


Node Central

Question

Hi,

Being new to Fibaro I’d like to start building some Quick Apps for my HC3 and while I have some Lua experience,  I work best by seeing how a variety of existing apps/programmes work, hence I was wondering if it’s possible when I download an .fqa file, if I can view the code contents ?

 

(I’ve looked at the guide (

Please login or register to see this link.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Yes, you can. It is json, so you could, for example, copy-paste is to json2table.com to see the code. Maybe then copy-paste the code part to an editor. 

Link to comment
Share on other sites

  • 0
13 minutes ago, Node Central said:

Hi,

Being new to Fibaro I’d like to start building some Quick Apps for my HC3 and while I have some Lua experience,  I work best by seeing how a variety of existing apps/programmes work, hence I was wondering if it’s possible when I download an .fqa file, if I can view the code contents ?

 

(I’ve looked at the guide (

Please login or register to see this link.

 

Yes, if the quickapp is not encrypted you can view and edit the code.

 

Just expand the quickapp in the list, click "bewerken" (thats in dutch) - edit, and it will open a new windows with the code.

 

 

Please login or register to see this attachment.

Please login or register to see this attachment.

 

Ow....maybe you mean inspecting the code on another machine :)

 

Well....then listen to @SmartHomeEddy

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Many thanks @ppeterr,  do most people encrypt them (hopefully not, as being able to open them up looks like a great source for my education ) ?

     

    As for inspecting them on other another machine, that’s a good point, as I do all my coding on an iPad (via Textastic app) - so that could be helpful - but I could not see anything on @SmartHomeEddypage that pointed me to viewing/editing .fqa files (I’m new to the forum too so it might just my inability to find things) ? 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I’ve just opened up a .fqa file (as a basic text doc) and it looks like it’s in the json format, example of the nest.fqa one i found on the site below . 

     

    And it’s the files / content section seems to be where the main code stored..  

     

     

    Please login or register to see this code.

     

    Edited by Node Central
    Link to comment
    Share on other sites

    • 0

    @Node Central

    I don't know if you are stating a fact or asking something.
    The FQA file is indeed in JSON format, as they wrote here before me. It is a complete application, with QA features, all code + GUI controls (buttons, labels, sliders,...).
    In addition to the entire FQA, I have a habit of backing up my own code in .lua, which is the source code as you write it in the editor (without GUI). For clarity, versioning, etc.

    And yes... studying open uncoded QA is a great learning opportunity. Go through the forms here and you will come across the GENTLEMEN in coding, they are the GURUs here. You will learn a lot, you just want to.
    But... please respect the basic principles of all forums. Look first, then ask.

     

    And just by the way. Ask here about QA (extension .fqa), which is a matter of the HC3x generation. You have HC2 in the description, which works with Virtual Devices, not QuickApps!

    eM.

    • Like 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks @Martin_N, quick FYI -  I somehow didn’t see the earlier post from @SmartHomeEddy, otherwise I wouldn’t have posted mine, sorry, not sure how that occurred, but I’ll be sure to double check next time..

     

    Regarding my signature, my HC3 is actually on route (bought a few days ago), currently I only have a few things on the HC2 and do all my plugins/coding on a VeraPlus/OpenLuup, so I’m hoping I can retire both if HC3 and QuickApps work out as I hope.


    When it comes to Lua coding, my initial challenge seems to be learning the Fibaro way, verses standard Lua;  you mentioned you backup all your code in Lua, out of interest do you write your in standard Lua, and then convert it (is there a conversion / translation facility that does that for you, if so  that could save loads of time porting code over )

     

    Edited by Node Central
    • Like 1
    Link to comment
    Share on other sites

    • 0

    @Node Central

    I'll be more specific.
    Because I'm lazy, I do QA primo in HC3. The main advantage is the addition of text, syntax highlighting,... You see the responses immediately, but you can cause the system to slow down or crash with inappropriate code. But it is not so dramatic and HC3 does not allow anything and the LUA interpreter writes an error and QA restarts.
    My code is Standard LUA. As I wrote, I'll copy it to Notepad (I've been using the Czech PSPad with syntax highlighting for many years and I've gotten used to it). This is the .LUA file (for my internal backup), but it can easily be saved as a .TXT (as long as PSPad won't highlight the syntax).
    When you create a QA with some functions, buttons, etc., it will work, you can export it from HC3 with the Download button from the QA property area.
    This will give you the .FQA file, which is in the already mentioned JSON format. It contains all the settings, GUI, etc. that I wrote last time and also the LUA code (it's the bottom CONTENT section).
    As I wrote - Because I'm lazy, I create QA directly in HC3 (and there aren't that many of them).

     

    This is followed by one substantial addition to the information:
    One of the local GURUs - Jgab provided an emulator to enable offline QA development. Follow the TQAE.
    JGAB is the creator of many interesting enhancements, for example FibaroExtra, EventRunnerX... (it's a pity that Fibaro doesn't include it in their attention and employ it).

    Watch the Forum, there are many other very handy people who share their codes, help out and are a great asset to the community (I don't want to list them so as not to offend anyone, but there are quite a few).


    I read that you are eager to learn, so first read, try, and then ask.
    Unfortunately, there are those who only ask and expect a straight solution without the slightest hint of their own involvement in the issue.

    It's been a long time
    I wish you a happy New Year.

     

    eM.

     

    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.

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