Тёмный

Getting started with ESPHome 

Let's Automate
Подписаться 6 тыс.
Просмотров 42 тыс.
50% 1

ESPHome is a perfect complement to Home Assistant. In this video I show you how to get started using it and creating your own DIY sensors.
I show you how to set up a PIR Motion Sensor and Capacitive Touch Button using a D1 Mini ESP8266 microcontroller.
ESPHome Documentation: esphome.io/
Useful links from the ESPHome documentation:
esphome.io/components/binary_...
esphome.io/guides/configurati...
esphome.io/guides/configurati...
Components used:
TTP223 Touch Button
HC-SR501 PIR
Wemos D1 Mini ESP8266 Microcontroller
Dupont wires
You may sometimes need to install a USB driver so that you microcontroller is discovered in Windows. The most common driver is the CH341 Driver which can be downloaded from multiple locations, including this one:
github.com/nodemcu/nodemcu-de...
00:00 Intro
00:28 What will be covered
00:51 What is ESPHome?
01:38 ESPHome Add-On Install
01:55 Set up your first ESPHome Device
04:32 Add new device as a Home Assistant Integration
05:43 Touch Button Example (TTP223)
06:35 Touch Button Wiring
07:55 PIR Example (HC-SR501)
10:07 ESPHome YAML Config File
14:23 Wrap-up
#esphome #homeassistant

Наука

Опубликовано:

 

9 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 47   
@samiraslan9735
@samiraslan9735 10 месяцев назад
This is one of the best esphome videos ever! Hands down
@lets-automate
@lets-automate 10 месяцев назад
Thank you, that means a lot.
@Musicman-50
@Musicman-50 8 месяцев назад
Truly appreciate your quick and ty the point tutorial here. I've mastered flashing Tasmota, but was struggling with the ESPhome installation. Great to the point here. Thanks so much. 👍😊
@Hjaldor
@Hjaldor 10 месяцев назад
Thank you very much! This was exactly what I was looking for!
@SeaTaj
@SeaTaj 7 месяцев назад
Thank you! Great video. As others have mentioned, you get straight to the point. It's very much appreciated.
@benvinson4328
@benvinson4328 5 месяцев назад
Wow! I have been trying to get this little micro-controller to work for a week and your video finally did the trick! thanks mate! I just subscribed.
@eclair4151
@eclair4151 8 месяцев назад
Great tutorial, super clear and to the point. 10/10
@relativenormality
@relativenormality 6 месяцев назад
Thanks for making a clear video to get you going
@davidsims4823
@davidsims4823 9 месяцев назад
Nice and up to date - (at the moment!) Thanks.
@icharlemagne
@icharlemagne 4 месяца назад
Great video, got me up and running in just a few minutes.
@jerryp5792
@jerryp5792 4 месяца назад
Very helpful video! Thanks for taking the time.
@mrstijntje
@mrstijntje 4 месяца назад
This has been super duper helpful, thanks!
@TechdoLiberal
@TechdoLiberal 11 месяцев назад
Nice video. Thank you for this :)
@VorpalForceField
@VorpalForceField 6 месяцев назад
Excellent Content .. Thank You for sharing .. Cheers :)
@kevinw925
@kevinw925 2 месяца назад
Just subbed! Keep up the great work!
@occamraiser
@occamraiser 2 месяца назад
Very useful - and nice to see an up to date video, since GUIs can change so fast. I didn't really grasp the one-click insertion of the sensors - I understand the pin selection and the electronics - but where did the subject names - platform / pin / number /mode come from? You appeared to paste them in from nowhere?
@lets-automate
@lets-automate 2 месяца назад
Thanks for the comment! This was my first ESPHome video and I didn't put a link to the full code. There are a few links in the description to the documentation used though. I have an ESPHome playlist that might be worth checking out as most of the later videos include links to my sample code. The bath sensor one is quite similar.
@TheSdfkjh
@TheSdfkjh 9 месяцев назад
I want to build an esphome to replace harmony remote in each room, but also control any rf/ir devices. Is this possible, of so whats needed?
@riordan381
@riordan381 Месяц назад
what app are you using? I cant find this home assistant app
@azerelgamiel
@azerelgamiel 19 дней назад
can i do the same with esp01
@davidsomething4867
@davidsomething4867 10 месяцев назад
Thanks for the video, I found the same PiR sensor in a Pi project kit I bought years back. Do you need more than 3.3v for the PIR my board only supplies 3.3v , I know you mentioned the jumper. My PiR is constantly changing state could you post the yaml for the PiR too the video does not quite show the complete config🙂
@lets-automate
@lets-automate 10 месяцев назад
Hi there, sorry for the late reply. What board are you using and how are you powering it? Often it's via USB so you can pull 5v off the input. If you are trying to power the PIR via the normal pin with 3.3v then it won't work and you will get constant state changes. Either power it with 5v from the normal pin or power it with 3.3v from the jumper pin and it should be okay. The other reason you can get fluctuating states is if: 1. Your Power Supply isn't strong or stable enough and so you're getting voltage drops 2. You haven't set "pullup" under the pin configuration. I have upload the yaml from my video to here for you: gist.github.com/letsautomatenet/b7cffe868118ab2a416d3b2a0fdc7e3b Hope you get it sorted!
@miatared
@miatared 8 месяцев назад
I struggled at one point....solution: when you install/upload the yaml file using the USB cable, and it's installed, at the 4:33 mark. You need to disconnect it and reconnect it, as it will not reconnect to your SSID by itself and HA will never discover it. Otherwise, thank you for your tutorial.
@kyle8293
@kyle8293 6 месяцев назад
would i be able to trigger an automation from incoming voltage from a relay for an alarm panel push notification?
@lets-automate
@lets-automate 5 месяцев назад
Yes you could. A little more complex because the voltage from your alarm is probably too high. Also, relays can send voltage spikes when turned on and off which could fry the microcontroller. It would probably be best to step-down the voltage from the alarm and use that to turn on an optocoupler. The other side of the optocoupler would then be connected to a gpio pin so that it would be high when on and low when off. You might need to do a bit of research. I know it is possible though because a few years ago I used a usb port on my TV which only had power when the TV was on, to detect if the TV was on in Home Assistant, as it wasn't a smart TV. (I could of course have used a power monitoring smart plug instead for this example!)
@johnadams1976
@johnadams1976 Месяц назад
great video - thanks... what are the advantages of doing this with a d1mini rather than just buying a zigbee PIR sensor for example? Cheers
@lets-automate
@lets-automate Месяц назад
I would say mainly that you can attach lots of different sensors to the same device, such as mmWave or temp and humidity sensors etc. It was more to explain the concept of ESPHome and connecting sensors than the PIR specifically. Also it's wifi rather than zigbee, so useful for people who don't use zigbee. Zigbee PIRs are of course a great option though and I use lots of them in my smart home! Zigbee is great for places you can't get power to. Some people hate the thought of changing coin cell batteries every couple of years, so wired sensors have their place.
@johnadams1976
@johnadams1976 Месяц назад
@@lets-automate defninitely get the battery replacement thing!!! ;-) Think I'll order a few D1minis / relays and give them a try too... if nothing else, I learn how to flash code to them etc!
@OfficialBiglitttle
@OfficialBiglitttle 5 месяцев назад
So, for example, if I want a temperature humidity sensor in a couple of different rooms, I need a main esp board for each sensor as well, right?
@lets-automate
@lets-automate 5 месяцев назад
Yes, you would need an ESP for each room unless you put one in the wall between 2 rooms. If it's just for temperature and humidity though I'd probably say go with a zigbee one instead if you have a zigbee network. They are fairly cheap and run off batteries for a couple of years, so no need to have power nearby. If you're going to connect other sensors as well though then it makes sense to use an ESP device.
@OfficialBiglitttle
@OfficialBiglitttle 5 месяцев назад
@lets-automate thank you! That's the thing, tho. I've got zigbee temp/hum. Sensors. And they work great. BUT their battery doesn't update. It stays at either 100% or at a % the battery is at. I've ordered some new ones, aqara ones, hopefully that fixes some things I'm dealing with atm.
@MaxGoddur
@MaxGoddur 10 месяцев назад
Question concerning ESPhome yaml creation. Have noticed there is not any consistency in syntax; sometimes GPIO pin labeling is used and other times descriptive naming is used as in D2. Why is that? This is just one case where this is true but wanted to ask why as it makes learning how to program for ESPhome in YAML code rather difficult. Thank you for your time and videos, I enjoyed them.
@lets-automate
@lets-automate 10 месяцев назад
I think the reason the D convention came out was to make it easier to know what to put in your code because the D numbers are printed on your circuit board on D1 Minis. Save you having to look at schematics. They are actually just "constants" (like variables) which reference the GPIO number. You can use either in your code.
@MaxGoddur
@MaxGoddur 10 месяцев назад
@@lets-automate there are times when I use for for example D2 and the dreaded red warning comes up. Not sure why but using the correct GPIO pin fixes the problem.
@lets-automate
@lets-automate 10 месяцев назад
This could be the board type that you have selected. For example if you have the board set as something generic like "esp32dev" then the "D" numbers aren't available. But if you have it set to something like "wemos_d1_mini32" then it should let you. Hopefully that helps!
@AssaggInformatici
@AssaggInformatici 7 месяцев назад
I apologize in advance for the silly non technical question, regarding the pronunciation. When you say the word "home" it sounds to my foreigner ears (I'm Italian) more like "haim". I've been checking more than once also asking to my wife. So the question is: where are you from? What kind of inflection is your one? I don't complain, of course, I just try to enlarge my knowledge about English different inflections. Thanks.
@lets-automate
@lets-automate 7 месяцев назад
Haha. No problem at all. Easier to answer than some questions I get! I'm originally from "The Midlands"; my accent is less prominent as I've gotten older, but it's probably to do with coming from there I imagine. I'm trying to learn French a little and subtle differences in how things are said is definitely a challenge.
@AssaggInformatici
@AssaggInformatici 7 месяцев назад
@@lets-automate thank you so much for your kind answer. BTW I've been working a lot in B'ham, at the Midlands Metro plant. I have a few good friends on there. But even after many months I didn't manage to get accustomed to the local dialect. Many words are spelled differently, yes. Things like "right" that I was used to pronounce "rait" and they said "rooit". Or "friday" (fraiday in my habit) was "froiday". But what about "tara-a-bit"? 😀
@joeking5211
@joeking5211 6 месяцев назад
Any chance of a getting started section that does'nt involve Home Assistant. I'm lost as for what ever reason EVERY vid i view to get ESPHome running end up developing with or wrapping things up in HA and i want to stay as far away from that ** as I can as I have wasted many hours of getting my dozen or so Tasmota devices to even be seen in it, but that's another story, but desperate to get a ESPHome start.
@lets-automate
@lets-automate 6 месяцев назад
In my upcoming video I do briefly mention that you can use ESPHome with Home Assistant, but not in any detail. Mainly because it depends on what you want to connect it to. What is the central platform you use (or plan to) to control things? Regarding Tasmota... Once you've configured MQTT they should just show up and update in Home Assistant automatically. I use Tasmota less and less now due to ESPHome not needing MQTT to talk to Home Assistant.
@joeking5211
@joeking5211 6 месяцев назад
Many thks for your quick reply, greatly appreciated, you are the 1st to ever reply in the world of ESPHome/HA. Sorry, you mention above that in you 'upcoming vid you can use it with HA but not in detail', but that was exactly my issue, on YT EVERY ESPHome vid wraps it up in *** HA and that is what i dont want as it completely vectors away from the tutorial is about ESPHome. I have over the past 8+ years used several Tasmota's controlled by my node-red code over mqtt which runs without any glitches, my reason to look at ESPHome was not ditch Tasmota but i want to create some of my own devices that are more than just the standard on/off switches etc at which Tasmota's do very well. But EVERY YT vid you watch on ESPHome there seems only ** HA info, and to a user that has no clue what HA even is then stunts their startup with ESPHome which is a totally separate thing in any case. It is only this past week that i have looked at ESPHome for the very first time, i wish i had done it earlier, it looks superb that's if you can get up and running without ** HA. OK, now regarding my ** HA experience, I have had many attempts with various versions of it to try and add my dozen or so fully working Tasmota's to it and have totally failed, long live node-red. I have followed various YT tutorial to do this and the best result I ever got/get is this: One of my 'Generic' Tasmota 's is found but the 'switch' shown for it on the ** HA dashboard was 'greyed out' so not usable, and NONE of the other eleven or so found anywhere. BUT, here is the good bit. I actually had listed in the ( forget the page name where all the ** HA devices show, is it Devices page/screen? ) there were/are if i run another copy up today - here we go - some 650 device that were populated in the dashboard with devices / types and names, many in foreign languages i had/have no idea about, i guess i had/could have the worlds Tasmota devices under my control, and yes clicking / switching their controls was indeed showing that it was being actioned ok, i just HOPE that i had not cause any one out there a problem that was'nt the intention, as i was initially shell shocked and had absolutely no idea what was going on, at first thought it was ** HA throwing in example devices as it was a fresh install and noobe user, but later realised the complete and utter ** of HA, regretfully i must have caused a bit damage to some poor folks devices around the planet as there were heaters for greenhouses, plant watering systems etc etc, some quite exotic devices and me thinking this was ** HA's way of showing what you should striving for and a good 'virtual' example to play with, so play i did, clicking/switching to get the feel of the dashboard etc. But still the irony of that is I could only see 'one' of my Tas's but with a 'grey out' switch that could'nt be used. I did over that time leave comments on the YT vids that i was using to get HA running, but NOBODY even commented, not even a 'go away' which set the opinion in my mind of the 'types' that ** HA users are. Hey, not your good self as i guess you do use ** HA but I sense you like myself are more of an electronics guy, the joke of the above is that it is implied that every joe bloggs can use ** HA but hands up i can't and have spent 50+ year in analog and digital electronics and been programming mainly C/C++ for most of that time and old enough now to have no embarrassment, all i can be sure of there must me countless others with similar experiences perhaps a lot younger and are embarrassed to say, which is why i say i am staggered that ** HA is used as much as they say it is. Thks a lot for the reply, I do have respect for the few vids of yours that i have seen to date so if you are a seasoned ** HA user i should be be very interested to know your thoughts on the above fiasco, as NO other ** HA YT'er out there has bothered with a reply. Oh i do lie, one replied with the answer to my 'why oh why in a ESPHome totorial was ** HA heavily wrapped up in it i was told that ** HA has 'purchased' or taken over the ESPHome project. Well, judging on my above experience if that is the case maybe ESPHome goes to the dogs from now, what a shame that would be, However, many many thks, and a very Happy New Year to you, and if you do have any thoughts/comments on the above, well. Please substitute the ** in all the above prefix to (**)HA, if you get my meaning. Kind Rgds bfn. @@lets-automate
@lets-automate
@lets-automate 6 месяцев назад
Thanks for taking the time to give such information! So, yes I know what you mean. ESPHome is very Home Assistant focused now and most content out there seems to assume usage of HA. I’ve been thinking about this myself a bit recently which is why I briefly mentioned it in my recent video (Which was created before your comment, but released after it). This is however a brief mention and not what you’re after. Although ESPHome is “managed” by the HA team now, it didn’t start its life off like that and certainly earns its right separately in my opinion. So it seems that Node-RED is your automation platform of choice and if you’ve been using Tasmota for many years then you must have a stand-alone MQTT broker setup if not using Home Assistant? Is it Mosquitto that you use? When you speak of 650 random devices appearing…the only thing I can think of here is that you have connected your HA instance to a public MQTT server. Perhaps the example one from the documentation? I suspect lots of people have tried things out on there (or using it, not realising it’s public). ESPHome communicates with Home Assistant via API by default now, however it can and used to communicate with HA via MQTT instead. It does this with MQTT “discovery” topics. So you probably picked up lots of devices from historic mqtt topics which have “retained” messages. This may (possibly) be also why you are having issues with your Tasmota devices showing up in HA. If you have been using them separately then your Tasmota devices might not be sending messages to the HA MQTT discovery topic where it looks for them. You would need to go and investigate how discovery works. Tasmota does have a section in their docs too I believe. Like you, I was quite content with Tasmota, but when you start getting into different sensors ESPHome is possibly more suitable I would say. Although a fair amount of effort seems to have been put into supporting sensors in Tasmota too. (The Rules engine is not pretty though) On your original point…my latest video I am working on is ESPHome related and may address some of your questions around getting ESPHome to work with something other than HA. It’s turning into something bigger than I was expecting though, so I’m not promising at this point! I’ve been using HA for around 6 years now and if you get frustrated with it now, you certainly would have in it’s early days! It was not easy to use at all, but had the most integrations with smart home devices really, so I persevered. They have definitely focused on it being more user friendly the past couple of years; still a way to go, but I think they will get there. I appreciate that I probably won’t be able to solve your problems over a comment, but hopefully it has helped a little!
@lets-automate
@lets-automate 5 месяцев назад
I didn't manage to fit it into my latest video as it was already taking a lot of time to create and long. But I do plan to address using ESPHome without Home Assistant in a future ESPHome video.
@joeking5211
@joeking5211 7 месяцев назад
It seems other viewers here get the gist, I must be the only one not to then. Lost you 2:47, you made that 'Welcome to ESPHome' dialog disappear like a magician, so what, if anything did you do there as there seems no use in going any further until we know what should be done there. Have you noticed how fast your mouse is going ?.
@lets-automate
@lets-automate 7 месяцев назад
Thanks for your comment. I see what you mean. I should have shown me pressing one of the options. I just selected the type of device I was using, either ESP32 or ESP8266 in my case. It then should show you the "Configuration Created" that I show in the video. Regarding the mouse...do you mean I move it around too quickly? I do have it on a fast speed for productivity (I'm used to it) but certainly could slow it down for demos.
@edmo1166
@edmo1166 2 месяца назад
Hello, I did everything on the video but when I setup the binary sensor and try to install I get the following message: INFO ESPHome 2024.4.1 INFO Reading configuration /config/esphome/entrada-principal.yaml... Failed config captive_portal: [source /config/esphome/entrada-principal.yaml:30] [binary_sensor] is an invalid option for [captive_portal]. Please check the indentation. binary_sensor: - platform: gpio pin: number: D2 mode: input: True pullup: True name: sen puerta
@edmo1166
@edmo1166 2 месяца назад
Sorry never mind, my fault in the formating of the code
Далее
ESPHome Basic Setup For All ESP Devices
44:21
Просмотров 8 тыс.
Is it impossible to cut off so much?💀🍗
00:14
Просмотров 2,3 млн
An Improved Multi-sensor
29:40
Просмотров 29 тыс.
Every Home Assistant Install Should Use This
9:05
Просмотров 27 тыс.