home.social

#espidf — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #espidf, aggregated by home.social.

fetched live
  1. Поилка для кота из мусора с MQTT, Home Assistant и ESP8266

    Почти умная поилка для кошки с MQTT, Home Assistant и ESP8266. Эта короткая статья посвящена реализации умной поилка за нормальные деньги. Думаем, думаем

    habr.com/ru/articles/1064112/

    #esp8266 #homeassistant #iot #freertos #embedded #espidf #mqtt

  2. @penguin42 OK, whilst I really would like working gcc with gnu99 on my mac, my main use case is one bit of code that can be changed not to use nested functions, and hence use Mac gcc/clang.

    Next step, and also weird

    I am using make (old school), and it cannot see idf.py. It used to. It is in my path or whatever from command line so how the hell can it not be seen by Makefile. Arg!!!!

    #ESP #ESPIDF

  3. ВВОД В СИСТЕМУ «УМНЫЙ ДОМ» МОДУЛЯ GSM

    Данная статья является продолжением публикаций про созданную мною систему "Умный дом" на основе проводного интерфейса CAN. Также предлагаемый проект может быть использован для разработки каких то других пользовательских программ, так как оформлен в виде задачи (Task) в FreeRTOS. Программа написана на языке программирования C/C++ в среде программирования ESP-IDFv5.

    habr.com/ru/articles/1056968/

    #modem_GSM #smart_house #esp32 #espidf

  4. УМНЫЙ К1 — контроллер на базе ESP32 с REST, syslog и много опенсорса

    Предисловие Возможно то, про что я хочу рассказать в своей первой статье тут, покажется не новым, уже знакомым велосипедом. Речь пойдет о контроллерах на базе ESP32 и программном обеспечении. Да, современных решений, открытых и бесплатных – много. А сейчас зарождается еще одно (а опенсорса мало не бывает, я считаю). В статье я упущу и не буду рассказывать ни про свое знакомство с ардуиной, esp, php, python, js ни про то, что пришел сюда давным-давно гуманитарием. И да простят мой, вероятно не корректный, «жаргон» истинные профессионалы в микроэлектронике и программировании - итак, приступим. Совсем недавно я отключил RPI4 с HA и наконец «воткнул» в котельную очередную, но «готовую к деплою» версию контроллера (разрешите его далее называть «УМНЫЙ К1», спасибо).

    habr.com/ru/articles/1053764/

    #esp32 #rest_api #espidf #tauri #javascript #vuejs #vite #rust #умныйдом #видеонаблюдение

  5. Anyone any experience of #ESP32 ethernet? Using ESP IDF C code.

    I have an SPI MAC+PHY Ethernet on #ESP32S3 which is working great.

    But is *not* doing any IPv6, which makes no sense. All the documentation suggests it should just work, and I am calling esp_netif_create_ip6_linklocal even, and one is allocated (and answers ND).

    #ESPIDF

  6. This week in my #smarthome microcontroller misadventures: the more I work with #espidf's #zigbee stack, the more I understand why #esphome exists. Had to write multiple hundreds of lines of device capability config code yesterday that could've very easily been a rather short json file.
    Now if only esphome's zigbee support covered a bit more than the simplest use cases...

    #embedded #esp32 #programming #homeassistant

  7. So today I have to figure out why @kicad v10 is instantly crashing… I’ll work on it a bit before reporting.

    But I also have some of my C code randomly crashing, so it is going to be valgrind sort of day.

    And #ESPIDF v6 refuses to work either, with some python crash. I hate Python.

    Fun day ahead.

  8. Управляем питанием по-взрослому: конечный автомат для устройств с батарейным питанием

    В embedded-проектах с батарейным питанием управление энергопотреблением часто сводят к нескольким вызовам sleep() и проверке кнопки включения. Пока устройство простое — этого хватает. Но как только появляется аккумулятор, зарядка, дисплей, кнопка питания и требования к пользовательскому поведению, такой подход начинает разваливаться. Типичные ситуации, с которыми сталкиваются на практике: ● устройство выключено, но подключили зарядку — что должно происходить? ● зарядка идёт, пользователь нажал кнопку — включаться или нет? ● батарея критически разряжена — как корректно отказать во включении? ● устройство долго не используется — когда и как его выключать? ● контроллер питания подал питание сам по себе — это включение или ошибка? устройство вышло из Deep Sleep — это пробуждение или «холодный старт»?

    habr.com/ru/articles/986116/

    #DIY #espidf #esp32 #батарейное_питание

  9. ПРОГРАММА КОНТРОЛЛЕРА СЕТИ CAN

    Продолжаю публикацию статей по структуре "Умный дом" на основе локальной сети CAN. В этой статье описывается программа, которая записывается в каждый контроллер локальной сети. Программа написана любителем, не профессионалом, поэтому за ошибки прошу не судить строго. К тому же сам признаю, что стиль написания программы несколько устарел, но переучиваться не хочется да и поздно. В общем «не стреляйте в музыканта, он играет как может» . Попытался поместить исходный текст программы в статью, но понял что это невозможно из-за большого количества строк программы. Поэтому программу выложил в своем репозитории на github: github.com/OldIngineer/MySmart . И попытался кратко описать основные моменты программы.

    habr.com/ru/articles/982958/

    #can_bus #esp32 #mqtt #espidf #smart_home #program

  10. Ищем ошибку в работе WiFi у платы ESP32-C3 SuperMini

    Статья о небольшой эпопее с поиском ошибки в работе WiFi на плате ESP32-C3 SuperMini, с которой пришлось разбираться в процессе отладки кода прошивки для контроллера батареи АКБ ( О контроллере батареи ИБП (вопрос к читателям Хабра) и О контроллере батареи ИБП (часть 2) ). Симптоматика проблемы с WiFi следующая: после включения питания и начала авторизации по WiFi плата ESP32-C3 SuperMini через какое-то время зависает, вплоть до срабатывания сторожевого таймера. Поиск решения проблемы в интернете не помог, но было замечено, что в эти моменты на плате очень сильно нагревается стабилизатор напряжения 3.3V, да так, что даже рука не терпит, тогда как при работе тестовых примеров (где WiFi работает нормально) такого эффекта не наблюдается. Из-за этого решил копать именно в этом направлении.

    habr.com/ru/companies/beget/ar

    #ESP32C3 #ESP32C3_SuperMini #WiFi #отладка #ошибки #espidf

  11. With ESP-IDF, I created a custom flash partition table and stored the video streams in their own partitions. The app is under 300 KB, and it compiles, links, and flashes in 12 seconds.

    Arduino can do custom partition tables. Maybe it can do custom workflow to build the filesystem images too. It would still take over a minute to compile, though.

    🧵 12/N

    #SoulCage #Arduino #ESP32 #ESPIDF

  12. I am moving the Soul Cage's firmware from Arduino to ESP-IDF. Arduino is completely unusable for developing this app.

    I just measured a compile and upload time of 4:33. Four and a half minutes. That's 1:20 to compile and link, 0:49 of mysterious "indexing", and 2:24 to flash. Yeah, it's a huge image, about 15 MB.

    What's it doing with 1:20 compile time? This is an 8 core CPU; that's about 2 trillion cycles.

    🧵 11/N

    #SoulCage #Arduino #ESP32 #ESPIDF

  13. **ESPHome update 2025.08.02: This little maneuvre will cost you … several days.**

    (blog post)

    TL;DR

    Changing the ESPHome framework from Arduino to ESP-IDF is far from trivial. Don’t attempt it at home, if you’re a Home Assistant / ESPHome hobbyist with a poor C++ knowledge.

    Read on…

    After the last update of ESPHome, some of my compiled firmware images for my ESP32 boards suddenly became too big to fit in their memory. They said that Arduino libraries became too big and bloated. Yelp, I can’t update them anymore!

    They (ESPHome developers) said we should switch from Arduion framework to ESP-IDF anyways, because it’s smaller, optimized and closer to the metal.

    They said only a small change in esp configuration yaml is needed:

    esp32:  board: esp32dev  framework:    type: arduino # <-- change to esp-idf

    And that’s almost1 it!

    You wish.

    I changed the framework as described above (for one non-critical ESPCam).

    I got compile errors (for my lambda functions). But wait, they said everything will work the same, no, even better!

    But it looks like there are some differences between Arduino and ESP-IDF framework. For example, there is no String() in esp-idf! Isn’t that a … basic?

    Ok, I surrendered and changed my lambda function that returned uptime in human readable format from:

    - platform: uptime    name: ${devicename} Uptime in Days    id: uptime_sensor_days    update_interval: 60s    on_raw_value:      then:        - text_sensor.template.publish:            id: uptime_human            state: !lambda |-              int seconds = round(id(uptime_sensor_days).raw_state);              int days = seconds / (24 * 3600);              seconds = seconds % (24 * 3600);              int hours = seconds / 3600;              seconds = seconds % 3600;              int minutes = seconds /  60;              seconds = seconds % 60;              return (                (days ? String(days) + "d " : "") +                (hours ? String(hours) + "h " : "") +                (minutes ? String(minutes) + "m " : "") +                (String(seconds) + "s")              ).c_str();

    Changed the last bold bit (return…) that caused compile errors to:

    ...std::string result;              if (days)    result += std::to_string(days) + "d ";              if (hours)   result += std::to_string(hours) + "h ";              if (minutes) result += std::to_string(minutes) + "m ";              result += std::to_string(seconds) + "s";              return result;

    And then it compiled ok.

    It also linked ok and uploaded firmware to my ESPCam.

    Ping to my ESPCam worked, but sensors (camera web server, uptime, led switch,…) were unavailable.

    ESPHome log returned only the following info:

    changed lambda. log returns: Uploading: [============================================================] 100% Done... INFO Upload took 6.12 seconds, waiting for result... INFO OTA successful INFO Successfully uploaded program. INFO Starting log output from 192.168.0.15 using esphome API INFO Successfully resolved esp32-cam01 @ 192.168.0.15 in 0.000s INFO Trying to connect to esp32-cam01 @ 192.168.0.15 in the background INFO Successfully resolved esp32-cam01 @ 192.168.0.15 in 0.000s INFO Successfully resolved esp32-cam01 @ 192.168.0.15 in 0.001s INFO Successfully resolved esp32-cam01 @ 192.168.0.15 in 0.000s INFO Successfully resolved esp32-cam01 @ 192.168.0.15 in 0.000s INFO Successfully resolved esp32-cam01 @ 192.168.0.15 in 0.000s

    The connection to ESPCam looks ok.

    But it wouldn’t connect to ESPHome API:

    WARNING Can't connect to ESPHome API for esp32-cam01 @ 192.168.0.15: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.0.15', port=6053))]: [Errno 111] Connect call failed ('192.168.0.15', 6053) (SocketAPIError)

    I really wasn’t in the mood to research what went wrong and which part of my ESPCam configuration code is not compatible with ESP-IDF.

    So I ditched esp-idf framework, reverted it back to arduino, recompiled, uploaded and my espcam works again.

    Yes, I’ve searched for possible solutions2, but couldn’t find any that I could use.

    My other ESP32 board (the one that has suddenly too big firmware after ESPHome update) will obviously stay in un-updated state for the rest of it’s life. I don’t wan’t to deal with breaking changes, modifying the code, re-learning C++ just to make it work again.

    And this little maneuver caused me few days. Don’t go the same path.

    Or, if the framework change works for you, please let me know.

    Or, maybe I’ll try again when the issues3 are resolved.

    1. Official guide says: … Component Compatibility: Some components may need to be replaced with ESP-IDF compatible alternatives (<— WHICH ONES???)
      Library Differences: Arduino-specific libraries won’t be available (<— WHICH ONES???) ↩︎
    2. Of course I checked the official guide: https://esphome.io/guides/esp32_arduino_to_idf/. When I read I should go to their Discord for help, I just gave up. ↩︎
    3. https://github.com/esphome/esphome/issues ↩︎

    https://blog.rozman.info/esphome-update-2025-08-02-this-little-maneuvre-will-cost-you-several-days/

    #arduino #espIdf #espcam #ESPHome #homeassistant #lambda

  14. Of course, you are free to use any #dev environment you want, but you will likely have to roll the networked access yourself. 😅
    I'm looking into #arduino, #espidf and #esphome support at the minimum. Any other #software #support you would like to see?

  15. Turns out that a short sidequest into #embedded dev is a good way of getting more hands on understanding of pointers.

    At least as long as you avoid #arduino's software ecosystem. I worked with Arduino for years and I don't think I had to ever use a pointer, meanwhile #espidf basically forces you to understand them if you want to get anything done.

    #programming #coding #esp32

  16. Arg, tinyusb_msc_sdmmc #ESPIDF

    So has callbacks for mount/unmount, and naturally I assumed this was when host computer mounts/unmounts the SD.

    No, it is not, it is that when not mounted by USB host, tinyusb mounts locally for you, and unmounts when USB mounts the SD card, to avoid clash.

    Except it does not start mounted. It mounts when USB disconnects. This is bad if USB charger not host, as starts unmounted. It can't be mounted before starting tinyusb either as it then tries to mount...

  17. Kennt sich jemand mit C++ im Bereich Lowlevel im Zusammenhang mit esp-idf insbesondere rmt für #esphome aus?
    Ich würde gerne ein Projekt auf den aktuellen Esphome Stand bringen, damit es auch wieder kompillierbar ist. Ich verzweifel an RMT und könnte da Hilfe brauchen.

    Gerne teilen und sich bei mir melden.

    #programmieren #cpp #esp #esp32 #espidf #diy #elektronik

  18. Программирование ESP32 с ESP-IDF в среде platformio #3

    Привет, Хабр! Это четвертая статья из цикла по ESP-IDF. Как и обещал, сегодня мы рассмотрим мьютексы и семафоры на простых (и не очень) примерах.

    habr.com/ru/articles/923128/

    #esp #espidf

  19. Unit testing in ESP-IDF is probably the least developer-friendly thing in the world. Frustrating evening!

  20. Программирование ESP32 с ESP-IDF в среде platformio #2

    Привет, Хабр! Это третья статья из цикла по ESP-IDF. Ранее мы разобрали стек задач, работу с GPIO и прерывания. Теперь перейдём к очередям FreeRTOS — мощному инструменту для безопасного обмена данными между ISR и задачами. Поехали!

    habr.com/ru/articles/920636/

    #esp32 #espidf

  21. Программирование ESP32 с ESP-IDF в среде platformio #1

    Привет, Хабр! Это уже вторая статья из цикла по программированию ESP32 с использованием фреймворка ESP-IDF. В #0 статье мы познакомились с общей терминологией RTOS и написали парочку задач (Task). В этой статье, как я и обещал, мы поработаем с с GPIO, ISR и поговорим немного о стеке (спасибо за совет @0x6b73ca )

    habr.com/ru/articles/919362/

    #esp32 #espidf

  22. Программирование ESP32 с ESP-IDF в среде platformio #0

    Привет хабр! Совсем недавно мне в руки попала плата ESP32 (NodeMCU‑32S). Ранее я уже работал с ESP8266 и даже создавал на ней простейшее веб‑приложение в режиме Station. Делал я все это в ArduinoIDE и был рад обнаружить расширение, которое позволяло организовать мой проект (да и просто в VSCode удобнее работать) - PlatformIO . Именно в PlatformIO я в первый раз увидел фреймворк ESP-IDF и начал потихоньку углубляться в эту тему.

    habr.com/ru/articles/918434/

    #esp32 #espidf

  23. Week 1025 - scanning and planning

    @amcewen tidies up the move to a newer version of #ESPIDF; @defnetmedia looks at a website refresh; @huffeec does some #3Dscanning and some rather sweet #3Dprinting and #LED work as we look towards this week's #OHS2025

    mcqn.com/posts/week-1025-scann

    #weeknotes