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

Question

Posted

I am sharing here a little QA that manages backups. Some can use it in block scenes, and link it to some exact time, and make it automatic. I will wrap it into my ER5 system later, but so far maybe some will find this usefull.

I would appreciate any feedback about it, as testing is quite cumbersome, as every time it succedes, my system restarts  due to the succesfull backup downloading. I have tested it with both local and cloud types, and worked fine.

Just fill up the QA variables with you crednetials and IP address.

Please login or register to see this attachment.

Please login or register to see this attachment.

  • Like 4

13 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    Found a little bug. Uploaded version 0.2

    Please login or register to see this attachment.

    • Like 2
    • 0
    Posted

    I have uploaded your file Backup_manager_vs_0.2.fqax in my HC3 as is and it is working but I cannot change anything as your file cannot be edited in HC3.
    I am willing to add some buttons to have a new backup at a selected date and I need alos to tranlate into French buttons labels.

    How I can do that?

    • 0
  • Inquirer
  • Posted (edited)
    1 hour ago, Christb said:

    I have uploaded your file Backup_manager_vs_0.2.fqax in my HC3 as is and it is working but I cannot change anything as your file cannot be edited in HC3.
    I am willing to add some buttons to have a new backup at a selected date and I need alos to tranlate into French buttons labels.

    How I can do that?

    Well you would be able if i uploaded a non encrypted version. Meanwhile i have found some strange behaviours in the code.

    First i need to find where the problem is, and then I will share the code here. I don't want to share an unworking code. 

    For some reason, deleting a backup does not work anyomre for me. Not only in my plugin, but in general. I tried several backups to delete from swagger, but all the time i am getting ERROR 404,  not found message. So the plugin will not work if your backup list is filled up to maximum, becuase it can not delete the oldest one. As soon as I fix this issue i will share the unencrypted version too.

    Meanwhile, please test the code, try to fill up the backup list to maximum, and check what will the plugin do. I think it will crash. Will keep updating this topic regularly.

    Edited by Neo Andersson
    • 0
  • Inquirer
  • Posted (edited)

    Guys if someone can contribute, or assist a little bit. For some reason i can't delete any backup from my system by any code. Nor from swagger, and obviously neither from my plugin.

    Can someone make a test with me, to check if it is the same everywhere?

     

    Please login or register to see this attachment.

     

     

    Please login or register to see this attachment.

     

     

    Any help is much appreciated

    Edited by Neo Andersson
    • 0
    Posted (edited)

    Which version of HC3 you have, with version 1.41x there was a bug in the backup service that only Fibaro support has been able to fix in my HC3 (impossible to create any type of backup); it was not a general issue but only some HC3 had this type of issue.

    I think they have fixed it now in general with version 1.5x but it may be again a similar issue.

    I think you need to contact Fibaro support to ask help and may be a fix.

    When you say that you have reach maximum number of possible backups, is it because you have not enough authorized space on the fibaro server or because of the number of existing backup?

    Are you still able to deleted a remote or local backup when using the HC3 html page?

    I cannot make tests in a secure maner as I am right now remote from the HC3 but I will be back home next Wednesday and I will make tests and let you know.

    Edited by Christb
    • 0
  • Inquirer
  • Posted
    8 minutes ago, Christb said:

    Which version of HC3 you have, with version 1.41x there was a bug in the backup service that only Fibaro support has been able to fix in my HC3 (impossible to create any type of backup); it was not a general issue but only some HC3 had this type of issue.

    I think they have fixed it now in general with version 1.5x but it may be again a similar issue.

    I think you need to contact Fibaro support to ask help and may be a fix.

    When you say that you have reach maximum number of possible backups, is it because you have not enough authorized space on the fibaro server or because of the number of existing backup?

    Are you still able to deleted a remote or local backup when using the HC3 html page?

    I cannot make tests in a secure maner as I am right now remote from the HC3 but I will be back home next Wednesday and I will make tests and let you know.

    Thanks, meanwhile it seems that i have found a solution. Apparently the swagger is buggy. Using swagger is not possible to delete any backup. So far i was using the endopint that is suggested in swagger to delete backus, but i found a url that works. I will share the code here when tested a few more times. So I waste like two days for grinding through the swagger, and finally i realized that it is buggy, so it wont work that way in my code either. Will be back soon with the solution.

    • 0
  • Inquirer
  • Posted

    Okay, guys, the version 0.3 is uploaded. It is now in unencrypted format as some of you requested.

    I have tested it up and down, with remote and with local backups too. I had to found a working endpoint for deleting, because the one given by swagger just doesn't work in that format.

    You can use this and it will work. However, there is one thing, i could not test it when there is a slave gateway in the system. 

    So please be aware of this when using.

    I am attaching an edited explanation of the logic that is used.

     

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    • Thanks 1
    • 0
    Posted
    13 hours ago, Neo Andersson said:

    Okay, guys, the version 0.3 is uploaded. It is now in unencrypted format as some of you requested.

    I have tested it up and down, with remote and with local backups too. I had to found a working endpoint for deleting, because the one given by swagger just doesn't work in that format.

    You can use this and it will work. However, there is one thing, i could not test it when there is a slave gateway in the system. 

    So please be aware of this when using.

    I am attaching an edited explanation of the logic that is used.

     

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Thanks for the QA @Neo Andersson

    • 0
    Posted

    @Neo Andersson can confirm that this is not working with slave HC3L , I'm running a slave at home for testing purposes only and the backup QA ends with 

    Server respopnded with status "End of file" after looking for the backup possibility.

    • 0
  • Inquirer
  • Posted
    1 hour ago, Pica2017 said:

    @Neo Andersson can confirm that this is not working with slave HC3L , I'm running a slave at home for testing purposes only and the backup QA ends with 

    Server respopnded with status "End of file" after looking for the backup possibility.

    Yes, i was afraid of this, as i wrote you. For some reason this throws error when slave center is present. As there is nothing that can be specified in any api call reagarding slave gateways, i can only guess, that this is a Fibaro bug.

    Maybe i can ask you to try it without having a slave device? Just to confirm it. Becuase i have made several tests without slave gateway and it worked for me all the time.

    • 0
    Posted

    @Neo Andersson can confirm that this is not working with slave HC3L , I'm running a slave at home for testing purposes only and the backup QA ends with 

    Server respopnded with status "End of file" after looking for the backup possibility.
     

    Just tested again without the slave gateway and ran into the same error, which led me to double-check my credentials and found a typo!

    Re-tested with a Slave HC3L and your QA is working like a charm!! :) 
     

    • 0
  • Inquirer
  • Posted

    Guys, there was a little typo in the code, affecting the function

    Please login or register to see this code.

     

    Here is the version 0.4, hopefully flawless. So it wasn't really a harmfull bug, but anyway, its better to update. If somoene doesn't want to delete and upload the QA again, there is one variable to be changed, inside the getOldestBackupAndJustDeleteIt function, nothing more.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    • Like 1
    • 0
    Posted (edited)

    Hi @Neo Andersson

     

    i have an error when pression the button "find oldest backup Informative"

     

    Please login or register to see this code.

     

     

    i have on my HC3 2 cloud backups and 1 local .

     

    EDIT : Wrong configuration on my side, forget it  :-)  This for the QA

    Edited by SakkhhoID

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