# HG changeset patch # User drewp # Date 1377580289 25200 # Node ID 531fce163cbd2f572a1f9822e420265e3f236ce9 # Parent 2d718e542198d699f1b5066d1d47b71e37cb2ca7 more laundry webpage Ignore-this: 37af9a1a317728d0e460e5c2a482b4b6 darcs-hash:20130827051129-312f9-80ed32d3f53bffe9e9637fafb48e4c6a5ed5f845 diff -r 2d718e542198 -r 531fce163cbd service/laundry/index.html --- a/service/laundry/index.html Sat Aug 24 22:54:34 2013 -0700 +++ b/service/laundry/index.html Mon Aug 26 22:11:29 2013 -0700 @@ -8,12 +8,23 @@

laundry room pi

+
+ current /status + (as an rdf graph) +
motion: {{status.motion}}
switch1: {{status.switch1}}
switch2: {{status.switch2}}
switch3: {{status.switch3}}
doorClosed: {{status.doorClosed}}
-
orange led: {{status.led}}
+
+
+ orange led: {{status.led}} + + +
+
strike:
+
speaker:
Status: {{status | json}}
diff -r 2d718e542198 -r 531fce163cbd service/laundry/static/gui.js --- a/service/laundry/static/gui.js Sat Aug 24 22:54:34 2013 -0700 +++ b/service/laundry/static/gui.js Mon Aug 26 22:11:29 2013 -0700 @@ -1,7 +1,16 @@ 'use strict'; function Ctrl($scope, $http) { - $http.get("status").success(function (data) { - $scope.status = data; - }); + function refresh() { + $http.get("status").success(function (data) { + $scope.status = data; + }); + } + refresh(); + $scope.setLed = function (value) { + $http.put("led", value).succeed(function () { + refresh(); + }); + } + }