update
This commit is contained in:
parent
89229c989e
commit
5bbb0297dd
|
@ -183,7 +183,7 @@ def local():
|
||||||
'wind_speed': speedwind_data,
|
'wind_speed': speedwind_data,
|
||||||
'wind_direction': winddirection_data,
|
'wind_direction': winddirection_data,
|
||||||
'create_time': int(time.time()),
|
'create_time': int(time.time()),
|
||||||
'device_name': os.getenv('device_name')
|
'device_name': device_name
|
||||||
}
|
}
|
||||||
t = LOT_DATA(**data)
|
t = LOT_DATA(**data)
|
||||||
add(t)
|
add(t)
|
||||||
|
|
|
@ -186,7 +186,7 @@ def t():
|
||||||
'wind_speed': speedwind_data,
|
'wind_speed': speedwind_data,
|
||||||
'wind_direction': winddirection_data,
|
'wind_direction': winddirection_data,
|
||||||
'create_time': int(time.time()),
|
'create_time': int(time.time()),
|
||||||
'device_name': os.getenv('device_name')
|
'device_name': device_name
|
||||||
}
|
}
|
||||||
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)
|
||||||
|
@ -214,7 +214,7 @@ def test():
|
||||||
'wind_speed': 1,
|
'wind_speed': 1,
|
||||||
'wind_direction': 1,
|
'wind_direction': 1,
|
||||||
'create_time': int(time.time()),
|
'create_time': int(time.time()),
|
||||||
'device_name': os.getenv('device_name')
|
'device_name': device_name
|
||||||
}
|
}
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue