change s0 detection

master
ademant 2019-06-22 14:00:53 +02:00
parent cfb31f5738
commit 9204ad80f5
1 changed files with 2 additions and 2 deletions

View File

@ -27,14 +27,14 @@ while True:
if len(revcount) > 0:
rc=revcount[:]
for i in rc:
json_out={"time": timestamp,"device": devicename,"payload":{"S0":{"timestamp": timestamp,"sensor":"S0","i2c":0,"value":1}}}
json_out={"time": i,"device": devicename,"payload":{"S0":{"timestamp": i,"sensor":"S0","i2c":0,"value":1}}}
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except:
print("{}: could not connect to database".format(time.time()))
else:
try:
s.connect(("banana", 24048))
s.connect(("banana", 24049))
except:
print("{}: could not connect to database".format(time.time()))
else: