Let op: Tweakers stopt per 2023 met Tweakblogs. In dit artikel leggen we uit waarom we hiervoor hebben gekozen.

Getting started with ESP-01s

Door LEiPiE op vrijdag 30 oktober 2020 23:11 - Reacties (7)
Categorie: home automation, Views: 3.089

Yeah, it's about time to dive into the world of home automation. I've always been interested in making graphs of everything and I've been wanting to track temperature in our house for quite some time.

So, opened up Aliexpress and ordered six ESP-01s: 2 with relay, 2 with DHT-11 and 2 with DS18B20 and a flasher.

Of course things didn't go smoothly:
sudo apt-get install python3-pip
(I didn't have python/pip on my personal laptop)
pip install epshome
errors out... ah, need to install setuptools
sudo apt-get install python3-setuptools
pip install esphome
warnings about python 3.5 being deprecated, no problem (I'm still running Linux Mint 18.3, didn't feel the need to upgrade yet :) )
ok, so
esphome livingroom.yaml wizard
should be a command to make a configfile, but fails with a python stack trace, but no usable error info
according to https://stackoverflow.com...t-needs-an-argument-while this was fixed in python 3.5.3... guess what I'm running... 3.5.2 :(

Ok, so we will use the docker route then :)

Of course the wizards asks questions I don't know the answer to: is the esp-01s an ESP32 or ESP8266? I think the latter.
But what board is it? esp01 I guess.

Ok, so I now have a yaml file, now we need to customize it.
So, I'm starting with the DHT11 one... but what pin is it connected to? The boards have a sensor and a reset switch and they have IO0 and IO2. Examples say it's pin 2, so we'll go for that :)

Well, at least it compiles... now let's flash the esp-01s, with esphome run
Mmz, it times out... why doesn't shit just work at first try...
Found in one tutorial that you should connect io0 to gnd, but that didn't help.
Enough for today.

Had to try one more time: take out the ftdi, connect io0 and gnd, put the ftdi back in, let go of te io0/gnd combo (I was using a pair of scissors to make that connection...).
And yes! It flashes!