AutoSleep sleep/awake status in Homey

Steps to connect the AutoSleep status from your Apple Watch to your Homey user status. Then you can run automation flows based on whether you are awake or asleep.

  1. What do you need?
  2. Step 1: Prepare Homey
  3. Step 2: Prepare HomeKit
  4. Step 3: Create a virtual switch
  5. Step 4: Create scenes in HomeKit
  6. Step 5: Enable HomeKit in AutoSleep
  7. Step 6: Go to sleep
  8. Multiple users

What do you need?

  • Homey Pro
  • HomeKit router like Apple TV or HomePod
  • Apple device like iPhone or Watch
  • HomeKitty app on Homey
  • AutoSleep app on your Apple Watch

Step 1: Prepare Homey

When you have gone through the basic setup Homey should be available in your network and connected to your Homey account and app.

  1. Go to Settings > Experiments
  2. Enable Virtual devices
  3. Go to Settings > Apps
  4. Install HomeKitty
  5. Go to the app
  6. Tap the settings cog icon
  7. Go to Advanced settings
  8. Toggle the devices you do or don’t want Homey to expose in HomeKit

Step 2: Prepare HomeKit

On your iPhone open the Home app

  1. Tap the + button
  2. Add hub
  3. Find HomeKitty
  4. Enter the pairing code 11122333

Step 3: Create a virtual switch

First in the Homey app

  1. Tap the + button
  2. Choose Virtual devices
  3. Choose Virtual switch
  4. Tap Continue
  5. Name: something like “HomeKit asleep”

Connect the switch to your Homey user

  1. Add a flow “HomeKit asleep”
    • IF: device “HomeKit asleep” is on
    • THEN: set user “Name” asleep
  2. Homey: Add a flow “HomeKit awake”
    • IF: device “HomeKit asleep” is off
    • THEN: set user “name” awake

Step 4: Create scenes in HomeKit

On your iPhone go to the Home app

  1. Create a scene named exactly AS Off
  2. Include “HomeKit asleep” device with on state
  3. Create a scene named exactly AS Done
  4. Include “HomeKit asleep” device with off state

Step 5: Enable HomeKit in AutoSleep

On your iPhone

  1. Open the AutoSleep app
  2. Tap Settings
  3. Tap HomeKit
  4. Enable HomeKit

On your Apple Watch

  1. Open the AutoSleep app
  2. Scroll to the bottom
  3. Enable the HomeKit toggle

Step 6: Go to sleep

Now to tell AutoSleep that you are going to sleep there are two options:

  1. Using the blue button with lamp icon.
  2. Or schedule an alarm and enable the Lights off toggle.

Both will run the AS Off scene. That will set the virtual switch to on and tell that to Homey. There the flow “HomeKit asleep” is triggered which will set your user status to sleeping.

When you wake up tap Done or the pink Sunrise button in AutoSleep. That will run the AS Done scene in HomeKit. Then the virtual switch will turn off and trigger Homey to run the “HomeKit awake” flow. Which will set your status to awake.

Buttons in the AutoSleep app

More detailed info in the manual >

From there you can have flows or conditions trigger on the sleep/awake events. In the AS scenes you can include more devices, like turning all the lights off.

In my experience it is best to add the AutoSleep complication to your Watch face. That way the app will stay awake while you are asleep. 😉

Multiple users

AutoSleep does not let you specify the scene names, so it is not possible to distinguish users. However, you can repeat the steps with unique names for the virtual switches and flows. Then the users can hit the designated button in the Home app, lockscreen, control center, etc. to indicate their own sleep state.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *