diff --git a/site/views/index.html b/site/views/index.html
index f583432..e6534b2 100755
--- a/site/views/index.html
+++ b/site/views/index.html
@@ -127,6 +127,12 @@ Get out of my source code
The plant watering index
diff --git a/site/views/js/main.js b/site/views/js/main.js
index 92dbef4..b54cae3 100755
--- a/site/views/js/main.js
+++ b/site/views/js/main.js
@@ -4,6 +4,8 @@ var humidities = []
var winds = []
var precipitations = []
var clouds = []
+var stemps = []
+var shmdts = []
var datetimes = []
var formatted_datetimes = []
var test_1 = [1, 2, 3, 4, 5, 6, 7]
@@ -25,6 +27,8 @@ async function get_all_data() {
winds.push(slice.wind)
precipitations.push(slice.rain_1h)
clouds.push(slice.cloud)
+ stemps.push(slice.local_soil_temperature)
+ shmdts.push(slice.local_soil_humidity)
})
console.log("Added all data...");
}
@@ -58,36 +62,27 @@ function draw_graph(ySeries, names, colors, div_name) {
async function plot_graphs() {
await get_all_data()
console.log("Starting data plot...");
- draw_graph(
- {data: temperatures, type: 'line'},
- {title: "Air Temperature",yaxis: "Temperature in ºC"},
- {trace: '#00FFFF'},
+ draw_graph({ data: temperatures, type: 'line' }, { title: "Air Temperature", yaxis: "Temperature in ºC" }, { trace: '#00FFFF' },
'temp_chart'
)
- draw_graph(
- {data: humidities, type: 'line'},
- {title: "Humidity",yaxis: "Air humidity in %"},
- {trace: '#00AAFF'},
+ draw_graph({ data: humidities, type: 'line' }, { title: "Humidity", yaxis: "Air humidity in %" }, { trace: '#00AAFF' },
'humidity_chart'
)
- draw_graph(
- {data: winds, type: 'line'},
- {title: "Wind speed",yaxis: "Wind speed in m/s"},
- {trace: '#AAFFAA'},
+ draw_graph({ data: winds, type: 'line' }, { title: "Wind speed", yaxis: "Wind speed in m/s" }, { trace: '#AAFFAA' },
'wind_chart'
)
- draw_graph(
- {data: precipitations, type: 'bar'},
- {title: "Precipitation",yaxis: "Rainfall in mm"},
- {trace: '#FF3333'},
+ draw_graph({ data: precipitations, type: 'bar' }, { title: "Precipitation", yaxis: "Rainfall in mm" }, { trace: '#FF3333' },
'rain_chart'
)
- draw_graph(
- {data: clouds, type: 'bar'},
- {title: "Cloud cover",yaxis: "Cloud coverage in %"},
- {trace: '#FFFFFF'},
+ draw_graph({ data: clouds, type: 'bar' }, { title: "Cloud cover", yaxis: "Cloud coverage in %" }, { trace: '#FFFFFF' },
'cloud_chart'
)
+ draw_graph({ data: stemps, type: 'line' }, { title: "Soil temperature", yaxis: "Temperature in ºC" }, { trace: '#FF9966' },
+ 'soil_temp__chart'
+ )
+ draw_graph({ data: shmdts, type: 'line' }, { title: "Soil humidity", yaxis: "Humidity (0->3000)" }, { trace: '#9933FF' },
+ 'soil_hmdt_chart'
+ )
}
@@ -121,4 +116,4 @@ plot_graphs();
// }
// })
// }
-// })
+// })
\ No newline at end of file