Compare commits

..

No commits in common. "4e25b921c45a9019a62fa28b934c0e6e857b8b81" and "debc535c9f70e26b1cf9c71e60c93bddb3e7c38f" have entirely different histories.

4 changed files with 5 additions and 7 deletions

View File

@ -35,7 +35,7 @@
{ {
"id": "3", "id": "3",
"autostate": false, "autostate": false,
"pin": "27", "pin": "37",
"times": [ "times": [
{ {
"on_time": "7:40", "on_time": "7:40",

View File

@ -47,11 +47,9 @@ class Control(threading.Thread):
for entry in self.__config['water']: for entry in self.__config['water']:
pin = int(entry['pin']) pin = int(entry['pin'])
GPIO.setup(pin, GPIO.OUT) GPIO.setup(pin, GPIO.OUT)
GPIO.output(pin, 1)
def run(self): def run(self):
self.load_config() self.load_config()
self.__heat.off()
self.__heat.start() self.__heat.start()
while self.__run_condition: while self.__run_condition:
if self.__trigger_read_config: if self.__trigger_read_config:

View File

@ -10,8 +10,8 @@ LOG_FILE = "/var/log/sauna.log"
LOG_FORMAT = "%(asctime)s %(levelname)s %(message)s" LOG_FORMAT = "%(asctime)s %(levelname)s %(message)s"
def main(): def main():
logging.basicConfig(format=LOG_FORMAT, level=LOG_LEVEL, filename=LOG_FILE) # logging.basicConfig(format=LOG_FORMAT, level=LOG_LEVEL, filename=LOG_FILE)
# logging.basicConfig(format=LOG_FORMAT, level=LOG_LEVEL) logging.basicConfig(format=LOG_FORMAT, level=LOG_LEVEL)
log = logging.getLogger() log = logging.getLogger()
config_file = os.path.join(os.path.expanduser('~'), ".config/gardencontrol/config.json") config_file = os.path.join(os.path.expanduser('~'), ".config/gardencontrol/config.json")

View File

@ -1,7 +1,7 @@
import logging import logging
from xmlrpc.server import SimpleXMLRPCServer import xmlrpc
import config import config
import control import control
@ -11,7 +11,7 @@ class Remotecontrol():
self.__config = config.Config(configfile) self.__config = config.Config(configfile)
host = (self.__config.hostinfo()) host = (self.__config.hostinfo())
self.__server = SimpleXMLRPCServer(host, allow_none=True) self.__server = xmlrpc.server.SimpleXMLRPCServer(host, allow_none=True)
self.__control = control.Control(configfile) self.__control = control.Control(configfile)
self.__server.register_function(self.set_water_autostate, 'set_water_autostate') self.__server.register_function(self.set_water_autostate, 'set_water_autostate')