Describe the bug
When disconnecting from a wifi network the variable The currently connected wifi is: in BTT does not change.
Automations that rely on the disconnection work fine. Therefore BTT seems to recognize the disconnect fine, but automations that trigger when connecting to a certain wifi network do not trigger when the previous connected wifi network was the same.
The variable The currently connected wifi is: does get updated once i connect to different network than the previous one.
Therefore one automation triggers (killing DisplayLink Manager when leaving the office wifi). However the automation to start the same programm when reentering the wifi network does not trigger if i did not connect to a different network in between.
Screenshots
Here you can see that i am not connected to a Wifi but it still says "The currently connected wifi is: C(...)
I just reproduced a similar issue on version 4.272. Seems like the variable didn't get updated when my laptop connected from my iPhone hotspot to my home wi-fi. Here's the details:
I was connected to my iPhone Hotspot, away from home.
I closed my laptop's lid and packed it for travel.
Everything with my CAG worked well up to that point.
30mins later when I opened up my laptop at home, it connected to my wi-fi.
My CAG was off and BTT's variable Connected Wifi was set with my iPhone Hotspot's SSID.
When I manually reconnected to that wi-fi, everything got set back correctly. BetterTouchToolDebug.zip (1.9 MB)
Hi, first of all thanks for making BetterTouchTool, it is awesome!
I too seem to be running into similar issues where the state does not seem to update. Most of the time the connected wifi seems to stay at (null) but I have seen a few times where it does after restarting BetterTouchTool it does consistently grab the wifi name correctly, but after switching wifi or turning it on and off it goes back to (null). I am on alpha 4.299, switched to that after it did not work properly on stable and reading this thread.
Apparently on macOS Sonoma, apps need the location permission to access the wifi information. However apparently macOS doesn't prompt users for this permission and there is no way to add an app manually to the list.
If BTT is not showing on the list of location services in the macOS System Settings, try to run this apple script once:
tell application "BetterTouchTool" to get_location
Thank you! That seems to do the trick! Weird that it does work when initially starting the application. Almost like apple forgot to block that way of accessing the wifi name.