[APP][Pro] Presence Simulator

Hi everyone!

When i moved from home assistant to Homey there was one thing missing. I had a feature that tracked lights and could replay them. Since i couldn’t find any feature like that for Homey I thought lets create an app myself.

The app has been reviewed :tada:

Sourcecode: Github

Feel free to ask questions in here.


:house: What does it do?

Presence Simulator replays your lighting patterns from one week ago. The app automatically tracks when your lights turn on and off throughout the week, then replays these exact patterns when you enable simulation mode.

Example: If your living room light turned on last Monday at 19:30 and off at 23:15, it will do the same this Monday when simulation is active.


:sparkles: Features

  • :bar_chart: Automatic tracking - Records your lighting patterns without manual intervention

  • :counterclockwise_arrows_button: Week-based replay - Replays patterns from exactly one week ago (same day, same time)

  • :chart_increasing: Visual timeline - See your weekly lighting patterns at a glance per day

  • :memo: Event history - Review when each device was turned on/off with detailed timestamps

  • :control_knobs: Simple controls - Enable/disable simulation mode with one click

  • :light_bulb: Smart filtering - Automatically filters to show only lights, sockets, and compatible groups

  • :busts_in_silhouette: Group support - Track device groups and automatically handle individual devices

  • :electric_plug: Multi-channel support - Full support for devices with multiple outputs (e.g., Fibaro Walli switches)

  • :inbox_tray: Import history - Import up to 50 historical events from Homey Insights when adding devices

  • :high_voltage: Performance optimized - Minimal storage writes and efficient memory usage to protect your Homey


:rocket: Getting Started

Installation

  1. Install the app from the Homey App Store

  2. Open the app settings page

  3. Select the devices you want to track

  4. Build up pattern history:

  • Quick start: Import existing history from Homey Insights (up to 50 events per device)

  • Automatic: Let the app run for at least a week to record your natural patterns

Usage

  1. Track your patterns - The app automatically records when your selected devices turn on/off

  2. Review the timeline - Check the visual timeline to see your weekly patterns

  3. Enable simulation - When desired, enable “Simulation Mode” in the app settings or use a flow card to enable or disable the simulation mode.

  4. Automatic replay - Your devices will turn on/off automatically based on patterns from one week ago


:gear: Configuration

App Settings

  • Simulation Mode - Toggle to enable/disable pattern replay

  • Device selection - Select which devices should replay on/off patterns when simulation mode is enabled. You can use the import function to import a maximum of 50 events.

  • Tracked devices - View the devices that are being tracked. You can view week patterns with detailed on/off events, import history, remove the history and remove the device:

  • Timeline view - Visualize patterns per day of the week (Monday - Sunday). You can even click on a badge to view all events for that moment.

  • Recent events - View detailed on/off events with timestamps for recent events.

Requirements

  • Homey (Pro) firmware >= 5.0.0

  • At least one compatible light, socket or switch device

  • Minimum one week of tracking data for accurate simulation (or use Import feature)


:wrench: How It Works

Tracking Phase

  1. The app monitors state changes of selected devices

  2. Every time a device turns on or off, the event is recorded with a timestamp

  3. Data is stored locally on your Homey

Simulation Phase

  1. When simulation mode is enabled, tracked lights will be set to the same state exactly one week ago.

  2. It schedules the same actions for today (e.g., if the device turned on last Monday at 19:30, it will turn on this Monday at 19:30)

  3. The simulation runs continuously until you disable it


:hammer_and_wrench: Troubleshooting

Devices aren’t turning on/off during simulation

  • Ensure simulation mode is enabled in the app settings

  • Verify the device has at least one week of tracking data

  • Check if the device is still online and responding

  • Review the event history to confirm events were recorded

Timeline shows no data

  • Wait at least 24 hours after adding a device for data to appear

  • Manually toggle the device on/off a few times to generate events

  • Check if the device is properly added in the tracked devices list

Device not available for tracking

  • Only lights, sockets, and groups containing lights/sockets are shown

  • Ensure the device supports on/off capability

  • Verify the device is online and working normally in Homey

  • If a device is part of a tracked group, it won’t appear individually


:clipboard: Changelog

Version 1.0.3

  • Fixed: “Last activity” indicator showed oldest event instead of most recent event

  • Fixed: Singular/plural forms now display correctly (e.g., “1 day ago” instead of “1 day/days ago”)

  • Fixed: Tuned light background greys so that dark mode inversion yields a softer dark grey instead of harsh pure black.

Version 1.0.2

  • Added: Multi-channel device support (e.g., Fibaro Walli switches with multiple outputs)

  • Fixed: Reduced storage writes to protect eMMC lifespan (per-device storage instead of saving all devices)

  • Fixed: Optimized memory usage by reusing single HomeyAPI instance instead of recreating multiple times

  • Fixed: Optimized polling interval (5s → 5 min)

  • Fixed: Prevent duplicate event recording from listener

Version 1.0.1

  • Added community topic

Version 1.0.0

  • First version!

5 Likes

Hi @Anoniemand,
that’s a really great idea and something that was indeed missing in the Homey universe until now. That’s why I installed the test version right away.
However, I noticed that a certain light switch doesn’t appear in the list of devices.
This is the Fibaro Walli Switch (FGWDSEU-221). It is a 2-channel switch, but can also be configured as a 1-channel switch.
Could you check what the problem might be?

Here is some data from both modes:

Walli Switch, configured as single switch

{
  "class": "socket",
  "capabilities": [
    "onoff.output1",
    "measure_power.output1",
    "meter_power.output1",
    "measure_power",
    "meter_power"
  ],
  "capabilitiesObj": {
    "onoff.output1": {
      "id": "onoff.output1",
      "type": "boolean",
      "iconObj": null,
      "title": "Ausgabe 1",
      "getable": true,
      "setable": true,
      "insights": true,
      "insightsTitleTrue": "Eingeschaltet",
      "insightsTitleFalse": "Ausgeschaltet",
      "value": false,
      "lastUpdated": "2026-01-10T15:15:34.372Z"
    },
    "measure_power.output1": {
      "id": "measure_power.output1",
      "type": "number",
      "iconObj": null,
      "title": "Leistung - Ausgabe 1",
      "getable": true,
      "setable": false,
      "insights": true,
      "insightsTitleTrue": null,
      "insightsTitleFalse": null,
      "units": "W",
      "decimals": 2,
      "value": 0,
      "lastUpdated": "2026-01-10T15:15:39.020Z"
    },
    "meter_power.output1": {
      "id": "meter_power.output1",
      "type": "number",
      "iconObj": null,
      "title": "Stromzähler - Ausgabe 1",
      "getable": true,
      "setable": false,
      "insights": true,
      "insightsTitleTrue": null,
      "insightsTitleFalse": null,
      "units": "kWh",
      "decimals": 2,
      "value": 5.09,
      "lastUpdated": "2026-01-10T15:11:20.632Z"
    },
    "measure_power": {
      "id": "measure_power",
      "type": "number",
      "iconObj": null,
      "title": "Leistung - Gesamt",
      "getable": true,
      "setable": false,
      "insights": true,
      "insightsTitleTrue": null,
      "insightsTitleFalse": null,
      "units": "W",
      "decimals": 2,
      "value": 0,
      "lastUpdated": "2026-01-10T15:15:39.020Z"
    },
    "meter_power": {
      "id": "meter_power",
      "type": "number",
      "iconObj": null,
      "title": "Stromzähler - Gesamt",
      "getable": true,
      "setable": false,
      "insights": true,
      "insightsTitleTrue": null,
      "insightsTitleFalse": null,
      "units": "kWh",
      "decimals": 2,
      "value": 5.09,
      "lastUpdated": "2026-01-10T15:11:20.632Z"
    }
  }
}

Walli Switch, configured as double switch

{
  "class": "socket",
  "capabilities": [
    "onoff.output1",
    "onoff.output2",
    "measure_power.output1",
    "meter_power.output1",
    "measure_power.output2",
    "meter_power.output2",
    "measure_power",
    "meter_power"
  ],
  "capabilitiesObj": {
    "onoff.output1": {
      "id": "onoff.output1",
      "type": "boolean",
      "iconObj": null,
      "title": "Ausgabe 1",
      "getable": true,
      "setable": true,
      "insights": true,
      "insightsTitleTrue": "Eingeschaltet",
      "insightsTitleFalse": "Ausgeschaltet",
      "value": false,
      "lastUpdated": "2026-01-10T15:12:57.544Z"
    },
    "onoff.output2": {
      "id": "onoff.output2",
      "type": "boolean",
      "iconObj": null,
      "title": "Ausgabe 2",
      "getable": true,
      "setable": true,
      "insights": true,
      "insightsTitleTrue": "Eingeschaltet",
      "insightsTitleFalse": "Ausgeschaltet",
      "value": false,
      "lastUpdated": "2026-01-10T15:18:42.096Z"
    },
    "measure_power.output1": {
      "id": "measure_power.output1",
      "type": "number",
      "iconObj": null,
      "title": "Leistung - Ausgabe 1",
      "getable": true,
      "setable": false,
      "insights": true,
      "insightsTitleTrue": null,
      "insightsTitleFalse": null,
      "units": "W",
      "decimals": 2,
      "value": 0,
      "lastUpdated": "2026-01-09T10:28:46.010Z"
    },
    "meter_power.output1": {
      "id": "meter_power.output1",
      "type": "number",
      "iconObj": null,
      "title": "Stromzähler - Ausgabe 1",
      "getable": true,
      "setable": false,
      "insights": true,
      "insightsTitleTrue": null,
      "insightsTitleFalse": null,
      "units": "kWh",
      "decimals": 2,
      "value": 16.8,
      "lastUpdated": "2026-01-09T10:12:15.449Z"
    },
    "measure_power.output2": {
      "id": "measure_power.output2",
      "type": "number",
      "iconObj": null,
      "title": "Leistung - Ausgabe 2",
      "getable": true,
      "setable": false,
      "insights": true,
      "insightsTitleTrue": null,
      "insightsTitleFalse": null,
      "units": "W",
      "decimals": 2,
      "value": 0,
      "lastUpdated": "2026-01-10T15:18:45.208Z"
    },
    "meter_power.output2": {
      "id": "meter_power.output2",
      "type": "number",
      "iconObj": null,
      "title": "Stromzähler - Ausgabe 2",
      "getable": true,
      "setable": false,
      "insights": true,
      "insightsTitleTrue": null,
      "insightsTitleFalse": null,
      "units": "kWh",
      "decimals": 2,
      "value": 2.52,
      "lastUpdated": "2025-12-12T10:58:25.762Z"
    },
    "measure_power": {
      "id": "measure_power",
      "type": "number",
      "iconObj": null,
      "title": "Leistung - Gesamt",
      "getable": true,
      "setable": false,
      "insights": true,
      "insightsTitleTrue": null,
      "insightsTitleFalse": null,
      "units": "W",
      "decimals": 2,
      "value": 0,
      "lastUpdated": "2026-01-10T15:18:45.207Z"
    },
    "meter_power": {
      "id": "meter_power",
      "type": "number",
      "iconObj": null,
      "title": "Stromzähler - Gesamt",
      "getable": true,
      "setable": false,
      "insights": true,
      "insightsTitleTrue": null,
      "insightsTitleFalse": null,
      "units": "kWh",
      "decimals": 2,
      "value": 19.32,
      "lastUpdated": "2026-01-09T10:12:15.448Z"
    }
  }
}

If you need further information, please let me know.
Thank you very much for your efforts!

1 Like

When I saw youre idea, I was thinking it’s a bit overkill. My lights turn on and off according to a schedule, but the sensor-controlled lights don’t, of course. This way, the lights in the garage and bathroom, for example, will also turn on occasionally.

I’m going to install and check it out.

1 Like

Great to see more are interested in this app :slight_smile:
Thanks for finding an issue so fast :stuck_out_tongue: i’ll look into it and get back to you.

1 Like

Good to see that someone who has automated most lights still sees an use case for it :+1:

Some things I noticed from your source code:

  • Contant creation on new HomeyApi objects (you only need 1 and this causes alot of unneeded memory and garbage collection)
  • You are contantly writing the whole state to the settings with saveState which causes alot of emmc wear. Settings are ment to store settings and should not be used to track alot of logging data.

Thanks for the feedback, will look into it :+1:

Interesting, 1 physical device, two on off features.

I’ve created an implementation that treats such a device as two devices. So in your case they would show up as:

  • Fibaro Walli - Ausgabe 1
  • Fibaro Walli - Ausgabe 2

Currently I’m awaiting review, I’ll upload this new version as soon as the current one is reviewed.

1 Like

Really good feedback, I’ve addressed both issues, the summary would be:

  • Reduced storage writes to protect eMMC lifespan (per-device storage instead of saving all devices)
  • Optimized polling interval (5s → 5 min)
  • Optimized memory usage by reusing single HomeyAPI instance instead of recreating multiple time

Fixes will come in updated version (after the current has been reviewed)

2 Likes

I don’t know what happened with the review, they’ve sent a message I cannot read and v1.0.1 has been put back in test phase. Anyhow…

That’s a good opportunity to publish v 1.0.2 :slight_smile: which is available to test: Presence Simulator | Homey

@DirkG In this version the double on/off feature should work, could you test it?

Also the optimizations thanks to the code review from @Jero are in it.

Have you accidentally clicked “Retract submission” when checking the developer tools page? If you do that while they have left a message, it will disappear and go back to the test phase.

No I didn’t, maybe the reviewer did? Just hope the next feedback will be readable, otherwise we’ll keep running in circles.

Yes, I’m now able to select the two channels separately. Thx! :+1:

1 Like

hi,

i’m a bit confused about the last seen (zuletzt:) information. it doesn’t seem to add up. today is wednesday, and i’ve spotted switch on/off activity for both today and yesterday. but since today isn’t 2 days ago (vor 2 tag(en).

i’m wondering if I’m reading this wrong or if there might be a glitch?

Thanks for the keen eye on that one.

That seems fuzzy indeed. I will look into it later today.

It was showing the oldest entry instead of the most recent one. I’ve published a newer version.

Thanks for spotting this issue :+1:

1 Like

I’ve been testing the app for a few days and it works fine. Great work! :slightly_smiling_face:
There’s just one thing I haven’t figured out yet.

For example:

In everyday use, lights in the living room are switched on in the morning and evening. Other rooms like the kitchen or bedroom are switched on at different times. When leaving the apartment, all lights are turned off.

When Presence Simulator is activated, only the lights in e.g. the kitchen or bedroom are simulated if their scheduled times fall after activation. The living room lights are not simulated, even though they normally would be on at that time.

Ideally, the living room should switch on a few minutes before lights in other rooms, so the simulated movement pattern through the apartment looks natural.

A feature that allows defining which room should turn on first—before the regular schedule starts—might solve this and create a more realistic presence pattern.

Is something like this possible as a setting-option in future in the app like “Initial room activation before schedule” ?

I’ve been testing the app for a few days and it works fine. Great work! :slightly_smiling_face:

Thank you

When Presence Simulator is activated, only the lights in e.g. the kitchen or bedroom are simulated if their scheduled times fall after activation. The living room lights are not simulated, even though they normally would be on at that time.

When activating Presence Simulator all lights (that are tracked) will be checked and set in the state it was 7 days ago (on or off). I should re-verify this, but as far as I have tested this scenario, the lights should be on.

Ideally, the living room should switch on a few minutes before lights in other rooms, so the simulated movement pattern through the apartment looks natural.

Good idea, I might work out something with order and delay (range) per tracked device. The name for a tracked device and the order might differ per household.

Perhaps an idea:

When the Presence Simulator is activated, the app determines which light in the schedule would be the next one to turn on after the activation time.

From that point, the app calculates a backwards offset (based on one or two user‑defined parameters, e.g. a 10‑minute window). During this offset window, one or several selected lights could be switched on automatically to create a realistic initial state.

The simulator would reconstruct a plausible “pre‑activation phase” by looking ahead in the schedule and then back‑filling the state of certain rooms before the actual timeline begins.

Maybe i’m overthinking it. In the end, the app would only need to check which lights should already be on at the moment the Presence Simulator is activated. Those lights could simply be switched on immediately, so the simulation starts with the correct initial state.