Is it possible to restore a backup made on a 2023 Homey Pro, on my old 2019 Homey Pro? I don’t need zigbee or any directly connected device, just my flow cards, variables, etc.
I would say not
You can copy advanced flows per “Device Capabilities” app
Translated quote:
.
Better Logic variables can be exported and imported, but it’s of no use when you use only Homey logic variables.
.
You can consider using the 2019 model as satellite of the 2023 model (as controller), by using the Homesh app set:
Thank you Peter for your reply. Unfortunately I don’t use better logic, but Homey’s own variables. Satelite mode isn’t my solution, because I wanted to offload a lot of calculations done by Homey to a second Homey. Also some apps check periodically at fixed intervals data which has to be processed. At those times my lighting can be a little slow (delay of 1-2 seconds), which can be annoying. For example IcalCalendar checks every 15 minutes and processes all icals. It doesn’t take that long, but in those 20-30 seconds, Homey’s load is high.
It would take me tens of hours to copy every flow, so it would be much easier to buy a second Pro 2023 and restore a backup.
How so? For all of your advanced flows it can be done in one go, like explained in my earlier post
Additional screenshot:
.
That’s really odd, just one app should not cause a high load during checks, and slow down other Homey actions.
What does the developer think about that? Did you report this phenomenon to him?
Also a hint, many users seem to do “every hour”, “every X minutes” checks.
To spread the load, I use “every 3601 seconds” (hour + one second), or “every 899 seconds” (15 minutes -/- 1 second)
That’s the easiest way indeed
You could, with the Homesh apps. You can start flows from one homey on the other homey.
The problem is recreating the flows. I’ve had two old Homey Pro’s 2019 running in parallel, communicating via MQTT to keep each other up-to-date.
I will try it, thank you. Although I must say, updating to 10.3.0 (from 10.1.4) seems to have reduced the load on Homey. I experienced regular (but not at the same time, because I use the irregular intervals for “regular” flows) spikes in system load.
Be aware: the graph of the past 7 days uses averaged data of one hour, so a spike of 60% could be 20 minutes of 140% and 40 minutes of 20%.
Sadly, I can’t prioritize calculations. Lighting should respond immediately, while calculations for my heatpump for example can be done a few seconds later.
To answer the original question last answer I heard for restoring on HP19 from HP23 backup
“When hell freezes over”
Advanced flows can be exported and imported with the Device Capabilities app.
Told him already, Arie
Haha yes, you both did. But you said it doesn’t work with Homey variables, so I’ll see how that goes. Will get back to you when I’ve got the time to test! Thank you both
YW. Dunno how much variables you need on the Pro 2019, but you will have to re-create them, before proceeding with the import of the exported flows.
To make life easier, you can export the variable names with HomeyScript, see below.
Then, you only need to copy/paste each new variable’s name while creating them.
Now, when you’ve re-created all needed variables, you can start the Device Capabilities app’s flow import procedure, and all the right variables should be added to the flows they were in.
Script:
Just add a new Homeyscript, and copy/paste the code below.
Then just run the script; be patient though, it takes quite some time to run completely.
EDIT: I just noticed this is now only usable for standard flows…
I tried to replace
const flows = await Homey.flow.getFlows();
by
const flows = await Homey.flow.getAdvancedFlows();
but this results in error…
// FindLogicsVarsInFlows.js
//
// Script to find Homey Logics Variables in Flows, and orphaned Variables (by RonnyW)
//
const flows = await Homey.flow.getFlows();
const logicVars = await Homey.logic.getVariables();
let flowMatches;
let varUsed;
let position = [];
let results2Var; // To be able to build a string to output the results to
// a variable [FoundLogicsVarsInFlows], for usage in flows
results2Var = ("*** Logics Variables found in Flows ***\n\n script: FindLogicsVarsInFlows.js\n\n");
for (var iLogicVar in logicVars){
results2Var = results2Var + "\n**VARIABLE:** ["+logicVars[iLogicVar].name + "]\n";
let logicVar = logicVars[iLogicVar].name;
let logicVarId = logicVars[iLogicVar].id;
varUsed = false;
for (var iFlow in flows){
flowMatches = false;
position = [];
// Search for variable name in Triggers
if (flows[iFlow].trigger.uri == "homey:manager:logic"){
for (var iArgs in flows[iFlow].trigger.args){
if ( flows[iFlow].trigger.args[iArgs].name == logicVar
|| flows[iFlow].trigger.args[iArgs].id == logicVarId){
position.push("Trigger card (IF)");
flowMatches = true;
}
}
}
// Search for variable name in Condition cards
for(var iCond in flows[iFlow].conditions){
if ( flows[iFlow].conditions[iCond] &&
flows[iFlow].conditions[iCond].uri == "homey:manager:logic"){
//log(flows[iFlow].conditions[iCond].args);
for (var iArgs in flows[iFlow].conditions[iCond].args){
if ( flows[iFlow].conditions[iCond].args[iArgs].name == logicVar
|| flows[iFlow].conditions[iCond].args[iArgs].id == logicVarId ){
position.push("Condition (AND) - direct reference");
flowMatches = true;
}
}
}
for (var iArgs in flows[iFlow].conditions[iCond].args){
if ( flows[iFlow].conditions[iCond].args[iArgs] &&
JSON.stringify( flows[iFlow].conditions[iCond].args[iArgs] ).indexOf( logicVarId ) > 0 &&
JSON.stringify( flows[iFlow].conditions[iCond].args[iArgs] ).indexOf( "homey:manager:logic" ) > 0 ){
position.push("Condition (AND) - indirect reference (Tag)");
flowMatches = true;
}
}
}
// Search for variable name in Action cards
for(var iAct in flows[iFlow].actions){
if ( flows[iFlow].actions[iAct] &&
flows[iFlow].actions[iAct].uri == "homey:manager:logic"){
for (var iArgs in flows[iFlow].actions[iAct].args){
if ( flows[iFlow].actions[iAct].args[iArgs].name == logicVar
|| flows[iFlow].actions[iAct].args[iArgs].id == logicVarId ){
position.push("Action (THEN) - direct reference");
flowMatches = true;
}
}
}
for (var iArgs in flows[iFlow].actions[iAct].args){
if ( flows[iFlow].actions[iAct].args[iArgs] &&
JSON.stringify( flows[iFlow].actions[iAct].args[iArgs] ).indexOf( logicVarId ) > 0 &&
JSON.stringify( flows[iFlow].actions[iAct].args[iArgs] ).indexOf( "homey:manager:logic" ) > 0 ){
position.push("Action (THEN) - indirect reference (Tag)");
flowMatches = true;
}
}
}
// Results of Flows found:
if (flowMatches == true){
varUsed = true;
results2Var = results2Var + " - ";
results2Var = results2Var + "**Flowname:** (" + flows[iFlow].name + ") \n";
results2Var = results2Var +" -Position: \n";
for (iPos in position){
results2Var = results2Var + " -" +position[iPos] + " / \n";
}
}
}
if (!varUsed){
results2Var = results2Var +"*** NOT FOUND IN FLOWS *** \n\n";
}
}
//
// Output
console.log(results2Var)
return(true);