ESPHome for the first time

Hello,

I installed the esphome add-on and tried to add my first ESP32 device.

But when pushing the connect button I get this message :

Schermafbeelding 2022-09-18 084032

I already tried different USB cables, connecting to my computer (HP Pavilion 17-ab464nb) or to the ODROID N2+ itself but nothing helps.

Do I have to do something else ?

Hi,

I can’t translate the screenshot :grinning: but see it looks like a serial port error using duckdns. I know with google chrome it only allows you to connect to the serial port on https websites. Could you be using HTTP?

I’ve always set up my esp devices by downloading the file to my computer and then using the espflasher tool. Once setup and installed the first time I can then flash using the web interface. Maybe you could try this?

You have to give more details or it’s going to be difficult to help you ! What ESP board do you use ? If it’s one with USB controler integrated try to connect it at your computer to check if it “sees” the ESP (whatever it asks for driver is not a problem but will confirm your USB cable is good).

Connecting to the IP address of my server (192.168.1.6:8123) and attached the usb cable to the server worked for me :slight_smile:

After disconnecting and just powering it, I stays online…so that’s ok.

I already did some changes, now yaml code is like this :

esphome:
  name: pond-thermometer

esp32:
  board: nodemcu-32s
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: !secret esphome_api_password

ota:
  password: !secret esphome_ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Pond-Thermometer"
    password: "bYiANKSAJWQ4"

captive_portal:

I wonder if this seems correct ? Especialy the arduino part ? Also the API part, where there was initialy an encryption key…

Looks good, and if it works it works. It only misses the pond temperature sensor :slight_smile:

If it passes the validation in esphome it is correct from a technical view point :wink:

If you don’t use an encryption key then communication between ha and the esphome isn’t encrypted. :unlock:

As you use a password at least it needs authentication to be able to communicate. Still encryption would be best practice (and default nowadays) at it adds an extra layer of security and doesn’t has any downsides :lock:

Next step…connecting my ds18b20 to my NodeMCU-32S

Between red and yellow wire I’ve put a resistor of 4,7KΩ

Red : 3V3
Black : GND
Yellow : GPIO21

Added this line in the yaml :

dallas:
  - pin: GPIO21

But… :thinking:

Try another pin, in the ESPHome docs, pin GPIO23 is used
I also have this sensor for my pond, but without the resistor, and it works fine. Not sure what the consequences are…

Pin 23 does not work :confused:

Is your board also a NodeMCU-32S (NodeMCU-32S Core Development Board | 安信可科技) ?

Did you connect the red wire to 5V or 3,3V ?

I think 3.3v
I have the ESP8266 nodemcu v2, connected to pin D2

Found it…a wire had a bad connection :grimacing:

For your information, it works with and without the resistor.

I added it cause that’s what the documentation says… Dallas Temperature Sensor — ESPHome

Thanks for your help !

1 Like

Little question : can I connect a display that uses 5V on this same board (so the pin 3.3V for the temperature sensor and the 5V pin for the display) ?

Yes, as long as you keep 3.3v and 5v separate

Works like a charm :slight_smile:

Thanks again !

1 Like