change s0 detection
parent
cfb31f5738
commit
9204ad80f5
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue