Skip to content

Example 2: Restore a flow or copy a flow.

Dijker edited this page Nov 20, 2016 · 3 revisions

You installed HomeyPSCLI, already connected with Homey and maybe made an export of everything?

PS> Export-HomeyConfig -ExportPath C:\Homey\Backup-0.1.9b

Now you want to restore that working flow you exported yesterday after you F*cked-up it on Homey.

Find the file of the export on your system:

it is on [ExportPath]\Flows\[folders]\[FlowName]-{GUID}-{HomeyVersion}-{YYYYMMDDHHmmss}.json Lets Call it {FlowFilePath.json}

Execute:

PS> Import-HomeyFlow -JSONFile {FlowFilePath.json} -OverwriteFlow

-Overwrite is necessary to confirm you want to restore over the existing flow in Homey. It will keep its {GUID}

You can also choose not to overwrite and maybe you removed the flow flow from Homey, than you have no other option than creating a new Flow and {GUID}.

-NewFlowID Will create a new Flow with a ned ID and restore over there (so it will copy it back)

If you don't know if the old Folder of flows exists or maybe want to clone to the root folder use -RestoreToRoot

PS> Import-HomeyFlow -JSONFile {FlowFilePath.json} -NewFlowID -RestoreToRoot

Happy Cloning ;-)

Clone this wiki locally