-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.html
67 lines (62 loc) · 2.74 KB
/
setup.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>USB Weather - Setup</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="page__header">
<h1>HID Weather</h1>
</header>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a class="active" href="#">Setup</a></li>
<li><a href="weather.html">Weather Data</a></li>
<li><a href="about.html">About</a></li>
</ul>
</nav>
<main>
<article>
<header>
<h2>Setup</h2>
</header>
<h3>Materials</h3>
<ul>
<li>Computer with a browser that can run this web app</li>
<li>Weather station - WH 3080 or WS 3080 or compatible, it needs to have an indoor display unit with USB slot</li>
<li>USB cable to connect the display unit to the computer</li>
</ul>
<h3>Browser</h3>
<p>You need a browser that supports the WebHID API. <a target="_blank" rel="nofollow noopener noreferrer" href="https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API#browser_compatibility">You can check the compatibility table</a>.</p>
<h3>Configure operating system</h3>
<details id="linux-config">
<summary>Linux</summary>
<div class="details__full">
<p>In order to access the weather station, you need to make it available for your user as a USB and HID device. If you don't and try to connect to the device with the browser, the process of connecting will fail.</p>
<p>We can make the weather station available to the browser by creating a udev rule. Create the file <em>/etc/udev/rules.d/99-weatherstation.rules</em> and add the following content to it. You will need root user rights to do so (use <em>sudo</em>).</p>
<pre><code>SUBSYSTEM=="usb", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE="0666"
KERNEL=="hidraw*", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE="0664", GROUP="plugdev"</code></pre>
<p>This rule will ensure that devices with the product ID 8021 and vendor ID 1941 (the weather station) will be available as a USB device to all users and as a HID device to all members of the plugdev group. Make sure you are a member of the plugdev group or adjust the mode to your liking.</p>
</div>
</details>
<details id="other-config">
<summary>Other</summary>
<div class="details__full">
I don't know if something is necessary. If you do, please email me.
</div>
</details>
</article>
</main>
<script>
if (navigator.userAgent.includes('Linux')) {
document.getElementById('linux-config').open = true
} else {
document.getElementById('other-config').open = true
}
</script>
</body>
</html>