client.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:thermostat 作者: carter-lavering 项目源码 文件源码
def run(server_class=HTTPServer, handler_class=BaseHTTPRequestHandler):
    server_address = ('', 8000)
    httpd = server_class(server_address, handler_class)
    httpd.serve_forever()


# RELAY.on() activate relay

# Import JSON config file as a dictionary for future reference by ID and IP.

# Thread: Listen for signal from thermostat. When received, use the function
# below and pass it the ID and IP.

# Function: send ID, IP, and delay to the server.

# Thread: Listen for activate command from server. When received, open relay.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号