Leaving an SSID does not start the WireGuard tunnel
Hello folks,
I bought Tasker mainly for one thing: to stop/start a WireGuard tunnel when in/out of a specific WiFi SSID, respectively. Quite a straightforward mission.
So I have two profiles: One for being inside the SSID (Wifi Connected, with the SSID name), linked to a TunnelDown task
WireGuardSetTunnel(false,xxx)
and one for being outside that SSID (Wifi Connected, same SSID name, "invert"), linked to a TunnelUp task:
WireGuardSetTunnel(true,xxx)
When going into the SSID, the task takes place correctly and the tunnel is brought down. However when leaving the SSID, the opposite task is not performed, and the tunnel remains down.
When I'm NOT connected to the SSID, and I open the tasker app to see what's happening, the second profile is correctly lit in green (so it seems like Tasker is aware I'm out). When I "play" the corresponding task, it indeed starts the tunnel. However, that never happens automatically.
Note, only one direction is broken; when I start the tunnel manually and later go back into the SSID, the tunnel is indeed brought down, as it should.
Would appreciate your assistance here. Android 13.
EDIT: Resolved, by using one profile with entry/exit task rather than two separate profiles. Still not sure why the two profiles setup doesn't work, but my need seems to be resolved (still testing corner cases).