[Login]

Home Assistant/ESPHome NodeMCU

If you are running Home Assistant core and would like to flash your NodeMCU with ESPHome and integrate it with Home Assistant then you can follow my steps.

  1. Install the ESPHome docker image. I use Unraid so I just installed it from the community apps.
  2. Open ESPHome, it'll run on port 6052 and click the + sign to add a new node
    1. Node Name: Give it any name you want. This will also be it's local DNS name. It needs to be lowercase.
    2. Device Type: I just picked NodeMCU under ESP8266
    3. Wifi: Enter you wifi info. This is what the NoeMCU will use to connect to your wifi router
    4. Click finish. It will build and fail because it can't connect to your NodeMCU. This is expected the first time you try to flash your NodeMCU
    5. At the home screen in ESPHome, click the ... on your device, click "Compile" and then "Download Binary". This is what we'll use to flash the device for the first time so you can then use wifi going forward
  3. Flash the device with your binary from the previous step
    1. Download esp-home flasher
    2. Plug in your NodeMCU to your compouter with a USB cable
    3. Open esp-home flasher and select the serial port for your node. You list of serial ports might be empty. If so, this might be your problem 1) install the driver, I used the CP210x Universal Windows Driver 2) try a different USB cable, some are charging only and otherwise won't work.
    4. Now flash the device by selecting your downloaded bin file and clicking the flash button
    5. Now your device should be on wifi
  4. Go back to Home Assistant -> Configuration -> Integrations -> Add an integration -> Search for ESPHome -> For "Host" use the name you have the device, click submit