esphome-ratgdo/static/index.html

366 lines
12 KiB
HTML
Raw Permalink Normal View History

2023-06-08 17:57:45 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
2023-06-13 22:54:57 +00:00
<title>ESPHome ratgdo</title>
2023-06-08 17:57:45 +00:00
<meta
name="description"
2023-06-13 22:54:57 +00:00
content="Install ratgdo on your ESPHome devices."
2023-06-08 17:57:45 +00:00
/>
<meta name="viewport" content="width=device-width" />
<meta name="color-scheme" content="dark light" />
2023-06-13 22:54:57 +00:00
<meta property="og:title" content="ESPHome ratgdo" />
<meta property="og:site_name" content="ESPHome ratgdo" />
2023-06-08 17:57:45 +00:00
<meta
property="og:url"
2023-09-12 18:32:59 +00:00
content="https://ratgdo.github.io/esphome-ratgdo/"
2023-06-08 17:57:45 +00:00
/>
<meta property="og:type" content="website" />
<meta
property="og:description"
content="Install RATGTO on your ESPHome devices."
/>
<meta
property="og:image"
2023-09-12 18:32:59 +00:00
content="https://ratgdo.github.io/esphome-ratgdo/header.png"
2023-06-08 17:57:45 +00:00
/>
<meta name="twitter:card" content="summary_large_image" />
2023-06-13 22:54:57 +00:00
<meta name="twitter:site" content="@esphome_ratgdo" />
<meta name="twitter:title" content="ESPHome ratgdo" />
2023-06-08 17:57:45 +00:00
<meta
name="twitter:description"
2023-06-13 22:54:57 +00:00
content="Install ratgdo on your ESPHome devices."
2023-06-08 17:57:45 +00:00
/>
<meta
name="twitter:image"
2023-09-12 18:32:59 +00:00
content="https://ratgdo.github.io/esphome-ratgdo/header.png"
2023-06-08 17:57:45 +00:00
/>
<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: 600px;
margin: 0 auto;
padding: 12px;
}
.header {
display: block;
width: 100%;
aspect-ratio: 1200 / 675;
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,
img:has(+ input:checked){
border-color: #58a6ff;
2023-06-08 17:57:45 +00:00
}
@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;
}
div.radios{
display: flex;
align-items: start;
font-size: 75%;
}
div.radios label{
/* padding: 10px; */
width: 32%;
}
div.radios img{
width: 150px;
border-radius: 10px;
}
2024-01-23 22:04:27 +00:00
div.radios .note{
font-size: 80%;
color: #DDD;
font-style:italic;
}
#wiring_diagram{
width: 600px;
border-radius: 15px;
}
2023-06-08 17:57:45 +00:00
</style>
<script
type="module"
src="https://unpkg.com/esp-web-tools@9/dist/web/install-button.js?module"
></script>
</head>
<body>
<div class="content">
<img
class="header"
src="./header.png"
2023-06-13 22:54:57 +00:00
alt="ESPHome ratgdo"
2023-06-08 17:57:45 +00:00
/>
2023-06-13 22:52:37 +00:00
<h1>ESPHome ratgdo</h1>
2023-06-08 17:57:45 +00:00
<p>
2024-11-10 15:25:43 +00:00
In order to install the firmware, first pick your door opener control protocol, then pick your <a href="https://ratcloud.llc/">ratgdo control board</a> version.
2023-06-08 17:57:45 +00:00
No programming or other software required.
</p>
<h2>Choose your GDO Control Protocol:</h2>
<div class="protocol radios">
2023-11-19 21:33:03 +00:00
<label>
<img src="./yellow_learn_button.jpg" alt="Security + 2.0, round yellow learn button." />
<input type="radio" name="protocol" value="secplusv2" checked />
Security + 2.0<br/>
round yellow learn button<br/>
<span class="note">excluding models 8500/RJ020 &amp; 8500C/RJ020C</span>
2023-11-19 21:33:03 +00:00
</label>
2024-01-23 22:04:27 +00:00
2023-06-08 17:57:45 +00:00
<label>
<img src="./purple_learn_button.jpg" alt="Security + 1.0, purple, orange, or red learn button." />
<input type="radio" name="protocol" value="secplusv1" />
Security + 1.0<br/>
purple, brown, orange or red learn button<br/>
<span class="note">or jackshaft models 8500/RJ020 &amp; 8500C/RJ020C</span><br/>
<span class="note">Security + 1.0 support is experimental and may not work for all openers/wall panels.</span>
2023-06-08 17:57:45 +00:00
</label>
2024-01-23 22:04:27 +00:00
<label>
<img src="./dry_contact.jpg" alt="Dry contact control." />
<input type="radio" name="protocol" value="drycontact" />
Dry Contact control<br/>Requires open &amp; close limit switches
</label>
</div>
2024-01-23 22:04:27 +00:00
<h2>Choose your ratgdo control board:</h2>
<div class="hardware radios">
2024-11-10 15:25:43 +00:00
<label>
<img src="./ratgdo32_disco.jpg" alt="v32 disco" />
<input type="radio" name="hardware" value="v32disco" checked />
ratgdo32 disco
</label>
2024-11-15 15:56:17 +00:00
<label>
<img src="./ratgdo32.jpg" alt="v32 board" />
<input type="radio" name="hardware" value="v32board" checked />
ratgdo32
</label>
<label>
<img src="./ratgdo_v2.5xi.jpg" alt="v2.5i, v2.52i, v2.53i" />
<input type="radio" name="hardware" value="v25iboard" checked />
ratgdo v2.5x<br/>
v2.5, v2.5i, v2.52i, v2.53i (black PCB)
2024-01-23 22:04:27 +00:00
</label>
2024-12-04 16:32:25 +00:00
</div>
2024-12-04 16:32:25 +00:00
<a id="show_legacy_hardware" style="text-decoration: underline;" onclick="toggleLegacy()">Show Legacy Hardware &raquo;</a>
2024-12-04 16:32:25 +00:00
<div class="hardware radios" id="legacy_hardware" style="display: none">
<label>
<img src="./ratgdo_v2.0.jpg" alt="v2.0" />
<input type="radio" name="hardware" value="v2board_esp8266_d1_mini" />
ratgdo v2.0<br/>
ESP8266 / D1 Mini (white PCB)
</label>
2024-01-23 22:04:27 +00:00
2024-12-04 16:32:25 +00:00
<label>
<img src="./v25board_esp32_d1_mini.png" alt="v2.5 esp32" />
<input type="radio" name="hardware" value="v25board_esp32_d1_mini" />
ratgdo v2.5<br/>
ESP32 (black PCB)
</label>
2024-01-23 22:04:27 +00:00
2024-12-04 16:32:25 +00:00
<label>
<img src="./v2board_esp32_d1_mini.png" alt="v2.0 esp32" />
<input type="radio" name="hardware" value="v2board_esp32_d1_mini" />
ratgdo v2.0<br/>
ESP32 (white PCB)
</label>
</div>
2023-06-08 17:57:45 +00:00
<p>
2024-12-31 16:37:39 +00:00
<form method="get" action="v32board-esp32/v32board-esp32.ota.bin" id="download_ota_form" style="float: right">
<button type="submit" style="padding: 8px 28px; font-size: 14px; border-radius: 4px; color: #fff; background-color: #03a9f4; border: none; box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.12), 0 1px 5px 0 rgba(0,0,0,.2);">Download OTA Firmware</button>
</form>
<esp-web-install-button></esp-web-install-button>
</p>
2023-11-19 21:33:03 +00:00
2023-06-08 17:57:45 +00:00
<h2>Wiring Diagram</h2>
2024-11-12 18:26:46 +00:00
<img id="wiring_diagram" src="wiring_diagrams/v25iboard_secplus.png" alt="Security + 1 and 2 wiring diagram" />
<h3>Documentation</h3>
<ul>
<li><a href="webui_documentation.html">Web User Interface Documentation</a></li>
</ul>
<h3>Drivers</h3>
<p>If you can't connect to your ratgdo board make sure you have the right driver installed for the type of board you have.</p>
<ul>
2024-12-18 21:19:18 +00:00
<li>ratgdo32 and ratgdo32 disco use a CH9102 USB to Serial chipset. Modern versions of Windows &amp; macOS include the necessary drivers natively. Installing a standalone driver can create a conflict preventing you from connecting to ratgdo32.</li>
<li>ratgdo v2.5i uses a CH340 USB to Serial chipset. [<a href="https://www.wch-ic.com/downloads/CH341SER_EXE.html" target="_blank">driver download</a>]</li>
</ul>
2024-11-10 15:25:43 +00:00
<p>Watch the v2.5i driver and firmware installation [<a href="https://www.youtube.com/watch?v=9WecAUTC9iI">video on YouTube</a>].</p>
2023-06-08 17:57:45 +00:00
<h3>Advanced Users</h3>
<ul>
<li>
The device is adoptable in
<a
href="https://my.home-assistant.io/redirect/supervisor_addon/?addon=5c53de3b_esphome&repository_url=https%3A%2F%2Fgithub.com%2Fesphome%2Fhome-assistant-addon"
>the ESPHome dashboard</a
>
</li>
<li>
2024-01-23 22:04:27 +00:00
The YAML configuration for additional boards and chips is available on
2023-09-12 18:32:59 +00:00
<a href="https://github.com/RATGDO/esphome-ratgdo/tree/main/static">GitHub</a>
2023-06-08 17:57:45 +00:00
</li>
</ul>
<div class="footer">
<a href="https://esphome.io">ESPHome</a>
&mdash; Installer powered by
<a href="https://esphome.github.io/esp-web-tools/">ESP Web Tools</a>.
</div>
</div>
<script>
2024-11-15 15:56:17 +00:00
function toggleLegacy() {
var x = document.querySelector("#legacy_hardware");
var y = document.querySelector("#show_legacy_hardware");
if (x.style.display === "none") {
2024-12-04 16:38:27 +00:00
x.style.display = "flex";
2024-11-15 15:56:17 +00:00
y.innerHTML = "hide legacy hardware &raquo;";
} else {
x.style.display = "none";
y.innerHTML = "show legacy hardware &raquo;";
}
}
2024-12-31 16:37:39 +00:00
function setOTAFirmwarePath(url) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'json';
xhr.onload = function() {
var status = xhr.status;
if (status === 200) {
document.querySelector("#download_ota_form").action = xhr.response.builds[0].ota.path;
}
};
xhr.send();
};
2024-01-23 22:04:27 +00:00
document.querySelectorAll('div.radios input').forEach((radio) =>
2024-01-24 18:10:19 +00:00
radio.addEventListener("change", () => {
const button = document.querySelector("esp-web-install-button");
var protocol = document.querySelector('input[name="protocol"]:checked').value;
var hardware = document.querySelector('input[name="hardware"]:checked').value;
2024-07-03 00:59:37 +00:00
2024-11-12 18:26:46 +00:00
var diagram_protocol = protocol.replace("v1","").replace("v2","");
2024-11-13 09:57:31 +00:00
var img = document.querySelector("#wiring_diagram");
2024-11-13 09:43:00 +00:00
img.onerror = function() {
console.log(`img not found: ${this.src}`);
2024-11-13 09:57:31 +00:00
this.src = "wiring_diagrams/v25iboard_secplus.png";
2024-01-24 18:10:19 +00:00
}
2024-11-13 09:43:00 +00:00
img.src = `wiring_diagrams/${hardware}_${diagram_protocol}.png`;
2024-07-03 00:59:37 +00:00
2024-01-26 17:27:06 +00:00
if(protocol !== "secplusv2" && (hardware === "v2board_esp8266_d1_mini" || hardware === "v2board_esp32_d1_mini")){
2024-01-24 18:10:19 +00:00
alert("ratgdo version 2.0 only works with Security + 2.0");
document.querySelector('input[name="protocol"][value="secplusv2"]').checked = true;
return;
}
2024-07-03 00:59:37 +00:00
2024-01-24 18:10:19 +00:00
if(protocol === "secplusv2"){
protocol = "";
}else{
protocol = `_${protocol}`;
}
2024-07-03 00:59:37 +00:00
2024-01-24 18:10:19 +00:00
button.manifest = `${hardware}${protocol}-manifest.json`;
2024-12-31 16:37:39 +00:00
setOTAFirmwarePath(button.manifest);
2024-01-24 18:10:19 +00:00
})
);
2023-06-08 17:57:45 +00:00
document
2024-01-24 18:06:27 +00:00
.querySelector('input[name="protocol"]:checked')
2023-06-08 17:57:45 +00:00
.dispatchEvent(new Event("change"));
</script>
</body>
</html>