My setup: Home assistant as a virtual machine on my Synology (no docker)
ESPHome as add-on.
Made a yaml file for my weatherstation (see below)
Accessing Home assistent via laptop (Windows).
Connected my ESP32 via USB cabel.
Installed drivers needed for com ports
When i try to install (compile and flash) i choose Plug in to computer (via dashboard). Then my ESPHome gives an error : Pick Server Port.
What am i missing?
Yaml:
name: weerstation
platform: ESP32
board: esp32dev
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "xxxxxxxxxxxxx"
wifi:
ssid: "xxxxxxxx"
password: "xxxxxxxxxxxxxxxxx"
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.1.21
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.1.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: "Weerstation Fallback Hotspot"
password: "xxxxxxxxx"
captive_portal:
i2c:
# sda: 21
# scl: 22
scan: true
id: bus_a
sensor:
- platform: bme280
temperature:
name: "BME280 Temperature"
oversampling: 16x
pressure:
name: "BME280 Pressure"
humidity:
name: "BME280 Humidity"
update_interval: 10s
i2c_id: bus_a
address: 0x76
Thanks! I succeeded in flashing. But no network connection. I think my network config is not correct. Do I have to configure IP settings in this Yaml file??
But why does esphome present this error after installing? (Pick server port). Does the server port have to be configured on esphome? Or do I have to connect the esp32 on the USB port on Synology?
No, you don’t have to, I always use dchp, and then reserve the ip address on the dhcp-server (so it will always get the same address).
Only ssid/password need to be correct.
If not, you should see the fall back ssid🤔
Can you ping the address?
Since i use a HyperV myself, i can’t use usb, hence i don’t know anything about it…sorry
Found a very difficult workaround!
Installed Python on Windows laptop
Installed ESPHOME on it.
Started Wizard to build yaml file.
Then run the yaml file (explination is here : ESPHome – Introduction – Internet of Things projects (galagaking.org))
This flashed the ESP32 correctly.
After that i saw it on my Home Assistent and could configure it via Wifi!!!
Plugging it directly into my computer en chosing install from Home Assistant Plugin an choosing Plug into this computer did not work. Got error “Pick server port”. But i wasn’t able to pick one…
Ahhh, found it! just executing. I used the ESPhome program and that was character based…
I think in my case that the most easy way is to just make a small yaml file with only wifi config. Then flashing it and do the rest over te air with the Esphome addon in my home assistant. Once it gets connected via Wifi i can manage and configure it!
You where right about the instruction instead of the error. But the message showed me to pick a server port. But is was not showing.
That would still be double…why not make the full yaml on HomeAssistant EspHome dashboard,compile, download and flash it…
(which is what I do for the esphome for my ac, since it too big for OTA)
No need to install Python on the WIndows machine. There’s a release from ESPHome-Flasher just for Windows. No need for anything else, it’s just an *.exe you can run without installing anything.