Pop up with the question

Hello,
I have a need:
starts a rule, he sends me a pop up with the question “Do you want to open?” yes / no on ios with openhab app.
Based on the response, send an ON command.
It can be done?

No, but why would you need something like that? Maybe there is another way to get the end result you are looking for.

Hello,
I use icloud to detect iphone.
I wanted to open the gate when I’m close to home 30 meters range.
I’m running tests with rules, it seems like it works, but I wanted to add the question.

One way that I just thought of, while not exactly what you want, is that you can send a notification to your devices, and then when you receive that notification, you have to flip a certain switch on your device, and to that switch you link a rule that performs the action you want (opening the gate in this case).
In the rule that you use to send the notification, you can, before you send the notification, set that switch to the default position first, if you require that.

Something like:

Confirm switch item definition

Switch ConfirmGate "Confirm Gate"

Rules

rule "Check opening of gate"
    when
        // some item that detects if you are close
    then
        // probably some other checks first that you already have in place
        ConfirmGate.postUpdate(OFF)
        sendBroadcastNotification("Do you want to open the gate?")
end

rule "Confirm opening gate"
    when
        Item ConfirmGate received command ON
    then
        // Now open the gate
end

Hope this makes sense.

The principle is, but out of laziness the demand was more immediate for use.
Unlock iphone, open app, then switch … while driving
Do you think the question is not feasible?

Can you do this with Telegram? I think I remember reading somewhere you could put an action in a Telegram message?

Squid

This is totally doable on Android with Tasker. I do this myself. I don’t know if the tools on iOS that work a bit like Tasker can manage this or not. This is all done on in Tasker.

  • I use a geofence around my home that triggers a Task when I enter the geofence
  • The Task shows a Menu with two options: cancel, open the garage
  • Cancel is self explanatory. If I tap “open the garage” it sends a command to my garage door controller through OH’s REST API. I keep my phone connected to my LAN through a VPN so I use the local address. You could use myopenhab.org instead.

Note that NONE of this is done through openHAB or the openHAB apps. There is not way to do what you are after through OH itself. You must use some third party app to make this happen.

Do you mean this link binding?

You don’t need any binding for this. However also using iCloud for this will never (or rarely) work.
It is just polling the device status, so it is not ‘instant’. Polling time is minimum 5 min. So it means that in average you will have to wait 2.5 min after arriving to your garage door to wait for that pop-up (if you set 5 min polling time in OH).

If I’m right there is no Tasker (or alternatives) available for iOS. You can’t do this on iOS.
I think you have two options to have a good ‘geofence’ feature and open the automatically (and that you don’t even need a question to pop-up because it will be well defined to not to open when you are not at home):

  • If you have enough Wi-Fi range outside the garage door (enough that when you approach it with the car it will connect to your Wi-Fi automatically) then you can use arping or other methods to detect devices on the network. Arping is also just polls the network devices but you can have 10sec poll time so you only have to wait 5 sec in average.

  • Integrate HomeKit to your openHab and have a ‘Presence’ switch. Then in HomeKit create an automation which turns on that switch when you arrive home. I have a switch set-up like this, however I didn’t have time to test it how long does it takes to realize that the phone is inside the geofence.

  • Also if you really want to do, there is a guy who is developing a new binding for Telegram which allows you to send Telegram message with pre-configured replies easily.

If you have an Amazon Echo/Alexa you can also use their new location aware features to do the same thing.

Set up Hue Emulation and get your Garage Door properly tagged and your in business. You will not get the POP Up alert, but you can get the door to automatically open fairly easily once you pass a preset location.

Squid

Yes

Yes, intact in HomeKit

Interesting, I will do some research

I do not have Amazon Echo

You can put an automation in homekit for your gate - I assume this is one of your nodered homekit items…

From your iPhone homekit you make a new automation that says “when I get home open the gate”. Since homekit sees this as “giving access to your home” the gate should not actually open but instead your phone will alert and say “do you want to run this automation?” At which point you click yes, do Touch ID/Face ID and your gate will open.

If I’m not mistaken that’s exactly what you’re looking for?

Yesssssssss :rofl::rofl::rofl:
The home position from where does it take you?
I do not have a fixed Apple device at home, I use wi-fi when I arrive

Ah yes - You will need either Apple TV, HomePod, or iPad at home acting as a “home hub” (what apple calls it) for this to work. That gives you more automation options in homekit.

thank you