NodeMCU ESP8266

The NodeMCU board is fully supported by ESPHome. Simply select ESP8266 when the ESPHome wizard asks you for your platform and nodemcuv2 as the board type.

Note

Most NodeMCU that can be purchased now are version 2 or upwards. If you’re using an original v1 board, set the board type to nodemcu

	# Example configuration entry
	esphome:
	name: livingroom
	esp8266:
	board: nodemcuv2

The NodeMCU’s pin numbering as seen on the board (the D0 etc pins) is different from the internal pin numbering. For example, the D3 pin number maps to the internalGPIO0 pin. Fortunately ESPHome knows the mapping from the on-board pin numbers to the internal pin numbering, but you need to prefix the pin numbers with D as in the image below in order for this automatic mapping to occur.

In general, it is best to just use the D0, D1, … pin numbering to avoid confusion

Pins on the NodeMCU ESP8266 development board.

Note that in certain conditions you can use the pins marked as INTERNAL in above image.

	# Example configuration entry
	esphome:
	name:    livingroom
	esp8266: 
	board:   nodemcuv2
	binary_sensor: -
	platform: gpio
	name: "Pin D0"
	pin: D0