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

GitHub raw file download from a Private repo


Question

Posted

Hello guys

 

Can anyone help me with a Http request, that would fetch a certain file from a certain private repository?

I was trying to use token, byt probably i malformed my HTTP call.

Any help please?

 

So far i tried these two ways, 

 

Way one, according to documentatin, there is a link for raw files with token 

 

Please login or register to see this link.

 

I have tried this inside a regula http call like

 

Please login or register to see this code.

 

this did not work

 

Then i tried with headers in the HTTP call

 

Please login or register to see this code.

 

 

this neither

 

 

Anyone can help please?

 

THanks

Recommended Posts

  • 0
Posted

For versioning you can use releases on GitHub. Tag them with a version number. Your QA first fetches all releases and get the latest. Match that with your version tag in your QA and you know if there is a newer release.

  • 0
Posted
5 minutes ago, Joep said:

Does it work when you use main in a QA to just do the init, update handling and launch the QA code in another file?

 

So a function in main downloads the new version file and replaces the old. Does this crash or cripple the QA? 
 

I have an update notifier via GitHub, buts in a public repo. On my list is this auto update mechanism. I know somebody has written it on the forum, but I forgot the user. 

It can work if you are lucky. But if you have an error in any of the files your QA is toast and needs manual recovery.

If you need to add or remove files, you may leave the QA in a state where it crashes because the QA restarts every time you add, remove, or update a file.

1 minute ago, Joep said:

For versioning you can use releases on GitHub. Tag them with a version number. Your QA first fetches all releases and get the latest. Match that with your version tag in your QA and you know if there is a newer release.

I think that's too heavy - to download the whole release every time. Often you just need to update selected files.

5 minutes ago, Neo Andersson said:

As Jgab mentioned, it is not working within the same QA that you want to update.  At this moment i am able to upate a some file in QA2 from a function in QA1. 

as I mentioned - I don't think updating from another QA will work with encrypted QAs.

  • 0
  • Inquirer
  • Posted
    1 minute ago, Joep said:

    For versioning you can use releases on GitHub. Tag them with a version number. Your QA first fetches all releases and get the latest. Match that with your version tag in your QA and you know if there is a newer release.

    Actuall you dont need to go through all the tags of releases on github. There is this url that give you the latest release

     

    Please login or register to see this code.

    However the more tricky part is to add a version tag to my QA in Fibaro..JGAB suggested to use model property of the device..i am going to try to do it with some unique QA variable, or whatever..i will see

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

    It can work if you are lucky. But if you have an error in any of the files your QA is toast and needs manual recovery.

    If you need to add or remove files, you may leave the QA in a state where it crashes because the QA restarts every time you add, remove, or update a file.

    Jan, i have only one thing here that doesnt work for me. Can you help please?

    I can update all the file in QA file structures with data coming from github using a table variable to PUT like

    Please login or register to see this code.

    but for some reason it works nicely for every file except the main..I can delete it, but when i try to upload the new main filee with new content, it doesn't work.

    Any clue?

    • 0
    Posted
    2 hours ago, Neo Andersson said:

    Jan, i have only one thing here that doesnt work for me. Can you help please?

    I can update all the file in QA file structures with data coming from github using a table variable to PUT like

    Please login or register to see this code.

    but for some reason it works nicely for every file except the main..I can delete it, but when i try to upload the new main filee with new content, it doesn't work.

    Any clue?

    I don't think you can delete the main file - only update it.

    • 0
  • Inquirer
  • Posted
    7 minutes ago, jgab said:

    I don't think you can delete the main file - only update it.

    Ohh my friend...but how??? That is the question

    How to update QA files, layouts etc

     

    With post it doesnt work. 

    With put neither.

    Please some example, how to update the entire QA, from a downloaded QA data?

     

    11 minutes ago, jgab said:

    I don't think you can delete the main file - only update it.

    I am loosing all my hairs :-)

    • 0
    Posted

    Maybe this helps you. I use this code to update a QA with unsupported GUI (selectbox) that I can't edit after I inject the GUI.

    This works flawless, but as I said I run it from another QA. It updates the main "file" with the code from my helper QA. You have to use the code from GitHub on that place.

     

    Please login or register to see this code.

     

     

    • 0
  • Inquirer
  • Posted
    6 minutes ago, Joep said:

    Maybe this helps you. I use this code to update a QA with unsupported GUI (selectbox) that I can't edit after I inject the GUI.

    This works flawless, but as I said I run it from another QA. It updates the main "file" with the code from my helper QA. You have to use the code from GitHub on that place.

     

    Please login or register to see this code.

     

     

    Updating files works now with multifile PUT way

    But please check what i wrote to other post

     

    The sructure of rhat fqa file is completly different..

    And so quickapvariables, layouts never updates..I tried to use the syntax what i see in my downloaded json, and use initialproperties instead of properties, but it doesnt work.

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