forked from Chaospott/Heizberry
Standard Loglevel zu WARN gesetzt
This commit is contained in:
parent
8eba2c198c
commit
a410dc90ef
@ -107,7 +107,7 @@ def getArgs():
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
signal.signal(signal.SIGINT, terminate)
|
signal.signal(signal.SIGINT, terminate)
|
||||||
args = getArgs()
|
args = getArgs()
|
||||||
logging.basicConfig(filename='/var/log/heizberry/heizberry_control.log', level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
|
logging.basicConfig(filename='/var/log/heizberry/heizberry_control.log', level=logging.WARN, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
|
||||||
log = logging.getLogger('heizberry')
|
log = logging.getLogger('heizberry')
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
log.setLevel(logging.DEBUG)
|
log.setLevel(logging.DEBUG)
|
||||||
|
@ -47,11 +47,13 @@ def on_message(client, userdata, message):
|
|||||||
if message.topic.split("/", -1)[2] == "heizung":
|
if message.topic.split("/", -1)[2] == "heizung":
|
||||||
if message.topic.split("/", -1)[3] == "temperatur":
|
if message.topic.split("/", -1)[3] == "temperatur":
|
||||||
for i in zimmer:
|
for i in zimmer:
|
||||||
|
tmpThermostat = Thermostat(i.thermostat)
|
||||||
|
|
||||||
if message.topic.split("/", -1)[1] == i.name:
|
if message.topic.split("/", -1)[1] == i.name:
|
||||||
tmpThermostat = Thermostat(i.thermostat)
|
|
||||||
tmpThermostat.mode= 3
|
tmpThermostat.mode= 3
|
||||||
tmpThermostat.target_temperature = round(float(msg),1)
|
tmpThermostat.target_temperature = round(float(msg),1)
|
||||||
|
|
||||||
|
time.sleep(10)
|
||||||
|
|
||||||
sendReadings()
|
sendReadings()
|
||||||
|
|
||||||
@ -63,7 +65,6 @@ def sendReadings():
|
|||||||
for i in zimmer:
|
for i in zimmer:
|
||||||
tmpThermostat = Thermostat(i.thermostat)
|
tmpThermostat = Thermostat(i.thermostat)
|
||||||
|
|
||||||
|
|
||||||
tmpThermostat.update()
|
tmpThermostat.update()
|
||||||
|
|
||||||
if tmpThermostat.target_temperature > 17.0:
|
if tmpThermostat.target_temperature > 17.0:
|
||||||
@ -71,6 +72,8 @@ def sendReadings():
|
|||||||
else:
|
else:
|
||||||
client.publish("zimmer/" + i.name + "/heizung/status", 0, qos=1, retain=True)
|
client.publish("zimmer/" + i.name + "/heizung/status", 0, qos=1, retain=True)
|
||||||
|
|
||||||
|
time.sleep(10)
|
||||||
|
|
||||||
log.debug('sent readings')
|
log.debug('sent readings')
|
||||||
|
|
||||||
|
|
||||||
@ -96,7 +99,7 @@ def getArgs():
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
signal.signal(signal.SIGINT, terminate)
|
signal.signal(signal.SIGINT, terminate)
|
||||||
args = getArgs()
|
args = getArgs()
|
||||||
logging.basicConfig(filename='/var/log/heizberry/heizberry_io.log', level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
|
logging.basicConfig(filename='/var/log/heizberry/heizberry_io.log', level=logging.WARN, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
|
||||||
log = logging.getLogger('heizberry')
|
log = logging.getLogger('heizberry')
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
log.setLevel(logging.DEBUG)
|
log.setLevel(logging.DEBUG)
|
||||||
|
Loading…
Reference in New Issue
Block a user