Backup Bond Configuration

Merck,

Thank you so much for the detailed explanation regarding HTTP chunked transfer encoding and why it is necessary given the constraints of the hardware! It makes perfect sense.

Also, the Python 3 code sample that you provided is excellent. I was able to run a local server and push a backup to it. I haven’t worked with HTTP chunked transfer much in the past, so it was very helpful to get sample code.

I did end up changing:

httpd = HTTPServer(("127.0.0.1", port), ChunkedRequestHandler)

to

httpd = HTTPServer(("0.0.0.0", port), ChunkedRequestHandler)

as the incoming connections were being blocked into Windows 10 with 127.0.0.1 .

1 Like

So glad it was helpful to you! — Maybe this is something that will get built into the HA integration :thinking:

You’re right! The 127.0.0.1 address is only for receiving connections that originate from the same host. I copied the above out of our continuous integration testing suite, which runs a simulated firmware on the same host as the test script. — Indeed I now recall that we needed to change to 0.0.0.0 (“all addresses”) when using in bond-cli. However, the listen on 0.0.0.0 introduced a delay (unclear why), so it was kept to localhost 127.0.0.1 for the CI script.

Hi @merck - Has there been any progress with making the backup file visible to the File manager on an Android device? I’ve done a backup via the app, but can’t find the resulting file anywhere on my phone.

I can also successfully trigger a backup via the API but I’m not sure how to capture the resulting file (even after reading the chunked transfer details above).

Another option for the app may be a “share” feature to attach the resulting file to an email, or upload it to dropbox or google drive? I use an app called TinyScanner that does this for the resulting pdf files it generates.

Thanks!

I was looking for a way to do the same. Accessing the backup file. Looking forward to this.

Nice idea. @marcio, thoughts?

2 Likes