A while back I wanted a way to capture all my flows as backups. There have been several instances of things going awry, and then a card in a flow becomes “Unknown”, and of course I can’t remember exactly how I set it up. Especially bad for logic or Better-Logic-Library cards. Going to each flow and screenshotting it was … painful.
So I started playing with the api to pull the json for each flow - that’s a simple backup and easy to restore. Just navigate to where it belongs, alt-right-click and import. But still, going to Each. Flow. and saving it … yah, only have to do it once, and then remember to do it again when you change/update a flow. Bothersome and prone to forgetfulness. So started a script to back up all the flows as json files.
And then I got to thinking “what if I could render the flow really close to how Homey does it ?”. Pity there’s no endpoint to handle that, would have saved a TON of time. What started as a simple “back up all the flow jsons” morphed into a “can we render a flow ?” and then to “crap, need to resolve the devices and variable names” and so on …
And if we’re going to back up the flow jsons, why not the other jsons too ? Devices, variables, folder names, zones etc. We needed them all anyway to fully resolve the flow card contents … The result was this set of scripts:
uv run backup.py --render-png to back up all the jsons and render all the flows.
For example, here’s a screenshot of a flow, and the rendered version. Not exact, but pretty damn close, good enough to recreate it if needed from the image alone.
Note - this is NOT a full backup. It’s just what I needed, mainly flow backups and images. But it might be helpful for restoring bits and pieces rather than a whole ground-up restore.

