IPhone (incomming) call sets an item switch

Hello,

i’m looking for a solution to automatic stop my kodi and sonos playing when i get a call on my iphone - or when i make a call with it. I tried IFTTT but there is only a solution for android.

Would it be possible for the ios openhab app to set a switch on the openhab server to on when the iphone gets a call and to set it off at the end?

Or has anybody an other idea?

Thank you very much.

Best regards

Michael

use some App to trigger the REST API:

  • it’s realtime (and not laggy like IFTTT)
  • you won’t Need much to do

which app? I haven’t found one that can trigger something like REST API.
IFTTT doesn’t have such a trigger - only for android i think.

maybe something like the workflow app for ios? (didnt check by myself if there is a call-trigger)

I can’t find an incomming call trigger in workflow or ifttt.

If the is a function for an app to get the actual incomming call number it would be fine when the openhab-app would get a function to set a switch.

I was also searching on my mac mini server (where openhab runs) to catch the ringing event (my mac also rings when there is a call to my iphone) but i didn’t find anything :frowning:

I’m sorry, I’m no iOS user and I’m more than startled, that there’s now incoming call trigger…the REST-call should be possible judging from my linked thread?

My problem is finding the trigger. Maybe there is a function in osx / REST to read the messagecenter, but the best way would be the iOS-App:

Since iOS 10 theres a new CallKit and there are some Apps for checking the phone number before the iphone rings (= spam protection). So technical it should be possible to get the number on the iphone and to something (e.g. set a switch, maybe also transfer the number), but i can’t program a app or (better) add a function to the openhab-ios-app.

I tried to setup an app with CallKit. If you enable the “Spam protection” the app gets called one time and not every time a call comes in. Maybe Apple will add a trigger in the Shortcuts sometime, but I don’t think so.