Toggle WireGuard based on home WiFi connection

by Ron (McTRASH692)

Version 3 (February 28, 2023)

Download (469 downloads)

NOTICE: I used this flow and uploaded with minor modifications however it was built by someone else.
At the time of upload I did not give credit in the description and I can not now remember which flow it was.
If you recognise your work please contact me and I will happily give credit here along with link to the original.

*VERIFIED* Enable WireGuard VPN tunnel when not connected to a specific WiFI SSID, and disable when reconnected to that WiFi. Adds a check for mobile network connection before connecting to tunnel.
Before using
1) in Automate>Settings, enable "Control Wireguard tunnels"
2) Change the WiFi name to your home WiFi inside the WiFi SSID block
3) Change the Wireguard tunnel name in the UP and Down blocks.

UPDATE: Added a "ping" block to verify mobile connection before tunnel goes up. Otherwise in some cases the tunnel goes up too early and you don't have internet.

UUPDATE: Fixed a connection that cause the flow to get stuck on the detection block.

5.0 average rating from 1 reviews

5 stars
4 stars
3 stars
2 stars
1 star

Rate and review within the app in the Community section.