Bladeren bron

check_shelly - wifi correction

master
Dirk Alders 1 jaar geleden
bovenliggende
commit
6aedd63627
1 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 4
    4
      check_shelly

+ 4
- 4
check_shelly Bestand weergeven

@@ -8,8 +8,8 @@ import urllib.request
8 8
 
9 9
 CHECKS = ['wifi', 'mqtt', 'memory', 'filesystem', 'temperature']
10 10
 #
11
-WIFI_QUALITY_ERROR = -30
12
-WIFI_QUALITY_WARNING = -50
11
+WIFI_QUALITY_ERROR = -90
12
+WIFI_QUALITY_WARNING = -85
13 13
 #
14 14
 RAM_ERROR = .15
15 15
 RAM_WARNING = .30
@@ -41,9 +41,9 @@ if __name__ == "__main__":
41 41
     if args.check == 'wifi':
42 42
         connected = data['wifi_sta']['connected']
43 43
         quality = data['wifi_sta']['rssi']
44
-        if not connected or quality > WIFI_QUALITY_ERROR:
44
+        if not connected or quality <= WIFI_QUALITY_ERROR:
45 45
             status = n.ERROR
46
-        elif quality > WIFI_QUALITY_WARNING:
46
+        elif quality <= WIFI_QUALITY_WARNING:
47 47
             status = n.WARNING
48 48
         else:
49 49
             status = n.OK

Laden…
Annuleren
Opslaan