Homey Community Forum

Zone Memory - Save and Restore Device Configurations

Zone Memory

large
App Store: Zone Memory
Frequently Asked Questions
Change Log

Supported Languages

:uk: English
:de: German
:netherlands: Nederlands

Permissions

homey:manager:api (required for controlling all devices on behalf of the user)

Currently Supported Device Classes

All device classes known by Homey as of 2020-06-14.
The use of some classes in combination with Zone Memory might not make obvious sense.
However, even a button might have additional custom capabilities to toggle some behaviour for example.

How it works

This app enables you to save the capability states of devices in a zone (including their subzones).
Only values of capabilities, which can be get AND set by the user, will be stored.
Advanced settings are not saved or restored.

The data is stored on Homey persistently. You can delete unwanted datasets from the app settings dialog.
Also, you can now check what data has been saved to a specific dataset using the app’s settings dialog.

Available Flowcards

Actions

Save State of Devices in Zone

Saves the current state of all devices, based on the selected devices classes, in a zone (including the subzones).

Arguements

  • ‘Name under which to store the dataset’ The name will be known by the restore cards if it was saved, at least once, only.
  • ‘Zone’ defines the zone, including it’s subzones, to capture.
  • Multiple toggles, defining, which device types should be captured.

Restore State of Devices in Zone

Restores a previously captured state of devices.

Arguements

  • ‘Name of the stored dataset’ The name will be known by the restore cards if it was saved, at least once, only.
  • ‘On/Off Behavior’ controls how the on/off state of the devices (if they have it) is mapped on restore.
  • ‘Optional: Capabilities to ignore’ can contain a comma separated list of capabilities to ignore on restore. You can check which capabilities are set by a dataset by going into the app settings and inspect the dataset.
  • ‘Commands Send Rate’ controls how fast the commands are sent to the devices. This is useful if you have devices/apps which do not handle api rate limits themselves.

Save State of a Devices

Saves the current state of a specific device.

Arguements

  • ‘Device’ to capture the state of.
  • ‘Name under which to store the dataset’ The name will be known by the restore cards if it was saved, at least once, only.

Restore State of a Device

Restores a previously captured state of a device.

Arguements

  • ‘Name of the stored dataset’ The name will be known by the restore cards if it was saved, at least once, only.
  • ‘On/Off Behavior’ controls how the on/off state of the device (if it got it) is mapped on restore.
  • ‘Optional: Capabilities to ignore’ can contain a comma separated list of capabilities to ignore on restore. You can check which capabilities are set by a dataset by going into the app settings and inspect the dataset.
  • ‘Commands Send Rate’ controls how fast the commands are sent to the devices. This is useful if you have devices/apps which do not handle api rate limits themselves.

Triggers

The following triggers can be used to chain flows, so you can make sure further actions happen after the Zone Memory operations have finished. Saving the state of devices in a zone is an expensive operation and might take some time depending on how many devices you have there.

A specific dataset has finished restoring

This trigger fires when a selected dataset has finished restoring.
Note: The trigger is run after sending the last command, but before the commands have finsihed acknowledging by the device(s).

Arguements

  • ‘Name of the stored dataset’ The name will be known if it was saved, at least once, only.

A dataset has finished restoring

This trigger fires when a any dataset has finished restoring.
Note: The trigger is run after sending the last command, but before the commands have finsihed acknowledging by the device(s).

Tokens

  • ‘Name of the dataset’ as stored.
  • ‘Type of the dataset’ can either be ‘devices’ or ‘zones’ depending on the type of dataset. A dataset with the same name can exist for both types.

A specific dataset has finished saving

This trigger fires when a selected dataset has finished saving.

Arguements

  • ‘Name of the stored dataset’ The name will be known if it was saved, at least once, only.

A dataset has finished saving

This trigger fires when a any dataset has finished saving.

Tokens

  • ‘Name of the dataset’ as stored.
  • ‘Type of the dataset’ can either be ‘devices’ or ‘zones’ depending on the type of dataset. A dataset with the same name can exist for both types.

Note

This app is not for backup purposes. However, you can basically use it to save a ‘scene’ for one or more device class(es).
Like have a party mode for your lights, and want to reliably restore the state of the devices to the setup they had before activating your party mode.

7 Likes

Change Log

v2.0.7

  • Fixed: A potential race condition which could cause the flow editor to crash.
  • Fixed: A race condition on restore settings between onoff vs. other capabilities.

v2.0.6

  • Fixed: Optional flowcard arguements are now actually optional.
  • Updated: Multilanguage AppStore info.

v2.0.5

  • Added: Ability to inspect stored datasets in the app settings menu.
  • Added: New zone save card. The legacy card works still, but cannot be added anymore.
  • Added: New zone restore card. The legacy card works still, but cannot be added anymore.
  • Added: New device restore card. The legacy card works still, but cannot be added anymore.
  • Added: Ability to control the command send rate for restore cards.
  • Added: Trigger cards for save and restore events. Legacy restore cards do not fire the triggers.
  • Updated: AthomAPI to v3.2.7.
  • Fixed: Flow error message are now multilingual.

v1.3.6

  • Updated: athom-api to v3.2.3

v1.3.5

  • Maintenance only. No functional changes.

v1.3.4

  • Changed: Zone selector improved.

v1.3.2

  • Fixed: Single device memory not updating stored settings with latest data.
  • Fixed: Light mode not updated as expected if stored device had no proper info on it.
  • Fixed: For some device on/off was not handled correctly on restore.

v1.3.0

  • Added: Support for memorizing single device state.

v1.2.2

  • Fixed: Potential issue with data storage handling.
  • Changed: Data store layout. Old data is migrated automatically on update of the app.

v1.2.1

  • Added: Dutch translation. Thanks Danee!

v1.1.0

  • Changed: Data is now stored in persistent file store instead of in memory.

v1.0.0

  • Initial Version

Frequently Asked Questions

Q: Can I use this app to store light scenes?
A: Yes, of course you can use it for that.

Q: I cannot find any device to add.
A: Currently the app does not implement any devices to add. If you want a button to activate a setting you can use Homey’s Virtual Devices for the time being.

Q: Can I use this app to store settings of a single device?
A: Yes. This is supported starting with version 1.3.0.

Great app!
I’ve been able to simplify my flows to make my garden lights go brighter when motion is detected en dim them again when no more motion is detected. :+1:

3 Likes

Hello, can it be that the Zone Memory app doens’t work anymore?
Or maybe i’m doing it wrong. I get only No Result? See printscreen.

1 Like

@JerX
Am not aware of any issues. Can you verify that the datasets exist by checking the app settings dialog? The dropdown will offer only datasets which have been saved at least once.

Ok, found the issue.

When making a first run, you have to save the dataset first before you can use it in other flows.
That wasn’t very clear :slight_smile:

So case solved.

1 Like

Zone Memory just got a whole lot better and more powerful :smiley:
Your existing flows should not break and still work but the majority of flowcards have been replaced by superior versions.
Enjoy the new possibilities.

PS: The Dutch translation is mostly based on Google Translate. If you have better wordings feel free to send me a private message or an email with suggestions.

1 Like

Hello,

I have installed your app.

I noticed something odd.

When i save a zone and all the lights are out. It goes wrong…

I had a previous save with one light dimmed.
I start the save with all the lights out. I then switch on all the lights. Then i restore the save (so that all the lights return in the old setting) to off…
BUT the save is not restored. It’s restored to a save before that wit one light dimmed. The dimmed light is stuck in this setting. I can’t switch it off… i have to restart my homey to fix this…

Am i doing something wrong?

Yours,

Johan

Can’t figure out what I’m doing wrong, but I cannot get this to work


The Living Room play 1 is a Hue Play, Zone Memory does run but saves the state of the device after it has changed not before. This is odd because when I run the Test I get a green tick for the Zone Memory before the Hue device changes. I have put delays in to give Zone Memory time to store. I have confirmed that the device dataset is created. I have a delay before the restore and when the delay runs out the Play flashes back to its previous setting then goes back to the red?
Would appreciate advice

Hello @Philip_Montgomery,
this is a little strange indeed. And not the first issue I see with hue in specific. Also 5 seconds delay should be more than generous for a single device state to get saved.
What makes me curious is that you seem to get the state saved after the light has changed. That should technically be impossible to happen. Maybe the device state reported by the hue app is not up to date at start even.
I will do a little test on my end to rule out the possibility of a bug. What you could do in the meantime is create a app diagnostic report for me to check on your data.
To do so, run the flow in question and right afterwards go Homey menu “More…” -> “Apps” -> “Zone Memory” -> hit the little gear icon and press create disg report button. Just enter your forum name as message so I know it is coming from you.

Thank you for your response. Report on its way, Homey app said to give you this as well.
319e97d8-1a04-4ba2-be09-dcdc49b988c9

Hello again @Philip_Montgomery,
well, the ID is not really useful but thanks. Got your report.
So this might not be the best news for you but I retested the flowcards and found no buggy behaviour there. They work just fine.
But seeing your data it looks like Homey actually reports some red color setting for the device when you save it. Here is the raw data which has been read:
{ name: ‘onoff’, value: true },
{ name: ‘dim’, value: 0.57 },
{ name: ‘light_hue’, value: 0 },
{ name: ‘light_saturation’, value: 0.87 },
{ name: ‘light_temperature’, value: 0.85 },
{ name: ‘light_mode’, value: ‘color’ }
I don’t know why this happens, I would expect that the hue app you are using would send up to date info on the light’s actual state. All I do is send this data back (basically spoken) as if you used flowcards or the Homey app UI.
What you could try is to make sure it is not a timing problem on your Homey, by splitting the flow using the trigger card for when the save operation has been completed. So you leave the save state card of your current flows then section but move all other cards in there to a separate flow which is triggered by the dataset saved trigger card. This way you could at least ensure there is no race condition when setting the light.
If this does not work, then something is either wrong with the hue app or Homey itself :frowning:

Evening, thanks for looking over the report. I wonder is Homey prepping the “Then” steps and not sending the info to the play until the time requested. I’m guessing, I don’t know. Before the flow runs the light is either off or a variation of White, certainly not red but having looked at the log your app creates it is not being told their current state.
I am using the Athom Hue app via Hue Hub as I want to be able to use the hue app as currently Homey have no way of setting scenes, updating firmware or adjusting sensors. I imagine your app diagnostic showed that I am using v5 RC50, don’t know if that makes any difference.
What I will try is having a flow with your app to save device settings and a separate flow running after to set the light colour and then restore device settings recalled from Zone Memory. I’ll let you know.

The Homey firmware version “should” not have any impact. But I only have Homey on stable channel so I cannot cross test. Let me know how it goes.

1 Like

Okay, I’ve split it into 3 flows


Ran a test and it worked :grin:
I’ve had Homey for about 3 weeks ago so learning, some users advocate splitting flows into several and this maybe one of those occasions when necessary. I don’t know but hopefully my learning helps someone else. I think I’ll forward this to Homey as well, need to contact support anyway as their Spotify and HEOS apps aren’t working and there seem to be others with same problem. I had contacted them before asking why their Hue app can see scenes but cannot activate them, they assured me they’re improving it.

1 Like

Good to know.
In regards to your first flow. You can save the 3 seconds delay if you trigger your Bosh Alert flow using this card:
image
Should read uhm… “A specific Dataset has been saved” or so in English. This way you can run the alert flow as soon as Zone Memory finished saving that particular dataset.

1 Like

Indeed, Great point, alteration made. Epic support, thanks

1 Like

Morning, update, I have my Homey set to restart overnight, no particular reason but others have suggested it as being a good habit. This morning the flows that were working last night are not working as before, Zone Memory seems unable to restore to…A Hue Play.

I changed the target light to a lamp and it works again. I think I am also seeing a problem with control of Hue Play that has nothing to do with your App.

When I disabled the Bosch Alert flow and ran a test on Microwave Oven Finished Zone Memory was able to store the values of the play but could not restore them. But with a Hue Lamp it seems to work exactly as intended.

This is just for your info and I have also forwarded this to Athom Support

1 Like

Indeed. :+1:t3:
It’s been a while since I tried ZoneMemory too and had the same problem with my Hue lamps via Hue Bridge.
However, I’m currently moving all my Zigbee devices from Homey and the Hue Bridge to ConBee II and deCONZ respectively, so I can’t try it out at the moment. But I will give a feedback when I have tried it.

1 Like