leave mower alone outside working hours
This commit is contained in:
@@ -5,6 +5,7 @@ import time
|
|||||||
from threading import Thread
|
from threading import Thread
|
||||||
import cherrypy # https://docs.cherrypy.org/en/latest/tutorials.html#tutorial-1-a-basic-web-application
|
import cherrypy # https://docs.cherrypy.org/en/latest/tutorials.html#tutorial-1-a-basic-web-application
|
||||||
import requests, json
|
import requests, json
|
||||||
|
import datetime
|
||||||
|
|
||||||
cherrypy.config.update({
|
cherrypy.config.update({
|
||||||
'server.socket_host' : '192.168.178.49',
|
'server.socket_host' : '192.168.178.49',
|
||||||
@@ -69,6 +70,9 @@ def mower_safety():
|
|||||||
pushover("couldn't reach mower (freeze)")
|
pushover("couldn't reach mower (freeze)")
|
||||||
else:
|
else:
|
||||||
pushover("mower in the back yard, keep going")
|
pushover("mower in the back yard, keep going")
|
||||||
|
else:
|
||||||
|
if (status["status"]["status"] == 17 and (datetime.datetime.now().hour < 6 or datetime.datetime.now().hour > 13)):
|
||||||
|
pushover("mower's asleep, leave it alone")
|
||||||
else:
|
else:
|
||||||
pushover("lock mower in garage")
|
pushover("lock mower in garage")
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user