From aa72712b30e43bd36968b7a52749f80963f66342 Mon Sep 17 00:00:00 2001 From: Clemens Fries Date: Sat, 22 Sep 2018 16:19:30 +0200 Subject: Add a simple web site that displays the sensor data This also adds an overly broad CORS policy, complying with best industry practices for IoT. --- application.lua | 1 + monitor-screenshot.png | Bin 0 -> 56701 bytes monitor.html | 104 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 monitor-screenshot.png create mode 100644 monitor.html diff --git a/application.lua b/application.lua index ad90814..2474822 100644 --- a/application.lua +++ b/application.lua @@ -15,6 +15,7 @@ srv:listen(80,function(conn) -- local Tsgn = (T < 0 and -1 or 1); T = Tsgn*T conn:send(string.format([[HTTP/1.1 200 OK Content-Type: application/json +Access-Control-Allow-Origin: * Connection: close {"temperature": %s, "pressure": %s, "humidity": %s, diff --git a/monitor-screenshot.png b/monitor-screenshot.png new file mode 100644 index 0000000..38a6e80 Binary files /dev/null and b/monitor-screenshot.png differ diff --git a/monitor.html b/monitor.html new file mode 100644 index 0000000..c800543 --- /dev/null +++ b/monitor.html @@ -0,0 +1,104 @@ + + + Aktuelles Balkonwetter + + + + + +
+
Temperatur
+
Luftfeuchte
+
Luftdruck
+ +
+
°C +
+
+
% +
+
+
hPa +
+ +
Licht
+
Infrarot
+
Breitband
+ +
+
lux +
+
+
lux +
+
+
lux +
+
+ + + + -- cgit