-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathaquaserver.py
executable file
·45 lines (39 loc) · 1.23 KB
/
aquaserver.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python
# coding=utf-8
import sys
import time
from aqualink.pool import *
from aqualink.web import *
from aqualink.serial import *
import config
########################################################################################################
# main routine
########################################################################################################
class M(object):
""" mock object """
def __init__(self, d):
self.d = d
def __getattribute__(self, k):
return object.__getattribute__(self, "d")[k]
if __name__ == "__main__":
thePool = M({"airTemp": 70,
"poolTemp": 60,
"spaTemp": 80,
"title": "Mock Pool",
"spa": M({
"state": "ON",
}),
"heater": M({
"state": "ON",
}),
"aux4": M({
"state": False,
}),
"aux5": M({
"state": False,
}),
})
#thePool = Pool("Pool", config)
#serialUI = SerialUI("SerialUI", config, thePool)
webUI = WebUI("WebUI", config, thePool)
webUI.block()