diff --git a/esphome/components/modem/__init__.py b/esphome/components/modem/__init__.py index ce50e557bd..b830eb78c5 100644 --- a/esphome/components/modem/__init__.py +++ b/esphome/components/modem/__init__.py @@ -74,10 +74,7 @@ CONFIG_SCHEMA = cv.All( cv.Required(CONF_APN): cv.string, cv.Optional(CONF_STATUS_PIN): pins.gpio_input_pin_schema, cv.Optional(CONF_POWER_PIN): pins.gpio_output_pin_schema, - cv.Optional(CONF_DTR_PIN): pins.internal_gpio_output_pin_schema, cv.Optional(CONF_PIN_CODE): cv.string_strict, - cv.Optional(CONF_USERNAME): cv.string, - cv.Optional(CONF_PASSWORD): cv.string, cv.Optional(CONF_USE_ADDRESS): cv.string, cv.Optional(CONF_INIT_AT): cv.All(cv.ensure_list(cv.string)), cv.Optional(CONF_ENABLE_ON_BOOT, default=True): cv.boolean, @@ -122,10 +119,6 @@ def _final_validate(config): # if wifi_config := fv.full_config.get().get(CONF_WIFI, None): # if wifi_has_sta(wifi_config): # raise cv.Invalid("Wifi must be AP only when using ethernet") - if config.get(CONF_STATUS_PIN, None): - _LOGGER.warning("Using '%s' is experimental", CONF_STATUS_PIN) - if not config[CONF_ENABLE_ON_BOOT]: - _LOGGER.warning("Using '%s: False' is experimental", CONF_ENABLE_ON_BOOT) if config.get(CONF_POWER_PIN, None): if config[CONF_MODEL] not in MODEM_MODELS_POWER: raise cv.Invalid( diff --git a/esphome/components/modem/modem_component.cpp b/esphome/components/modem/modem_component.cpp index cbcb7f9356..0058d93019 100644 --- a/esphome/components/modem/modem_component.cpp +++ b/esphome/components/modem/modem_component.cpp @@ -214,13 +214,6 @@ void ModemComponent::setup() { this->ppp_netif_ = esp_netif_new(&netif_ppp_config); assert(this->ppp_netif_); - if (!this->username_.empty()) { - ESP_LOGV(TAG, "Set auth: username: %s password: %s", this->username_.c_str(), this->password_.c_str()); - ESPHL_ERROR_CHECK(esp_netif_ppp_set_auth(this->ppp_netif_, NETIF_PPP_AUTHTYPE_PAP, this->username_.c_str(), - this->password_.c_str()), - "PPP set auth"); - } - err = esp_event_handler_instance_register(IP_EVENT, ESP_EVENT_ANY_ID, &ModemComponent::ip_event_handler, nullptr, nullptr); ESPHL_ERROR_CHECK(err, "IP event handler register error"); @@ -262,10 +255,8 @@ void ModemComponent::loop() { ESP_LOGD(TAG, "TONUART check sync"); if (!this->modem_sync_()) { ESP_LOGE(TAG, "Unable to power on the modem"); - // this->internal_state_.powered_on = false; } else { ESP_LOGI(TAG, "Modem powered ON"); - // this->internal_state_.powered_on = true; } break; case ModemPowerState::TOFF: diff --git a/esphome/components/modem/modem_component.h b/esphome/components/modem/modem_component.h index 6ec770114b..c5c71d4cd0 100644 --- a/esphome/components/modem/modem_component.h +++ b/esphome/components/modem/modem_component.h @@ -62,8 +62,6 @@ class ModemComponent : public Component { void set_power_toff(int toff) { this->power_toff_ = toff; } void set_power_toffuart(int toffuart) { this->power_toffuart_ = toffuart; } void set_status_pin(GPIOPin *status_pin) { this->status_pin_ = status_pin; } - void set_username(const std::string &username) { this->username_ = username; } - void set_password(const std::string &password) { this->password_ = password; } void set_pin_code(const std::string &pin_code) { this->pin_code_ = pin_code; } void set_apn(const std::string &apn) { this->apn_ = apn; } void set_not_responding_cb(Trigger<> *not_responding_cb) { this->not_responding_cb_ = not_responding_cb; } @@ -129,8 +127,6 @@ class ModemComponent : public Component { int power_toffuart_; GPIOPin *power_pin_{nullptr}; std::string pin_code_; - std::string username_; - std::string password_; std::string apn_; std::vector init_at_commands_; std::string use_address_;