浏览代码

check_shelly - wifi correction

master
Dirk Alders 1年前
父节点
当前提交
6aedd63627
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4
    4
      check_shelly

+ 4
- 4
check_shelly 查看文件

@@ -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

正在加载...
取消
保存