update
This commit is contained in:
parent
2d139a039f
commit
ef268df604
|
@ -195,6 +195,7 @@ def local():
|
||||||
|
|
||||||
def test():
|
def test():
|
||||||
while True:
|
while True:
|
||||||
|
try:
|
||||||
data = {'ambient_temperature': 1,
|
data = {'ambient_temperature': 1,
|
||||||
'ambient_humidity': 1,
|
'ambient_humidity': 1,
|
||||||
'carbon_dioxide': 1,
|
'carbon_dioxide': 1,
|
||||||
|
@ -215,7 +216,9 @@ def test():
|
||||||
}
|
}
|
||||||
t2 = LOT_DATA(**data)
|
t2 = LOT_DATA(**data)
|
||||||
add(t2)
|
add(t2)
|
||||||
time.sleep(1)
|
time.sleep(10)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
@ -198,6 +198,7 @@ def t():
|
||||||
|
|
||||||
def test():
|
def test():
|
||||||
while True:
|
while True:
|
||||||
|
try:
|
||||||
data = {'ambient_temperature': 1,
|
data = {'ambient_temperature': 1,
|
||||||
'ambient_humidity': 1,
|
'ambient_humidity': 1,
|
||||||
'carbon_dioxide': 1,
|
'carbon_dioxide': 1,
|
||||||
|
@ -219,7 +220,9 @@ def test():
|
||||||
t2 = LOT_DATA(**data)
|
t2 = LOT_DATA(**data)
|
||||||
client.publish('demo', payload=json.dumps(data, ensure_ascii=False), qos=0)
|
client.publish('demo', payload=json.dumps(data, ensure_ascii=False), qos=0)
|
||||||
add(t2)
|
add(t2)
|
||||||
time.sleep(1)
|
time.sleep(10)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def on_connect(client, userdata, flags, rc):
|
def on_connect(client, userdata, flags, rc):
|
||||||
|
|
Loading…
Reference in New Issue