#Detect App information

1 messages · Page 1 of 1 (latest)

cursive bone
#

is it possible to detect if a VPN connection has been made using the companion app?

I've got an automation that starts a vpn connection to my home network. I would like to create a second automation so that if that connection is dropped, or connected I can be notified automatically.

Thanks.

#

Detect App information

grave quartz
#

Have you tried the Network type sensor, the options include a value of VPN. On Android anyway.

cursive bone
#

I have. I've had my phone connected to vpn whilst i've been out today, but it just shows wifi or cellular.

grave quartz
#

Do you use a standard android vpn or something like wireguard, it is possible it's not picked up by what ever api the app is using.

cursive bone
#

i'm using "openVPN for Android"

#

i'm using this as it wokrs better than the normal openvpn client with a UDMP

#

so it looks like openvpn for android creates a persistent notification:

data.new_state.attributes["de.blinkt.openvpn_1346787898_is_ongoing"]

this value gets set true if connected.

#

although i'm not sure the notifications update fast enough for it to be useful in an automation.

grave quartz
#

It is worth a try, I normally find new notifications come through quite quickly.

drifting pike
cursive bone
#

I think app already has full permissions, how do i check this?

drifting pike
#

If you can enable the sensor it's granted

cursive bone
#

sorry, if i can enable which sensor?

drifting pike