akshayballal commited on
Commit
62fe9df
1 Parent(s): 0b03fce

chore: Update file paths and dependencies

Browse files
Files changed (5) hide show
  1. .gitignore +1 -1
  2. bootstrap_data.csv +3 -0
  3. dashboard.py +1 -1
  4. mqtt_client.py +1 -1
  5. mqttpublisher.py +4 -3
.gitignore CHANGED
@@ -4,4 +4,4 @@ venv
4
  __pycache__/
5
  *.tf
6
  data
7
- *.csv
 
4
  __pycache__/
5
  *.tf
6
  data
7
+
bootstrap_data.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa790fe53f832021ebd35ef9a61afc2b9d1f38fb14ddb9185de92732749471df
3
+ size 37969341
dashboard.py CHANGED
@@ -74,7 +74,7 @@ for i in range(1, 5):
74
  )
75
 
76
 
77
- all_data = pd.read_csv("data/bootstrap_data.csv")
78
  df_faults = pd.DataFrame(columns=["_______Time_______", "__________Issue__________"])
79
  current_stat = [False, False, False, False]
80
  energy_pipeline_north = EnergyPredictionPipeline(
 
74
  )
75
 
76
 
77
+ all_data = pd.read_csv("bootstrap_data.csv")
78
  df_faults = pd.DataFrame(columns=["_______Time_______", "__________Issue__________"])
79
  current_stat = [False, False, False, False]
80
  energy_pipeline_north = EnergyPredictionPipeline(
mqtt_client.py CHANGED
@@ -2,7 +2,7 @@
2
  import paho.mqtt.client as mqtt
3
  import json
4
 
5
- broker = "localhost"
6
  port = 1883
7
  topic = "sensor_data"
8
 
 
2
  import paho.mqtt.client as mqtt
3
  import json
4
 
5
+ broker = "test.mosquitto.org"
6
  port = 1883
7
  topic = "sensor_data"
8
 
mqttpublisher.py CHANGED
@@ -5,7 +5,7 @@ import pandas as pd
5
  import json
6
 
7
  clientId = "smartbuilding"
8
- broker_address = "localhost"
9
  broker_port = 1883
10
 
11
  df = pd.read_csv("data/demo_data2.csv")
@@ -15,7 +15,8 @@ client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1, clientId)
15
  client.connect(broker_address, broker_port)
16
  topic = "sensor_data"
17
 
18
- def publish_sensor_data():
 
19
  for i in range(len(df)):
20
 
21
  data = {}
@@ -30,4 +31,4 @@ def publish_sensor_data():
30
  while True:
31
  publish_sensor_data()
32
  # time.sleep(0.1)
33
- client.disconnect()
 
5
  import json
6
 
7
  clientId = "smartbuilding"
8
+ broker_address = "test.mosquito.org"
9
  broker_port = 1883
10
 
11
  df = pd.read_csv("data/demo_data2.csv")
 
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)):
21
 
22
  data = {}
 
31
  while True:
32
  publish_sensor_data()
33
  # time.sleep(0.1)
34
+ client.disconnect()