Homekit for Alarmclock integration?


I use an alarmclock in openhab to switch my Espresso Machine and lights when I get up.
Unfortunately I need to set it up separately from the alarmclock on my iPhone.
This is not really comfortable and sometimes tricky not to forget to set one of both correctly.

Is it possible to integrate the iPhone’s alarmclock into openhab with the Homekit?

Any other suggestions?

No, that’s not possible. Apple only allows HomeKit triggers on location, accessory characteristic changes, or a static time. There’s no event for the built-in alarm app.

Thanks, @beowulfe,
That’s actually disappointing. I think this would be the ultimate feature, because I assume more and more people use the smartphone as an alarmclock.

@others: Is there any other option to link the iPhone alarmclock into OH?

Nah this is an apple problem. There is now way currently of getting that value that you set in the alarm clock app.


Will ifttt help? There you can trigger things when your alarm is turned on (though I have not tested so far)



I think the ifttt alarm channel is based off its own scheduler, not off the built in iOS app.

I would also use another alarm clock than the iphone natie one.
If it’s reliable and works with Openhab.

Did anyone successfully integrated the Homekit Bridge to receive the iOS Alarmclock event?
I would like to get rid of a separate Alarmclock in OH together with another alarmclock (on my phone)

It is really disappointing, that this is still not possible.
I wonder if this is really not required from regular HomeKit users to trigger actions if the iPhone alarm goes off in the morning… !?

It is possible. Without HomeKit.

If you use the App Shortcuts you can create a litte program to set the alarm clock.
Like this one:

then at the end of the program you must add something like this:

As “File” you can choose the variable “Time” that you set earlier in the shortcut program.

Now if you execute the shortcut and set your Time, the time is send to the Rest Api. You have to create a String Item where the time can be send to,

String testiphone

A rule example to convert to LocalDateTime and Unix Timestamp:

import java.time.LocalDateTime
import java.time.format.DateTimeFormatter

rule "String to DateTime"
    Time cron "0 0/1 * * * ?"
    var weckzeit = testiphone.state.toString
    // convert to LocalDateTime
    var DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd.MM.yyyy, HH:mm")
    var LocalDateTime formatDateTime = LocalDateTime.parse(weckzeit, formatter)
    // convert to Unix Timestamp
    var weckzeitepoch = new DateTime(formatDateTime.toString).millis
    logInfo ('rules','iPhone Weckzeit: ' + formatDateTime)
    logInfo ('rules','iPhone Weckzeit: ' + weckzeitepoch)

I hope this is helpful:)

Great - thank you so much.
This is definitely helpful! :slight_smile:
I will start to play around with it.

very nice that this finally is possible. Very complex though.
If your “playing around” bears fruit, it would be greatly appreciated if you would post a detailed description of a working solution.
Thank you very much.

Sure, no problem.
Currently I have some other topics to finish first, but I will keep you posted.

I just wanted to start yesterday with the implementation.
Unfortunately Siri is deactivated on my company phone.
So I won’t be able to use the “create alarm” on my iPhone :frowning:

Thanks a lot for your help though and I will keep this in my todo list in case Siri will be available one day…