diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 791b803..f65ae25 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -428,13 +428,15 @@ namespace ratgdo { this->door_action(DoorAction::OPEN); - // query state in case we don't get a status message - set_timeout("door_query_state", (*this->opening_duration + 1) * 1000, [=]() { - if (*this->door_state != DoorState::OPEN && *this->door_state != DoorState::STOPPED) { - this->door_state = DoorState::OPEN; // probably missed a status mesage, assume it's open - this->query_status(); // query in case we're wrong and it's stopped - } - }); + if (*this->opening_duration > 0) { + // query state in case we don't get a status message + set_timeout("door_query_state", (*this->opening_duration + 2) * 1000, [=]() { + if (*this->door_state != DoorState::OPEN && *this->door_state != DoorState::STOPPED) { + this->received(DoorState::OPEN); // probably missed a status mesage, assume it's open + this->query_status(); // query in case we're wrong and it's stopped + } + }); + } } void RATGDOComponent::door_close() @@ -458,13 +460,15 @@ namespace ratgdo { this->door_action(DoorAction::CLOSE); - // query state in case we don't get a status message - set_timeout("door_query_state", (*this->closing_duration + 1) * 1000, [=]() { - if (*this->door_state != DoorState::CLOSED && *this->door_state != DoorState::STOPPED) { - this->door_state = DoorState::CLOSED; // probably missed a status mesage, assume it's closed - this->query_status(); // query in case we're wrong and it's stopped - } - }); + if (*this->closing_duration > 0) { + // query state in case we don't get a status message + set_timeout("door_query_state", (*this->closing_duration + 2) * 1000, [=]() { + if (*this->door_state != DoorState::CLOSED && *this->door_state != DoorState::STOPPED) { + this->received(DoorState::CLOSED); // probably missed a status mesage, assume it's closed + this->query_status(); // query in case we're wrong and it's stopped + } + }); + } } void RATGDOComponent::door_stop() diff --git a/static/dry_contact.jpg b/static/dry_contact.jpg new file mode 100644 index 0000000..c02d488 Binary files /dev/null and b/static/dry_contact.jpg differ diff --git a/static/index.html b/static/index.html index eff5dd0..d57158d 100644 --- a/static/index.html +++ b/static/index.html @@ -101,8 +101,9 @@ border: 4px solid rgba(0, 0, 0, 0); aspect-ratio: 1; } - input:checked + img { - border-color: #58a6ff; + input:checked ~ img, + img:has(+ input:checked){ + border-color: #58a6ff; } @media (prefers-color-scheme: dark) { body { @@ -136,6 +137,31 @@ 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; + } + + div.radios .note{ + font-size: 80%; + color: #DDD; + font-style:italic; + } + + #wiring_diagram{ + width: 600px; + border-radius: 15px; + } diff --git a/static/purple_learn_button.jpg b/static/purple_learn_button.jpg new file mode 100644 index 0000000..101a322 Binary files /dev/null and b/static/purple_learn_button.jpg differ diff --git a/static/ratgdo_v2.0.jpg b/static/ratgdo_v2.0.jpg new file mode 100644 index 0000000..7486fa0 Binary files /dev/null and b/static/ratgdo_v2.0.jpg differ diff --git a/static/ratgdo_v2.5xi.jpg b/static/ratgdo_v2.5xi.jpg new file mode 100644 index 0000000..7e9a6b6 Binary files /dev/null and b/static/ratgdo_v2.5xi.jpg differ diff --git a/static/webui_documentation.html b/static/webui_documentation.html new file mode 100644 index 0000000..bc321cb --- /dev/null +++ b/static/webui_documentation.html @@ -0,0 +1,670 @@ + + + + + + ESPHome ratgdo Web UI Documentation + + + + + + + + + + + + + + + + + + + +
+ ESPHome ratgdo +

ESPHome ratgdo Web UI Documentation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameStateActionsExplanation
+ Button + + OFF + + A sensor indicating when the wall panel button is pressed to toggle the door. +
+ Client ID + + 1234 + +
+ + + +
+
+ A unique identifier used to generate security + 2.0 codes +
+ Closing duration + + 0.0 s + +
+ + + +
+
+ The amount of time it takes for the door to close (learned after one door cycle) +
+ Door + + OPEN | CLOSED + + + + + + + + Discrete controls for the door. +
    +
  • - open the door, ignore if already opened.
  • +
  • - stop the door, only if door is moving.
  • +
  • - close the door, ignore if already closed.
  • +
+
+ Dry contact close + + OFF | ON + + + The state of the ratgdo trigger door close input. +
    +
  • OFF - input is floating
  • +
  • ON - input is connected to GND
  • +
+
+ Dry contact light + + OFF | ON + + + The state of the ratgdo trigger light input. +
    +
  • OFF - input is floating
  • +
  • ON - input is connected to GND
  • +
+
+ Dry contact open + + OFF | ON + + + The state of the ratgdo trigger door open input. +
    +
  • OFF - input is floating
  • +
  • ON - input is connected to GND
  • +
+
+ Learn + + OFF | ON + + + + Put the GDO in learn mode (same as pressing the learn button) +
+ Light + + OFF | ON + + + + + + Toggle the GDO's light on or off. +
+ Lock remotes + + UNLOCKED + + + + + + + + + Lockout the wireless remotes. +
    +
  • - lock the remotes. Wireless remotes will be ignored by + the GDO.
  • +
  • - unlock the remotes. The GDO will respond to commands + from wireless remotes.
  • +
+
+ Motion + + OFF | ON + + + + ON - Motion was detected by the wall control panel (on Sec + 1.0, triggers when the light turns + on) +
+ Motor + + OFF | ON + + + + Indicates whether the GDO motor is running or not. +
+ Obstruction + + OFF | ON + + + + Indicates whether the obstruction sensor beam is blocked by an object or not. +
+ Opening duration + + 0.0 s + + +
+ + + +
+
+ The amount of time it takes for the door to open (learned after one door cycle) +
+ Openings + + 200 openings + + + + The number of times the GDO has cycled +
+ Paired Devices + + 6 + + + + The number of clients which are paired with the GDO. +
+ Query Paired Devices + + + + + + + + Send a query to the GDO to get the number of paired devices. +
+ Query openings + + + + + + + + Send a query to the GDO to get the current Openings count. This value is automatically updated + during normal status updates. +
+ Query status + + + + + + + + Get the current physical status of the garage door, light, wireless lockout, learn, openings, + etc. +
+ Restart + + + + + + + + Restart ratgdo +
+ Rolling code counter + + 22 codes + +
+ + + +
+
+ The current rolling code counter for Security + 2.0, it's increemnted for each operation. +
+ Safe mode boot + + + + + + + + Restarts the device in a safe mode, useful if the device is missbehaving/crashing in a way that is preventing an Over-The-Air update to be performed. +
+ Sync + + + + + + + + Manually sync the ratgdo client with the GDO. If the GDO isn't responding to commands from + ratgdo, a sync should force them to be on the same rolling code counter. +
+ Toggle door + + + + + + + + Cycles the door regardless of it's current state. +
+ + +
+ + + + diff --git a/static/wiring_diagrams/dry_contact_diagram.png b/static/wiring_diagrams/dry_contact_diagram.png new file mode 100644 index 0000000..fef2f5f Binary files /dev/null and b/static/wiring_diagrams/dry_contact_diagram.png differ diff --git a/static/wiring_diagrams/secplus_diagram.png b/static/wiring_diagrams/secplus_diagram.png new file mode 100644 index 0000000..6d3394f Binary files /dev/null and b/static/wiring_diagrams/secplus_diagram.png differ diff --git a/static/yellow_learn_button.jpg b/static/yellow_learn_button.jpg new file mode 100644 index 0000000..3d51ea0 Binary files /dev/null and b/static/yellow_learn_button.jpg differ