I have a esp-01s attached to a relay board acting as a switch between two usb ports. I’ve flashed the ESP-01s using ESPHome-Flasher-1.1.0
this is the yaml I flashed
esphome:
name: elsbeths_charger_test
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret ssid
password: !secret password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Elsbeths Charger Test"
password: !secret appass
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
# Enable Web server.
web_server:
port: 80
# Sync time with Home Assistant.
time:
- platform: homeassistant
id: homeassistant_time
# Sensors with general information.
sensor:
# Uptime sensor used in following formatted uptime sensor
- platform: uptime
name: "Elsbeths Charger Test Do Not Use"
id: e_charger_test_do_not_use
internal: true
update_interval: 600s
# WiFi Signal sensor.
- platform: wifi_signal
name: Elsbeths Charger test WiFi Signal
update_interval: 600s
when flashing it tell me everything is ok, but when I plug the ESP-01s into the relay board and connect to 5v power via usb nothing shows in home assistant, nothing shows in my wifi hub I dunno what I have done wrong.
i’ve got photos on my phone that I’ll add in a sec to help see what I have done.
I haven’t looked at your wiring, but it seems like the only functionality you’ve enabled in the code and will show up in home assistant so far is a WiFi signal sensor. Have you added it to home assistant using configuration->integrations->Esphome?
thanks for your reply. Yeah that’s right so far I was just putting on something to get me started and to see if everything is working, I guessed I could do all the rest OTA as I work on it.
I’ve tried setting a static IP ans adding it to Home assistant vie config->Integrations->ESPhome but it says to include the api: which as far as I understand I have…
I’ve removed the static IP settings, reset my router and restarted my Pi runing Home Assistant but it still wont show up. my thought was maybe the chip isnt getting power… so I checked my wireing, the relay is getting 5v and the chip is getting 3v (Ive rounded the voltage) so I’m totally stummped now…
Can you get the logs after flashing it? I’m not familiar with these units, but with other units I can get logs after flashing to see if it boots and connects correctly. Then if it doesn’t work in its final position, it is likely either a power issue or a WiFi signal issue.
looking at you code I cant see the code talking to the relay Switch
shouldn’t you have some code in there pointing to the switch GPIO0
# Switch to turn on/off the chime.
- platform: gpio
id: relay
inverted: true
name: Elsbeths Charger Switch
pin: GPIO0
also the only way I get esp working is by add a IPaddress manually
wifi:
ssid: "bla-bla"
password: "bla-bla-bla"
manual_ip:
static_ip: ipaddress not in dhcp range
gateway: ipaddress pointing to your router
subnet: 255.255.255.0
then goto Integrations hit the plus seach for esphome type in above ipaddress and above password for esp home
I suspect that you aren’t completing the right sequence of flashing and rebooting required with these units, but I’ve never used one. Hopefully someone with more direct knowledge can help.
thank you Myle, though unfortunately that didnt change anything.
I’ve tried to use Frencks doorbell tutorial to upload the yaml, even tried to upload that file and alter it from there, but still the same problem… my thoughts now are that I have a faulty ESP-01s
Hi nick , baby steps it what I was trying (but maybe the wrong steps)…
Acording to esp home flasher I can flash the chip, that to me says its getting power (also a led on the esp-01s flashed blue). Other than that nothing I’ve tried works or shows any signs of life.
Once flashed there are no logs shown in esp home flasher.
Humour me please… What’s the flashing process? Just thinking I may have this wrong…
What I’ve done…
Got a breakout board and…
Soldered a dupont cable to link vcc with chpd.
Soldered a dupont cable to link gnd with gp0
soldered a dupont cable to tx and a separate one to rx.
removed all my wires and fitted pins to the breakout board then pressed it into a breadboard.
wired it as above except I put a normally open tempory switch between ground and gpio0.
when flashing I held the button down then when finished I reset the chip and released the button, my logs showed in esphome flasher. so I know the chip is working and everything there is ok… Phew!!
i still cant find it in home assistant though. when i conect it up and reboot it sometimes shows up but if I go throguht intigrations nothing is there and I get an error
Can’t connect to ESP. Please make sure your YAML file contains an ‘api:’ line.
I’m sure that is set correctly… have I got that wrong?