annotate service/bedroomArduino/index.xhtml @ 117:1fada3a61c5f

bedroomarduino updates Ignore-this: eeb3e527e652601b04ddd1d18f0f15f3
author drewp@bigasterisk.com
date Sun, 22 Sep 2013 00:30:20 -0700
parents 5fef0b7db346
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
1 <?xml version="1.0" encoding="utf-8"?>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
4 <html xmlns="http://www.w3.org/1999/xhtml">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
5 <head>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
6 <title>bedroom controls</title>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
7 <style type="text/css" media="all">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
8 /* <![CDATA[ */
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
9 .section {
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
10 margin: 10px;
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
11 padding: 10px;
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
12 border: 1px solid black;
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
13 }
117
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
14 .swatch {
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
15 background: hsl(0, 0%, 13%);
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
16 display: inline-block;
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
17 padding: 4px;
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
18 margin: 3px;
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
19 border-radius: 9px;
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
20 font-size: 24px;
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
21 }
29
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
22 /* ]]> */
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
23 </style>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
24
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
25 </head>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
26 <body>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
27
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
28 <div class="section">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
29 <button>Alarm check</button>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
30 </div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
31
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
32 <div class="section">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
33 Speaker selector: <span>pillow</span>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
34 <div><button>Speakers</button></div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
35 <div><button>Pillow</button></div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
36 </div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
37
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
38 <div class="section">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
39 Vol request: <button>+1</button> <button>-1</button>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
40 </div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
41
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
42 <div class="section">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
43 Output volume: <span data-text="volume">35%</span>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
44 </div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
45
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
46 <div class="section">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
47 Sound effects:
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
48
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
49 <div>lights up <button>play</button></div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
50 <div>lights down <button>play</button></div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
51 <div>pillow spkr <button>play</button></div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
52 <div>room spkr <button>play</button></div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
53 </div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
54
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
55 <div class="section">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
56 Podcast:
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
57 </div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
58
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
59 <div class="section">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
60 Music:
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
61 </div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
62
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
63 <div class="section">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
64 Lights:
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
65
117
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
66 <div>Tower LED:
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
67 <span data-bind="text: brite0"/>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
68 <span class="swatch" data-bind="attr: {style: bg(brite0())}">&#9641;</span>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
69 </div>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
70 <div>Headboard 1:
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
71 <span data-bind="text: brite1"/>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
72 <span class="swatch" data-bind="attr: {style: bg(brite1())}">&#9641;</span>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
73 </div>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
74 <div>Headboard 2:
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
75 <span data-bind="text: brite2"/>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
76 <span class="swatch" data-bind="attr: {style: bg(brite2())}">&#9641;</span>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
77 </div>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
78 <div>Headboard 3:
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
79 <span data-bind="text: brite3"/>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
80 <span class="swatch" data-bind="attr: {style: bg(brite3())}">&#9641;</span>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
81 </div>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
82 <div>Headboard 4:
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
83 <span data-bind="text: brite4"/>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
84 <span class="swatch" data-bind="attr: {style: bg(brite4())}">&#9641;</span>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
85 </div>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
86 <div>Corner:</div>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
87 <div>Red ball:</div>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
88 <div>Ceiling:</div>
29
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
89 </div>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
90
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
91
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
92
117
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
93 <script src="//bigasterisk.com/lib/knockout-2.3.0.js" type="text/javascript"/>
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
94 <script src="//bigasterisk.com/lib/jquery-2.0.3.min.js" type="text/javascript"/>
29
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
95 <script type="text/javascript">
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
96 // <![CDATA[
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
97 $(function () {
117
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
98 var model = {
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
99 volume: "36%",
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
100 brite0: ko.observable("loading"),
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
101 brite1: ko.observable("loading"),
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
102 brite2: ko.observable("loading"),
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
103 brite3: ko.observable("loading"),
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
104 brite4: ko.observable("loading"),
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
105 };
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
106 model.bg = function (c) { return "color: "+c; };
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
107 ko.applyBindings(model);
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
108 function loadBrites() {
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
109 $.get("brite/0", function (data) { model.brite0(data); });
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
110 $.get("brite/1", function (data) { model.brite1(data); });
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
111 $.get("brite/2", function (data) { model.brite2(data); });
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
112 $.get("brite/3", function (data) { model.brite3(data); });
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
113 $.get("brite/4", function (data) { model.brite4(data); });
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
114 }
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
115 loadBrites();
29
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
116 });
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
117 // ]]>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
118 </script>
5fef0b7db346 bedroomarduino project started. web server isn't ready
drewp@bigasterisk.com
parents:
diff changeset
119 </body>
117
1fada3a61c5f bedroomarduino updates
drewp@bigasterisk.com
parents: 29
diff changeset
120 </html>