Spaces:
Sleeping
Sleeping
akshayballal
commited on
Commit
•
b911d24
1
Parent(s):
62fe9df
chore: Update mqttpublisher.py to read data from demo_data2.csv
Browse files- mqttpublisher.py +2 -2
mqttpublisher.py
CHANGED
@@ -8,13 +8,13 @@ clientId = "smartbuilding"
|
|
8 |
broker_address = "test.mosquito.org"
|
9 |
broker_port = 1883
|
10 |
|
11 |
-
df = pd.read_csv("data/demo_data2.csv")
|
12 |
-
|
13 |
|
14 |
client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1, clientId)
|
15 |
client.connect(broker_address, broker_port)
|
16 |
topic = "sensor_data"
|
17 |
|
|
|
|
|
18 |
|
19 |
def publish_sensor_data():
|
20 |
for i in range(len(df)):
|
|
|
8 |
broker_address = "test.mosquito.org"
|
9 |
broker_port = 1883
|
10 |
|
|
|
|
|
11 |
|
12 |
client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1, clientId)
|
13 |
client.connect(broker_address, broker_port)
|
14 |
topic = "sensor_data"
|
15 |
|
16 |
+
df = pd.read_csv("data/demo_data2.csv")
|
17 |
+
|
18 |
|
19 |
def publish_sensor_data():
|
20 |
for i in range(len(df)):
|