forked from EverythingSmartHome/everything-presence-one
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
238 lines (231 loc) · 6.59 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Everything Presence One</title>
<meta
name="description"
content="Web installer for the Everything Presence One board."
/>
<meta name="viewport" content="width=device-width" />
<meta name="color-scheme" content="dark light" />
<meta property="og:title" content="Everything Presence One" />
<meta property="og:site_name" content="Everything Presence One" />
<meta
property="og:url"
content="https://everythingsmarthome.github.io/everything-presence-one/"
/>
<meta property="og:type" content="website" />
<meta
property="og:description"
content="Web installer for the Everything Presence One board."
/>
<style>
body {
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI",
Roboto, Ubuntu, sans-serif;
padding: 0;
margin: 0;
line-height: 1.4;
}
.content {
max-width: 70%;
margin: 0 auto;
padding: 12px;
}
.header {
display: block;
width: 100%;
aspect-ratio: 100 / 100;
border-radius: 12px;
}
h3 {
margin-top: 1.5em;
}
a {
color: #03a9f4;
}
.hidden {
display: none;
}
li {
padding: 4px 0;
}
.footer {
margin-top: 24px;
border-top: 1px solid #ccc;
padding-top: 24px;
text-align: center;
}
.footer .initiative {
font-style: italic;
margin-top: 16px;
}
.radios {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
}
.radios label {
padding: 4px;
cursor: pointer;
width: calc(33.3% - 16px);
display: block;
position: relative;
}
.radios input {
position: absolute;
top: 12px;
left: 12px;
}
.radios img {
display: block;
width: calc(100% - 8px);
border: 4px solid rgba(0, 0, 0, 0);
aspect-ratio: 1;
}
input:checked + img {
border-color: #58a6ff;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #333;
color: #fff;
}
a {
color: #58a6ff;
}
}
@media only screen and (max-width: 450px) {
.radios label {
width: calc(50% - 16px);
max-width: initial;
}
}
.diy::after {
content: "DIY";
background-color: #f44336;
color: #fff;
padding: 2px 4px;
border-radius: 4px;
font-size: 0.8em;
position: absolute;
bottom: 12px;
left: 12px;
}
body .diy {
display: none;
}
body.show-diy .diy {
display: initial;
}
</style>
<script
type="module"
src="https://unpkg.com/esp-web-tools@9.0.3/dist/web/install-button.js?module"
></script>
</head>
<body>
<div class="content">
<img
class="header"
src="./header.png"
alt="Web installer for the Everything Presence One board."
width="100" height="150"
/>
<h1>Everything Presence One ESPHome Installer</h1>
<p></p>
<p>
This site installs the latest
<a href="https://esphome.io">ESPHome</a> firmware on the Everything
Presence One board for direct integration with
<a href="https://home-assistant.io">Home Assistant</a>.
</p>
<p>
Hit the connect button to install the latest ESPHome firmware on you're
Everything Presence One board. No programming or other software
required.
</p>
<div class="radios">
<label>
<input
type="radio"
name="type"
value="everything-presence-one"
checked
/>
<img
src="./everything-presence-one.png"
alt="Everything Presence One"
/>
</label>
</div>
<p class="button-row" align="center">
<esp-web-install-button></esp-web-install-button>
</p>
<h2>User Guide</h2>
<h3>Unboxing and Preperation</h3>
<p>You will need 4 items to build your EP1 with this guide:</p>
<ul>
<li>Everything Presence One Board</li>
<li>Panasonic PIR</li>
<li>DFRobot mmWave Sensor</li>
<li>3D Printed Case</li>
</ul>
<h3>Assembly</h3>
<p>
First you will want to grab all 5 pieces of the 3D printed case - front,
back, stand, ball socket and locking ring:
</p>
<img class="header" src="./header.png" alt="Placeholder image" />
<p>
Start by taking the back, and inserting the ball socket into it from the
front and use the locking ring to tighten it down:
</p>
<img
class="header"
src="./header.png"
alt="Web installer for the Everything Presence One board."
/>
<p>
Note that it will be pretty tight, but will still rotate if enough
pressure is applied - this is intentional to allow for setting the
position easier. Note also that the locking ring has a slight grove on
one side, make sure this faces the back of the case:
</p>
<img
class="header"
src="./header.png"
alt="Web installer for the Everything Presence One board."
/>
<p>Next, grab the EP1 base board and place it into the back of the case. Press down in all 4 corners and it will click into place securely.</p>
<div class="footer">
<br /><br />
<a href="https://esphome.io">ESPHome</a>
— Installer powered by
<a href="https://esphome.github.io/esp-web-tools/">ESP Web Tools</a>.
</div>
</div>
<script>
document.querySelectorAll('input[name="type"]').forEach((radio) =>
radio.addEventListener("change", () => {
const button = document.querySelector("esp-web-install-button");
button.manifest = `./${radio.value}-manifest.json`;
document.querySelectorAll(".info").forEach((info) => {
info.classList.add("hidden");
});
document
.querySelector(`.info.${radio.value}`)
.classList.remove("hidden");
})
);
document
.querySelector('input[name="type"]:checked')
.dispatchEvent(new Event("change"));
if (new URLSearchParams(document.location.search).has("diy")) {
document.body.classList.add("show-diy");
}
</script>
</body>
</html>