This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Closed CommunityApp

[App] Flow Backups (v1.1.1)

GeurtDijkerGeurtDijker Member
edited July 2018 in Apps

Flow Backups 

Backup and restore your flows to and from a file. You can select which flows from your backup you want to restore. You can use the app to copy multiple flows at once as well. 
The app is intended as a temporary solution, until Athom offers a built-in backup function.


Current Version : 1.1.1

Athom Apps store:  https://apps.athom.com/app/nl.regoor.flowbackup
Github repository:   https://github.com/Dijker/nl.regoor.flowbackup

Supported Languages:

  • English
  • Dutch

Latest Update: 
  • v1.1.1 Minor update to SDK2

Warning: use this app at your own risk.

Special Thanks to the Original Developer Serge Regoor for creating the initial App! He transferred the app to me on request. 

(Other old discussions will be merged below here)
Tagged:
«1

Comments

  • Make a feature where we can backup and import our flow set to disk, I want to do a factory reset because all my devices are not respondig anymore since firmware 0.9.1 but I know i will lose all my flows.

    this is the only reason I have not done it.
  • PeaoPeao Member
    In the meantime you can use the good old screenshot-method :smiley: 

  • SommoSommo Member
    edited August 2016
    in 2016 the screenshots or notepad are the backup solution more realiable D
    Anyway, a backup is needed, to import/export flow, also sharing flow from comunity's member could be the next features
  • caseda said:

    There is no rush, as long as I have it by the end of next week.
  • SdR said:
    There is no rush, as long as I have it by the end of next week.
    :joy: 
  • Is there already any news on the backup / restore function? Maybe in coming version 1.0?
    I wan't to start building a rather huge and complex set of flows to do some "next level shit automation" ;). But I'm kinda keeping this off for the moment as I did this in the past and lost it all duo an update. Worse is that I'm owning multiple homey's and spent hours copying the flows by hand from one to the other. So I need to do both again, currently running basic flows on one, the others are offline :(. So I would really like to suggest an easy way for sharing / deploying / keeping-up-to-date of configurations/flows for multiple homey's.

    Maybe even a export/import for one or multiple flows for easy sharing? (as is saw requested in other posts already)
  • I would rather see something more simple to backup flows as for using the powershell CLI you really need to know what you are doing. Something simple like export/import as being offered with BeterLogic and CountDown timer.
  • I've been thinking of making a flow backup app which we can use until Athom comes up with a solution.
    Backing up flows shouldn't be a problem, neither should restoring all flows or just a number of flows.
    The problem is, since an app cannot communicate with devices, there's no way for such an app to know whether devices are still present. For example if you would restore a flow which contains devices that have been deleted (or re-added), the flow will be broken and the flow cards of the deleted device would not be visible. Not very user friendly.

    If you guys think such a flow backup app would still be beneficial even considering this draw back, I'll make the app.
  • +1
  • casedacaseda Member
    edited November 2016
    i don't think that is possible from an app side, since it's running in a sandbox, it can only see it's own flow cards, not of other apps

    it can't even see entire flow cycles, just the card (and triggers) them selves
  • Not true. I've done some tests last week and I was able to see all flows and folders. Haven't tried to change a flow, though, but my guess it's possible.
  • casedacaseda Member
    edited November 2016
    i would find that very strange, then the sandbox is there for nothing.. or you found a hole, and it is going to/should be closed soon

    let's call it this way, i would never want an app created by another developer be able to see/touch my flows... look at how much damage that could do.. delete all my flows, rearrange all my flows.. i don't even want to think about that
  • By exporting flow, the also be importing and between theese points it possible to manipuleat.

    So export/import is alwais unsafe
  • I agree that you wouldn't want another app to access your flows without your consent. But it's just the way Homey works: you view and edit your flows in the user interface of the flow editor. The user interface communicates with the back end API. We can access this API, too. The only thing is: to access the API we need the bearer token. The bearer token is not accessible to us app developers (we can't access the session in the back-end, and we can't access the bearer token in the front-end, because the bearer token is an "HTTPOnly" variable in the session cookie).
    By supplying the bearer token to an app in the app settings, users automatically grant that app full access to all functionalities. There's at least one app that I know of, that asks for the bearer token to function properly.

    Athom has stated that the bearer token based access will be deprecated, as they know it is a security risk.
  • SergeR said:
    I've been thinking of making a flow backup app which we can use until Athom comes up with a solution.
    Backing up flows shouldn't be a problem, neither should restoring all flows or just a number of flows.
    The problem is, since an app cannot communicate with devices, there's no way for such an app to know whether devices are still present. For example if you would restore a flow which contains devices that have been deleted (or re-added), the flow will be broken and the flow cards of the deleted device would not be visible. Not very user friendly.

    If you guys think such a flow backup app would still be beneficial even considering this draw back, I'll make the app.
    I rather have to walk though broken flows after an import, than re-create all >250 flows from scratch !
    So yes please @SergeR  this would be beneficial ;)

  • Yes definately worth making until athom find the time to implement this officially. I see it as a basic back up feature just like copying a folder that contains your flows. In the meantime if devices have been removed maybe it is possible to make a selection of which flows you would like to back up and restore?
  • Great if @SergeR can develop an app like that, we absolutely need a backup facility. On the other side, homey has a local IP address. In my case 192.168.1.15, can we not access this device via FTP or as any other network device?

    If homey is accessible like any network device, some explorer tool/app could access the folders we need and simply copy them as backup.

    I'm probable being too optimistic :wink: 
  • I've got a first version of the backup app ready. Before publishing to the app store, I'd like one or two people who can test the app to make sure it's working properly. For people comfortable installing an app through the CLI, you can find the app here: https://github.com/SergeRegoor/nl.regoor.flowbackup

    After a few tests have been succesful, I'll request publication of the app.
  • I installed it and don't mind trying the backup function, but I'm "a bit" hesitant to test the restore function ;)
  • I can imagine :-)

    Clicking the "restore" button will not restore all flows automatically. You will see a list of the flows in the backup, with the choice to restore which flows. Perhaps you can start by selecting only a single flow, and select the action "Create a copy", instead of overwriting. If that works well, you can try to change a non-important flow (adding/removing/changing flow cards), and then overwrite the flow from the backup. If that works well too, you can remove the flow, and then restore it.
  • fiekfiek Member
    edited November 2016
    @SergeR....Thnx for making the app. I also installed the app I already did the following:

    - I restored a flow without changing the flow that was restored....OK
    - I changed a flow and then restored it....OK
    - I deleted a flow and then restored it... OK

    The device in the flows that I tested was the Sony Bravia device.

    [Edit] Is it neccesary to test this also with other devices or do you need me to test something else in specific?
  • - Full backup, OK
    - Create copy to different folder, OK
    - Overwrite existing flow, OK

    Seems to be working just fine! :)
  • Thanks @fiek and @Fire69  for helping out! Don't think other testing is necessary, good to hear it works well. If restoring a flow with one device works, it should work with any device.
    I'll submit the app now :-)
  • amazing @SergeR! i will install it absolutely! thank you
  • I installed it, and made a backup. that all works fine.
    But when I try to restore:  
    I tried to use the zip file, also tried to use the flows.json file.
    What am I doing wrong?


  • I've updated the app this morning (roughly 30 minutes ago), and backup sets made with the app in the version before do not work in the new version. Is it possible you updated the app, and are trying to use a backup set from before the update? If not, can you contact me on Slack so you can send your backup file?
  • I tried to restore thew backup made with the same version ( i Just installed it)
    How do I contact you on slack ??? I don't use that
  • Sorry, didn't think of non-Slack users. You can send me a direct message here on the forum, and I'll reply with my e-mail address where you can send your backup file to.

    Slack is another channel where us Homey users can communicate. To use Slack, you'll need to sign up at https://athomcommunity.slack.com. My username there is "serger".
This discussion has been closed.