diff --git a/README.md b/README.md
index 2f66c11..6f60de4 100644
--- a/README.md
+++ b/README.md
@@ -5,19 +5,11 @@ This is a port of the ratgdo software for the v2.0/v2.5 board to ESPHome.
[Visit the github.io page to purchase boards](https://paulwieland.github.io/ratgdo/#order)
-## Moving from stock ratgdo
+## Installation
-If you have not used the stock ratgdo firmware, and are starting with a fresh install of the ESPHome based firmware, [skip these steps](#fresh-install-when-the-stock-ratgdo-firmware-was-not-used-before).
+- Flash the ESPHome based firmware using the [Web Installer](https://ratgdo.github.io/esphome-ratgdo/)
-- Use the [`Logs & Console`](https://paulwieland.github.io/ratgdo/flash.html) to view and make note of the current rolling code
-- Flash the new ESPHome based firmware using the [Web Installer](https://esphome-ratgdo.github.io/esphome-ratgdo/)
-- Use the `number` entity in Home Assistant or the built-in ESPHome web-server to set the rolling code.
-
-
-
-## Fresh install when the stock ratgdo firmware was not used before
-
-- Flash the new ESPHome based firmware using the [Web Installer](https://ratgdo.github.io/esphome-ratgdo/)
+It is no longer necessary to save the rolling code counter when switching between firmware.
## First use after adding to Home Assistant
@@ -25,10 +17,6 @@ The ESPHome firmware will allow you to open the door to any position after calib
-## Updating from versions older than 2023.07.07
-
-When updating from older versions, save the rolling counter value and restore it via the number entity after flashing the new firmware. If you forget to save the code, check the Home Assistant history.
-
## ESPHome config
- [ESPHome config for v2.0 board with ESP8266 D1 Mini lite](https://github.com/RATGDO/esphome-ratgdo/blob/main/static/v2board_esp8266_d1_mini_lite.yaml)
diff --git a/base.yaml b/base.yaml
index 86e1ef7..a44560e 100644
--- a/base.yaml
+++ b/base.yaml
@@ -14,7 +14,6 @@ ratgdo:
input_gdo_pin: ${uart_rx_pin}
output_gdo_pin: ${uart_tx_pin}
input_obst_pin: ${input_obst_pin}
- remote_id: 0x539
on_sync_failed:
then:
- homeassistant.service:
@@ -161,6 +160,14 @@ number:
name: "Closing duration"
unit_of_measurement: "s"
+ - platform: ratgdo
+ id: ${id_prefix}_client_id
+ type: client_id
+ entity_category: config
+ ratgdo_id: ${id_prefix}
+ name: "Client ID"
+ mode: box
+
cover:
- platform: ratgdo
id: ${id_prefix}_garage_door
diff --git a/components/ratgdo/__init__.py b/components/ratgdo/__init__.py
index 076caa7..d584c33 100644
--- a/components/ratgdo/__init__.py
+++ b/components/ratgdo/__init__.py
@@ -24,9 +24,6 @@ DEFAULT_INPUT_GDO = (
CONF_INPUT_OBST = "input_obst_pin"
DEFAULT_INPUT_OBST = "D7" # D7 black obstruction sensor terminal
-CONF_REMOTE_ID = "remote_id"
-DEFAULT_REMOTE_ID = 0x539
-
CONF_RATGDO_ID = "ratgdo_id"
CONF_ON_SYNC_FAILED = "on_sync_failed"
@@ -44,9 +41,6 @@ CONFIG_SCHEMA = cv.Schema(
cv.Optional(
CONF_INPUT_OBST, default=DEFAULT_INPUT_OBST
): pins.gpio_input_pin_schema,
- cv.Optional(
- CONF_REMOTE_ID, default=DEFAULT_REMOTE_ID
- ): cv.uint64_t,
cv.Optional(CONF_ON_SYNC_FAILED): automation.validate_automation(
{
cv.GenerateID(CONF_TRIGGER_ID): cv.declare_id(SyncFailed),
@@ -76,7 +70,6 @@ async def to_code(config):
cg.add(var.set_input_gdo_pin(pin))
pin = await cg.gpio_pin_expression(config[CONF_INPUT_OBST])
cg.add(var.set_input_obst_pin(pin))
- cg.add(var.set_remote_id(config[CONF_REMOTE_ID]))
for conf in config.get(CONF_ON_SYNC_FAILED, []):
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
diff --git a/components/ratgdo/number/__init__.py b/components/ratgdo/number/__init__.py
index bf56e8f..59bd7d2 100644
--- a/components/ratgdo/number/__init__.py
+++ b/components/ratgdo/number/__init__.py
@@ -12,6 +12,7 @@ NumberType = ratgdo_ns.enum("NumberType")
CONF_TYPE = "type"
TYPES = {
+ "client_id": NumberType.RATGDO_CLIENT_ID,
"rolling_code_counter": NumberType.RATGDO_ROLLING_CODE_COUNTER,
"opening_duration": NumberType.RATGDO_OPENING_DURATION,
"closing_duration": NumberType.RATGDO_CLOSING_DURATION,
diff --git a/components/ratgdo/number/ratgdo_number.cpp b/components/ratgdo/number/ratgdo_number.cpp
index 27152e0..f78b93b 100644
--- a/components/ratgdo/number/ratgdo_number.cpp
+++ b/components/ratgdo/number/ratgdo_number.cpp
@@ -10,7 +10,9 @@ namespace ratgdo {
void RATGDONumber::dump_config()
{
LOG_NUMBER("", "RATGDO Number", this);
- if (this->number_type_ == RATGDO_ROLLING_CODE_COUNTER) {
+ if (this->number_type_ == RATGDO_CLIENT_ID) {
+ ESP_LOGCONFIG(TAG, " Type: Client ID");
+ } else if (this->number_type_ == RATGDO_ROLLING_CODE_COUNTER) {
ESP_LOGCONFIG(TAG, " Type: Rolling Code Counter");
} else if (this->number_type_ == RATGDO_OPENING_DURATION) {
ESP_LOGCONFIG(TAG, " Type: Opening Duration");
@@ -24,7 +26,11 @@ namespace ratgdo {
float value;
this->pref_ = global_preferences->make_preference
- Be sure to save the value of the rolling code counter and set it again or the board will not be able to control the garage door opener. If you forget to do this, you may be able to restore control by pressing the learn button, or factory resetting the garage door opener by pressing and holding the learn button 3 times for 10 seconds. -
- When updating from older versions, save the rolling counter value and restore it via the number entity after flashing the new firmware. If you forget to save the code, check the Home Assistant history. -
-