Files
espHome-NBS-files/docs/GENERAL_DEVICE.md
Nicolas Bachschwell 1f7c437c3e This adds:
- A general folder for documantation configs
- A documantation for general esphome devices with functionallity too small for it's own file.
- Removed the powersave mode NONE on garage doors.
2025-10-08 10:13:10 +02:00

3.1 KiB

What is this:

This is the general documentation for esphome configs deemed too short to deserve their own documantation. Stuff like the 5gModem, the sonoffStecker or the nbs-light-room are just too short for me to believe it necessary.

So, let's get through the basics of any esphome config developed by me.

General configs

Before I start, I should mention what I consider to be general configurations: modules like esphome, esp8266 or esp32, as well as wifi, logger, ota are all part of that. Nearly all of them require all of them (with exception to esp8266 and esp32 as they are mutually exclusive).

esphome

The esphome defines general points, and is required by any esphome config to function. Weirdly, in the last few years this has become a mere holder for name and maybe version.

For name I recommand something that actually give the device a name that is clear what it does. For version when used, I recommand using semantic versioning that makes sense. But if you actually use it or not is up to you.

esp8266/esp32

The esp8266 or esp32 has a special point about only being their to define the actually board being used. Most common boards for esp8266 that we use is the nodemcuv2. While for the esp32 it is the wemos_d1_mini32 also sometimes referenced as esp32dev.

A special note about esp32 is that they have multiple frameworks that are supported. This is defined as esp32.framework.type:

  • arduino
  • esp-idf

wifi

The wifi part is not confusing at all. Normally we use ssid, password and fast_connect. You will see that there is also a captive_portal defined at times should the esp somehow fail to connect to the wifi at all. This captive portal and it's own wifi that it will open in such an event can be used to rescue the device without having to manually flash it again.

SSID is the wifis name, while password is, well, its password. fast_connect just means that the esp will NOT attempt to verify that the network exists by scanning for it. This is important if you need to connect to a hidden wifi.

logger

We actually keep this empty. Just having it around is enough.

api

The api just defines the encryption key for the esphome native api used by esphome and home assistant.

ota

Ahh, the usual over the air update component. The platform used is the normal esphome platform used by the esphome cli as well as the esphome builder in HomeAssistant from there we define a password. Just to be sure.

status_led

The status led is specific to each esp device. but I use it usually to detect if a device is connected to the wifi or not.

More device specific configuration

This is the section for more device specific configuration options that might be important

5gModemPower

This is a normal sonoff power relay. It has a pin defined for the relay. A pin defined for the actual button should you need to press it directly on the device and that's about it.

The relay that controls the power is controlled by an gpio pin (Number 12) and starts out as always on.

There is a binary sensor included for the button on the actual device. This is an inverted pullup pin on gpio 0, pressing it toggles the relay.