Using iPhone automation to control oH item

Hi there,

i would like to use an iPhone automation to control an oH item, once my phone connectes to CarPlay.
I´m already using an automation that starts an app feature when connecting and disconnecting.
This worked very well, even when the iPhone was locked.

Now i created two shortcuts, one to enable and one to disable the oH item through the app.
It works manually, within my network and through cellular with myopenhab-org.
After that, i created two automations, one that uses the enable shortcut and one that uses the disable shortcut, both triggered by CarPlay connecting or disconnecting.

It doesn´t work :frowning:
An neither does the previous automation work.

Here´s what i want to achieve.
I got my car and phone locations in openHAB, a switch item that controls notifications from the car and a switch item that shows the CarPlay connection status.

I would like to control the notifications based on the connection status.
I don´t need any notifcations, when i´m connected to the car.
But i would like to get notifications, when the car is moved without my phone connected.

Any ideas?

Cheers

I was able to solve this issue with another approach.
It´s not possible to control the state of an item through the openHAB app when the phone is locked.
But the automation can call an URL while the phone is locked.
I still got my shortcut that triggers the app feature when connecting and disconnecting from CarPlay.

To control the openHAB item, i created a shortcut that uses myopenhab.
This shortcut is called by an automation when the phone connects to my cars WiFi, which is basically the same step as connecting to CarPlay.

Both automations now work flawless without the phone being unlocked.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.