Homey Apps SDK
📖 Apps SDK Reference🌍 Web API🛠 Developer Tools
  • Welcome to the Apps SDK documentation 👋
  • The Basics
    • Getting Started
      • Homey CLI
    • App
      • Manifest
      • Internationalization
      • Permissions
      • Persistent Storage
    • Drivers & Devices
      • Pairing
        • System Views
          • Devices List
          • Add Devices
          • OAuth2 Login
          • Credentials Login
          • Pincode
          • Loading
          • Done
        • Custom Views
      • Capabilities
      • Energy
      • Settings
      • Best practices
        • Lights
        • Window coverings
        • Battery status
    • Flow
      • Arguments
      • Tokens
    • Widgets
      • Settings
      • Styling
      • Debugging
  • Wireless
    • Wi-Fi
      • Discovery
    • Bluetooth LE
    • Z-Wave
    • Zigbee
    • 433 MHz
    • Infrared
    • Matter
  • Cloud
    • OAuth2
    • Webhooks
  • App Store
    • Publishing
    • Guidelines
    • Verified Developer
    • Updating
  • Advanced
    • Custom Views
      • App Settings
      • Custom Pairing Views
      • HTML & CSS Styling
    • Web API
    • Images
    • LED Ring
    • Homey Compose
  • Guides
    • Homey Cloud
    • Breaking Changes
    • Tools
      • Bluetooth LE
      • Zigbee
      • TypeScript
    • Using ESM in Homey Apps
  • Upgrade Guides
    • Homey v6.0.0
    • Upgrading to SDK v3
      • Zigbee Apps
    • Device Capabilities
Powered by GitBook
On this page
  • Device Settings
  • App Settings
  • App Userdata

Was this helpful?

  1. The Basics
  2. App

Persistent Storage

There are various ways to store persistent data within your app.

PreviousPermissionsNextDrivers & Devices

Last updated 2 years ago

Was this helpful?

Your app can store a user's settings in various ways. For each usecase, there's a best practice.

Device Settings

Most likely, you'll want to store settings per-device.

For front-end, user-visible settings, use .

For back-end, persistent settings, use the Device Store. Refer to and for the documentation.

App Settings

Most app-specific settings can be stored and retrieved through . This enabled your app to save and retrieve any value that is JSON-serializable. App Settings are saved across app restarts, and are only deleted when your app is uninstalled.

On Homey Pro, a custom App Settings can be created using HTML, CSS and JavaScript.

It is generally discouraged to use custom HTML, because often app settings are better to be stored within a Device Store.

App Userdata

For non-JSON serializable data, e.g. binary files, the /userdata/ folder is writable on Homey Pro.

The /userdata/ is publicly available on https://<homey>/app/your.app.id/userdata/.

This allows for some nice usecases, but can also be a security risk! Be sure to keep your filenames unique so they cannot be guessed.

For example, when storing an image, don't name it image1.jpg but a656d380-c887-4d8b-9ee5-f89de7b65d01.jpg and keep the Image's name stored in the App Settings.

Device Settings
Device.getStoreValue
Device.setStoreValue
ManagerSettings