Arduino IDE or ESPhome for our Projects?

Поділитися
Вставка
  • Опубліковано 14 січ 2025

КОМЕНТАРІ • 337

  • @squalazzo
    @squalazzo Місяць тому +37

    to access cpp src from haos, do this:
    - open terminal (don't have it? have it...)
    - go inside the esphome container: docker exec -it $(docker ps --filter "name=esphome" --format "{{.Names}}") bash
    - go in /data/build/your_device_name/src
    pin this if you want

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +9

      Cool! It works! Thank you. Pinned.

  • @oscargr_
    @oscargr_ Місяць тому +29

    Classic, classic Spiess video.
    Breaking down how things work, followed by examples and then a clear conclusion.
    👍🏼💁🏻‍♂️

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +2

      Thank you for your kind words!

    • @oscargr_
      @oscargr_ Місяць тому +6

      @AndreasSpiess So well deserved.
      You put so much work into those videos.

    • @MrCWoodhouse
      @MrCWoodhouse Місяць тому

      @andreasspiess thank you for all your great work!

  • @xwhyzzwhy
    @xwhyzzwhy Місяць тому +11

    A fantastic guide and a huge time saver. I might never have gone in this direction, but I probably will now. We definitely will need a way to get the data out to complete the job and enable so many other great projects.
    Thanks again!

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +2

      Good that I motivated you to try it!

    • @dougle03
      @dougle03 Місяць тому

      MQTT is supported. Also, you can write your own components if the existing ones don't quite do what you want... Plenty of Open Source components to clone and modify for your needs.

  • @ei23de
    @ei23de Місяць тому +16

    00:00 Arduino IDE vs. ESPHome: Introduction
    01:05 Understanding the Fundamentals: C++ vs. YAML
    03:08 Basics of YAML for ESPHome: Key-Value Pairs & Objects
    06:10 First ESPHome Project: Wi-Fi Connectivity and Basic Setup
    07:50 Building a Sensor with ESPHome: BME280 Example
    09:33 Adding Outputs and Switches: Controlling LEDs
    10:48 Examining the Generated Arduino Code: PlatformIO Project
    12:10 Integrating an OLED Display: Lambda Functions in YAML
    14:08 Implementing Logic with Automations: Button and Switch Control
    15:56 Using Scripts in ESPHome: Reusable Functionality
    18:19 Verdict: ESPHome vs. Arduino IDE - Pros and Cons
    21:03 Future Use Cases and Conclusion
    These chapters were created entirely locally on my Debian machine using open-source software (Whisper, Ollama, Qwen2.5:14b).
    @Andreas Spiess - Use the chapters in your video description if you want, no need for credits.

  • @markxexar9386
    @markxexar9386 Місяць тому +7

    Great overview of ESPhome concepts - this would have saved me so much time when getting started. A few other tips that I learnt the hard way, and wish I took this path from the beginning: 1) Compiling ESPhome is so slow on something like a RPi for Home Assistant. It is far better to do the compiling and flashing from a high performance desktop (running ESPhome as a container). The devices can still be discovered by Home Assistant. 2) Keep all your secrets (passwords and IP addresses) in the secrets yaml file. This simplifiles your boilerplate code for each project. 3) Use name substitutions at the top of your file, which means the main yaml body is more generic and can easily be shared with others, or duplicated across similar projects and devices.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Thank you for your additions. I agree with all of them. Frequent users know that one of the reasons I moved to X86 and Proxmox was the slow speed of ESPhome compilation on the Raspberry 4. With my second-hand miniPC the speed is ok...

  • @r7boatguy
    @r7boatguy Місяць тому +2

    I kind of knew a lot of this, but had never really thought about it in a structured way. Thank you for making this video, it was really helpful and added to my knowledge! Merry Xmas to you and your family!

  • @lemd49
    @lemd49 Місяць тому +3

    A well structured and educational video from Andreas, what a nice way to spend a few relaxing moments on Sunday afternoon 😊

  • @deivissergio2378
    @deivissergio2378 Місяць тому +85

    YAML is not a programming language, but a configuration file (like JSON), by the way is quite similar to JSON but uses less data... 😊👍👍👍

    • @michaels3003
      @michaels3003 Місяць тому

      Yes Sir.

    • @michaels3003
      @michaels3003 Місяць тому +2

      "Human-readable data-serialization language."

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +6

      You are right!

    • @mikejones-vd3fg
      @mikejones-vd3fg Місяць тому

      @@michaels3003 lol human readable, key value pairs? ... thats machine readable, if i have to memorize these high level abstractions of what they mean when they say "home:something" i might as well learn the code that manipulates the registers that set these functions instead, maybe not as "easy" to read but you have to understand what they mean just the same as any readable word anyway so i dont see the effeciencey gains here, infact you just have to memorize a layer of bloat and lose the undersatnding of what youre actually doing with these high level abstractions and now youre stuck when something goes wrong or want to add a feature. Im all for abstracting messy code awway, but it should be code you wrote, or at leaste copied. I have 250 lines of code that uses no libraries except a font.h file written in arduino IDE stm32c6 (the low ram version) that sets up the BME sensor and calibrates it too your liking, weather (pun intended) you want to oversample temp/ humidity or preasure, or not which is critical for any power savings for a usable weaher station on batttery. Outputting to an oled display with a handsome font ,fittingon 32 kb or ram. I wonder how much ram this esp32 bloatware version cost us eh Andreas? ;) I kid, the register manipulation code is ugly, but kind of simple, and now you know where the data is and can interface it with whatever database you want. By the way i not a pro programmer, i just used chatgtps help to setup this sensor with minimal libraries and resources.

    • @jmr
      @jmr Місяць тому +4

      I liked JSON immediately but YAML sucked at first.

  • @osaether
    @osaether Місяць тому +1

    Very good video! I have been using ESPHome for a couple of years now but I still learned a lot from your video! Thanks!

  • @basgro
    @basgro Місяць тому +1

    Very nice creating this overview, to the point and sufficient depth. Thank you!

  • @Grrr2048
    @Grrr2048 Місяць тому +2

    As always, a good and informative video full of relevant info

  • @ws_stelzi79
    @ws_stelzi79 Місяць тому +6

    One thing with YAML is to understand the difference between declarative (= describing the end result and the system figures everything out) and imperative (= do this then do something else, ...) coding. Most coding was always done imperative and declarative is a fairly new thing.

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому

      I agree. Plus, ESPhome is a mixture of both...

  • @trentbrown3714
    @trentbrown3714 Місяць тому +3

    I have been avoiding ESPhome but after watching this video I see using ESPhome for HA projects in my future - thanks Andreas!

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Very good! Trying is a good concept. Then you still can decide not to use it.

    • @MrCWoodhouse
      @MrCWoodhouse Місяць тому

      I love the way you can make almost any appliance or gadget smart with a quickly built esphome node. Just need a relay or a motor to actuate. So many integrated components. It is amazing !

  • @asiw
    @asiw Місяць тому +3

    Wow, wow, wow. So informative and useful. Its amazing what you do.

  • @ei23de
    @ei23de Місяць тому +9

    There are various ways to write ESPHome sensors to a database such as InfluxDB, depending on what you want to do.
    - ESPHome + MQTT: ESPHome offers support for sending data to MQTT topics, so you can go the route completely without Home Assistant. The data could then be written to InfluxDB, for example, using your own program or Node-RED.
    - ESPHome + Home Assistant + Nodered: The Home Assistant add-on for Node-RED can capture specific sensor data and write it to the desired database using a database add-on such as InfluxDB.
    - Customize Home Assistant Recorder: There are ways to customize the recorder in Home Assistant so that certain values are written to the desired location, such as the Influx database.
    - Long-term sensor data in Home Assistant: If the data ends up in Home Assistant anyway, there is the option of writing long-term data to the Home Assistant database. It is not always necessary to use an Influx database for long-term data.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Thank you for your answer. Currently, I use Node-Red to post the data to influxDB (your 3rd proposal) and I once used influxDB for all HA data. After your comment, I looked again at this integration, and it seems you can now limit the sensor data written to influxDB. And maybe I could even have more than one bucket. That would solve my problem of having topic-specific buckets.

    • @ei23de
      @ei23de Місяць тому

      @AndreasSpiess Yes, it did so too. (Inspired by your videos) But unfortunately Influx1.8 is discontinued and migration to newer versions is complicated. So i switched to postgres as my main database, since there is a "postgres for everything" movement.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      @@ei23de I am also not happy with the "behavior" of the organization behind influx. For the moment, I try to stick with it because I did not want the effort for migration. Mabe, one day it anyway has to be done...

    • @ei23de
      @ei23de Місяць тому +1

      @@AndreasSpiess Kind of this is what they mean when they say "there is no free lunch", right?

  • @squelchstuff
    @squelchstuff Місяць тому +1

    I've been on the journey of learning ESPhome recently, and this video condenses much of what I've discovered. Thank you Andreas.
    A tip I learned recently concerning the use of LVGL and local displays, is to build a simulation environment using SDL2. It saves all of those flash writes whilst making small changes to layout and data formatting and can connect to live ESPhome. eg: I connect my sensors to ESPhome, and then fiddle with the display output on my PC simulation until I'm happy, and then flash the local display.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      So far I did not use LVGL. So thank you for the tip!

  • @ReneKnuvers74rk
    @ReneKnuvers74rk Місяць тому +12

    We are back at the first row!

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +6

      Yes! Some viewers wished it...

    • @AndreasDelleske
      @AndreasDelleske Місяць тому

      The first row had several thousand seats today!

  • @graemebrowne1463
    @graemebrowne1463 Місяць тому +1

    That was fantastic, you clearly explained the problems I was having.

  • @LimBo3500
    @LimBo3500 Місяць тому +1

    Perfect timing, after just setting up my Home Assistant to monitor and control my home, and now adding modules to support my filament storage, and humidity control.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Indeed a perfect example for ESPhome.

  • @XavierGr
    @XavierGr Місяць тому

    What a nice subject to cover after our discussion on your previous video about the lora mailbox notifier. Thank you for bringing attention to ESPhome.

  • @koeiekop1973
    @koeiekop1973 Місяць тому +2

    Thank you again, even after experimenting and quite some frustrations on the YAML code I got things working. This video still learned me a lot! And happy to see you use chat gpt for help as well. This tool makes programming so much easier!

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +2

      YAML is hard for many "conventional" programmers. I assume it is much easier for a guy not knowing how to program...

  • @sunhillman63
    @sunhillman63 Місяць тому +1

    Thanks Andreas for the video and for the good and helpful information - I will try it also and I guess your info will save a lot of experimental time on my side.

  • @jrioublanc
    @jrioublanc Місяць тому +1

    Thanks for this introduction on YAML, you triggered my interest.

  • @bgable7707
    @bgable7707 Місяць тому

    Long over due clear explaination of YAML which I still loathe!!! Wish I had this 4 years ago. JSON is easier for me to read and understand due to the open/close separation of items. Seeing how list, ie, arrays, and automation, decision branches, are created helps a lot!
    As always, you're clear and concise, and great to see an fellow DECcie still "Kicking it"

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому

      Indeed, some fellow DECies still kick while others are already dead. So let's enjoy the rest ;-)

  • @MarcelHuguenin
    @MarcelHuguenin Місяць тому

    Thanks Andreas, this was another very interesting video. I like the way you setup your videos. If I have a home project to do, I will definitely check back and let them guide me.

  • @SebaOPL
    @SebaOPL Місяць тому +1

    My daily driver for hobby projects is PlatformIO, but after seeing your video, I will give ESP-IDF with yaml a shot. Thanks for the new ideas!

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому +1

      For a quick project it is perfect! My last one: A wake-on-lan button in a different subnet with an ESP8266...

  • @gedgicat2063
    @gedgicat2063 Місяць тому

    A great video, that explains everything really really well. As a novice with esp32's in general you have massively increased my understanding. Especially thst red squiggly line don't always mean a syntax error in the code i've just pasted.. 😂.

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому +1

      Indeed, the best is really to hit "install"...

  • @FPol-if6bm
    @FPol-if6bm Місяць тому +1

    indeed, great thanks for this well explained guide. Even for using esphome for long time, you explained me the concept much better. That's what i really about your channel, the well explained concepts of various topcs.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Thank you for your kind words. giving a bit of structure to the things is one of the main goals of this channel.

  • @catalinalb1722
    @catalinalb1722 Місяць тому +2

    Exactly what I need a great clarification from the Master :) with the help of chatGPT I managed to setup a Victron UART reader for my solar system, Bedroom Air Qualtiy sensor running BME680 and MH Z17 CO2 sensor, and HX711 for weight scale. Thank you!

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      Cool projects! Indeed, ChatGPT became a regular "CoPilot" for me. Sometimes very helpful and in the worst case just a waste of a bit of time.

  • @WilliamVirkin
    @WilliamVirkin Місяць тому +1

    I really like you videos, thanks soooooo much for your content!!

  • @MikesTropicalTech
    @MikesTropicalTech Місяць тому +1

    Another super useful video! I had heard of ESPhome but didn't know its capabilities. I have a project idea for a stepper motor control that will raise and lower my window blinds and the Home Assistant instant integration made it an easy choice! As you say I'll still use Arduino/PlatformIO for things like my circuit board that drives the gas gauge in my converted electric Porsche based on the state of charge of the battery pack.

  • @dougbas3980
    @dougbas3980 Місяць тому +16

    Yes, I run home-assistant with esp-home. It is good but I am not a trusting sort. YAML is me calling other peoples code. I started programming in assembly language where nothing executed beside what you wrote. If you have a problem, it is your code that is causing it. As I progressed to C, C++, Python, and now YAML, not much of what is executing is code I wrote. It is a paradigm shift and a lesson in trust. And now I ask Claude AI to help me code and more trust required. I am an old dog having some problems learning new tricks, but alas, I am adjusting🤔 For sure this speeds up my results orders of magnitude in time. I watch the esp-home compile and ponder all the code I did not have to write

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +2

      I understand your point. Unfortunately, I do not trust myself because many of my programs contain errors;-) Also with Ardino IDE and ESP32 we run on other's code (libraries or Wi-Fi for example).
      Working in the industry with complex systems, my firm believe became that testing is the aproach, not understanding the code. Particularly not in programs with parallel execution. I always told people: "Assume that an untested system does not work".
      However, I wonder how this will be done with "AI automations" when the response on certain input can be different.

    • @dan-nutu
      @dan-nutu Місяць тому +2

      The whole "IoT" thing is layers upon layers of code written by God knows who/where/how. Testing can help with some assurance for functionality. Now think how much trust you can put in the security of these things. For me it felt similar to bungee jumping 😀

    • @dan-nutu
      @dan-nutu Місяць тому +1

      And I know you're going to say that you don't care who can see the temperature in your fridge Andreas :) The trouble is - you never know where people use the same devices/libraries/framework for something more important, and you find out when it's too late

    • @dougle03
      @dougle03 Місяць тому +3

      @@dan-nutu You can always review the component code that underpins the higher abstract layer ESPHome works on. The world runs on common libraries these days. With ESPHome, all of those are open source and thus available for inspection. Writing your own functions is entirely possible too.

    • @oscargr_
      @oscargr_ Місяць тому

      ​@@AndreasSpiessDo they really run in parallel though?
      Isn't it just you declare your components in parallel, but the compiler still calls an update function on each of the components you declare in YAML.
      I didn't quite get the use of lambda functions and scripts in ESP-Home. (And their difference)

  • @BerndFelsche
    @BerndFelsche Місяць тому +1

    Thanks for the primer.

  • @andresaksalu5189
    @andresaksalu5189 Місяць тому +1

    I have waited for this video on this channel for about a year 🙂 - to me the Arduino IDE is already painful today if you do not need the millisecond response from the chip. Having different chips and screens around house and ESPhome makes it easy to implement new ideas.
    Mentioning the easy implementation and immediate feedback from “system” is also to me an important feature when comparing ESPhome with Arduino IDE

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому

      Indeed, the speed of implementation is a good thing. Yesterday, I needed a Wake on LAN button in a different subnet. An ESP8266 and a few lines of YAML...

  • @Zigge
    @Zigge 29 днів тому

    Your video has expanded my understanding of ESPhome immensely as I am a noob in the HA world.
    If you feel comfortable with it, I would appreciate a video in which you expand on the methods for making sequential code in ESPhome. I see implementing this as bringing the best of both worlds together.

    • @AndreasSpiess
      @AndreasSpiess  24 дні тому

      I showed the principle (with consecutive actions), so I do not plan such a video. And as I said, Ask ChatGPT. It can help a lot.

  • @wjn777
    @wjn777 Місяць тому

    Great video, thank you for sharing. Definitely food for thought, I will try to use ESPHome more often. I've never seen a good example of running it standalone though, that is an interesting option

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому +1

      It should be easy: Omit api: and add for example MQTT for communication (if you need it).

  • @rudieo3113
    @rudieo3113 Місяць тому +4

    To have direct control and read out without HomeAssistant use the included webserver this can have a output window for log too.
    web_server:
    port: 80

  • @PhG1961
    @PhG1961 Місяць тому +1

    Very informative and usefull!

  • @CamiloSperberg
    @CamiloSperberg Місяць тому

    Nice to see this video from a perspective of somebody who never quite got to play with arduino ide and only knows esphome. I know this is surely not helping but I ditched my grafana + influxdb stack due to the added complexity it brought + extra maintenance time it required. To be very honest I have enough data I need from Home Assistant itself. That being said, very good video! Learned some stuff as well which I had no idea about :)

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Thank you for sharing your thoughts. Interesting to see that needs can be different. I interact much more with Grafana than with HA (things in HA are often automated).

  • @ezinatx
    @ezinatx Місяць тому

    Like the others commenting here, I found this to be an excellent resource. The comments add value too. Andreas Spiess made my day and earned 10 Attaboys. 🤩

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Indeed, in the comments of my videos usually is more content than in the video ;-)

  • @eduardocenteno3769
    @eduardocenteno3769 Місяць тому +1

    Another great video. EspHome is a very powerful tools.

  • @laurieinjapan
    @laurieinjapan Місяць тому +3

    ESPhome is a fantastic project! I have to agree with you that the documentation, while detailed, misses explaining some key concepts. It often talks about "platforms" and it took me quite a long time to realize platforms are analogous to components.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +2

      I treat "platforms" as containing the code, and "components" as the object containing code and other definitions. This helps me to understand lists, for example.

    • @oscargr_
      @oscargr_ Місяць тому +2

      So true, lots and lots of details, but not an overview of the basic concepts. (For a beginner to wrap his/her head around)
      This is the power of Andreas!!

  • @nzhillnet
    @nzhillnet 28 днів тому

    Great video Andreas. I run InfluxDb and Grafana in Home Assistant OS, with sensor data being fed in etc. If this is of interest I'm more than happy to knowledge share etc. All the best from New Zealand.

    • @AndreasSpiess
      @AndreasSpiess  24 дні тому

      Thank you! My question is very specific: How can I write the data of one sensor to one influxDB bucket and the data of another into a different bucket.

  • @Rainer_Landes
    @Rainer_Landes Місяць тому +1

    Thank you, Andreas! Perfect timing, and perfect "translation" from c++ concepts to yaml concepts ;-)
    One question though: What do I do, if my new sensor is not covered by the vast list of ESPhome sensors? It is connected by I2C and there exists working Arduino code for it. How do I turn this into a ESPhome device?

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому

      First, I would use a different sensor. And second, I probably would use C++. Third: Learn how to write an ESP32 component. Not impossible, but probably too much for just one sensor.

    • @Rainer_Landes
      @Rainer_Landes 29 днів тому

      @@AndreasSpiess thank you for your comment!

  • @tullgutten
    @tullgutten Місяць тому

    Thank you for this video. As a total noob and beginner to ESP and HA i can't get anything to work like i want 😅 especially since i don't even have HA yet

  • @ristomatti
    @ristomatti Місяць тому +3

    The declarative YAML stuff is also at the heart of what "DevOps" or "cloud engineers" do these days. It is in a way very powerful or expressive way to get a lot of done with "just a few lines". But on the contrast, it lacks a lot of convenient features developers have gotten used to with modern programming languages and IDE's such static analysis and autocomplete. In my experience there's typically 1:10 ratio of engineers that know their way around this in a typical project. These engineers often end up being the bottlenecks. In the worst case a "bus factor" of 1.
    MCU's are a very different topic as cloud engineering, but the principle here is the same. In essence, it's a GUI interface without the GUI. It might contain snippets of code/script but code it is not. I guess it is called "infrastructure as code" as it can be committed to version control with the rest of the code and also peer reviewed the same way. 😁

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      At least, autocomplete is built-in ESPhome. And the squiggles help to avoid obvious errors. But many more complex errors are only discovered during compilation. Maybe this will become better in the future, if the overall code is regularly checked, not only the few lines around where your write.

    • @michaels3003
      @michaels3003 Місяць тому +2

      Internet says ESPHome uses Python to generate C++ code that is then compiled.

    • @gungun974
      @gungun974 Місяць тому

      @@michaels3003 this is true, the ESPHome CLI is at the end a program written in Python that parse YAML files and decide to copy blob of c++ code in a directory to form a real project and than compile it for you.

  • @mikejones-vd3fg
    @mikejones-vd3fg Місяць тому

    I was skeptical Andreas, with my recent forray into bare metal programming with stm32 I have an unhealthy obsession with having to know exactly what the bits are doing and why and even fondle them as they move along their path, and these high level markup languages dont give me that fix. But i need to stop twiddling the bits and make something useful and this shoulld help, especially the easy wifi setup and integration into a control app. Thanks for introducing us to this.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      I am old, and therefore, time is valuable (it soon will run out). That is why I like such time-savers ;-)

  • @JulianKnight-IT
    @JulianKnight-IT Місяць тому

    You don't have to use ESPHome with Home Assistant, I use it directly with Node-RED And MQTT. Also, if using multiple devices, even of different types, one of the advantages of ESPHome is that you can split the YAML into components and then simply stich together the ones you want. So you get great reusability. ESPHome is the near enough the perfect balance between modularity and bespoke and I've used it now in preference to other ESP platforms for some years.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      I agree that splitting YAML (also in HA) is a good idea. And I thought I had mentioned that ESPhome can be used stand-alone and integrated with MQTT.

  • @g.s.3389
    @g.s.3389 Місяць тому +1

    great, i moved to esphome when i started to use homeassistant heavily, it is very easy to use and there iis nearly always someone that had your same problem and someone else helped to solve it.... :)

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      I agree. The community is already huge!

  • @anthonvanderneut
    @anthonvanderneut Місяць тому

    4:19 The YAML specification states that the order of keys in a mapping is undefined (this corresponds e.g. to the behaviour of dict in Python 2), even though of course there is an ordering in the YAML document. That you can move around keys (and their values) in documents providing ESP32 specification is a logical result of that.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      I agree with the definition. However, I never read it :-( Looking at the generated code helped me to understand it from the point of view of a "sequential" programmer...

    • @anthonvanderneut
      @anthonvanderneut Місяць тому

      @@AndreasSpiess Yes it is nice if you can get away with not reading the specs. I had to go over it multiple times for my Python library (ruamel.yaml) in which I wanted to be able keep the order of the keys (easier when you compare versions). And I still find things missed in the first few readings ...

  • @mkpears
    @mkpears Місяць тому +1

    an EXCELLENT video ! ...I have been wondering how to learn programming ESPHome for HomeAssistant, and have looked at the ESPHome website, but it really does not have a structured learning path, just examples of code for each sensor, ESP proce, etc... I am an old fart that programmed in FORTRAN many years ago, and was looking for a more detailed learning source, like also the C++ programming texts... while your video is VERY helpful in understanding, I still would like to find a good learning source... cheers !!

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому

      The next step is trying a few projects with the help of ChatGPT (not Gemini)...

    • @mkpears
      @mkpears 29 днів тому

      @@AndreasSpiess will try that, Thanks !!

  • @rklauco
    @rklauco Місяць тому +4

    Influx? In the integration for influxDB (the yaml) you can set which data is stored in influx - and as soon as such data is populated, it's sent to influx instance. No problem at all. The only thing is you have to have HA in the middle of it.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Thank you for the tip! So I have to investigate a bit more. I do not want to have only one database for all data. I want to separate them (weather, energy, for example).

    • @dan-nutu
      @dan-nutu Місяць тому

      I'd also be interested to find this (i.e. how to separate data sent to influxdb).

    • @Darkk6969
      @Darkk6969 Місяць тому

      I currently use influxDB and Grafana that is integrated into HA. I currently run HA as a VM and works pretty well. I already have a separate influxDB and Grafana VM for other uses.

    • @DanielFSmith
      @DanielFSmith Місяць тому

      I haven't looked at the Influx problem, but if I were starting out, I'd get HA's Node Red listening on the sensors, then process, and feed them in to the database.

  • @OldCurmudgeon3DP
    @OldCurmudgeon3DP Місяць тому +2

    Thanks for the video. Will an ESPHome device continue to run unaffected if it loses connection to HA? If not then that's another use case for the IDE (i.e. hvac, water heater).
    I've had my water heater on an ESP32 since '17 after I got tired of the mechanical system failing. I wrote code for an HVAC controller back then too but have yet to test it. My telescope mount is driven by IDE code as well. 🙂

    • @CamiloSperberg
      @CamiloSperberg Місяць тому +3

      Yeah all code runs locally. You won't be able to control it from ha for obvious reasons but all code that you write in esphome runs locally

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      If you omit the line "api:" you will have no HA connection. But you still have Wi-Fi or OTS, and can add MQTT

  • @koenvanduffel2084
    @koenvanduffel2084 Місяць тому

    Working with Home Assistant and ESPhome for like 2 years now i still don't find it easy to work with YAML. The whole concept in both is still misterious at times. Recapping those concepts well surely help, t thanks for that.

  • @MikeKranidis
    @MikeKranidis Місяць тому

    Perfect introduction. I found the esphome and yaml configuration very strange or confused to me, to be honest !

  • @ligius3
    @ligius3 Місяць тому

    You can use the mqtt component to publish to mqtt the values which will get picked up by influxdb. I think before the easy "homeassistant:" tag this is how it was done, many years ago, but I might confuse it with a different project.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Thank you. So far, I have never come across a direct input of mqtt into influxDB. Maybe they use a converter. I will have to investigate

  • @Steven_Bennett_YT
    @Steven_Bennett_YT Місяць тому

    How can one open the device dashboard shown at 7:39? I am running ESPHome from within Home Assistant running as a VM in VirtualBox, all on Win 11. Thank you

    • @efimovv
      @efimovv Місяць тому

      This is device in Homeassistant. Settings --> devices and integrations --> ESPhome --> some device.

  • @zeffster2
    @zeffster2 Місяць тому +5

    YAML is just a config data format. pure data. kinda like json or xml

    • @klassichd10
      @klassichd10 Місяць тому +1

      @zeffster2 I am always asking why yaml was created instead of using existing standards such as json.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      Writing JSON manually on one line is not easy for me. So I usually use a structure similar to YAML (Counting the {{}} is not easy for my old eyes).
      So the natural decision probably was: If you anyway need a sort of structure, why not omit the {{}}?
      As showed in the video, ESPhome YAML can contain also programming logic. So it is probably a mixture between both.

    • @klassichd10
      @klassichd10 Місяць тому

      @@AndreasSpiess my first programming language was Algol 60 using 'begin' and 'end' as structural elements. C uses {} as json does. And I have not to count spaces which was the source of the majority of errors when I started ESPHome. Anyway, it is as it is and at the end of the day ESPHome is faster than writing arduino C-code by myself

    • @regispriqueler8745
      @regispriqueler8745 Місяць тому

      @@AndreasSpiess json is not a programing language, YAML is not a language. Why always trying to reinvent the wheel ? All hat ESP home do could be done with library and an adhoc IDE, using C, C++, javascript or python. Using a data format to make code is absurd. And don't tell me it's easier for beginner just because not learning a real language is easier. What Home assistant have done is starting with creating a domotic system base you can managesd by configuring on the shelp component, but then they rapidly have been confronted to more complex logic and to keep a "simple" link between the graphical configuration interface and the scriptabale files they have put logic into configuration files. But it's confusing, annoying and quit cumbersome to write if you want complex logic to be implemented into Home Assistant. But as you conclude, it's the way to go if the project is adding relatively simple on the shelf components to our Home Assitant ecosystem.

  • @abboberg987
    @abboberg987 Місяць тому +3

    This video is not for me (i use ESPHome for a few years now), still i learned some: coding and routines in ESPHome.
    I use the ESP's with ESPHome as a sensor-device, including buzzer, BME280 and RGB-led. But all the 'automations' are done in HomeAssistant. (Just as you stated in the end of the video).
    But if you don't have HA, an ESP with ESPHome can work on its own. How nice.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      I share your concept of having the complexity inside HA. Still, some applications (particularly interactions) are probably better executed on the device itself (faster reaction, for example).

    • @LimBo3500
      @LimBo3500 Місяць тому

      I see devices as standalone that get parameters from HA.
      So it HA fails, the basic functionality still works.
      Eg thermostat.
      I'm the only "technerd" in the family and everything is setup so no basic (house) functionality is lost when I'm out of the country or otherwise occupied.
      I like this video because it gives me options to keep local logic without the need to go full Arduino.
      Thanks.

    • @dan-nutu
      @dan-nutu Місяць тому +1

      I sometimes need things to be taken care of even if the (Wi-Fi) connection to Home Assistant is temporarily not available, so for these cases I write the automations to run on the esp device running ESPHome (BTW Andreas, I think it would have been useful to drop a quick mention in the video that ESPHome works on both esp8266 and esp32 chips).
      Example: I have one esp8266 module that monitors the temperature sensors in my 19" rack and sets the PWM ratio for the cooling fans. I want the fans to work even if the connection to HA is temporarily down for whatever reason. So running the automations on the esp module allows me to do that, simply updating HA with the current values when the connection is reestablished.

  • @zyghom
    @zyghom Місяць тому

    I have tones of devices in ESPhome but also another tone of C++ ones. All depends what the usage is - for Home Assistant for sure ESPHome is much, much easier, unless it is very complicated device i.e. Hot Plate or so.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Thank you for sharing your experience. It will help others to decide.

  • @rudieo3113
    @rudieo3113 Місяць тому +1

    ESPhome works also fine on the Raspberry Pi Pico.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Thank you for the info. Where would you prefer it over an ESP32?

    • @rudieo3113
      @rudieo3113 Місяць тому

      @@AndreasSpiess When more i/o ports are needed, ESP32 have a number of GPIO which are restricted in use, example 34 and up are input only.

    • @rudieo3113
      @rudieo3113 Місяць тому

      have not a real preference for small projects. For real small projects as one or two sensors only the ESP 8266 prefers even.

  • @kirovoleg
    @kirovoleg Місяць тому

    For InfluxDB I have the esphome sensors send data to mqtt and then nodered takes it and sends to influx

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Currently, I use HA sensors (from the companion app) in Node-Red and do the same. So, I do not need MQTT. This is what I would like to avoid...

    • @kirovoleg
      @kirovoleg Місяць тому

      @AndreasSpiess then you may be able to use an http request directly on esphome to the Influxdb url. I use this on my raspberry pi but never tried it on esphome.

  • @YigalBZ
    @YigalBZ Місяць тому

    I am curious: the push button you used requires debounce. Is that generated automatically? Time control?

    • @efimovv
      @efimovv Місяць тому +1

      It controlled via separate options. In binary sensor component you have filters, like delayed_on: 100ms or delayed_off: 100ms (i.e. you must hold for 100ms ). You can even implement different actions on short and long press, double and triple clicks - via automations IIRC (I did implement double click long time ago)

  • @rickharold7884
    @rickharold7884 Місяць тому

    Super cool

  • @jerzyrzaniak4437
    @jerzyrzaniak4437 Місяць тому

    you're breaking my 'tasmota-lover' heart, esphome looks more technically elegant. BTW have you tried berry on Tasmota for these purposes?

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      No, I never used it. I tend to stick to one solution for a particular problem to save the initial time for learning :-(

  • @KingErasmos
    @KingErasmos 20 днів тому

    Yaml can seem difficult at first but it’s superior to JSON on the whole after you learn it.

    • @AndreasSpiess
      @AndreasSpiess  19 днів тому

      JSON is probably more made for machines with all the patentesis...

  • @Natepwnsu
    @Natepwnsu Місяць тому

    O man my petibro cat fountain has a mode that turns it on when the cat is in range if you have it set to battery mode which is the default setting when it's not plugged into the wall.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      It's the same here, with the exception that my PIR sensor also starts the pump when anyone else is within its range. That is what I want to omit.

  • @jmr
    @jmr Місяць тому

    I find sometimes order matters In YAML. The file seems to execute top to bottom and sometimes A must happen before B. Maybe not a problem with ESP Home but definitely an issue for the HA config file.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      I did not recognize it in ESPhome. But maybe it is also true here. But I only meant components in this respect. Inside components, the sequence can matter a lot.

  • @pperrinuk
    @pperrinuk Місяць тому

    Very interesting - It would be interesting to see you ask an AI to write the equivalent arduino studio code from your esphome code...
    In my experience people are massively underestimating the existing power of AI. With a good AI whisperer like me, things go amazingly fast.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      I also use ChatGPT for coding C++ and I agree, it is very helpful. Still, the differences stay more or less the same.

  • @MasterBoyZs
    @MasterBoyZs Місяць тому

    this very nice

  • @GunXter
    @GunXter Місяць тому +1

    Well for me as a programmer its a big difference: ESPHome you are just configuring existing program. ArduinoIDE YOU are making the program

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому +1

      And where does AI fit in? As a programmer, your boss or customer will ask you in the future to use these new tools to save time.
      He will call it "productivity increase" ;-)

  • @Nebbia_affaraccimiei
    @Nebbia_affaraccimiei Місяць тому +5

    what i hate about esphome is the lack of clear guidance and examples on what is supported and what not.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +4

      This frustration lead to this video ;-)

    • @Darkk6969
      @Darkk6969 Місяць тому

      Same here. I had to do alot of research to figure out how to get MQTT devices working properly in HA. Once I figured out the logic it's not too bad.

  • @TheRajeev7778
    @TheRajeev7778 Місяць тому

    Do we have a good source of YAML tutorial for beginners?

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Many of the typical HA channels have some sort of YAML tutorials for HA (e.g.
      Smart Home Junkie). UA-cam search should find them for you.

    • @TheRajeev7778
      @TheRajeev7778 Місяць тому

      @AndreasSpiess Thankyou

  • @bendunselman
    @bendunselman Місяць тому

    How much time per line of code did it take? How much time would it take in either IDE?

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      No idea. But the # of lines of code would probably be 10x more in C++. And do not forget the debugging and testing...

  • @bitosdelaplaya
    @bitosdelaplaya Місяць тому

    Thanks for this good video. What do you think about micropython on esp32 ???? I already use arduino ide, but for my work i need to program some app and i think about learning python (one language multiple platform : i'm not a big c++ fan). Thanks for your response

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      Micropython is also a language on a higher level. For me, it is replaced by ESPhome for most applications. Complex and fast things are done in C++ anyway.

    • @bitosdelaplaya
      @bitosdelaplaya Місяць тому

      @@AndreasSpiess Thanks

  • @ralfoide
    @ralfoide 7 днів тому

    *YAML is not a "programming language"* -- it's just a data model language, similar to XML or JSON. In this case, the YAML data format is just used to configure the ESPHome framework.
    The difference between something like ESPHome and an Arduino INO is that the former can only execute whatever components have already been defined in the ESPHome ecosystem.
    That said, a lot of Arduino users like Arduino because it's "simple" and they are not programmers. In that case, a simple configuration language like the one used by ESPHome is much better for these users -- they can just use the existing bricks, without having to build their own.

    • @AndreasSpiess
      @AndreasSpiess  2 дні тому

      It depends on your definition of "programming language". However, most "programmers" would agree.

  • @ifell3
    @ifell3 Місяць тому

    Wow, sounds great for the part time hobbiest. Wonder if the forums are full of people that will make you work to solve a question.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      The community is big already, and many solution are documented as entries there. If you do not find your problem discussed somewhere, you know: It will be hard ;-)

    • @dougle03
      @dougle03 Місяць тому +2

      Like all forums, ESPHome is not immune to idiots and superior complex people... I moderate the FB group and we generally mute or remove the worst offenders...

    • @ifell3
      @ifell3 Місяць тому

      @dougle03 never thought about looking at the groups on Facebook.

  • @kmtsvetanov
    @kmtsvetanov 29 днів тому

    Hello. Can you help me with ESPHome? How to work with SD? I wish to play a mp3 or wav file. I have media player and DAC and I can play music using Home Assistant but not from SD. I was looking for a solution for the past week 😢. I have esp32 and a SD board connected

    • @AndreasSpiess
      @AndreasSpiess  24 дні тому

      I would have to google, too to find an answer :-(

  • @222inverter
    @222inverter Місяць тому

    I use ESPHome in some of my sensors at home...but on one occasion a ESPHome update screwed up my Hot Water sensor???...I re-flashed with a clean install of ESPHome...configured it...still did not work??? I think that updates should be pointed out is a possible flaw in their process???? I ended up reflashing it in Arduino MQTT code....been working ever since.

    • @dougle03
      @dougle03 Місяць тому

      I generally don't update existing devices unless I'm making changes to the device... I would suggest not updating unless you really need to. If you do, then take the time to read the breaking changes carefully to understand the impacts of revision changes...

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +2

      I agree: MQTT is more standardized. And the ESPhome (fast) update policy is not always good ( mentioned that fact in my HA video).
      I would create an issue in the sensor project that the maintainer can correct it. It seems to be a classical bug.

  • @bendunselman
    @bendunselman Місяць тому

    How does it compare if you take Home Assistent and ChatGPT out of the comparison?

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      I think similar because I use ChatGPT also to write Arduino code...

  • @ezrakoper
    @ezrakoper Місяць тому

    How zigbee and ZHA which are native to home assistant fit in

  • @DaveSomething
    @DaveSomething Місяць тому

    that's pretty, I have to do it in CLI, using Nano... then I type: esphome run thingy.yaml. Sometimes I have to add the name to my hosts file so it can upload to the esp32 OTA. HA then grabs it.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      That is what I called "offline". A good way if your HA runs on a Raspberry Pi because compiling is usually much faster on a Desktop PC.

    • @DaveSomething
      @DaveSomething Місяць тому

      @AndreasSpiess I tried the other ways, but went back to core install.

  • @michaels3003
    @michaels3003 Місяць тому

    Internet says ESPHome uses Python to generate C++ code from YAML configuration files edited by the user. This is a very old idea, but not much used up to this point (I think).

    • @michaels3003
      @michaels3003 Місяць тому

      I meant code generation from configuration files, not from YAML specifically.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      AFAIK you are right!

  • @MrFlagstaf
    @MrFlagstaf Місяць тому

    hey andi! mini antwort im breite bärndütsch 😄 merci für dä abriib. also quasi es "deklerativs modäll" wome mit yaml files erstellt. gueti abstraktion vo esphome! mache itz ou no eine uf tüpflischisser... hesch gwüsst, yaml isch ke programiersprach 😂... uuhhh de muess me de aube grad korrigiere. aber weme z video luegt zeigsch ja genau dr ungerschiid vo programiere zu deklariere. aber houpsach me het öpis chönne "korrigiere" 🤪... mach witer mit tüftle, häb spass u aues guete🫡

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому

      Wenn wir ganz genau werden wollen gehen wir zum "Duden". Der schreibt:
      Programmiersprache: System von Wörtern und Symbolen, die zur Formulierung von Programmen (4) für die elektronische Datenverarbeitung verwendet werden. Jetzt bist du dran ;-)

  • @SamLaybriz
    @SamLaybriz Місяць тому

    I prefer personnaly Annex32 RDS and his mqtt commands, it runs on a esp8666/esp32 wich is programmable in basic via a web browser.😊

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      I never used it, so I cannot tell the difference :-(

  • @yoalmiravendano1569
    @yoalmiravendano1569 Місяць тому

    Hello Sir this comment is not related to the video, but I’m looking for some information, im trying to make a device wireless I’m normally send and receive data from it but I have issues with the cable is an usb device so I was thinking to add an ESP32 on the end of the device and another ESP32 to the computer, I don’t have much knowledge, being watching your videos I’m trying to learn so any answer will be appreciated

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому +1

      Maybe you start acquiring knowledge with a simple project and add more functionality with more knowledge? But it will take time :-(

  • @101jtag
    @101jtag Місяць тому

    Hassio cannot be run offline, right ? I dont trust the interweb, nor do i want to become dependent. So i need a fallback. I choose MQTT. So i prefer ESPEasy for my sensors.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      Home Assistant runs completely offline (except for getting the files and updates).

    • @efimovv
      @efimovv Місяць тому

      If you prefer you can install Homeaasistan as python app to wheel and run it directly from there. As well as ESPHome can be installed directly (I run it from my notebook).

  • @MSP_TechLab
    @MSP_TechLab Місяць тому

    This style of modern programming with something like app.run() inside the main loop makes me frustrating.
    I once spent more than half an hour trying to understand how nordics ble example with simle blink logic works.
    It appeared that particular led.on/off() function was buried five leves deep (if count from main).
    I still don't understand why on earth they need so much levels of abstraction on a such small device. 😢

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      Welcome to the new world. Somebody has to use the power of the new MCUs ;-)

  • @derickmachaa
    @derickmachaa Місяць тому +1

    I enjoyed the video, @AndreasSpiess do you use platform IO as an alternative for Arduino IDE?

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      I sometimes do, but not for videos. The Arduino IDE is more used by my viewers.

    • @derickmachaa
      @derickmachaa Місяць тому

      @@AndreasSpiess Thanks

  • @holgerschurig4430
    @holgerschurig4430 Місяць тому +2

    0:20 So if you understand YAML to be a programming language ... then there you have your error. YAML is a configuration language. Like TOML, Windows INI files etc. It is used to configure a program generator (this is what ESPHome actually is). But it isn't really a programming language in itself.

  • @ralfjahns3777
    @ralfjahns3777 Місяць тому +3

    YAML is a markup language and therefore totally inappropriate for programming (sequences, loops, branching). So it fits well for describing the properties of a sensor but fails when it comes to automation (for example).

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +6

      I think, ESPhome found a good compromise with the "common actions" and with the "lambda code"

  • @PersonXes
    @PersonXes Місяць тому

    When you talk about using Home Assistant instead of Node Red, I guess you're not referring to automations, but all the rest.
    There's a lot of information coming from my esphome devices to home assistant, that I use in node red automations

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      I already started to transfer some of the simple automations to HA because then it is in one place. The more complex flows are still in Node-Red and I heavily use the interaction between the two.

    • @PersonXes
      @PersonXes Місяць тому +2

      @AndreasSpiess my reasoning is the opposite of yours: I don't transfer any automations from node red to Home Assistant, as otherwise I have my automations in two places which will confuse me when I need to start digging 😊

    • @dougle03
      @dougle03 Місяць тому

      @@PersonXes All of my automations are in NodeRed... Automations in HA 5 years ago were terribly limited, thus NR was prefered. HA automations today are better, but I'm sticking with what I know and the flexibility NR offers still leaves HA in the dust..
      I have elements in NodeRed that are not possible to get into HA natively, thus it is the better place for automation.

    • @PersonXes
      @PersonXes Місяць тому

      @dougle03 I'm in exactly the same situation as you 😉

  • @menhirmike
    @menhirmike Місяць тому +4

    As a longtime software engineer, let me say that it’s okay that you didn’t like YAML. I don’t know anyone that actually _likes_ it, we just learned to deal with, like Stockholm Syndrome.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      :-))

    • @pcfreak1992
      @pcfreak1992 Місяць тому

      Liking is a strong word. I *prefer* it though 😅

    • @neithere
      @neithere 10 днів тому

      YAML is a very good and readable language. It's just too complex and the early versions had a few stupid decisions ("on" being interpreted as a bool, etc). We need a subset of it (not JSON but a readable one). Unfortunately TOML has appeared to fill this niche and it's basically all the worst traits of YAML and ini-files combined...

  • @Doping1234
    @Doping1234 Місяць тому

    I wrote a component for ESPhome (though not merged). The project is awesome, but yaml code is horrible to look at and it is not beginner friendly.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      Cool! I have no clue how to write a component. So I am thankful for all of you doing this work!

    • @Doping1234
      @Doping1234 Місяць тому

      @@AndreasSpiess Well I don't really know either, I took a similar component and adjusted the code :D

  • @murraymadness4674
    @murraymadness4674 Місяць тому

    How would you save data to a SDcard in YAML, and make it write in a circular buffer, so only saving the latest data. It only works for an ESP32 ? Isn't that rather limited? Being an old salt, I can't stand having to learn new gizmo languages just to do what I already can do. I know I should learn python, but I just can't.
    I discovered uLisp (being an old Lisp guy) and it actually runs on all the micros that have enough memory. But frankly C does the job for small apps.
    In fact, I hate C++ when C is just fine for a tiny micro, I just rewrote the only actually working RTSP code for arduino I could find, and what a mess of C++ it was, crudely adapted to arduino. Now its a single arduino ino file you just load and compile in the ide, no libraries, it just works now.

    • @dougle03
      @dougle03 Місяць тому

      ESP32 can interface with SD storage, there is example code in the ESPHome docs on how to do this. I'd recommend against rapid writes to flash media as they don't last long if constantly being written to. Might be better to use MQTT and have the data off loaded to a more appropriate storage device. You can still locally store latest data for on-chip logic of course...

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      The idea of ESPhome is to create connected devices. This is why I do not use SD cards anymore. I transfer the readings to a more capable device for future use. So I do not know.

  • @quarteratom
    @quarteratom Місяць тому

    This is not "programming". This is just configuring a library with a configuration file.
    Indentation is tabs BTW, not spaces.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому +1

      Definitions from Oxford Languages: Programming: the process or activity of writing computer programs. You decide.
      And YAML does not work with tabs :-(

    • @quarteratom
      @quarteratom 27 днів тому

      @@AndreasSpiess That's the stu,pidest thing I heard since Go messed up K&R style curly braces. Developers, who limit everyone else just because they like one style of syntax, are bad.

  • @calvinbrowne2126
    @calvinbrowne2126 Місяць тому

    Biggest problem I've yet to figure out with esphome is how to do things that require deep sleep.

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      I played around with deep sleep, and it worked. However, I did not take any measurements (e.g., how long it takes to wake up).

    • @calvinbrowne2126
      @calvinbrowne2126 Місяць тому

      @AndreasSpiess I must revisit....

    • @AndreasSpiess
      @AndreasSpiess  Місяць тому

      @@calvinbrowne2126 It did not make it into the video (it was already too long ;-)

  • @ThomasHaberkorn
    @ThomasHaberkorn Місяць тому

    ProgramIO in VS code

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому

      Did I say that? Then it was definitively wrong :-(

  • @edmilinski1295
    @edmilinski1295 Місяць тому

    It's silly to compare c++ with yaml. These technologies help us achieve completely different things. You could also compare it with Microsoft word...

    • @AndreasSpiess
      @AndreasSpiess  29 днів тому

      Where are the "completely different things". Both create a device that does what I want (if I am happy). Just two different roads or vehicles, perfect for a comparison in my view.

  • @denverbraughler3948
    @denverbraughler3948 Місяць тому +1

    * indentation.