I just set up just such a profile and it works like a charm. I
actually use two profiles, one detects when wifi is on, but not
connected and sets a variable %WIFIONDISCONNECTED to 1. The other
reacts to this variable and initiates a debounce sequence to make sure
that I'm not killing wifi during momentary losses of communication
like taking out the trash. I like to use a shorter timer in
conjuction with a counter because it kills the task sooner if the
conditions are no longer met.
You can ignore most of the alerts (they are there for debugging, hence
the "NEVERONE~1") but if you remove them, be sure to update the "GoTo"
numbers accordingly.
Profile: Wifi On/Disconnected (113)
State: Not Wifi Connected
State: Variable Value
Enter: Anon (114)
A1: Variable Set [ Name:%WIFIONDISCONNECTED To:1 Do Maths:Off
Append:Off ]
Exit: Anon (100)
A1: Variable Clear [ Name:%WIFIONDISCONNECTED ]
Profile: Wifi Off Debounce (115)
Event: Variable Set
State: Variable Value
Enter: Wifi Auto Off (112)
A1: Popup [ Title: Text:%WIFI
%WIFII Time:5 Centre Text:Off Text Size:18 Background Image: ] If
[ %NEVERONE ~ 1 ]
A2: Variable Set [ Name:%WIFIDEBOUNCE To:1 Do Maths:Off Append:Off ]
A3: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
A4: Variable Add [ Name:%COUNTER1 Value:1 Wrap Around:0 ]
A5: Flash [ Text:Count: %COUNTER1 Long:Off ] If [ %NEVERONE ~ 1 ]
A6: Goto Action [ Number:10 ] If [ %WIFIONDISCONNECTED != 1 ]
A7: Goto Action [ Number:9 ] If [ %COUNTER1 > 12 ]
A8: Goto Action [ Number:3 ]
A9: WiFi [ Set:Off ] If [ %WIFIONDISCONNECTED ~ 1 ]
A10: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
A11: Variable Clear [ Name:%WIFIDEBOUNCE ]
A12: Variable Clear [ Name:%WIFIONDISCONNECTED ] If [ %WIFI ~ off ]
A13: Variable Clear [ Name:%COUNTER1 ]
> > > - 顯示被引用文字 -- Hide quoted text -
>
> - Show quoted text -