Answer the question
In order to leave comments, you need to log in
Does Home Assistant give an error when trying to connect a new device?
Read about Home Assistant. See how easy it is. I decided to do something on my own and immediately ran into a bunch of problems.
With difficulty, I connected one nodemcu board, which controls the temperature sensor and the pir sensor. I connected via IP, because I couldn’t do it otherwise. When I tried to connect directly via Home Assistant in conjunction with ESPHome, I got an error like: "could not find the ip of the device, are you sure it's online?"
code for the first board:
esphome:
name: maingatenode1
platform: ESP8266
board: nodemcuv2
wifi:
ssid: "mywifi"
password: "mypass"
# manual_ip:
# # Set this to the IP of the ESP
# static_ip: 10.0.0.42
# # Set this to the IP address of the router. Often ends with .1
# gateway: 10.0.0.1
# # The subnet of the network. 255.255.255.0 works for most home networks.
# subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "ap_ssid"
password: "ap_pass"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
sensor:
platform: dht
pin: D8
temperature:
name: "Temperature"
humidity:
name: "Humidity"
#move sensor
binary_sensor:
- platform: gpio
pin: D7
name: "PIR Sensor"
device_class: motion
manual_ip:
# Set this to the IP of the ESP
static_ip: 10.0.0.43
# Set this to the IP address of the router. Often ends with .1
gateway: 10.0.0.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
Unable to connect to ESP. Please make sure your YAML file contains the string 'api:'.
esphome:
name: el_marta_socket
platform: ESP8266
board: nodemcuv2
wifi:
ssid: "mywifi"
password: "mypass"
manual_ip:
# Set this to the IP of the ESP
static_ip: 10.0.0.43
# Set this to the IP address of the router. Often ends with .1
gateway: 10.0.0.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "ap_ssid"
password: "ap_pass"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "*****"
ota:
password: "*****"
switch:
- platform: gpio
name: "Socket_relay_1"
pin: D0
inverted: True
restore_mode: RESTORE_DEFAULT_OFF
Answer the question
In order to leave comments, you need to log in
There is a great YouTube channel with HA tutorials by Alex Kvazis
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question