Difference between revisions of "Magic text:Wifi/cell signal strength"
Endercraft (talk | contribs) Tags: Mobile web edit Mobile edit |
Endercraft (talk | contribs) Tags: Mobile web edit Mobile edit |
||
Line 12: | Line 12: | ||
</pre><br> | </pre><br> | ||
− | < | + | <p style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px; font: Courier New;"> |
− | Actions | + | Actions<br> |
− | IF (compare values([wifi_strength] < -80)) | + | IF (compare values([wifi_strength] < -80))<br> |
− | Connect to network (wifi1) | + | Connect to network (wifi1)<br> |
− | Constraint---> Wifi connected (wifi 2) | + | <span style="background-color: green;">Constraint---> Wifi connected (wifi 2)</span><br> |
− | Connect to network (wifi2) | + | Connect to network (wifi2)<br> |
− | Constraint---> Wifi connected (wifi 1) | + | <span style="background-color: green;">Constraint---> Wifi connected (wifi 1)</span><br> |
− | </ | + | </p><br> |
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;"> | <pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;"> | ||
Constraints | Constraints |
Revision as of 13:39, 1 November 2023
The Wifi/cell tower signal strength (written as [wifi_strength] and [cell_signal_strength]) can be used for example to determine the distance between you and the tower/router (this can vary depending on the thickness of walls and other various factors). The scale of these values can be confusing : they range from -127 to 0 which might not be obvious on how to use. The better the strength, the closer you will be to 0 the weaker the strength the closer you will be to -127: if you are standing next to the source, you'd typically be around -35. If you have a weak connection to a cell tower, you'd get around -110 to -115. -127 means you are not connected to the source you are trying to measure. 2147483647 means the magic text broke for some reason..
Example Usage
Triggers Regular interval (Interval: 00:00:30)
Actions
IF (compare values([wifi_strength] < -80))
Connect to network (wifi1)
Constraint---> Wifi connected (wifi 2)
Connect to network (wifi2)
Constraint---> Wifi connected (wifi 1)
Constraints Geofence (Inside area : home)
Local variables No variables