mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-09-29 04:27:32 +02:00
Add changing name section
This commit is contained in:
parent
ccfc7d9352
commit
55e2fa42bd
@ -22,9 +22,8 @@ Configuration variables:
|
|||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
- **name** (**Required**, string): This is the name of the node. It
|
- **name** (**Required**, string): This is the name of the node. It
|
||||||
should always be unique to the node and no other node in your system
|
should always be unique in your esphome network. May only contain upper/lowercase
|
||||||
can use the same name. It can also only contain upper/lowercase
|
characters, digits and underscores. See :ref:`esphome-changing_node_name`.
|
||||||
characters, digits and underscores.
|
|
||||||
- **platform** (**Required**, string): The platform your board is on,
|
- **platform** (**Required**, string): The platform your board is on,
|
||||||
either ``ESP32`` or ``ESP8266``. See :ref:`esphome-arduino_version`.
|
either ``ESP32`` or ``ESP8266``. See :ref:`esphome-arduino_version`.
|
||||||
- **board** (**Required**, string): The board ESPHome should
|
- **board** (**Required**, string): The board ESPHome should
|
||||||
@ -250,6 +249,46 @@ This option behaves differently depending on what the included file is pointing
|
|||||||
AND included in the main.cpp. This way the lambda code can access it.
|
AND included in the main.cpp. This way the lambda code can access it.
|
||||||
- If the include str
|
- If the include str
|
||||||
|
|
||||||
|
.. _esphome-changing_node_name:
|
||||||
|
|
||||||
|
Changing ESPHome Node Name
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
Trying to change the name of a node or its address in the network?
|
||||||
|
You can do so with the ``use_address`` option of the :doc:`WiFi configuration <wifi>`.
|
||||||
|
|
||||||
|
Change the device name or address in your YAML to the new value and additionally
|
||||||
|
set ``use_address`` to point to the old address like so:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
# Step 1. Changing name from test8266 to kitchen
|
||||||
|
esphome:
|
||||||
|
name: kitchen
|
||||||
|
# ...
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
# ...
|
||||||
|
use_address: test8266.local
|
||||||
|
|
||||||
|
Now upload the updated config to the device. As a second step, you now need to remove the
|
||||||
|
``use_address`` option from your configuration again so that subsequent uploads will work again
|
||||||
|
(otherwise it will try to upload to the old address).
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
# Step 2
|
||||||
|
esphome:
|
||||||
|
name: kitchen
|
||||||
|
# ...
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
# ...
|
||||||
|
# Remove or comment out use_address
|
||||||
|
# use_address: test8266.local
|
||||||
|
|
||||||
|
The same procedure can be done for changing the static IP of a device.
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -45,7 +45,8 @@ Configuration variables:
|
|||||||
- **dns2** (*Optional*, IPv4 address): The backup DNS server to use.
|
- **dns2** (*Optional*, IPv4 address): The backup DNS server to use.
|
||||||
|
|
||||||
- **use_address** (*Optional*, string): Manually override what address to use to connect
|
- **use_address** (*Optional*, string): Manually override what address to use to connect
|
||||||
to the ESP. Defaults to auto-generated value. Example, if you have changed your static IP and want to flash OTA to the prior configured IP address.
|
to the ESP. Defaults to auto-generated value. Example, if you have changed your static IP and want to flash OTA to the previusly configured IP address.
|
||||||
|
|
||||||
- **ap** (*Optional*): Enable an access point mode on the node.
|
- **ap** (*Optional*): Enable an access point mode on the node.
|
||||||
|
|
||||||
- **ssid** (*Required*, string): The name of the access point to create.
|
- **ssid** (*Required*, string): The name of the access point to create.
|
||||||
@ -111,6 +112,10 @@ Additionally, this can help with :doc:`Over-The-Air updates <ota>` if for exampl
|
|||||||
home network doesn't allow for ``.local`` addresses. When a manual IP is in your configuration,
|
home network doesn't allow for ``.local`` addresses. When a manual IP is in your configuration,
|
||||||
the OTA process will automatically choose that as the target for the upload.
|
the OTA process will automatically choose that as the target for the upload.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
See also :ref:`esphome-changing_node_name`.
|
||||||
|
|
||||||
.. _wifi-power_save_mode:
|
.. _wifi-power_save_mode:
|
||||||
|
|
||||||
Power Save Mode
|
Power Save Mode
|
||||||
|
Loading…
Reference in New Issue
Block a user