{"id":8855,"date":"2026-08-26T08:10:00","date_gmt":"2026-08-26T06:10:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/?p=8855"},"modified":"2026-09-24T23:33:30","modified_gmt":"2026-09-24T21:33:30","slug":"esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/","title":{"rendered":"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors"},"content":{"rendered":"\r\n<h2 class=\"wp-block-heading\">ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Commercially available indoor air quality monitors frequently rely on proprietary cloud ecosystems, introducing latency, security vulnerabilities, and dependency on external servers. Designing custom environmental sensors using ESP32 microcontrollers and ESPHome enables complete local autonomy, sub-second telemetry, and direct integration into Home Assistant. Combining true Non-Dispersive Infrared (NDIR) CO2 sensors like the Sensirion SCD40 or SCD30 with Volatile Organic Compound (VOC) and precision temperature\/humidity modules delivers laboratory-grade environmental monitoring entirely confined within an isolated local VLAN.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">1. Hardware Architecture and I2C Bus Design<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Precision indoor air monitoring requires selecting sensors that measure physical gas concentrations rather than relying on mathematical approximations from cheap heated-metal oxide alternatives. Connecting multiple sensors over a shared I2C bus requires correct pull-up resistor sizing and strict voltage regulation:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Sensirion SCD40 \/ SCD30 (CO2):<\/strong> Operating on the NDIR photoacoustic or optical measurement principle, these modules measure true carbon dioxide concentrations between 400 ppm and 5000 ppm with high accuracy and low drift.<\/li>\r\n\r\n\r\n\r\n<li><strong>VOC &amp; Thermohygrometer Modules:<\/strong> Integrating secondary sensors such as the Bosch BME680 or Sensirion SGP40 alongside an SHT40 allows measuring Volatile Organic Compound indices and temperature-compensated relative humidity on the same 3.3 V I2C data lines (SDA\/SCL).<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"lw-diagram\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/hand-esphome-en.png\" width=\"1120\" height=\"700\" alt=\"Wiring sketch: ESP32 connected over I2C to an SCD40 sensor, whose three readings go to Home Assistant over an encrypted local link\">\n<figcaption>The whole device is two wires and a config file. What it measures goes straight into the local instance over an encrypted link \u2014 nothing takes a detour past a manufacturer.<\/figcaption>\n<\/figure>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">2. Firmware Implementation via ESPHome YAML<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">ESPHome compiles clean, highly optimized C++ firmware from structured YAML configuration files. Implementing automatic calibration routines\u2014such as Automatic Self-Calibration (ASC) for NDIR sensors\u2014ensures long-term baseline stability without manual intervention.<\/p>\r\n\r\n\r\n<figure style=\"--cbb-digits:2\" class=\"cbb cbb--wrap cbb--numbers wp-block-code-beautifier-block-code\" data-lang=\"yaml\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">YAML<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" data-cbb-done=\"Copied\" data-cbb-failed=\"Press Ctrl+C to copy\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\" aria-live=\"polite\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\"><code class=\"cbb-code language-yaml\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-comment\"># Example: ESPHome configuration for an ESP32 with SCD40 CO2 and environmental sensing<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">esphome<\/span>:\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-attr\">name<\/span>: <span class=\"cbb-string\">\"env-monitor-office\"<\/span>\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-attr\">platform<\/span>: ESP32\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-attr\">board<\/span>: esp32dev\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">wifi<\/span>:\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-attr\">ssid<\/span>: <span class=\"cbb-string\">\"IoT_VLAN_20\"<\/span>\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-attr\">password<\/span>: <span class=\"cbb-string\">\"StrongVLANPasswordHere\"<\/span>\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">api<\/span>:\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-attr\">encryption<\/span>:\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-attr\">key<\/span>: <span class=\"cbb-string\">\"32CharacterBase64EncodedKey=====\"<\/span>\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">i2c<\/span>:\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-attr\">sda<\/span>: GPIO21\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-attr\">scl<\/span>: GPIO22\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-attr\">scan<\/span>: <span class=\"cbb-constant\">true<\/span>\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-attr\">frequency<\/span>: 100kHz\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">sensor<\/span>:\n<\/span><span class=\"cbb-line\">  <span class=\"cbb-operator\">-<\/span> <span class=\"cbb-attr\">platform<\/span>: scd4x\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-attr\">co2<\/span>:\n<\/span><span class=\"cbb-line\">      <span class=\"cbb-attr\">name<\/span>: <span class=\"cbb-string\">\"Office CO2\"<\/span>\n<\/span><span class=\"cbb-line\">      <span class=\"cbb-attr\">accuracy_decimals<\/span>: <span class=\"cbb-number\">0<\/span>\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-attr\">temperature<\/span>:\n<\/span><span class=\"cbb-line\">      <span class=\"cbb-attr\">name<\/span>: <span class=\"cbb-string\">\"Office Temperature\"<\/span>\n<\/span><span class=\"cbb-line\">      <span class=\"cbb-attr\">accuracy_decimals<\/span>: <span class=\"cbb-number\">1<\/span>\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-attr\">humidity<\/span>:\n<\/span><span class=\"cbb-line\">      <span class=\"cbb-attr\">name<\/span>: <span class=\"cbb-string\">\"Office Humidity\"<\/span>\n<\/span><span class=\"cbb-line\">      <span class=\"cbb-attr\">accuracy_decimals<\/span>: <span class=\"cbb-number\">1<\/span>\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-attr\">update_interval<\/span>: 30s\n<\/span><span class=\"cbb-line\">    <span class=\"cbb-attr\">automatic_self_calibration<\/span>: <span class=\"cbb-constant\">true<\/span><\/span><\/code><\/pre><\/figure>\r\n\r\n\r\n<h2 class=\"wp-block-heading\">3. Local VLAN Isolation and Native Home Assistant API<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">For maximum network security, DIY ESP32 sensors should reside within a dedicated IoT Virtual Local Area Network (VLAN) without outbound internet routing permissions. Communication with Home Assistant is handled over the local native ESPHome API (TCP port 6053), which uses Noise Protocol encryption. This architecture prevents external data exfiltration while delivering instantaneous sensor state updates for HVAC automation, mechanical ventilation control, and window-opening notifications.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Summary<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Building custom environmental monitors using ESP32 microcontrollers, Sensirion SCD40 NDIR sensors, and ESPHome eliminates cloud dependencies and proprietary data silos. Deploying these sensors within an isolated local VLAN and connecting them via the encrypted native Home Assistant API ensures laboratory-grade telemetry, maximum privacy, and absolute operational reliability.<\/p>\r\n\n\n<div class=\"lw-faq\">\n<h2>Questions and answers<\/h2>\n\n<h3>With outbound traffic blocked on an isolated IoT VLAN, how do ESPHome devices receive firmware updates?<\/h3>\n<p>From inside the network, which is one of the quieter advantages of this setup: the firmware is compiled locally and delivered over the air, usually from the same machine that runs the automation. The device never needs the internet, either at build time or at flash time. Only the toolchain does, when it downloads the framework and libraries, and that happens on the machine doing the compiling rather than on the device.<\/p>\n<p>What the firewall does have to allow is the path from the automation host to the device on the update port, and back. A rule that blocks the sensor VLAN from initiating connections is fine; a rule that also blocks the automation host from reaching into it leaves the devices unreachable for updates and, incidentally, for the encrypted API as well.<\/p>\n<p>Two things are worth setting before the first device goes on the wall rather than after: the update password, which is not enabled by default in every configuration, and a stable hostname per device. Retrieving a device that has changed its address and has no working name resolution can mean a cable and a laptop, which is exactly the situation the wireless update path was meant to avoid.<\/p>\n<\/div>\n\n<div class=\"lw-quellen\">\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/esphome.io\/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">ESPHome documentation<\/a><\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Technical guide on building cloud-free environmental sensors: integrating ESP32, Sensirion SCD40 CO2 NDIR modules, and ESPHome over local VLAN into Home Assistant.<\/p>\n","protected":false},"author":1,"featured_media":14115,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[91591,91365,91374,91626,91324],"class_list":["post-8855","post","type-post","status-publish","format-standard","hentry","category-smart-home","tag-esphome","tag-home-assistant","tag-iot","tag-smart-home-de","tag-vlan"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors | Lukas Wojcik<\/title>\n<meta name=\"description\" content=\"Build ESP32 environmental sensors with ESPHome: I2C, SCD40, YAML configuration and local Home Assistant connectivity across VLANs.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors | Lukas Wojcik\" \/>\n<meta property=\"og:description\" content=\"Build ESP32 environmental sensors with ESPHome: I2C, SCD40, YAML configuration and local Home Assistant connectivity across VLANs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-26T06:10:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-24T21:33:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-8855-esphome-esp32-cloud-free-environment-g.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors\",\"datePublished\":\"2026-08-26T06:10:00+00:00\",\"dateModified\":\"2026-09-24T21:33:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/\"},\"wordCount\":618,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-8855-esphome-esp32-cloud-free-environment-g.png\",\"keywords\":[\"ESPHome\",\"Home Assistant\",\"IoT\",\"Smart Home\",\"VLAN\"],\"articleSection\":[\"Smart Home\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/\",\"name\":\"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors | Lukas Wojcik\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-8855-esphome-esp32-cloud-free-environment-g.png\",\"datePublished\":\"2026-08-26T06:10:00+00:00\",\"dateModified\":\"2026-09-24T21:33:30+00:00\",\"description\":\"Build ESP32 environmental sensors with ESPHome: I2C, SCD40, YAML configuration and local Home Assistant connectivity across VLANs.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-8855-esphome-esp32-cloud-free-environment-g.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-8855-esphome-esp32-cloud-free-environment-g.png\",\"width\":1200,\"height\":630,\"caption\":\"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/smart-home\\\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"Lukas Wojcik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"Lukas Wojcik\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors | Lukas Wojcik","description":"Build ESP32 environmental sensors with ESPHome: I2C, SCD40, YAML configuration and local Home Assistant connectivity across VLANs.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/","og_locale":"en_US","og_type":"article","og_title":"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors | Lukas Wojcik","og_description":"Build ESP32 environmental sensors with ESPHome: I2C, SCD40, YAML configuration and local Home Assistant connectivity across VLANs.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-08-26T06:10:00+00:00","article_modified_time":"2026-09-24T21:33:30+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-8855-esphome-esp32-cloud-free-environment-g.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors","datePublished":"2026-08-26T06:10:00+00:00","dateModified":"2026-09-24T21:33:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/"},"wordCount":618,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-8855-esphome-esp32-cloud-free-environment-g.png","keywords":["ESPHome","Home Assistant","IoT","Smart Home","VLAN"],"articleSection":["Smart Home"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/","name":"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors | Lukas Wojcik","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-8855-esphome-esp32-cloud-free-environment-g.png","datePublished":"2026-08-26T06:10:00+00:00","dateModified":"2026-09-24T21:33:30+00:00","description":"Build ESP32 environmental sensors with ESPHome: I2C, SCD40, YAML configuration and local Home Assistant connectivity across VLANs.","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-8855-esphome-esp32-cloud-free-environment-g.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-8855-esphome-esp32-cloud-free-environment-g.png","width":1200,"height":630,"caption":"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/smart-home\/esphome-and-esp32-in-practice-building-cloud-free-environmental-sensors\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"Lukas Wojcik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"Lukas Wojcik"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/8855","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=8855"}],"version-history":[{"count":4,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/8855\/revisions"}],"predecessor-version":[{"id":18135,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/8855\/revisions\/18135"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/14115"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=8855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=8855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=8855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}