mwarning / trigger

Android app to lock/unlock/ring doors. Supports generic HTTPS/SSH/Bluetooth/MQTT and Nuki Smartlock.
GNU General Public License v3.0
133 stars 22 forks source link

Wishlist: Geofence #72

Closed rdorsch closed 2 years ago

rdorsch commented 2 years ago

Hi,

many thanks for the trigger app, which is one of my most used apps.

There are two items which I am currently still missing:

There is a tutorial on geofencing available: https://developer.android.com/training/location/geofencing

A simpler option could be to check if the device is in a certain wifi network and if not fire a warning. I assume for this most of the code is already in trigger.

mwarning commented 2 years ago

Nice to hear that this app helps. :-)

A simpler option could be to check if the device is in a certain wifi network and if not fire a warning. I assume for this most of the code is already in trigger.

That particular feature is already there (SSIDs). Enter one or more SSIDs (separated by commas) and you will only be able to send command if connected to one of those WiFi networks.

As for your two listed features, I understand that they would be nice to have, but currently I do not have the motivation to implement it. If someone wants to create a merge request, then I will be happy to merge it (if I am able to maintain the code).

rdorsch commented 2 years ago

If I understand it correctly, if I want to open the door w/o being in the wifi, I would need to go into settings, disable the SSID check, open the door, go back to settings and enable the SSID check again. Here a shortcut with a confirmation option if the not in the wifi network (yes I want to open it) would be quite useful.

mwarning commented 2 years ago

If I understand it correctly, if I want to open the door w/o being in the wifi, I would need to go into settings, disable the SSID check, open the door, go back to settings and enable the SSID check again.

Correct.

I wonder if a shortcut is something that is needed by many people. Well, I am uncertain about this. Well, disabling the "Require WiFi" option does not disable the SSID check, maybe it should..

StickyDigit commented 2 years ago

Just a thought... Perhaps an additional item like 'when SSID "x" visible' could serve well for 'any-net but not anywhere' situations.

On 11 March 2022 23:09:54 GMT, Moritz Warning @.***> wrote:

If I understand it correctly, if I want to open the door w/o being in the wifi, I would need to go into settings, disable the SSID check, open the door, go back to settings and enable the SSID check again.

Correct.

I wonder if a shortcut is something that is need by many people. Well, I am uncertain about this.

-- Reply to this email directly or view it on GitHub: https://github.com/mwarning/trigger/issues/72#issuecomment-1065622584 You are receiving this because you are subscribed to this thread.

Message ID: @.***> -- Sent from a phone. Please excuse my brevity.

rdorsch commented 2 years ago

I used as workaround to connect to the NATed IPv4 address in the wifi network instead of the IPv6 address. But whenever the phone is not in the Wifi network yet, it does not work. Usually that happens when I am in a hurry.

Instead of changing the trigger settings, I usually trigger a wifi scan.

If I could just hit a confirm button for yes that is ok in these cases, that would help.

mwarning commented 2 years ago

I have added a dialog to temporarly disable the WiFi check (wifi status and wifi ssid check). Let's see if that works.

mwarning commented 2 years ago

I added ssh passphrase supoort. But it is not working yet.

rdorsch commented 2 years ago

I think there was an (experimental?) implementation before, which stored the passphrase in the configuration as the private key, which kind of defeats the purpose of the passphrase. Is this one not stored in memory and needs to be reentered if trigger gets restarted?

mwarning commented 2 years ago

The implementation now caches the passphrase temporarely (until the app exits or another door profile is selected). So you need to reenter the passphrase.

rdorsch commented 2 years ago

Why do you invalidate the passphrase if another door profile is selected? At least in my case, I use the same private key for all doors. So I would rather never need to invalidate it (except if the app exits, then it is certainly gone). Is it possible to invalidate clear the passphrase cache only if the new door profile uses a different passphrase?

mwarning commented 2 years ago

That should be possible (but a bit tricky). I will do that.

mwarning commented 2 years ago

I have added the features. But there might be bugs, of course. Let's close this issue and create new ones for those bugs.