<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Baran Can Aydın on Medium]]></title>
        <description><![CDATA[Stories by Baran Can Aydın on Medium]]></description>
        <link>https://medium.com/@barancanaydn?source=rss-8732faaf083------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4mOLYmj1iBEdDNW59YSaAg.jpeg</url>
            <title>Stories by Baran Can Aydın on Medium</title>
            <link>https://medium.com/@barancanaydn?source=rss-8732faaf083------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:53:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@barancanaydn/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building My Own ESP32 Voice Assistant — Part 8: Adding a Second Xiaomi Air Purifier to Home…]]></title>
            <link>https://medium.com/@barancanaydn/building-my-own-esp32-voice-assistant-part-8-adding-a-second-xiaomi-air-purifier-to-home-9fe338bbcd5f?source=rss-8732faaf083------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fe338bbcd5f</guid>
            <category><![CDATA[smart-home]]></category>
            <category><![CDATA[home-assistant]]></category>
            <category><![CDATA[esphome]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <category><![CDATA[xiaomi]]></category>
            <dc:creator><![CDATA[Baran Can Aydın]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 19:46:33 GMT</pubDate>
            <atom:updated>2026-11-11T19:46:33.372Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building My Own ESP32 Voice Assistant — Part 8: Adding a Second Xiaomi Air Purifier to Home Assistant</h3><p><em>This is part 8 of an ongoing series in which I build my own ESP32 voice assistant. I add new parts as the components arrive and the project moves forward.</em></p><p><a href="https://medium.com/p/41f11c8d068a"><em>Türkçe versiyonu</em></a></p><p>In <a href="https://medium.com/p/aa68901d1950">Part 7</a>, Bex spoke for the first time. In this part I add the new Xiaomi Smart Air Purifier 4 Compact to Home Assistant, so Bex can turn it on and off by voice too.</p><p>I actually bought this unit for the balcony, to clear cigarette smoke. But it didn’t perform the way I wanted out there. So for now I swapped them: the big Air Purifier 4 moved to the balcony, and the small Compact went to the living room.</p><h3>How was the first purifier added?</h3><p>My first unit is a Xiaomi Smart Air Purifier 4 (model zhimi.airp.mb5). I had added it to Home Assistant like this:</p><ul><li>I installed the <strong>Xiaomi Miot</strong> integration through <strong>HACS</strong> (al-one/hass-xiaomi-miot).</li><li>When adding the integration, I used the <strong>“Add device using host/token”</strong> option, i.e. not with a Xiaomi account, but with the device’s <strong>IP address</strong> and <strong>token</strong>.</li><li>I got the token from the terminal with the <strong>Xiaomi Cloud Tokens Extractor</strong> tool.</li></ul><p>I added the new unit the same way.</p><h3>Why not just log in with a Xiaomi account?</h3><p>The first option in Xiaomi Miot is “Add devices using Mi Account”. When I tried it, Home Assistant answered “Xiaomi rejected credentials”.</p><p>So Xiaomi’s standard path didn’t work here, and I went with host/token. That method has a bonus: Home Assistant talks to the device directly over the home network, no cloud needed.</p><h3>Step 1: Get the token</h3><p>The token is a 32-character key the device uses to accept commands on the local network. Xiaomi Cloud Tokens Extractor lists the tokens and IP addresses of every device in your Xiaomi account.</p><p>I opened Terminal on my Mac and ran these one by one:</p><pre>mkdir -p ~/Downloads/token_extractor<br>cd ~/Downloads/token_extractor<br>curl -sSfL -o te.zip https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/releases/latest/download/token_extractor.zip<br>unzip -oq te.zip<br>python3 -m venv .venv<br>.venv/bin/pip install -q -r $(find . -name requirements.txt | head -1)<br>.venv/bin/python $(find . -name token_extractor.py | head -1)</pre><p>The tool first asks how you want to log in:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XWt7A073nIU9sDMq.png" /></figure><p>I picked q for the QR code. The tool showed a QR code at http://127.0.0.1:31415; after I scanned it with the Mi Home app on my phone, the terminal printed &quot;Logged in.&quot;</p><p>After login the tool checks every Xiaomi server (cn, de, us, ru, tw, sg, in, i2) and lists the devices it finds like this:</p><pre>NAME:     &lt;device name&gt;<br>   ID:       &lt;hidden&gt;<br>   MAC:      &lt;hidden&gt;<br>   IP:       &lt;device-ip&gt;<br>   TOKEN:    &lt;hidden&gt;<br>   MODEL:    &lt;model&gt;</pre><p>I left the server question empty and pressed Enter, so it checked all of them. My devices showed up in the same home on the <strong>tw</strong>, <strong>sg</strong> and <strong>in</strong> servers; the new one appeared as <strong>Xiaomi Smart Air Purifier 4 Compact</strong>, model xiaomi.airp.cpa4.</p><blockquote><em>⚠️ Don’t share this output with anyone. Anyone who knows the token can control your device if they’re on the same network.</em></blockquote><h3>Step 2: Add it to Home Assistant</h3><ol><li><strong>Settings → Devices &amp; Services → Xiaomi Miot → Add entry</strong></li><li>Choose <strong>“Add device using host/token”</strong> and press <strong>Next</strong>.</li><li>Fill in the form:</li><li><strong>Host:</strong> the device’s IP address</li><li><strong>Token:</strong> the token from the tool</li><li><strong>Name:</strong> whatever you want to call the device</li><li>Press <strong>Submit</strong>.</li></ol><p>Watch out: Chrome auto-filled the “Host” and “Token” fields in this form with a saved username and password. Clear both and type the correct values before submitting.</p><p>After Submit, the device was added right away, together with its sensors.</p><h3>Step 3: Introduce it to Bex</h3><p>Once added, Home Assistant created a fan entity called fan.xiaomi_cpa4_4b15_air_purifier plus sensors like PM2.5 and filter life. It was exposed to Assist automatically.</p><p>With two purifiers in the house, Bex needs to know which one I mean. The first one already has the alias “hava temizleyici” (air purifier). I named the new one <strong>“Küçük hava temizleyici”</strong> (small air purifier) and gave it the alias “kompakt hava temizleyici” (Settings → Entities → the device → Aliases).</p><p>I hit a trap here: after changing the entity’s name and aliases, “küçük hava temizleyiciyi kapat” (turn off the small air purifier) got the answer “no device by that name”. “Kompakt hava temizleyiciyi aç” (turn on the compact air purifier) worked, though. The reason: while editing the alias list, the entity’s own name had dropped out of it. In Home Assistant the entity’s own name sits in the alias list as a separate row; adding that row back fixed it.</p><p>Test sentences (Bex speaks Turkish):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*diYKsTpKIgp_Ue44.png" /></figure><p>Since I moved the units, I also updated their areas in Home Assistant: I created a new <strong>Balkon</strong> (balcony) area and moved the big purifier there, and the small one to <strong>Salon</strong> (living room). Now “balkondaki hava temizleyiciyi aç” (turn on the air purifier on the balcony) works too; Bex understands both the area and the device and turns on the big one.</p><p>“Salondaki hava temizleyiciyi aç” (turn on the air purifier in the living room) didn’t work at first: there was no device called “hava temizleyici” in the living room area, since the small one is named “küçük hava temizleyici”. If I had given the small one the alias “hava temizleyici”, it would have clashed with the one on the balcony. Instead I wrote a small automation that sends “salondaki hava temizleyiciyi aç/kapat” straight to the small purifier:</p><pre>triggers:<br>  - trigger: conversation<br>    id: ac<br>    command:<br>      - &quot;salon[daki|da] hava temizleyici[yi|i] aç&quot;<br>  - trigger: conversation<br>    id: kapat<br>    command:<br>      - &quot;salon[daki|da] hava temizleyici[yi|i] kapat&quot;<br>actions:<br>  - choose:<br>      - conditions: [{ condition: trigger, id: ac }]<br>        sequence:<br>          - action: fan.turn_on<br>            target: { entity_id: fan.xiaomi_cpa4_4b15_air_purifier }<br>          - set_conversation_response: Salondaki hava temizleyici açıldı.<br>      - conditions: [{ condition: trigger, id: kapat }]<br>        sequence:<br>          - action: fan.turn_off<br>            target: { entity_id: fan.xiaomi_cpa4_4b15_air_purifier }<br>          - set_conversation_response: Salondaki hava temizleyici kapatıldı.</pre><p>I told Bex “Hello Bex… küçük hava temizleyiciyi kapat” and the living room purifier turned off. After adding the automation, “Hello Bex… salondaki hava temizleyiciyi kapat” worked too.</p><p>In the video I say “Hello Bex, küçük hava temizleyiciyi kapat”; Bex answers “Küçük hava temizleyici kapatıldı” and the purifier in the living room turns off:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/0*CqzHUUOOuyDclfxv.jpg" /></figure><p><a href="https://cdn.jsdelivr.net/gh/justicemilitia/bisonar-ai@main/esp32-voice-assistant/blog-images/ses-02-kucuk-hava-temizleyici-kapat.mp4">▶️ Watch the video with sound</a></p><h3>Adding it to the dashboard</h3><p>In the “Hava Temizleyici” section of my main dashboard I added two cards for the new unit: a tile to control the fan speed and a tile showing the PM2.5 value.</p><p>Clicking the card opens the device’s detail dialog, where you can change the speed, turn it on or off, and switch the preset mode (Auto, Sleep, Favorite):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yD14hyYjN4uKgQpn.png" /></figure><h3>What I learned in this part</h3><ul><li><strong>Adding Xiaomi devices sometimes means stepping off the standard path.</strong> The integration’s own Mi account login was rejected; getting the token with a community tool and adding the device by IP and token solved it. Is it always going to be the Chinese hacking things together? :)</li><li><strong>A token is like a password.</strong> The tool’s output lists the token, IP and MAC address of every Xiaomi device in the house in plain text; don’t share it anywhere.</li><li><strong>Watch out for browser auto-fill.</strong> Chrome had put a saved username and password into the Host and Token fields of the Home Assistant form.</li><li><strong>With two similar devices, names matter.</strong> Calling one “air purifier” and the other “small air purifier”, and putting each device in the right area, kept Bex from mixing them up. A small automation covered the one sentence that didn’t work with the area name.</li><li><strong>The empty-looking row in the alias list matters.</strong> That row is the entity’s own name; delete it and Bex can no longer find the device by name.</li></ul><h3>What’s next?</h3><p>Next up: closing the case and turning the volume up a little more with a 100 kΩ resistor. If I come across an LED strip, I’ll add it in a separate part.</p><p>💻 The full living room automation is on GitHub: <a href="https://github.com/justicemilitia/bisonar-ai/blob/main/esp32-voice-assistant/ha-config/salon-hava-temizleyici-sesli.yaml">https://github.com/justicemilitia/bisonar-ai/blob/main/esp32-voice-assistant/ha-config/salon-hava-temizleyici-sesli.yaml</a></p><p>🛠️ Step-by-step guide on Instructables: <a href="https://www.instructables.com/DIY-ESP32-Voice-Assistant-for-Home-Assistant-With-/">https://www.instructables.com/DIY-ESP32-Voice-Assistant-for-Home-Assistant-With-/</a></p><h3>Parts of the series</h3><ul><li><a href="https://medium.com/p/01ec87864faf">Part 1</a></li><li><a href="https://medium.com/p/a1b946401395">Part 2</a></li><li><a href="https://medium.com/p/0eee9b1b91ac">Part 3</a></li><li><a href="https://medium.com/p/d81bdeb800be">Part 4</a></li><li><a href="https://medium.com/p/09724433c6c2">Part 5</a></li><li><a href="https://medium.com/p/ed16188fa542">Part 6</a></li><li><a href="https://medium.com/p/aa68901d1950">Part 7</a></li><li><strong>Part 8</strong> (this post)</li></ul><blockquote><em>Case design: ImpatientMaker (remix of JakeB’s “Voice Assist Puck”), CC BY-NC 4.0. ESPHome code: impatientmaker/esphome-voice-assist (MIT). Full credits in </em><a href="https://medium.com/p/01ec87864faf"><em>Part 1</em></a><em>.</em></blockquote><p><em>Xiaomi Miot integration: </em><a href="https://github.com/al-one/hass-xiaomi-miot"><em>al-one/hass-xiaomi-miot</em></a><em> · Token tool: </em><a href="https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor"><em>PiotrMachowski/Xiaomi-cloud-tokens-extractor</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fe338bbcd5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP32 ile Kendi Sesli Asistanımı Yapıyorum — Bölüm 8: İkinci Xiaomi Hava Temizleyiciyi Home…]]></title>
            <link>https://medium.com/@barancanaydn/esp32-ile-kendi-sesli-asistan%C4%B1m%C4%B1-yap%C4%B1yorum-b%C3%B6l%C3%BCm-8-i%CC%87kinci-xiaomi-hava-temizleyiciyi-home-41f11c8d068a?source=rss-8732faaf083------2</link>
            <guid isPermaLink="false">https://medium.com/p/41f11c8d068a</guid>
            <category><![CDATA[akıllı-ev]]></category>
            <category><![CDATA[xiaomi]]></category>
            <category><![CDATA[home-assistant]]></category>
            <category><![CDATA[esphome]]></category>
            <category><![CDATA[sesli-asistan]]></category>
            <dc:creator><![CDATA[Baran Can Aydın]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 19:45:08 GMT</pubDate>
            <atom:updated>2026-11-11T20:29:56.834Z</atom:updated>
            <content:encoded><![CDATA[<h3>ESP32 ile Kendi Sesli Asistanımı Yapıyorum — Bölüm 8: İkinci Xiaomi Hava Temizleyiciyi Home Assistant’a Eklemek</h3><p><em>Bu yazı, ESP32 ile kendi sesli asistanımı yaptığım ve hâlâ devam eden serinin 8. bölümü. Parçalar kargodan geldikçe ve proje ilerledikçe yeni bölümler ekliyorum.</em></p><p><a href="https://medium.com/p/9fe338bbcd5f"><em>English version</em></a></p><p><a href="https://medium.com/p/61d67d69d70d">Bölüm 7</a>&#39;de Bex ilk kez konuştu. Bu bölümde eve yeni gelen Xiaomi Smart Air Purifier 4 Compact’i Home Assistant’a ekliyorum, böylece Bex onu da sesle açıp kapatabilecek.</p><p>Bu cihazı aslında balkon için, sigara dumanını temizlesin diye aldım. Ama balkonda istediğim performansı alamadım. Şimdilik yer değiştirdim: büyük olan Air Purifier 4 balkona geçti, küçük Compact salona.</p><h3>İlk hava temizleyici nasıl eklenmişti?</h3><p>İlk cihazım Xiaomi Smart Air Purifier 4 (model zhimi.airp.mb5). Onu Home Assistant&#39;a şöyle eklemiştim:</p><ul><li><strong>HACS</strong> üzerinden <strong>Xiaomi Miot</strong> entegrasyonunu kurdum (al-one/hass-xiaomi-miot).</li><li>Entegrasyonu eklerken <strong>“Add device using host/token”</strong> seçeneğini kullandım, yani Xiaomi hesabıyla değil, cihazın <strong>IP adresi</strong> ve <strong>token</strong>’ı ile.</li><li>Token’ı <strong>Xiaomi Cloud Tokens Extractor</strong> aracıyla terminalden aldım.</li></ul><p>Yeni cihazı da aynı yoldan ekledim.</p><h3>Neden Xiaomi hesabıyla eklemedim?</h3><p>Xiaomi Miot’un ilk seçeneği “Add devices using Mi Account”. Bunu denediğimde Home Assistant “Xiaomi rejected credentials” hatası verdi.</p><p>Yani Xiaomi’nin standart yolu burada işe yaramadı. Bu yüzden host/token yöntemiyle devam ettim. Bu yöntemin bir artısı da var: Home Assistant cihazla doğrudan ev ağı üzerinden konuşuyor, bulut gerekmiyor.</p><h3>Adım 1: Token’ı almak</h3><p>Token, cihazın yerel ağda komut kabul etmek için kullandığı 32 karakterlik bir anahtar. Xiaomi Cloud Tokens Extractor, Xiaomi hesabındaki tüm cihazların token’larını ve IP adreslerini listeliyor.</p><p>Mac’te Terminal’i açıp şunları sırayla çalıştırdım:</p><pre>mkdir -p ~/Downloads/token_extractor<br>cd ~/Downloads/token_extractor<br>curl -sSfL -o te.zip https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/releases/latest/download/token_extractor.zip<br>unzip -oq te.zip<br>python3 -m venv .venv<br>.venv/bin/pip install -q -r $(find . -name requirements.txt | head -1)<br>.venv/bin/python $(find . -name token_extractor.py | head -1)</pre><p>Araç önce giriş yöntemini soruyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EnPbX00Ysqs3Yhhx.png" /></figure><p>Ben q ile QR kodu seçtim. Araç http://127.0.0.1:31415 adresinde bir QR kod gösterdi; telefondaki Mi Home uygulamasıyla okutunca terminalde &quot;Logged in.&quot; yazdı.</p><p>Girişten sonra araç her Xiaomi sunucusunu (cn, de, us, ru, tw, sg, in, i2) tarıyor ve bulduğu cihazları şu şekilde listeliyor:</p><pre>NAME:     &lt;cihaz adı&gt;<br>   ID:       &lt;gizli&gt;<br>   MAC:      &lt;gizli&gt;<br>   IP:       &lt;cihaz-ip&gt;<br>   TOKEN:    &lt;gizli&gt;<br>   MODEL:    &lt;model&gt;</pre><p>Sunucu sorusunu boş bırakıp Enter’a basınca hepsini taradı. Cihazlarım <strong>tw</strong>, <strong>sg</strong> ve <strong>in</strong> sunucularında aynı evde göründü; yeni cihaz listede <strong>Xiaomi Smart Air Purifier 4 Compact</strong>, model xiaomi.airp.cpa4 olarak çıktı.</p><blockquote><em>⚠️ Bu çıktıyı kimseyle paylaşmayın. Token’ı bilen biri, aynı ağdaysa cihazınızı kontrol edebilir.</em></blockquote><h3>Adım 2: Home Assistant’a eklemek</h3><ol><li><strong>Ayarlar → Cihazlar ve Hizmetler → Xiaomi Miot → Giriş ekle</strong></li><li><strong>“Add device using host/token”</strong> seçeneğini seçip <strong>Sonraki</strong>’ye basın.</li><li>Formu doldurun:</li><li><strong>Host:</strong> cihazın IP adresi</li><li><strong>Token:</strong> araçtan aldığınız token</li><li><strong>İsim:</strong> cihaza vereceğiniz ad</li><li><strong>Gönder</strong>’e basın.</li></ol><p>Dikkat: Chrome bu formda “Host” ve “Token” alanlarını kayıtlı kullanıcı adı ve şifreyle kendiliğinden doldurdu. Göndermeden önce ikisini de silip doğru değerleri yazın.</p><p>Gönder’e bastıktan sonra cihaz hemen eklendi ve sensörleriyle birlikte geldi.</p><h3>Adım 3: Bex’e tanıtmak</h3><p>Cihaz eklenince Home Assistant’ta fan.xiaomi_cpa4_4b15_air_purifier adında bir fan varlığı ve PM2.5, filtre ömrü gibi sensörler çıktı. Assist&#39;e otomatik olarak açılmıştı.</p><p>Evde artık iki hava temizleyici olduğu için Bex’in hangisini kastettiğimi anlaması lazım. İlkinin takma adı zaten “hava temizleyici”. Yenisine <strong>“Küçük hava temizleyici”</strong> adını, ayrıca “kompakt hava temizleyici” takma adını verdim (Ayarlar → Varlıklar → cihaz → Takma adlar).</p><p>Burada bir tuzak yaşadım: Varlığın adını ve takma adlarını değiştirdikten sonra “küçük hava temizleyiciyi kapat” dediğimde “bu adda bir cihaz yok” cevabı aldım. “Kompakt hava temizleyiciyi aç” ise çalışıyordu. Sebebi, takma ad listesini düzenlerken varlığın kendi adının listeden düşmesiydi. Home Assistant’ta takma ad listesinde varlığın kendi adı da ayrı bir satır olarak duruyor; o satırı geri ekleyince sorun çözüldü.</p><p>Test cümleleri:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/0*fKQVvi9hvD9vplUN.png" /></figure><p>Cihazların yerini değiştirdiğim için Home Assistant’taki alanlarını da güncelledim: yeni bir <strong>Balkon</strong> alanı açıp büyük temizleyiciyi oraya, küçüğü <strong>Salon</strong>’a taşıdım. Böylece “balkondaki hava temizleyiciyi aç” komutu da çalışıyor; Bex hem alanı hem cihazı anlayıp büyük olanı açıyor.</p><p>“Salondaki hava temizleyiciyi aç” ise ilk başta çalışmadı: Salon alanında “hava temizleyici” adında bir cihaz yoktu, küçüğün adı “küçük hava temizleyici”. Küçüğe “hava temizleyici” takma adını verseydim bu sefer balkondakiyle karışacaktı. Bunun yerine küçük bir otomasyon yazdım; “salondaki hava temizleyiciyi aç/kapat” cümlesini doğrudan küçük temizleyiciye yönlendiriyor:</p><pre>triggers:<br>  - trigger: conversation<br>    id: ac<br>    command:<br>      - &quot;salon[daki|da] hava temizleyici[yi|i] aç&quot;<br>  - trigger: conversation<br>    id: kapat<br>    command:<br>      - &quot;salon[daki|da] hava temizleyici[yi|i] kapat&quot;<br>actions:<br>  - choose:<br>      - conditions: [{ condition: trigger, id: ac }]<br>        sequence:<br>          - action: fan.turn_on<br>            target: { entity_id: fan.xiaomi_cpa4_4b15_air_purifier }<br>          - set_conversation_response: Salondaki hava temizleyici açıldı.<br>      - conditions: [{ condition: trigger, id: kapat }]<br>        sequence:<br>          - action: fan.turn_off<br>            target: { entity_id: fan.xiaomi_cpa4_4b15_air_purifier }<br>          - set_conversation_response: Salondaki hava temizleyici kapatıldı.</pre><p>Bex’e “Hello Bex… küçük hava temizleyiciyi kapat” dedim, salondaki temizleyici kapandı. Otomasyonu ekledikten sonra “Hello Bex… salondaki hava temizleyiciyi kapat” da çalıştı.</p><p>Videoda “Hello Bex, küçük hava temizleyiciyi kapat” diyorum; Bex “Küçük hava temizleyici kapatıldı” diye cevap veriyor ve salondaki cihaz kapanıyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/0*qYK24O7o4lhLioNN.jpg" /></figure><p><a href="https://cdn.jsdelivr.net/gh/justicemilitia/bisonar-ai@main/esp32-voice-assistant/blog-images/ses-02-kucuk-hava-temizleyici-kapat.mp4">▶️ Videoyu sesiyle izleyin</a></p><h3>Ana panoya eklemek</h3><p>Ana Pano’daki “Hava Temizleyici” bölümüne yeni cihaz için iki kart ekledim: fan hızını ayarlayan bir kutucuk ve PM2.5 değerini gösteren bir kutucuk.</p><p>Karta tıklayınca cihazın detay penceresi açılıyor; buradan hız ayarı, açma/kapama ve ön ayar modu (Auto, Sleep, Favorite) değiştirilebiliyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BmM-9j_A7VgOe7ed.png" /></figure><h3>Bu bölümden öğrendiklerim</h3><ul><li><strong>Xiaomi cihazlarını eklemek için bazen standart dışına çıkmak gerekiyor.</strong> Entegrasyonun kendi Mi hesabı girişi reddedildi; işi bir topluluk aracıyla token alıp cihazı IP ve token ile eklemek çözdü. Hep Çinliler mi bir şeyleri hack’leyecek :)</li><li><strong>Token bir şifre gibidir.</strong> Araç çıktısında evdeki tüm Xiaomi cihazlarının token’ı, IP’si ve MAC adresi açıkça yazıyor; bu çıktıyı hiçbir yerde paylaşmamak gerekiyor.</li><li><strong>Tarayıcının otomatik doldurmasına dikkat.</strong> Chrome, Home Assistant formundaki Host ve Token alanlarına kayıtlı kullanıcı adı ve şifreyi yazmıştı.</li><li><strong>İki benzer cihaz varsa isimler önemli.</strong> Birine “hava temizleyici”, diğerine “küçük hava temizleyici” demek ve cihazları doğru alanlara koymak Bex’in karışmamasını sağladı. Alanın adıyla çalışmayan cümle için küçük bir otomasyon yetti.</li><li><strong>Takma ad listesindeki boş görünen satır önemli.</strong> O satır varlığın kendi adı; silinirse Bex cihazı adıyla bulamıyor.</li></ul><h3>Sırada ne var?</h3><p>Sırada kasanın kapağını kapatmak ve sesi 100 kΩ dirençle biraz daha açmak var. LED şeridi elime geçerse onu da ayrı bir bölümde ekleyeceğim.</p><p>💻 Salon otomasyonunun tamamı GitHub’da: <a href="https://github.com/justicemilitia/bisonar-ai/blob/main/esp32-voice-assistant/ha-config/salon-hava-temizleyici-sesli.yaml">https://github.com/justicemilitia/bisonar-ai/blob/main/esp32-voice-assistant/ha-config/salon-hava-temizleyici-sesli.yaml</a></p><p>🛠️ Projenin adım adım İngilizce anlatımı Instructables’ta: <a href="https://www.instructables.com/DIY-ESP32-Voice-Assistant-for-Home-Assistant-With-/">https://www.instructables.com/DIY-ESP32-Voice-Assistant-for-Home-Assistant-With-/</a></p><h3>Serinin bölümleri</h3><ul><li><a href="https://medium.com/p/64323de4c397">Bölüm 1</a></li><li><a href="https://medium.com/p/75d280070e51">Bölüm 2</a></li><li><a href="https://medium.com/p/5eaf14a5fa28">Bölüm 3</a></li><li><a href="https://medium.com/p/6b82072eebcb">Bölüm 4</a></li><li><a href="https://medium.com/p/3e6e2db06da5">Bölüm 5</a></li><li><a href="https://medium.com/p/af83b6ae2b9f">Bölüm 6</a></li><li><a href="https://medium.com/p/61d67d69d70d">Bölüm 7</a></li><li><strong>Bölüm 8</strong> (bu yazı)</li></ul><blockquote><em>Kasa tasarımı: ImpatientMaker (JakeB’nin “Voice Assist Puck” remix’i), CC BY-NC 4.0. ESPHome kodu: impatientmaker/esphome-voice-assist (MIT). Tüm atıflar </em><a href="https://medium.com/p/64323de4c397"><em>Bölüm 1</em></a><em>&#39;de.</em></blockquote><p><em>Xiaomi Miot entegrasyonu: </em><a href="https://github.com/al-one/hass-xiaomi-miot"><em>al-one/hass-xiaomi-miot</em></a><em> · Token aracı: </em><a href="https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor"><em>PiotrMachowski/Xiaomi-cloud-tokens-extractor</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41f11c8d068a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building My Own ESP32 Voice Assistant — Part 7: Soldering and the First Sound]]></title>
            <link>https://medium.com/@barancanaydn/building-my-own-esp32-voice-assistant-part-7-soldering-and-the-first-sound-aa68901d1950?source=rss-8732faaf083------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa68901d1950</guid>
            <category><![CDATA[home-assistant]]></category>
            <category><![CDATA[smart-home]]></category>
            <category><![CDATA[esphome]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <dc:creator><![CDATA[Baran Can Aydın]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 11:02:07 GMT</pubDate>
            <atom:updated>2026-11-10T11:02:07.190Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is part 7 of an ongoing series in which I build my own ESP32 voice assistant. I add new parts as the components arrive and the project moves forward.</em></p><p><a href="https://medium.com/p/61d67d69d70d"><em>Türkçe versiyonu</em></a></p><p>In <a href="https://medium.com/p/ed16188fa542">Part 6</a> I gave my assistant its own name: “Hello Bex”. Bex now hears me on the first try and runs my commands, but it still can’t talk. In this part I give it a voice.</p><h3>The speaker arrived</h3><p>The first part out of the box was the speaker: a small 4 cm, <strong>4 Ω, 3 W</strong> speaker. The label on the back says “XLY, 4Ω 3W, D43”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QmvkZ7MJ8N0O359T.jpg" /></figure><p>The first thing I did was check that it fits the case. The speaker sits perfectly in its slot in the 3D-printed body:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Wvasvfd3hBaVJ6tm.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DO5dxKVSzsdKII9Z.jpg" /></figure><p>With the case closed, there is still plenty of room inside for the magnet and the solder tabs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b0vfOsQjT93m3pdm.jpg" /></figure><h3>The amplifier arrived: MAX98357A</h3><p>I can’t connect the speaker straight to the ESP32. The ESP32 outputs audio digitally over I2S, and it can’t supply enough current to drive a speaker. The <strong>MAX98357A</strong> sits in between: it takes the I2S data, turns it into analog audio and drives the speaker as a small class D amplifier.</p><p>The board I got is a MAX98357A module labelled HW-792. The pin header and the screw terminal for the speaker came soldered from the factory, so there was nothing for me to solder on this board. There are seven pins on top: <strong>Vin, GND, SD, GAIN, DIN, BCLK, LRC</strong>. The speaker’s + and − wires are screwed into the green terminal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5NCbRU0Nt3TiiVlN.jpg" /></figure><p>The specs are printed on the back: <strong>4–8 Ω, 3 W</strong>, supply <strong>2.5–5.5 V</strong>, default gain <strong>9 dB</strong>, output <strong>(L+R)/2</strong>, which means mono audio that is the average of the left and right channels. My speaker is 4 Ω and 3 W, so they are a perfect match:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t8lqipU1pkP6smlp.jpg" /></figure><p>The GAIN pin sets the volume, and the SD pin turns the amplifier on or off:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/0*1LFf1ZF9VtiPqTmo.png" /></figure><p>I left SD unconnected. The board has a resistor that keeps this pin on, so the amplifier runs by itself. If SD were connected to GND, the amplifier would turn off. At first I also left GAIN unconnected, which gives 9 dB. The schematic has a 100 kΩ resistor between GAIN and GND, but the resistors I found in my drawer were 1 kΩ, 2.2 kΩ and 320 kΩ. To the amplifier, 1 kΩ and 2.2 kΩ look the same as a direct connection to GND, and 320 kΩ is not a value the datasheet defines. So none of them gives 15 dB.</p><h3>Soldering</h3><h3>First, removing the pin headers</h3><p>My ESP32 DevKit came with its pin headers soldered on. That was fine for the breadboard, but there is no room for them inside the case, so the wires have to be soldered straight into the board’s holes. The first job was removing the headers. I clamped the board in a helping-hands stand and, under the magnifier, heated each pin with the soldering iron and pulled it out with pliers, one by one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DOQlJdnPZ42iPh8-.jpg" /></figure><p>This takes patience. If a pin won’t come out, you have to stop and let the pad cool down, otherwise the pad lifts. The pins I removed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tz0U-FtI0QI9LGfU.jpg" /></figure><h3>Microphone: INMP441</h3><p>The first part I soldered was the microphone. On the breadboard I had used the INMP441 with a pin header, but there is no room for a header inside the case. So I soldered the wires straight to the six pads of the board. The pad names are printed on the board: <strong>GND, VDD, SD</strong> on the top row and <strong>L/R, WS, SCK</strong> on the bottom row. The hole in the middle is the microphone’s sound inlet, so it must stay uncovered:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*go6brAEVjXjHUY4k.jpg" /></figure><p>Each of the six pads gets one wire. From the side, the wires and the solder joints look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_ZqA9A00uGhGqgAl.jpg" /></figure><p>The wires go to the same ESP32 pins as in the ESPHome configuration (<a href="https://github.com/justicemilitia/bisonar-ai/blob/main/esp32-voice-assistant/code/mic-test.yaml">mic-test.yaml</a>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*2FysbsDYt1JPs_hj.png" /></figure><p>There was an accident while soldering: the ESP32’s <strong>GPIO26</strong> pad got too hot and burned. I soldered the WS wire to the free <strong>GPIO14</strong> instead and changed i2s_lrclk_pin to GPIO14 in the ESPHome configuration. The amplifier&#39;s LRC shares the same line, so it goes to GPIO14 too. GPIO14 outputs a short signal at boot, but that is not a problem for the I2S line.</p><pre>i2s_audio:<br>  - id: i2s_in<br>    i2s_lrclk_pin: GPIO14   # was GPIO26, the pad burned while soldering<br>    i2s_bclk_pin: GPIO25</pre><p>This is the microphone wired to the ESP32. The wires are kept short, and the ESP32 is held in the helping hands:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sVpYfNM5BEtYfrQi.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aQNxmRoAOmEQZD_R.jpg" /></figure><p>Up close you can see the burned pad. The hole above the D26 label is empty, and the copper ring around it is damaged. There are also brown heat marks along the edge of the board. The WS wire now goes to D14 (GPIO14), two pins to the left:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*r3X4WQfXWmJeYU09.jpg" /></figure><p>I didn’t use anything special for this: an ordinary soldering iron and the thin single-core wire I had at home. I don’t recommend that wire. It isn’t very flexible and is hard to bend inside the case. If you can, use <strong>soft silicone-insulated wire</strong>. It fits much more easily in a small case.</p><h3>Amplifier and ESP32</h3><p>The amplifier uses the same I2S line as the microphone. The clock signals (BCLK and LRC) are shared, only the data line is separate. The only new pins I soldered on the ESP32 were <strong>GPIO27</strong> (audio data) and <strong>VIN</strong> (5 V):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8NjeYQTPNO8WCKcu.png" /></figure><p>I connected Vin to VIN on purpose, not to 3V3. The amplifier also works at 3.3 V, but the current it draws at high volume would strain the ESP32’s 3.3 V regulator. As you’ll see in a moment, current caused trouble even at 5 V.</p><p>The speaker’s two wires are screwed into the amplifier’s green terminal. With a single speaker, the + and − direction doesn’t matter.</p><p>I didn’t push the amplifier’s BCLK and LRC wires into the same holes on the ESP32. Instead I stripped a short section in the middle of the microphone’s SCK and WS wires and soldered the amplifier’s wires there, making a splice. I covered the bare copper with heat-shrink tubing. That way each hole on the ESP32 takes a single wire, and the pad doesn’t get heated a second time.</p><h3>Microphone test after soldering</h3><p>I flashed the new configuration over USB and watched the logs. The board booted, connected to Wi-Fi and to Home Assistant, and loaded <strong>Hello Bex</strong> as the wake word.</p><p>The microphone’s average sound level (RMS) in a quiet room was between <strong>−37 and −48 dB</strong>. In the breadboard test the range was −51 to −34 dB. So soldering the wires straight to the pads didn’t cost the microphone any sensitivity.</p><p>Then the real test: “Hello Bex”, followed by “hava temizleyiciyi aç” (“turn on the air purifier”). Bex understood the command and the air purifier turned on. The speaker wasn’t connected yet, so I couldn’t hear the answer, but the microphone side still works after soldering.</p><blockquote><em>A small mistake: on the first try I flashed the wrong file, the old “Hey Jarvis” configuration (</em><em>esp32-assist.yaml). I noticed when I saw </em><em>Wake Word: Hey Jarvis in the logs, and flashed the right file, </em><em>mic-test.yaml.</em></blockquote><h3>The first sound: “Hava temizleyici açıldı”</h3><p>When I connected the amplifier and powered the board, the speaker only crackled. That was expected: the ESPHome configuration had no speaker yet, and the amplifier’s DIN pin was floating, so it played noise. Sound came only after I solved three problems.</p><h3>1. Adding the speaker to the configuration</h3><p>The first step was telling ESPHome about the speaker. It uses the same I2S line as the microphone (i2s_in) and outputs audio on GPIO27:</p><pre>speaker:<br>  - platform: i2s_audio<br>    id: hoparlor<br>    i2s_audio_id: i2s_in<br>    dac_type: external<br>    i2s_dout_pin: GPIO27   # MAX98357A DIN<br>    channel: mono<br>    bits_per_sample: 32bit<br>    sample_rate: 16000<br>    timeout: 2s</pre><pre>voice_assistant:<br>  id: va<br>  microphone:<br>    microphone: mic<br>  speaker: hoparlor</pre><p>The crackle stopped. I said “Hello Bex, bugün hava kaç derece” (“what’s the temperature today”), and there was no sound.</p><h3>2. “Parent bus is busy”: the microphone won’t let go of the line</h3><p>The logs showed that Home Assistant understood the question and sent the answer audio to the board. But the speaker gave the same error every second:</p><pre>[E][i2s_audio.speaker.std:427]: Parent bus is busy<br>[E][i2s_audio.speaker:142]: Driver failed to start; retrying in 1 second</pre><p>The microphone and the speaker share the same I2S line, but they can’t both use it at the same time. In my test configuration the microphone never stopped. Both the wake word listener (stop_after_detection: false) and the sound level sensor from Part 2 (passive: false) kept the microphone running all the time. The speaker never got its turn.</p><p>The fix was to release the microphone during the answer:</p><pre>sensor:<br>  - platform: sound_level<br>    passive: true             # don&#39;t keep the microphone running by itself</pre><pre>micro_wake_word:<br>  stop_after_detection: true  # stop listening once &quot;Hello Bex&quot; is heard</pre><p>On my first try I restarted the wake word listener in on_end, when Home Assistant had finished its work. That wasn&#39;t enough either. The answer audio comes from Home Assistant in chunks and keeps coming after on_end. The speaker waited for the first chunk, stopped after half a second, and the microphone grabbed the line in the meantime. The right moment is when the audio stream ends (on_tts_stream_end):</p><pre>on_tts_stream_end:<br>    - wait_until:<br>        not:<br>          speaker.is_playing: hoparlor<br>    - micro_wake_word.start:</pre><p>The speaker’s timeout: 2s setting keeps it from stopping between chunks. After this, Bex spoke for the first time: <strong>&quot;Hava temizleyici açıldı&quot;</strong> (&quot;the air purifier is on&quot;). But it was very quiet. I could only hear it with my ear right next to the speaker.</p><h3>3. Low current: Bex stops at the start of the sentence</h3><p>In one of the earlier tries, the board had restarted the moment the speaker began to play. So I had temporarily lowered the volume to 50%, which is why it was so quiet. I made the volume adjustable from Home Assistant, so I don’t have to reflash for it:</p><pre>number:<br>  - platform: template<br>    name: &quot;Hoparlör sesi&quot;<br>    id: hoparlor_sesi<br>    optimistic: true<br>    restore_value: true<br>    min_value: 10<br>    max_value: 100<br>    step: 5<br>    initial_value: 100<br>    on_value:<br>      - speaker.volume_set:<br>          id: hoparlor<br>          volume: !lambda return x / 100.0;</pre><p>I turned the volume up to 100%. Bex said “Ha…” and went silent. The logs show the answer arriving, the speaker starting and, right after that, Serial port closed!. The board had reset at the start of the sentence.</p><p>The cause was power. The board was plugged into my Mac’s USB port, and that port supplies limited current. At high volume the amplifier draws short but large bursts of current, the 5 V line drops and the ESP32 restarts. At 50% the current was enough, at 100% it wasn’t.</p><p>I plugged the board into an old phone charger I had at home: a Sony CP-AD2 with a <strong>5 V, 2.1 A</strong> output. This time Bex finished the sentence at 100% volume, and the board didn’t reset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sV3Tr6Ckp_WDpbzm.jpg" /></figure><p>I placed all the parts in the bottom half of the case: the speaker in the middle, the microphone and the amplifier with the green terminal on the left, and the ESP32 with the USB cable on the right:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0JkSoa9eLa0XW-Hs.jpg" /></figure><p>And the first conversation. In the video I first say “Hello Bex, hava temizleyiciyi kapat” (“turn off the air purifier”), and Bex answers from the speaker: “Hava temizleyici kapatıldı” (“the air purifier is off”). Then I try the same with “aç” (“on”):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*qrNSxYVmqYXVRwP7.jpg" /></figure><p><a href="https://cdn.jsdelivr.net/gh/justicemilitia/bisonar-ai@main/esp32-voice-assistant/blog-images/ses-01-hello-bex-sesli-cevap.mp4">▶️ Watch the video with sound</a></p><p>The sound was coming through, but it was still a bit quiet. So I connected the amplifier’s GAIN pin straight to GND with a short wire, raising the gain from 9 dB to <strong>12 dB</strong>. The sound got noticeably louder.</p><p>The next step is to find a 100 kΩ resistor and connect GAIN to GND through it. That will raise the gain to <strong>15 dB</strong>. The sound will also get louder once the case is closed, because the closed case works like a small speaker box.</p><h3>What I learned in this part</h3><ul><li><strong>Remove pins patiently.</strong> A pad that gets too hot burns. That’s how I lost GPIO26. Luckily the ESP32 has plenty of free pins.</li><li><strong>If the microphone and the speaker share one I2S line, they can’t both run at the same time.</strong> The microphone has to be released while the answer plays. That’s what the “Parent bus is busy” error is telling you.</li><li><strong>The answer audio keeps arriving after </strong><strong>on_end.</strong> Restart the microphone when the audio stream ends (on_tts_stream_end) and the speaker has gone quiet.</li><li><strong>A computer’s USB port may not be enough for an amplifier.</strong> If the board resets for no clear reason, check the power supply first. A 2.1 A phone charger solved it.</li><li><strong>The logs tell you everything.</strong> Every answer was in the ESPHome logs: the wrong wake word, the busy line, the USB disconnect.</li></ul><h3>What’s next?</h3><p>Bex can now hear and talk. Next up: closing the case and turning the volume up a little more with a 100 kΩ resistor. If I come across an LED strip, I’ll add it in a separate part.</p><p>💻 The full ESPHome configuration from this part is on GitHub: <a href="https://github.com/justicemilitia/bisonar-ai/blob/main/esp32-voice-assistant/code/mic-test.yaml">https://github.com/justicemilitia/bisonar-ai/blob/main/esp32-voice-assistant/code/mic-test.yaml</a></p><p>🛠️ Step-by-step guide on Instructables: <a href="https://www.instructables.com/DIY-ESP32-Voice-Assistant-for-Home-Assistant-With-/">https://www.instructables.com/DIY-ESP32-Voice-Assistant-for-Home-Assistant-With-/</a></p><h3>Parts of the series</h3><ul><li><a href="https://medium.com/p/01ec87864faf">Part 1</a></li><li><a href="https://medium.com/p/a1b946401395">Part 2</a></li><li><a href="https://medium.com/p/0eee9b1b91ac">Part 3</a></li><li><a href="https://medium.com/p/d81bdeb800be">Part 4</a></li><li><a href="https://medium.com/p/09724433c6c2">Part 5</a></li><li><a href="https://medium.com/p/ed16188fa542">Part 6</a></li><li><strong>Part 7</strong> (this post)</li></ul><blockquote><em>Case design: ImpatientMaker (a remix of JakeB’s “Voice Assist Puck”), CC BY-NC 4.0. ESPHome code: impatientmaker/esphome-voice-assist (MIT). Full credits in </em><a href="https://medium.com/p/01ec87864faf"><em>Part 1</em></a><em>.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa68901d1950" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESP32 ile Kendi Sesli Asistanımı Yapıyorum — Bölüm 7: Lehim ve İlk Ses]]></title>
            <link>https://medium.com/@barancanaydn/esp32-ile-kendi-sesli-asistan%C4%B1m%C4%B1-yap%C4%B1yorum-b%C3%B6l%C3%BCm-7-lehim-ve-i%CC%87lk-ses-61d67d69d70d?source=rss-8732faaf083------2</link>
            <guid isPermaLink="false">https://medium.com/p/61d67d69d70d</guid>
            <category><![CDATA[akıllı-ev]]></category>
            <category><![CDATA[home-assistant]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[esphome]]></category>
            <category><![CDATA[sesli-asistan]]></category>
            <dc:creator><![CDATA[Baran Can Aydın]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 11:00:26 GMT</pubDate>
            <atom:updated>2026-11-10T11:00:26.774Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Bu yazı, ESP32 ile kendi sesli asistanımı yaptığım ve hâlâ devam eden serinin 7. bölümü. Parçalar kargodan geldikçe ve proje ilerledikçe yeni bölümler ekliyorum.</em></p><p><a href="https://www.bisonar.com/en/blog/esp32-voice-assistant-part-7-soldering-and-first-sound"><em>English version</em></a></p><p><a href="https://medium.com/p/af83b6ae2b9f">Bölüm 6</a>&#39;da asistanıma kendi adını verdim: “Hello Bex”. Bex artık beni ilk seferde duyuyor ve komutları uyguluyor, ama hâlâ konuşamıyor. Bu bölümde ona bir ses veriyorum.</p><h3>Hoparlör geldi</h3><p>Kargodan ilk çıkan parça hoparlör oldu: 4 cm çapında, <strong>4 Ω, 3 W</strong> küçük bir hoparlör. Arkasındaki etikette “XLY, 4Ω 3W, D43” yazıyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*euva9M_3d84xlh-A.jpg" /></figure><p>İlk iş, kasaya sığıp sığmadığını denemek oldu. Hoparlör, 3D baskı gövdedeki yuvasına tam oturdu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BWwwTQAQhKvqrQ8u.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C9zQC6lZjLE100xD.jpg" /></figure><p>Kasayı kapatınca mıknatısı ve lehim uçlarıyla birlikte içeride rahatça yer kalıyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EYxF2UCUag841g-w.jpg" /></figure><h3>Amfi geldi: MAX98357A</h3><p>Hoparlörü ESP32&#39;ye doğrudan bağlayamam. ESP32 sesi dijital olarak, I2S ile veriyor, hoparlörü sürmek için de yeterli akımı yok. Aradaki işi <strong>MAX98357A</strong> yapıyor: I2S verisini alıyor, analoğa çeviriyor ve hoparlörü süren küçük bir D sınıfı amfi olarak çalışıyor.</p><p>Gelen kart HW-792 kodlu bir MAX98357A modülü. Pin başlıkları ve hoparlör için vidalı klemens fabrikadan lehimli geldi, bana bu kartta lehim işi kalmadı. Üstte yedi pin var: <strong>Vin, GND, SD, GAIN, DIN, BCLK, LRC</strong>. Alttaki yeşil klemense hoparlörün + ve − uçları vidalanıyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1JDEHhu1Tusdu1jp.jpg" /></figure><p>Kartın arkasında özellikleri yazıyor: <strong>4–8 Ω, 3 W</strong>, besleme <strong>2.5–5.5 V</strong>, varsayılan kazanç <strong>9 dB</strong>, çıkış <strong>(L+R)/2</strong>, yani sol ve sağ kanalın ortalaması olan mono ses. Hoparlörüm 4 Ω ve 3 W olduğu için birbirlerine tam uyuyorlar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9Pp2xx-HD_YdjBdj.jpg" /></figure><p>Kartın ses seviyesini GAIN pini, açık/kapalı durumunu SD pini belirliyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/0*ELivaK05iBQNBv1s.png" /></figure><p>SD’yi boş bıraktım. Kartın üstünde bu pini açık tutan bir direnç var, amfi kendiliğinden çalışıyor. GND’ye bağlansaydı amfi kapanırdı. GAIN’i ilk başta boş bıraktım, yani 9 dB. Şemada GAIN ile GND arasında 100 kΩ bir direnç var, ama çekmecemde çıkan dirençler 1 kΩ, 2,2 kΩ ve 320 kΩ’du. 1 kΩ ve 2,2 kΩ amfiye doğrudan GND gibi görünüyor, 320 kΩ ise veri sayfasında tanımlı değil. Yani hiçbiri 15 dB vermiyor.</p><h3>Lehim</h3><h3>Önce pinleri sökmek</h3><p>ESP32 DevKit’im pin başlıkları lehimli geldi. Breadboard için iyiydi, ama kasanın içinde yer yok, kabloları doğrudan kartın deliklerine lehimlemem gerekiyor. Bu yüzden ilk iş başlıkları sökmek oldu. Kartı üçüncü el aparatına sabitledim, büyütecin altında her pini havyayla ısıtıp pense ile tek tek çektim:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mHYl2tva5aG8u3bG.jpg" /></figure><p>Bu iş sabır istiyor. Pin çıkmıyorsa bırakıp pedin soğumasını beklemek gerekiyor, yoksa ped kalkıyor. Sökülen pinler:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YtpdTXc59Gb10WTr.jpg" /></figure><h3>Mikrofon: INMP441</h3><p>İlk lehimlediğim parça mikrofon oldu. Breadboard testinde INMP441&#39;i pin başlığıyla kullanmıştım, ama kasanın içinde başlığa yer yok. Bu yüzden kabloları doğrudan kartın altı pedine lehimledim. Pedlerin adları kartın üstünde yazıyor: üst sırada <strong>GND, VDD, SD</strong>, alt sırada <strong>L/R, WS, SCK</strong>. Ortadaki delik mikrofonun ses girişi, onu kapatmamak gerekiyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tlrg7euhLJDv5Jkv.jpg" /></figure><p>Altı pedin her birine bir kablo geliyor. Yandan bakınca kablolar ve lehim noktaları şöyle görünüyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*e2KorG6erneSgzwi.jpg" /></figure><p>Kabloların ESP32&#39;de gideceği yerler ESPHome ayarındaki (<a href="https://github.com/justicemilitia/bisonar-ai/blob/main/esp32-voice-assistant/code/mic-test.yaml">mic-test.yaml</a>) pinlerle aynı:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/0*f0urd96zwxnd_c9B.png" /></figure><p>Lehim sırasında bir kaza oldu: ESP32&#39;nin <strong>GPIO26</strong> pedi fazla ısınıp yandı. WS kablosunu bunun yerine boştaki <strong>GPIO14</strong>&#39;e lehimledim ve ESPHome ayarında i2s_lrclk_pin&#39;i GPIO14 yaptım. Amfinin LRC&#39;si de aynı hattı paylaştığı için o da GPIO14&#39;e gidiyor. GPIO14 açılışta kısa bir sinyal veriyor, ama I2S hattı için sorun değil.</p><pre>i2s_audio:<br>  - id: i2s_in<br>    i2s_lrclk_pin: GPIO14   # eskiden GPIO26, ped lehimde yandı<br>    i2s_bclk_pin: GPIO25</pre><p>Mikrofon ESP32&#39;ye bağlanmış hâli. Kablolar kısa tutuldu, ESP32 üçüncü elde:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UHHYp5XSn9WzrJuP.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*08GPN7blPhBzY79V.jpg" /></figure><p>Yakından bakınca yanan ped görünüyor. D26 yazısının üstündeki delik boş kaldı, etrafındaki bakır halka zarar görmüş. Kartın kenarı boyunca da ısınmadan kalan kahverengi izler var. WS kablosu artık iki pin soldaki D14&#39;e (GPIO14) gidiyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m4irdrs_CcsXcnkd.jpg" /></figure><p>Bu iş için özel bir şey kullanmadım: sıradan bir havya ve elimde olan ince, tek damarlı kablo. Bu kabloyu tavsiye etmem, çok yumuşak değil ve kasanın içinde bükmek zor. Elinizde varsa <strong>silikon kaplamalı, yumuşak kablo</strong> kullanın, küçük kasada çok daha rahat yerleşir.</p><h3>Amfi ve ESP32</h3><p>Amfi, mikrofonla aynı I2S hattını kullanıyor. Saat sinyalleri (BCLK ve LRC) ortak, sadece veri hattı ayrı. ESP32&#39;de yeni lehimlenen pinler sadece <strong>GPIO27</strong> (ses verisi) ve <strong>VIN</strong> (5 V) oldu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*N6iHp2mioEZ27r7D.png" /></figure><p>Vin’i bilerek 3V3&#39;e değil VIN’e bağladım. Amfi 3,3 V’ta da çalışıyor, ama yüksek seste çektiği akım ESP32&#39;nin 3,3 V regülatörünü zorlar. Birazdan göreceğiz, 5 V’ta bile akım sorun çıkardı.</p><p>Hoparlörün iki ucu amfinin yeşil klemensine vidalanıyor. Tek hoparlörde + ile −’nin yönü önemli değil.</p><p>Amfinin BCLK ve LRC kablolarını ESP32&#39;deki aynı deliğe sokmadım. Mikrofonun SCK ve WS kablolarının ortasını biraz sıyırdım, amfinin kablosunu oraya lehimleyerek köprü yaptım. Açıkta kalan bakırı da ısı makaronuyla kapattım. Böylece ESP32&#39;deki her deliğe tek kablo giriyor, ped bir kez daha ısınmıyor.</p><h3>Lehimden sonra mikrofon testi</h3><p>Yeni ayarı USB’den yükledim ve kayıtları izledim. Kart açıldı, Wi-Fi’ye ve Home Assistant’a bağlandı, uyandırma kelimesi olarak <strong>Hello Bex</strong> yüklendi.</p><p>Mikrofonun ortalama ses seviyesi (RMS) sessiz odada <strong>−37 ile −48 dB</strong> arasında çıktı. Breadboard testinde bu aralık −51 ile −34 dB’ydi. Yani kablolar doğrudan pedlere lehimlendikten sonra mikrofonun duyarlılığında bir kayıp yok.</p><p>Sonra asıl teste geçtim: “Hello Bex”, ardından “hava temizleyiciyi aç”. Bex komutu anladı ve hava temizleyici açıldı. Hoparlör henüz bağlı olmadığı için cevabı duyamadım, ama mikrofon tarafı lehimden sonra da çalışıyor.</p><blockquote><em>Küçük bir hata: ilk denemede yanlış dosyayı, eski “Hey Jarvis” ayarını (</em><em>esp32-assist.yaml) yükledim. Kayıtlarda </em><em>Wake Word: Hey Jarvis görünce fark ettim ve doğru dosya olan </em><em>mic-test.yaml&#39;ı yeniden yükledim.</em></blockquote><h3>İlk ses: “Hava temizleyici açıldı”</h3><p>Amfiyi bağlayıp kartı açtığımda hoparlörden sadece cızırtı geldi. Bu normaldi: ESPHome ayarında henüz hoparlör yoktu, amfinin DIN pini boşta kaldığı için gürültü çalıyordu. Ses ancak üç sorunu çözdükten sonra geldi.</p><h3>1. Hoparlörü ayara eklemek</h3><p>İlk iş ESPHome’a hoparlörü tanıtmak oldu. Mikrofonla aynı I2S hattını (i2s_in) kullanıyor, sesi GPIO27&#39;den çıkarıyor:</p><pre>speaker:<br>  - platform: i2s_audio<br>    id: hoparlor<br>    i2s_audio_id: i2s_in<br>    dac_type: external<br>    i2s_dout_pin: GPIO27   # MAX98357A DIN<br>    channel: mono<br>    bits_per_sample: 32bit<br>    sample_rate: 16000<br>    timeout: 2s</pre><pre>voice_assistant:<br>  id: va<br>  microphone:<br>    microphone: mic<br>  speaker: hoparlor</pre><p>Cızırtı kesildi. “Hello Bex, bugün hava kaç derece” dedim, ses yok.</p><h3>2. “Parent bus is busy”: mikrofon hattı bırakmıyor</h3><p>Kayıtlarda Home Assistant’ın soruyu anladığını ve cevap sesini karta gönderdiğini gördüm. Ama hoparlör her saniye aynı hatayı veriyordu:</p><pre>[E][i2s_audio.speaker.std:427]: Parent bus is busy<br>[E][i2s_audio.speaker:142]: Driver failed to start; retrying in 1 second</pre><p>Mikrofon ve hoparlör aynı I2S hattını paylaşıyor, ama ikisi aynı anda kullanamıyor. Benim test ayarımda mikrofon hiç durmuyordu. Hem uyandırma kelimesi dinleyicisi (stop_after_detection: false) hem de Bölüm 2&#39;deki ses seviyesi sensörü (passive: false) mikrofonu sürekli açık tutuyordu. Hoparlöre sıra hiç gelmiyordu.</p><p>Çözüm, mikrofonu cevap sırasında serbest bırakmak oldu:</p><pre>sensor:<br>  - platform: sound_level<br>    passive: true             # mikrofonu kendisi açık tutmasın</pre><pre>micro_wake_word:<br>  stop_after_detection: true  # &quot;Hello Bex&quot;i duyunca dinlemeyi bıraksın</pre><p>Uyandırma kelimesini dinlemeye ilk denemede on_end&#39;de, yani Home Assistant&#39;ın işi bitince yeniden başlattım. Bu da yetmedi. Cevap sesi Home Assistant&#39;tan parça parça geliyor ve on_end&#39;den sonra da gelmeye devam ediyor. Hoparlör ilk parçayı bekleyip yarım saniye sonra kapandı, mikrofon da o arada hattı geri aldı. Doğru yer, ses akışının bittiği an (on_tts_stream_end):</p><pre>on_tts_stream_end:<br>    - wait_until:<br>        not:<br>          speaker.is_playing: hoparlor<br>    - micro_wake_word.start:</pre><p>Hoparlörün timeout: 2s ayarı da parçalar arasında hemen kapanmasın diye. Bundan sonra Bex ilk kez konuştu: <strong>&quot;Hava temizleyici açıldı.&quot;</strong> Ama ses çok kısıktı, kulağımı hoparlöre dayayınca duyabildim.</p><h3>3. Düşük akım: Bex cümlenin başında susuyor</h3><p>Önceki denemelerden birinde kart, hoparlör çalmaya başladığı an yeniden başlamıştı. Bu yüzden sesi geçici olarak %50&#39;ye indirmiştim, kısık olmasının sebebi buydu. Ses seviyesini Home Assistant’tan ayarlanabilir yaptım, yeniden yüklemeye gerek kalmasın:</p><pre>number:<br>  - platform: template<br>    name: &quot;Hoparlör sesi&quot;<br>    id: hoparlor_sesi<br>    optimistic: true<br>    restore_value: true<br>    min_value: 10<br>    max_value: 100<br>    step: 5<br>    initial_value: 100<br>    on_value:<br>      - speaker.volume_set:<br>          id: hoparlor<br>          volume: !lambda return x / 100.0;</pre><p>Sesi %100&#39;e çıkardım. Bex “Ha…” dedi ve sustu. Kayıtlarda cevabın geldiği, hoparlörün başladığı ve hemen ardından Serial port closed! yazdığı görünüyor. Yani kart cümlenin başında resetlenmişti.</p><p>Sebebi güç. Kart Mac’in USB portuna bağlıydı ve bu port sınırlı akım veriyor. Amfi yüksek seste kısa süreli ama yüksek akım çekiyor, 5 V hattı düşüyor ve ESP32 kapanıp açılıyor. %50&#39;de akım yetiyordu, %100&#39;de yetmedi.</p><p>Kartı evdeki eski bir telefon şarj adaptörüne taktım: Sony CP-AD2, çıkışı <strong>5 V, 2,1 A</strong>. Bex cümleyi bu sefer %100 seste sonuna kadar söyledi ve kart resetlenmedi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DNyRtjoUhjBT-NCH.jpg" /></figure><p>Parçaların hepsini kasanın alt gövdesine yerleştirdim: ortada hoparlör, solda mikrofon ve yeşil klemensli amfi, sağda USB kablosuyla ESP32:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AAwbPVNQxmkCtdu0.jpg" /></figure><p>Ve ilk konuşma. Videoda önce “Hello Bex, hava temizleyiciyi kapat” diyorum, Bex hoparlörden “Hava temizleyici kapatıldı” diye cevap veriyor. Sonra aynısını “aç” komutuyla deniyorum:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*SRra0tVk_v9FsI8l.jpg" /></figure><p><a href="https://cdn.jsdelivr.net/gh/justicemilitia/bisonar-ai@main/esp32-voice-assistant/blog-images/ses-01-hello-bex-sesli-cevap.mp4">▶️ Videoyu sesiyle izleyin</a></p><p>Ses artık geliyordu, ama hâlâ biraz kısıktı. Bu yüzden amfinin GAIN pinini kısa bir kabloyla doğrudan GND’ye bağladım ve kazancı 9 dB’den <strong>12 dB</strong>’ye çıkardım. Ses belirgin şekilde arttı.</p><p>Bir sonraki adım 100 kΩ bir direnç bulup GAIN’i onunla GND’ye bağlamak. Bu kazancı <strong>15 dB</strong>’ye çıkaracak. Kasanın kapağı kapanınca da ses artacak, çünkü kapalı kasa küçük bir ses kutusu gibi çalışıyor.</p><h3>Bu bölümden öğrendiklerim</h3><ul><li><strong>Pinleri sabırla sök.</strong> Ped fazla ısınırsa yanıyor. GPIO26&#39;yı böyle kaybettim, neyse ki ESP32&#39;de boş pin çok.</li><li><strong>Mikrofon ve hoparlör aynı I2S hattını paylaşıyorsa, ikisi aynı anda çalışamaz.</strong> Cevap çalınırken mikrofonu serbest bırakmak gerekiyor. “Parent bus is busy” hatası bunu söylüyor.</li><li><strong>Cevap sesi </strong><strong>on_end&#39;den sonra da gelmeye devam ediyor.</strong> Mikrofonu ses akışı bitince (on_tts_stream_end) ve hoparlör susunca yeniden başlatmak gerekiyor.</li><li><strong>Bilgisayarın USB portu bir amfi için yetmeyebilir.</strong> Kart sebepsiz resetleniyorsa önce besleme kontrol edilmeli. 2,1 A’lik bir telefon adaptörü sorunu çözdü.</li><li><strong>Kayıtlar her şeyi söylüyor.</strong> Her sorunun cevabı ESPHome kayıtlarındaydı: yanlış uyandırma kelimesi, meşgul hat, USB kopması.</li></ul><h3>Sırada ne var?</h3><p>Bex artık duyuyor ve konuşuyor. Sırada kasanın kapağını kapatmak ve sesi 100 kΩ dirençle biraz daha açmak var. LED şeridi elime geçerse onu da ayrı bir bölümde ekleyeceğim.</p><p>💻 Bu bölümdeki ESPHome ayarının tamamı GitHub’da: <a href="https://github.com/justicemilitia/bisonar-ai/blob/main/esp32-voice-assistant/code/mic-test.yaml">https://github.com/justicemilitia/bisonar-ai/blob/main/esp32-voice-assistant/code/mic-test.yaml</a></p><p>🛠️ Projenin adım adım İngilizce anlatımı Instructables’ta: <a href="https://www.instructables.com/DIY-ESP32-Voice-Assistant-for-Home-Assistant-With-/">https://www.instructables.com/DIY-ESP32-Voice-Assistant-for-Home-Assistant-With-/</a></p><h3>Serinin bölümleri</h3><ul><li><a href="https://medium.com/p/64323de4c397">Bölüm 1</a></li><li><a href="https://medium.com/p/75d280070e51">Bölüm 2</a></li><li><a href="https://medium.com/p/5eaf14a5fa28">Bölüm 3</a></li><li><a href="https://medium.com/p/6b82072eebcb">Bölüm 4</a></li><li><a href="https://medium.com/p/3e6e2db06da5">Bölüm 5</a></li><li><a href="https://medium.com/p/af83b6ae2b9f">Bölüm 6</a></li><li><strong>Bölüm 7</strong> (bu yazı)</li></ul><blockquote><em>Kasa tasarımı: ImpatientMaker (JakeB’nin “Voice Assist Puck” remix’i), CC BY-NC 4.0. ESPHome kodu: impatientmaker/esphome-voice-assist (MIT). Tüm atıflar </em><a href="https://medium.com/p/64323de4c397"><em>Bölüm 1</em></a><em>&#39;de.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61d67d69d70d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Connecting an Ordinary Logitech Webcam to the Creality Ender-3 V3 KE — Part 3: Camera Mount]]></title>
            <link>https://medium.com/@barancanaydn/connecting-an-ordinary-logitech-webcam-to-the-creality-ender-3-v3-ke-part-3-camera-mount-7f01af1ef4e2?source=rss-8732faaf083------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f01af1ef4e2</guid>
            <category><![CDATA[webcam]]></category>
            <category><![CDATA[diy]]></category>
            <category><![CDATA[logitech]]></category>
            <category><![CDATA[creality]]></category>
            <category><![CDATA[3d-printing]]></category>
            <dc:creator><![CDATA[Baran Can Aydın]]></dc:creator>
            <pubDate>Fri, 06 Nov 2026 18:19:50 GMT</pubDate>
            <atom:updated>2026-11-06T18:19:50.408Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@barancanaydn/ender-3-v3-keye-s%C4%B1radan-bir-logitech-webcam-ba%C4%9Flamak-b%C3%B6l%C3%BCm-3-kamera-tutucu-4254894e8cc2"><em>Türkçe versiyonu</em></a></p><p>In <a href="https://medium.com/@barancanaydn/connecting-an-ordinary-logitech-webcam-to-the-creality-ender-3-v3-ke-part-1-getting-the-camera-0db95a65881e">Part 1</a> I got the Logitech C310 working with the printer’s own camera service, and in <a href="https://medium.com/@barancanaydn/connecting-an-ordinary-logitech-webcam-to-the-creality-ender-3-v3-ke-part-2-home-assistant-8816b9574bd6">Part 2</a> I added the picture to Home Assistant. Until now the camera was simply placed in front of the bed by hand. In this part I print a mount that holds it on the printer.</p><h3>Which mount?</h3><p>Instead of designing one myself, I found a ready-made model on Printables: <a href="https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270">Ender 3 V3 SE / KE Logitech Webcam Camera Mount (C270 or similar)</a> by FeetOffTheTable. Why I picked it:</p><ul><li>It is designed for the Ender-3 V3 SE/KE.</li><li>No supports, no screws, no assembly. The mount slides onto the right end of the X gantry and the camera sits on it with its own clip.</li><li>It was made for the C270, but according to Logitech’s specs the C310 has the same body dimensions.</li></ul><h3>Printing</h3><p>🔗 The model I printed: <a href="https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270">https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270</a></p><blockquote><strong><em>Credit:</em></strong><em> The mount design is not mine. </em><strong><em>FeetOffTheTable</em></strong><em> shares the 3D file on Printables; I downloaded it from there and printed it. Thank you!</em></blockquote><p>I started the print from OrcaSlicer. The camera I added to Orca’s Device tab in Part 1 is now watching its own mount being printed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zlhEkQIXQ0p29HNF.jpg" /></figure><p>The first attempt didn’t make it: the nozzle clogged. I put the printer into filament unload mode from the screen, which heats the nozzle to 240 °C. While it was hot, I pushed the filament down by hand from the top, at the extruder inlet. Filament started flowing and the nozzle cleared. Then I started the print again from scratch.</p><p>I printed it in PLA, straight, without supports. The print took 46 minutes and came out clean.</p><h3>Mounting</h3><p>The mount slides onto the right end of the X gantry, right next to the Z extrusion. No screws, you just push it on:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xktSYvsNrRTHhsFn.jpg" /></figure><p>The C310 clipped onto the end of the mount with its own clip. Even though the mount was designed for the C270, there is no play and the camera doesn’t wobble:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2h2f9JmtfrSeTJcd.jpg" /></figure><p>Because the mount sits on the X gantry, the camera moves up with Z. It stays at the same height relative to the nozzle, so the print doesn’t leave the frame as it grows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*j3hNxDfZDLpaQPdQ.jpg" /></figure><p>Since the camera and mount move together with the X gantry, nothing can hit anything, even at max Z.</p><h3>The new view</h3><p>The camera now looks from the right end of the X gantry, seeing the print head and the whole bed from the side. This is the view in Orca’s Device tab:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UEcA15W3GiDMrZ5N.jpg" /></figure><p>With the X gantry at the bottom, at the start of a print, the camera sits just above the bed. The bed fills almost the whole frame, so the first layer is seen up close:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wTfqErklAILb8sIN.jpg" /></figure><h3>Result</h3><ul><li>The ready-made mount from Printables fit the C310 perfectly, even though it was designed for the C270.</li><li>It printed in PLA without supports in 46 minutes. No screws, no assembly.</li><li>The camera sits on the X gantry and moves up with Z. Orca and Home Assistant show the same stream, now from a fixed angle.</li></ul><p>That completes the series: an 8-year-old Logitech webcam working with the printer’s own camera service, in Safari, in OrcaSlicer and in Home Assistant, and now fixed on the printer.</p><p><strong>Credit:</strong> The 3D design of the camera mount is by <strong>FeetOffTheTable</strong>: <a href="https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270">https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270</a></p><p>💻 Code and images on GitHub: <a href="https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam">https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f01af1ef4e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ender-3 V3 KE’ye Sıradan Bir Logitech Webcam Bağlamak — Bölüm 3: Kamera Tutucu]]></title>
            <link>https://medium.com/@barancanaydn/ender-3-v3-keye-s%C4%B1radan-bir-logitech-webcam-ba%C4%9Flamak-b%C3%B6l%C3%BCm-3-kamera-tutucu-4254894e8cc2?source=rss-8732faaf083------2</link>
            <guid isPermaLink="false">https://medium.com/p/4254894e8cc2</guid>
            <category><![CDATA[3d-yazıcı]]></category>
            <category><![CDATA[logitech]]></category>
            <category><![CDATA[creality]]></category>
            <category><![CDATA[webcam]]></category>
            <category><![CDATA[3d-printing]]></category>
            <dc:creator><![CDATA[Baran Can Aydın]]></dc:creator>
            <pubDate>Fri, 06 Nov 2026 18:18:46 GMT</pubDate>
            <atom:updated>2026-11-06T18:18:46.100Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.bisonar.com/en/blog/ender-3-v3-ke-webcam-mount"><em>English version</em></a></p><p><a href="https://medium.com/@barancanaydn/ender-3-v3-keye-s%C4%B1radan-bir-logitech-webcam-ba%C4%9Flamak-b%C3%B6l%C3%BCm-1-kameray%C4%B1-%C3%A7al%C4%B1%C5%9Ft%C4%B1rmak-841df69e094b">Bölüm 1</a>&#39;de Logitech C310&#39;u yazıcının kendi kamera servisiyle çalıştırdım, <a href="https://medium.com/@barancanaydn/ender-3-v3-keye-s%C4%B1radan-bir-logitech-webcam-ba%C4%9Flamak-b%C3%B6l%C3%BCm-2-home-assistant-b3cc70319baf">Bölüm 2</a>&#39;de görüntüyü Home Assistant’a ekledim. Kamera şimdiye kadar tablanın önünde elle yerleştirilmiş duruyordu. Bu bölümde onu yazıcıya sabitleyen bir tutucu basıyorum.</p><h3>Hangi tutucu?</h3><p>Kendim çizmek yerine Printables’ta hazır bir model buldum: FeetOffTheTable’ın <a href="https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270">Ender 3 V3 SE / KE Logitech Webcam Camera Mount (C270 or similar)</a> modeli. Seçmemin nedenleri:</p><ul><li>Doğrudan Ender-3 V3 SE/KE için çizilmiş.</li><li>Destek, vida ya da montaj gerekmiyor. Tutucu X kirişinin sağ ucuna geçiyor, kamera kendi klipsiyle tutucuya oturuyor.</li><li>C270 için yapılmış, ama C310&#39;un gövdesi Logitech’in verdiği ölçülere göre C270 ile aynı.</li></ul><h3>Baskı</h3><p>🔗 Bastığım model: <a href="https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270">https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270</a></p><blockquote><strong><em>Atıf:</em></strong><em> Tutucunun tasarımı bana ait değil. 3D dosyasını </em><strong><em>FeetOffTheTable</em></strong><em> Printables’ta paylaşıyor, ben oradan indirip bastım. Teşekkürler!</em></blockquote><p>Baskıyı OrcaSlicer’dan başlattım. Bölüm 1&#39;de Orca’nın Cihaz sekmesine eklediğim kamera, kendi tutucusunun basılışını izliyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4Cm_Eie-jehjetk6.jpg" /></figure><p>İlk deneme yarıda kaldı: nozul tıkandı. Yazıcıyı ekrandan filament çıkarma moduna aldım, nozul 240 °C’ye ısındı. Bu sırada filamenti üst taraftan, ekstrüderin girişinden elle aşağı ittim. Filament akmaya başladı, nozul açıldı. Sonra baskıyı sıfırdan yeniden başlattım.</p><p>Filament olarak PLA kullandım, destek eklemeden düz bastım. Baskı 46 dakika sürdü ve temiz çıktı.</p><h3>Montaj</h3><p>Tutucu, X kirişinin sağ ucuna, Z profilinin hemen yanına geçiyor. Vida yok, sadece itip oturtuyorsunuz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a7FOx_SzeEpf6RKh.jpg" /></figure><p>C310 kendi klipsiyle tutucunun ucuna oturdu. C270 için çizilmiş olsa da boşluk yok, kamera sallanmıyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L5WCGblVcmIHGSoU.jpg" /></figure><p>Tutucu X kirişine bağlı olduğu için kamera Z ile birlikte yükseliyor. Böylece nozula göre hep aynı yükseklikte kalıyor, baskı uzadıkça görüntüden çıkmıyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BPovAAfnthHomcsn.jpg" /></figure><p>Kamera ve tutucu X kirişiyle birlikte hareket ettiği için Z en üstteyken de hiçbir yere çarpmıyor.</p><h3>Yeni görüntü</h3><p>Kamera artık X kirişinin sağ ucundan, kafanın ve tablanın tamamına yandan bakıyor. Orca’nın Cihaz sekmesinde görüntü şöyle:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6qTVvhsX5P-7jySV.jpg" /></figure><p>X kirişi en aşağıdayken, yani baskının başında, kamera tablanın hemen üstünde kalıyor. Tabla görüntünün neredeyse tamamını kaplıyor, ilk katman yakından görünüyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hI_k6KwkQoQz_WfE.jpg" /></figure><h3>Sonuç</h3><ul><li>Printables’taki hazır tutucu, C270 için çizilmiş olmasına rağmen C310&#39;a tam oturdu.</li><li>PLA ile, destek olmadan 46 dakikada basıldı. Vida ya da montaj gerekmedi.</li><li>Kamera X kirişinde, Z ile birlikte yükseliyor. Orca’da ve Home Assistant’ta aynı akış, artık sabit bir açıdan.</li></ul><p>Böylece seri tamamlandı: 8 yıllık bir Logitech webcam, yazıcının kendi kamera servisinde, Safari’de, OrcaSlicer’da ve Home Assistant’ta çalışıyor ve yazıcının üstünde sabit duruyor.</p><p><strong>Atıf:</strong> Kamera tutucusunun 3D tasarımı <strong>FeetOffTheTable</strong>’a ait: <a href="https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270">https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270</a></p><p>💻 Kod ve görseller GitHub’da: <a href="https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam">https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4254894e8cc2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Connecting an Ordinary Logitech Webcam to the Creality Ender-3 V3 KE — Part 2: Home Assistant]]></title>
            <link>https://medium.com/@barancanaydn/connecting-an-ordinary-logitech-webcam-to-the-creality-ender-3-v3-ke-part-2-home-assistant-8816b9574bd6?source=rss-8732faaf083------2</link>
            <guid isPermaLink="false">https://medium.com/p/8816b9574bd6</guid>
            <category><![CDATA[smart-home]]></category>
            <category><![CDATA[home-assistant]]></category>
            <category><![CDATA[webcam]]></category>
            <category><![CDATA[creality]]></category>
            <category><![CDATA[3d-printing]]></category>
            <dc:creator><![CDATA[Baran Can Aydın]]></dc:creator>
            <pubDate>Thu, 05 Nov 2026 00:04:52 GMT</pubDate>
            <atom:updated>2026-11-06T18:27:55.657Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@barancanaydn/ender-3-v3-keye-s%C4%B1radan-bir-logitech-webcam-ba%C4%9Flamak-b%C3%B6l%C3%BCm-2-home-assistant-b3cc70319baf"><em>Türkçe versiyonu</em></a></p><p>In <a href="https://medium.com/@barancanaydn/connecting-an-ordinary-logitech-webcam-to-the-creality-ender-3-v3-ke-part-1-getting-the-camera-0db95a65881e">Part 1</a> I got an 8-year-old Logitech C310 working with the Ender-3 V3 KE’s own camera service. The picture is now streamed on the printer’s port 8080. In this part I bring that same picture into Home Assistant, so the printer sits on the same dashboard as my <a href="https://www.bisonar.com/en/blog/esp32-voice-assistant-part-1-plan-and-parts">ESP32 voice assistant</a>, the robot vacuum and the air purifier.</p><p>This part is much shorter than Part 1, because the hard work was done there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/0*bE7_n7GOHBldwbPd.jpg" /></figure><h3>Which integration?</h3><p>The printer already runs an mjpg_streamer that offers two addresses:</p><ul><li>Live stream: http://&lt;printer-ip&gt;:8080/?action=stream</li><li>Single frame: http://&lt;printer-ip&gt;:8080/?action=snapshot</li></ul><p>Home Assistant’s built-in <strong>MJPEG IP Camera</strong> integration asks for exactly these two. No add-on, no HACS and no YAML needed.</p><h3>Setup</h3><ol><li>Settings &gt; Devices &amp; services &gt; <strong>Add integration</strong>.</li><li>I searched for “MJPEG” and picked <strong>MJPEG IP Camera</strong>.</li><li>I filled in the fields like this:</li><li><strong>Name:</strong> Ender-3 V3 KE Kamera</li><li><strong>MJPEG URL:</strong> http://&lt;printer-ip&gt;:8080/?action=stream</li><li><strong>Still image URL:</strong> http://&lt;printer-ip&gt;:8080/?action=snapshot</li><li>Username and password empty. The printer’s stream has no password.</li><li>I pressed <strong>Submit</strong> and confirmed the device name.</li></ol><p>Home Assistant created a camera entity called camera.ender_3_v3_ke_kamera.</p><h3>A dashboard card</h3><p>I added the camera to my main dashboard in a new “3D Yazıcı” (3D printer) section. The card type is <strong>Picture entity</strong> with the <strong>live</strong> camera view:</p><pre>type: picture-entity<br>entity: camera.ender_3_v3_ke_kamera<br>camera_view: live<br>show_state: false<br>name: Ender-3 V3 KE</pre><h3>First test: dark again</h3><p>When I first opened the card, the picture was pitch black. Part 1 had taught me not to panic. I downloaded the frame Home Assistant served: a valid 1280×720 JPEG with an average brightness of 2 out of 255. The camera was working, the room was dark again. With the light on, the picture came through. The screenshot above is from the Home Assistant app on an Android phone. The camera now sits in front of the bed and sees the whole printer.</p><h3>The Huffman table again</h3><p>In Part 1 I explained that the Logitech’s MJPEG frames have no Huffman table (DHT), which is why Safari and macOS couldn’t open them. Home Assistant passes frames through as they come from the camera. The frame I downloaded from HA’s camera URL had no table either:</p><pre>200 image/jpeg bytes=21818 dht=0</pre><p>That is no problem in Chrome or in the Home Assistant app on Android, as both fill in the missing table themselves. Browsers and apps built on Safari’s WebKit engine (Safari on the Mac, iPhone and iPad) will most likely show a broken image. I have no iPhone at home, so I couldn’t test that. If you run into it, Home Assistant’s <strong>FFmpeg camera</strong> platform may help: FFmpeg re-encodes the frames and adds the standard table. I haven’t tried it, so I’m not giving step-by-step instructions here.</p><h3>Result</h3><ul><li>After the patch from Part 1, the Home Assistant side is a single built-in integration: <strong>MJPEG IP Camera</strong>, two URLs, that’s it.</li><li>The camera shows live on the main dashboard and works in the Android app.</li><li>Because the frames have no Huffman table, Safari-based clients may have trouble. I couldn’t test that.</li></ul><h3>What’s next</h3><p>Right now the camera is just placed by hand. In the next part I’ll print a mount that holds it on the printer. The model I printed: <a href="https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270">the model on Printables</a>. It’s out now: <a href="https://medium.com/@barancanaydn/connecting-an-ordinary-logitech-webcam-to-the-creality-ender-3-v3-ke-part-3-camera-mount-7f01af1ef4e2">Part 3: Camera Mount</a>.</p><p>💻 Code and images on GitHub: <a href="https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam">https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8816b9574bd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ender-3 V3 KE’ye Sıradan Bir Logitech Webcam Bağlamak — Bölüm 2: Home Assistant]]></title>
            <link>https://medium.com/@barancanaydn/ender-3-v3-keye-s%C4%B1radan-bir-logitech-webcam-ba%C4%9Flamak-b%C3%B6l%C3%BCm-2-home-assistant-b3cc70319baf?source=rss-8732faaf083------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3cc70319baf</guid>
            <category><![CDATA[webcam]]></category>
            <category><![CDATA[3d-yazıcı]]></category>
            <category><![CDATA[creality]]></category>
            <category><![CDATA[akıllı-ev]]></category>
            <category><![CDATA[home-assistant]]></category>
            <dc:creator><![CDATA[Baran Can Aydın]]></dc:creator>
            <pubDate>Thu, 05 Nov 2026 00:03:35 GMT</pubDate>
            <atom:updated>2026-11-06T18:27:24.261Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.bisonar.com/en/blog/ender-3-v3-ke-webcam-home-assistant"><em>English version</em></a></p><p><a href="https://medium.com/@barancanaydn/ender-3-v3-keye-s%C4%B1radan-bir-logitech-webcam-ba%C4%9Flamak-b%C3%B6l%C3%BCm-1-kameray%C4%B1-%C3%A7al%C4%B1%C5%9Ft%C4%B1rmak-841df69e094b">Bölüm 1</a>&#39;de 8 yıllık Logitech C310&#39;u Ender-3 V3 KE’nin kendi kamera servisiyle çalıştırdım. Görüntü artık yazıcının 8080 portunda yayınlanıyor. Bu bölümde aynı görüntüyü Home Assistant’a getiriyorum. Böylece yazıcı, <a href="https://www.bisonar.com/tr/blog/esp32-sesli-asistan-bolum-1-plan-ve-parcalar">ESP32 sesli asistanım</a>, robot süpürge ve hava temizleyiciyle aynı panoda duruyor.</p><p>Bu bölüm Bölüm 1&#39;e göre çok kısa, çünkü zor kısmı orada hallettim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/0*XDNQmz_xfU2NLxvM.jpg" /></figure><h3>Hangi entegrasyon?</h3><p>Yazıcının içinde zaten bir mjpg_streamer çalışıyor ve iki adres veriyor:</p><ul><li>Canlı akış: http://&lt;yazıcı-ip&gt;:8080/?action=stream</li><li>Tek kare: http://&lt;yazıcı-ip&gt;:8080/?action=snapshot</li></ul><p>Home Assistant’ın hazır <strong>MJPEG IP Camera</strong> entegrasyonu tam olarak bu iki adresi istiyor. Ek bir eklenti, HACS ya da YAML gerekmiyor.</p><h3>Kurulum</h3><ol><li>Ayarlar &gt; Cihazlar ve Hizmetler &gt; <strong>Entegrasyon ekle</strong>.</li><li>Arama kutusuna “MJPEG” yazıp <strong>MJPEG IP Camera</strong>’yı seçtim.</li><li>Alanları şöyle doldurdum:</li><li><strong>Ad:</strong> Ender-3 V3 KE Kamera</li><li><strong>MJPEG URL’si:</strong> http://&lt;yazıcı-ip&gt;:8080/?action=stream</li><li><strong>Durağan görüntü URL’si:</strong> http://&lt;yazıcı-ip&gt;:8080/?action=snapshot</li><li>Kullanıcı adı ve şifre boş. Yazıcının akışı şifresiz.</li><li><strong>Gönder</strong> dedim ve cihaz adını onayladım.</li></ol><p>Home Assistant camera.ender_3_v3_ke_kamera adında bir kamera varlığı oluşturdu.</p><h3>Ana Pano’ya kart</h3><p>Kamerayı Ana Pano’da yeni bir “3D Yazıcı” bölümüne ekledim. Kart tipi <strong>Resim varlık</strong> (picture-entity), kamera görünümü <strong>canlı</strong>:</p><pre>type: picture-entity<br>entity: camera.ender_3_v3_ke_kamera<br>camera_view: live<br>show_state: false<br>name: Ender-3 V3 KE</pre><h3>İlk test: yine karanlık</h3><p>Kartı ilk açtığımda görüntü simsiyahtı. Bölüm 1&#39;den ders almıştım, paniğe kapılmadım. Home Assistant’ın verdiği kareyi indirip baktım: 1280×720 boyutunda geçerli bir JPEG, ama ortalama parlaklığı 255 üzerinden 2. Yani kamera çalışıyordu, oda yine karanlıktı. Işığı açınca görüntü geldi. Yukarıdaki ekran görüntüsü Android telefondaki Home Assistant uygulamasından. Kamera artık tablanın önünde, yazıcının tamamını görüyor.</p><h3>Huffman tablosu meselesi</h3><p>Bölüm 1&#39;de Logitech’in MJPEG karelerinde Huffman tablosu (DHT) olmadığını, bu yüzden Safari’nin ve macOS’un bu kareleri açamadığını anlatmıştım. Home Assistant kareleri kameradan geldiği gibi aktarıyor. HA’nın kamera adresinden indirdiğim karede de tablo yoktu:</p><pre>200 image/jpeg bytes=21818 dht=0</pre><p>Bu, Chrome’da ve Android’deki Home Assistant uygulamasında sorun değil, ikisi de eksik tabloyu kendisi tamamlıyor. Safari’nin motoru WebKit’i kullanan tarayıcılarda ve uygulamalarda (Mac’te Safari, iPhone ve iPad) ise görüntünün kırık çıkması muhtemel. Benim evde iPhone olmadığı için bunu deneyemedim. Bu sorunu yaşayan olursa Home Assistant’ın <strong>FFmpeg kamera</strong> platformu bir çözüm olabilir. FFmpeg kareleri yeniden kodladığı için standart tabloyu da ekliyor. Ama bunu denemediğim için burada adım adım anlatmıyorum.</p><h3>Sonuç</h3><ul><li>Bölüm 1&#39;deki yamadan sonra Home Assistant tarafı tek bir hazır entegrasyondan ibaret: <strong>MJPEG IP Camera</strong>, iki adres, hepsi bu.</li><li>Kamera Ana Pano’da canlı görünüyor, Android uygulamasında da çalışıyor.</li><li>Kare Huffman tablosu içermediği için Safari tabanlı istemcilerde sorun çıkabilir. Bunu test edemedim.</li></ul><h3>Sırada ne var?</h3><p>Kamerayı şu an elle yerleştirdim. Bir sonraki bölümde onu yazıcıya sabitleyen bir tutucu basacağım. Bastığım model: <a href="https://www.printables.com/model/1161793-ender-3-v3-se-ke-logitech-webcam-camera-mount-c270">Printables’taki model</a>. Yazısı hazır: <a href="https://medium.com/@barancanaydn/ender-3-v3-keye-s%C4%B1radan-bir-logitech-webcam-ba%C4%9Flamak-b%C3%B6l%C3%BCm-3-kamera-tutucu-4254894e8cc2">Bölüm 3: Kamera Tutucu</a>.</p><p>💻 Kod ve görseller GitHub’da: <a href="https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam">https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3cc70319baf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Connecting an Ordinary Logitech Webcam to the Creality Ender-3 V3 KE — Part 1: Getting the Camera…]]></title>
            <link>https://medium.com/@barancanaydn/connecting-an-ordinary-logitech-webcam-to-the-creality-ender-3-v3-ke-part-1-getting-the-camera-0db95a65881e?source=rss-8732faaf083------2</link>
            <guid isPermaLink="false">https://medium.com/p/0db95a65881e</guid>
            <category><![CDATA[orca-slicer]]></category>
            <category><![CDATA[creality]]></category>
            <category><![CDATA[webcam]]></category>
            <category><![CDATA[klipper]]></category>
            <category><![CDATA[3d-printing]]></category>
            <dc:creator><![CDATA[Baran Can Aydın]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 23:28:40 GMT</pubDate>
            <atom:updated>2026-11-04T23:28:40.598Z</atom:updated>
            <content:encoded><![CDATA[<h3>Connecting an Ordinary Logitech Webcam to the Creality Ender-3 V3 KE — Part 1: Getting the Camera Working</h3><p><a href="https://medium.com/@barancanaydn/ender-3-v3-keye-s%C4%B1radan-bir-logitech-webcam-ba%C4%9Flamak-b%C3%B6l%C3%BCm-1-kameray%C4%B1-%C3%A7al%C4%B1%C5%9Ft%C4%B1rmak-841df69e094b"><em>Türkçe versiyonu</em></a></p><p>Creality sells an official camera for the Ender-3 V3 KE, the Nebula Camera. You plug it into USB and it works. What I had in a drawer was an 8-year-old Logitech webcam. My question was simple: can this ordinary webcam replace Creality’s own camera?</p><p>I couldn’t find a clear source that confirmed it. There were KE owners asking the same question on the Creality forum, but I didn’t see an answer. So I tried it myself. This post is the story of that trip: from plug and play, into the Linux system inside the printer, through Creality’s camera scripts, and finally down to the bytes of a JPEG file.</p><p><strong>Short answer:</strong> Yes, it works. The camera now starts with the printer’s own camera service and shows a live picture in the browser and in OrcaSlicer’s Device tab. But I had to get past two obstacles, and neither was where I expected it.</p><h3>What I have</h3><ul><li><strong>Printer:</strong> Creality Ender-3 V3 KE, Klipper-based Creality OS V1.1.0.15</li><li><strong>Webcam:</strong> a Logitech webcam I bought about 8 years ago, so no extra cost for this project. I thought it was a C505E, but it turned out to be a C310 (more on that below).</li><li><strong>Computer:</strong> a Mac (for SSH, Creality Print, Creality Cloud and OrcaSlicer)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hS-hP8wLbN_9fZbg.jpg" /></figure><p>To see where the camera could go, I first held it in front of the bed. A proper mount is the next job.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Cj7FFxKuuXehk9kI.jpg" /></figure><h3>The plan</h3><ol><li>Plug and play first: plug the webcam into the printer’s USB port and check for a picture in Creality Print.</li><li>If that fails, root: use SSH to see whether the system sees the camera at all.</li><li>Get the picture onto the computer somehow.</li></ol><h3>First try: plug and play</h3><p>I plugged the webcam into the printer’s USB port and opened the Device tab in Creality Print on the Mac. The printer showed up on the network with temperatures and axis controls. The camera area had no picture, only this warning: “Please check Does the printer camera device work properly.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y4GOkZQGf8cD6dog.jpg" /></figure><p>Maybe it only looks for a camera at boot, so I restarted the printer with the webcam plugged in. Same result.</p><p>To find out whether the system didn’t see the camera at all, or saw it but Creality’s software didn’t use it, I had to look inside the printer. Creality offers official root access on this printer (Settings &gt; Root account information). Root may affect the warranty. Mine had already expired, so I had nothing to lose.</p><h3>Looking inside with root</h3><p>I enabled root and connected from the Mac over SSH. Inside the printer runs a small computer with a MIPS CPU and a Linux 4.4 kernel:</p><pre>Linux Ender3V3KE-XXXX 4.4.94 #7 SMP PREEMPT Tue Aug 6 09:11:30 CST 2024 mips GNU/Linux</pre><p>The first surprise came from lsusb:</p><pre>Bus 001 Device 006: ID 046d:081b Logitech, Inc. Webcam C310</pre><p>My camera wasn’t a C505E but a <strong>Logitech C310</strong>. They look almost the same and both are 720p. What matters to the printer is that the camera supports the UVC standard.</p><p>The kernel log (dmesg) had good news. The UVC driver had recognized the camera:</p><pre>uvcvideo: Found UVC 1.00 device &lt;unnamed&gt; (046d:081b)<br>auto_uvc.sh (952): drop_caches: 3</pre><p>At boot the camera connected and dropped a few times, and once the driver failed to start it (error -71, usually USB power or cable). On the last attempt it was recognized properly and /dev/video4 appeared. The other video devices are the printer chip&#39;s own internal units:</p><pre>/sys/class/video4linux/video0: ingenic-rot<br>/sys/class/video4linux/video1: helix-venc<br>/sys/class/video4linux/video2: felix-vdec<br>/sys/class/video4linux/video3: Dummy video device (0x0000)<br>/sys/class/video4linux/video4: UVC Camera (046d:081b)</pre><p>So the hardware and driver side worked. The problem was that Creality’s software didn’t use the camera. The script that runs when a camera is plugged in was right there in dmesg: auto_uvc.sh.</p><h3>What does auto_uvc.sh do?</h3><p>The script lives at /usr/bin/auto_uvc.sh, with the original in the read-only /rom partition. There is no brand or model check in it. In short it does this:</p><ol><li>If the camera appears under /dev/v4l/by-id/ as main-video…, it carries on.</li><li>If the camera doesn’t support MJPG, it stops.</li><li>It starts Creality’s cam_app program, which always asks for <strong>1920×1080 at 15 fps</strong>.</li><li>It streams the picture with mjpg_streamer on port <strong>8080</strong>.</li><li>MAIN_PIC_WIDTH=1920 MAIN_PIC_HEIGHT=1080 MAIN_PIC_FPS=15</li></ol><p>According to v4l2-ctl --list-formats-ext, the C310 supports MJPG but tops out at 1280×960 and 1280×720. <strong>1920×1080 is not on the list.</strong> And ps showed neither cam_app nor mjpg_streamer. That was my first suspicion: cam_app asks for a resolution the camera can&#39;t give and exits.</p><h3>The real culprit: /tmp/.cam_version</h3><p>I started cam_app by hand at 1280×720. It still exited within seconds, so my suspicion was wrong. cam_app doesn&#39;t print errors to the screen. It writes them to its own log (/usr/data/creality/userdata/log/cam_app.log), which had the same lines for every attempt:</p><pre>[INFO]-[ingenic_video.c](569) realpath: /dev/video4<br>[ERROR]-[ingenic_video.c](450) open file /tmp/.cam_version failed!<br>[INFO]-[ingenic_video.c](1075) service will exit, ret = -1</pre><p>cam_app looks for /tmp/.cam_version at startup and exits when it isn&#39;t there. That file is written by the fw_info function in auto_uvc.sh, but only if cam_util can read a firmware version from the camera. On the C310, cam_util replied:</p><pre>Could not find/open sonix device<br>Device /dev/v4l/by-id/main-video-4 opened: UVC Camera (046d:081b).<br>ioctl(UVCIOC_CTRL_SET) FAILED (-1)<br>Get uvc extend unit id fail</pre><p>cam_util tries to talk to a Sonix chip in the camera over a vendor-specific UVC &quot;extension unit&quot;. Creality&#39;s camera answers there. The Logitech doesn&#39;t. So the version file never gets written and cam_app never starts. There is no explicit brand lock in the software, but there is an indirect one.</p><p>I wrote the file by hand, in the format the script uses, with “Logitech” as the manufacturer. cam_app read it but still exited:</p><pre>[INFO]-[ingenic_video.c](455) fw_info json file: { &quot;main_cam&quot;: { ... &quot;manufactory&quot;: &quot;Logitech&quot;, ... } }<br>[INFO]-[ingenic_video.c](1075) service will exit, ret = -1</pre><p>The script mentions two manufacturer names, STsmart_- and STJC-000I, which are the names in Creality cameras&#39; firmware. I replaced &quot;Logitech&quot; with STsmart_- and tried again:</p><pre>/usr/bin/cam_app -i /dev/v4l/by-id/main-video-4 -t 0 -w 1280 -h 720 -f 15 -c<br>/usr/bin/mjpg_streamer -i input_memfd.so -t 0 -o output_http.so -w /usr/share/mjpg-streamer/www/ -p 8080</pre><p>This time both stayed up, and at http://&lt;printer-ip&gt;:8080/?action=stream in the browser <strong>the first picture appeared</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GjsBtGIAapmh3x8S.jpg" /></figure><p>A few minutes later the picture went completely black. I was about to start debugging a dead camera when I realized I had switched off the room light. With the light back on, the picture came back:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MnMus1FrZL6Mr5hz.jpg" /></figure><h3>A permanent patch</h3><p>The file I wrote by hand was in /tmp and would be gone after a reboot. So I made a patched copy of auto_uvc.sh (<a href="https://github.com/justicemilitia/bisonar-ai/blob/main/creality-usb-webcam/code/auto_uvc.sh">code/auto_uvc.sh</a>). It differs from the original in two ways:</p><ol><li>If cam_util can&#39;t read firmware info from the camera, the script writes /tmp/.cam_version itself with STsmart_- as the manufacturer. It keeps updates switched off (can_update: false), so the printer never tries to flash Creality camera firmware onto the Logitech.</li><li>If the camera has no 1920×1080 MJPG mode, it uses 1280×720. Creality’s own camera still gets 1080p.</li></ol><p>Installing it takes two commands:</p><pre>scp -O code/auto_uvc.sh root@&lt;printer-ip&gt;:/tmp/auto_uvc.sh<br>ssh root@&lt;printer-ip&gt; &quot;sh -n /tmp/auto_uvc.sh &amp;&amp; cp /tmp/auto_uvc.sh /usr/bin/auto_uvc.sh &amp;&amp; chmod +x /usr/bin/auto_uvc.sh&quot;</pre><p>sh -n checks the syntax first, and nothing is copied if it fails. Going back is one command too, because the original stays in /rom:</p><pre>ssh root@&lt;printer-ip&gt; &quot;cp /rom/usr/bin/auto_uvc.sh /usr/bin/auto_uvc.sh&quot;</pre><p>After a reboot the camera came up on its own without any commands. The printer’s main service now sees it too:</p><pre>pack_camera_status: {&quot;cameras&quot;:{&quot;camera_main&quot;:{&quot;online&quot;:1},&quot;camera_sub&quot;:{&quot;online&quot;:0}}}<br>[Heartbeat] udisk0 = 0, ethernet = 0, camera0 = 1</pre><h3>Creality Print and Creality Cloud</h3><p>The browser had a picture, but Creality Print still didn’t. That’s because Creality’s apps don’t use port 8080. They use a separate webrtc service, which takes H.264 video from cam_app and sets up the connection through Creality&#39;s cloud (api.crealitycloud.com), not over the local network. There is no local WebRTC port open on the printer.</p><p>Creality Print never started a connection. In the Creality Cloud desktop app, though, a ▶ button appeared in the camera area, so the cloud does see the camera. Pressing it set up a connection:</p><pre>&quot;pcPool&quot;: [{ &quot;iceState&quot;: &quot;connected&quot;, ... }]</pre><p>But the screen stayed grey:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*47e3cNvWiid3TWCb.jpg" /></figure><p>While connected, webrtc used 0% CPU, so it wasn&#39;t sending any video. cam_app had opened the chip&#39;s H.264 encoder (/dev/video1, helix-venc), but frames didn&#39;t seem to reach it. I found out why in the next experiment.</p><h3>OrcaSlicer, and the real reason: a missing Huffman table</h3><p>I tried OrcaSlicer. When adding the printer I picked <strong>CrealityPrint</strong> as the connection type and gave it the printer’s IP. The test passed on the first try:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p-LHzxlzHOrLFexm.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*v7X-zXPwHhQD5yyM.jpg" /></figure><p>Orca’s <strong>Device</strong> tab shows the “Device UI” address from the connection settings. With the camera address there, the page opened, but there was a broken image icon where the picture should be. Neither the live stream nor a single snapshot (?action=snapshot) opened. The same snapshot URL was broken in Safari too, while Chrome showed it fine.</p><p>I downloaded a snapshot and looked inside:</p><pre>snap.jpg: JPEG image data, baseline, precision 8, 1280x720, components 3<br>DHT (FFC4): 0   DQT (FFDB): 2   SOF0 (FFC0): 1</pre><p>The frame has <strong>no Huffman table (DHT) at all</strong>. This is a known shortcut in MJPEG cameras. The Huffman table is the same in every frame, so the camera leaves it out and expects the decoder to insert the standard one from the JPEG spec (ITU T.81, Annex K.3). Chrome does that. Safari’s engine, WebKit, and the macOS image library don’t. macOS’s sips tool couldn&#39;t even read the image size.</p><p>As proof, I inserted the standard table (420 bytes) into the same frame right before the FFDA marker (start of scan). macOS opened it immediately:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HvQqrIBBXe8FgTbd.jpg" /></figure><p>This most likely explains the grey Creality Cloud screen too: the hardware JPEG decoder in the printer’s H.264 path probably can’t open these table-less frames either. I couldn’t confirm it, because cam_app is closed source.</p><h3>The fix: add the table in the page</h3><p>My first idea was to take the picture with mjpg_streamer&#39;s own input_uvc plugin instead of cam_app, since that plugin inserts the missing table itself. But the plugin didn&#39;t start in Creality&#39;s build of mjpg_streamer.</p><p>So I added the table on the viewing side instead. I wrote a small page, <a href="https://github.com/justicemilitia/bisonar-ai/blob/main/creality-usb-webcam/code/kamera.html">code/kamera.html</a>. It grabs a frame with ?action=snapshot five times a second. If the frame has no FFC4, it inserts the standard Huffman table before FFDA and shows the result as a Blob in an &lt;img&gt;.</p><p>I copied the page into the printer’s own mjpg_streamer folder. That way it is served from the same address (port 8080) and doesn&#39;t run into the browser&#39;s cross-origin (CORS) rules:</p><pre>scp -O code/kamera.html root@&lt;printer-ip&gt;:/usr/share/mjpg-streamer/www/kamera.html</pre><p>Then in OrcaSlicer I set “Device UI” to http://&lt;printer-ip&gt;:8080/kamera.html. The Logitech picture appeared in the Device tab. The clock in the bottom-left corner updates with each frame:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OzkTVk39cJprg3bN.jpg" /></figure><p>The same page works in Safari. The nice part of this approach is that it doesn’t touch Creality’s cam_app setup at all, so the printer still counts the camera as connected.</p><h3>Result</h3><ul><li>An ordinary Logitech C310 works with the Ender-3 V3 KE’s <strong>own camera service</strong>. All it takes is a small patch to auto_uvc.sh.</li><li>The camera starts on its own when the printer boots. In Chrome the picture is at http://&lt;printer-ip&gt;:8080/?action=stream.</li><li>Safari and OrcaSlicer need the Huffman table added to each frame. kamera.html does that, and Orca&#39;s Device tab shows live video.</li><li>Creality Cloud sees the camera and connects, but no picture arrives. Creality Print doesn’t connect at all. If you want to watch in Creality’s own apps, Creality’s camera is still the easiest way.</li></ul><p>A firmware update may remove the auto_uvc.sh patch and kamera.html. If that happens, copy both again with the same commands. If the printer ever offers a camera firmware update, don&#39;t accept it.</p><h3>What I learned</h3><ul><li><strong>The error isn’t on the screen, it’s in the log.</strong> cam_app exited without printing anything. The real reason was in the log under /usr/data/creality/userdata/log/. If a service quietly dies on Creality OS, that&#39;s the first place to look.</li><li><strong>The first suspect can be wrong.</strong> The resolution theory looked very convincing and was wrong. Testing it with a single change (only the resolution) showed that within minutes.</li><li><strong>A “brand lock” isn’t always an explicit check.</strong> There was no “Creality cameras only” line in the software. But a chain that can’t read a firmware version from the camera had the same effect.</li><li><strong>Working in a browser doesn’t mean the file is correct.</strong> Chrome quietly fills in the missing Huffman table. Safari, macOS and the printer’s hardware decoder don’t. When an image opens in one place and not another, look at its bytes.</li><li><strong>Know your way back before you change things as root.</strong> The original script sits in the read-only /rom partition, so every change could be undone with one command. That made it easy to experiment.</li></ul><h3>What’s next</h3><p>Next up: printing a fixed camera mount and adding the stream to Home Assistant. Both go into the next part.</p><p>💻 Code and images on GitHub: <a href="https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam">https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0db95a65881e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ender-3 V3 KE’ye Sıradan Bir Logitech Webcam Bağlamak — Bölüm 1: Kamerayı Çalıştırmak]]></title>
            <link>https://medium.com/@barancanaydn/ender-3-v3-keye-s%C4%B1radan-bir-logitech-webcam-ba%C4%9Flamak-b%C3%B6l%C3%BCm-1-kameray%C4%B1-%C3%A7al%C4%B1%C5%9Ft%C4%B1rmak-841df69e094b?source=rss-8732faaf083------2</link>
            <guid isPermaLink="false">https://medium.com/p/841df69e094b</guid>
            <category><![CDATA[klipper]]></category>
            <category><![CDATA[3d-yazıcı]]></category>
            <category><![CDATA[creality]]></category>
            <category><![CDATA[webcam]]></category>
            <category><![CDATA[orca-slicer]]></category>
            <dc:creator><![CDATA[Baran Can Aydın]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 23:26:55 GMT</pubDate>
            <atom:updated>2026-11-04T23:26:55.611Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.bisonar.com/en/blog/ender-3-v3-ke-logitech-webcam"><em>English version</em></a></p><p>Creality’nin Ender-3 V3 KE yazıcısı için resmi bir kamerası var: Nebula Camera. USB’ye takıyorsunuz ve çalışıyor. Benim çekmecemde ise 8 yıllık bir Logitech webcam duruyordu. Sorum basitti: Bu sıradan webcam, Creality’nin kendi kamerasının yerini tutabilir mi?</p><p>İnternette bunu doğrulayan net bir kaynak bulamadım. Creality forumunda aynı soruyu soran KE kullanıcıları vardı ama bir cevap göremedim. Ben de kendim denedim. Bu yazı, tak-çalıştırdan başlayıp yazıcının içindeki Linux’a, Creality’nin kamera betiklerine ve sonunda JPEG dosyasının baytlarına kadar inen o yolculuğun hikâyesi.</p><p><strong>Kısa cevap:</strong> Evet, çalışıyor. Kamera artık yazıcının kendi kamera servisiyle açılıyor, tarayıcıda ve OrcaSlicer’ın Cihaz sekmesinde canlı görüntü veriyor. Ama bunun için iki engeli aşmak gerekti, ikisi de beklediğim yerde değildi.</p><h3>Elimdekiler</h3><ul><li><strong>Yazıcı:</strong> Creality Ender-3 V3 KE, Klipper tabanlı Creality OS V1.1.0.15</li><li><strong>Webcam:</strong> Logitech webcam, yaklaşık 8 yıl önce almıştım, yani bu proje için ek bir masraf yok. C505E sandığım kameranın aslında C310 olduğu ortaya çıktı, aşağıda anlatıyorum.</li><li><strong>Bilgisayar:</strong> Mac (SSH, Creality Print, Creality Cloud ve OrcaSlicer için)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6CXwtPQINrJlaGih.jpg" /></figure><p>Kamerayı nereye koyacağımı görmek için önce tablanın üstünde tutup denedim. Sabit bir tutucu bir sonraki iş.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*O5DxY4LWHOV5VbOB.jpg" /></figure><h3>Plan</h3><ol><li>Önce tak-çalıştır: Webcam’i yazıcının USB’sine takıp Creality Print’te görüntü var mı bakmak.</li><li>Olmazsa root: SSH ile kameranın sistemde görünüp görünmediğine bakmak.</li><li>Görüntüyü bir şekilde bilgisayara getirmek.</li></ol><h3>İlk deneme: tak-çalıştır</h3><p>Webcam’i yazıcının USB portuna taktım ve Creality Print’te (Mac) Device sekmesini açtım. Yazıcı ağda göründü, sıcaklıklar ve eksen kontrolü geldi. Kamera alanında ise görüntü yoktu, sadece şu uyarı vardı: “Please check Does the printer camera device work properly.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZrYXPyS6jiBYWFhb.jpg" /></figure><p>Belki kamerayı sadece açılışta arıyordur diye webcam takılıyken yazıcıyı yeniden başlattım. Sonuç aynıydı.</p><p>Kameranın sistemde hiç görünmediğini mi, yoksa göründüğü hâlde Creality’nin yazılımının onu kullanmadığını mı anlamak için yazıcının içine bakmam gerekiyordu. Creality bu yazıcıda resmi root izni veriyor (Ayarlar &gt; Root account information). Root garantiyi etkileyebiliyor. Benim yazıcımın garantisi zaten bitmişti, kaybedecek bir şeyim yoktu.</p><h3>Root ile içeri bakış</h3><p>Root’u açıp Mac’ten SSH ile bağlandım. Yazıcının içinde MIPS işlemcili, Linux 4.4 çekirdekli küçük bir bilgisayar çalışıyor:</p><pre>Linux Ender3V3KE-XXXX 4.4.94 #7 SMP PREEMPT Tue Aug 6 09:11:30 CST 2024 mips GNU/Linux</pre><p>İlk sürpriz lsusb çıktısından geldi:</p><pre>Bus 001 Device 006: ID 046d:081b Logitech, Inc. Webcam C310</pre><p>Elimdeki kamera C505E değil, bir <strong>Logitech C310</strong>&#39;muş. İkisi neredeyse aynı görünüyor, ikisi de 720p. Yazıcı açısından önemli olan, kameranın UVC standardını desteklemesi.</p><p>Çekirdek günlüğünde (dmesg) iyi haber vardı. UVC sürücüsü kamerayı tanımıştı:</p><pre>uvcvideo: Found UVC 1.00 device &lt;unnamed&gt; (046d:081b)<br>auto_uvc.sh (952): drop_caches: 3</pre><p>Açılışta kamera birkaç kez bağlanıp kopmuş, bir denemede sürücü onu başlatamamış (-71 hatası, genelde USB güç ya da kablo kaynaklı). Son denemede ise düzgün tanınmış ve /dev/video4 oluşmuş. Diğer video cihazları yazıcı çipinin kendi iç birimleri:</p><pre>/sys/class/video4linux/video0: ingenic-rot<br>/sys/class/video4linux/video1: helix-venc<br>/sys/class/video4linux/video2: felix-vdec<br>/sys/class/video4linux/video3: Dummy video device (0x0000)<br>/sys/class/video4linux/video4: UVC Camera (046d:081b)</pre><p>Yani donanım ve sürücü tarafı çalışıyordu. Sorun, Creality’nin yazılımının bu kamerayı kullanmamasındaydı. Kamera takılınca çalışan betik de dmesg’de görünüyordu: auto_uvc.sh.</p><h3>auto_uvc.sh ne yapıyor?</h3><p>Betik /usr/bin/auto_uvc.sh yolunda, aslı da salt okunur /rom bölümünde duruyor. İçinde marka ya da model kontrolü yok. Yaptığı iş özetle şu:</p><ol><li>Kamera /dev/v4l/by-id/ altında main-video… adıyla görünüyorsa devam ediyor.</li><li>Kamera MJPG formatını desteklemiyorsa duruyor.</li><li>Creality’nin cam_app programını başlatıyor. Bu program görüntüyü sabit olarak <strong>1920×1080, 15 fps</strong> istiyor.</li><li>Görüntüyü mjpg_streamer ile <strong>8080</strong> portundan yayınlıyor.</li><li>MAIN_PIC_WIDTH=1920 MAIN_PIC_HEIGHT=1080 MAIN_PIC_FPS=15</li></ol><p>v4l2-ctl --list-formats-ext çıktısına göre C310 MJPG destekliyor ama en fazla 1280×960 ve 1280×720 verebiliyor. <strong>1920×1080 listede yok.</strong> ps çıktısında da ne cam_app vardı ne mjpg_streamer. İlk şüphem buydu: cam_app kameradan desteklemediği bir çözünürlük istiyor ve kapanıyor.</p><h3>Asıl suçlu: /tmp/.cam_version</h3><p>cam_app&#39;i 1280×720 ile elle başlattım. Yine birkaç saniye içinde kapandı, demek ki şüphem yanlıştı. cam_app hatayı ekrana yazmıyor, kendi günlüğüne (/usr/data/creality/userdata/log/cam_app.log) yazıyor. Günlükte her denemede aynı satırlar vardı:</p><pre>[INFO]-[ingenic_video.c](569) realpath: /dev/video4<br>[ERROR]-[ingenic_video.c](450) open file /tmp/.cam_version failed!<br>[INFO]-[ingenic_video.c](1075) service will exit, ret = -1</pre><p>cam_app açılırken /tmp/.cam_version dosyasını arıyor, bulamayınca kapanıyor. Bu dosyayı auto_uvc.sh içindeki fw_info fonksiyonu yazıyor, ama sadece cam_util kameradan bir firmware sürümü okuyabilirse. C310&#39;da cam_util şöyle cevap verdi:</p><pre>Could not find/open sonix device<br>Device /dev/v4l/by-id/main-video-4 opened: UVC Camera (046d:081b).<br>ioctl(UVCIOC_CTRL_SET) FAILED (-1)<br>Get uvc extend unit id fail</pre><p>cam_util, kameranın içindeki Sonix çipiyle UVC&#39;nin üreticiye özel &quot;extension unit&quot; kanalından konuşmaya çalışıyor. Creality&#39;nin kamerası bu kanala cevap veriyor, Logitech vermiyor. Sürüm dosyası yazılmıyor ve cam_app hiç başlamıyor. Yani yazılımda açık bir marka kilidi yok, ama dolaylı bir kilit var.</p><p>Dosyayı elle, betiğin yazdığı biçimde ve üretici adı “Logitech” olarak oluşturdum. cam_app dosyayı okudu ama yine kapandı:</p><pre>[INFO]-[ingenic_video.c](455) fw_info json file: { &quot;main_cam&quot;: { ... &quot;manufactory&quot;: &quot;Logitech&quot;, ... } }<br>[INFO]-[ingenic_video.c](1075) service will exit, ret = -1</pre><p>Betikte iki üretici adı geçiyordu: STsmart_- ve STJC-000I, Creality kameralarının firmware&#39;inde yazan adlar. &quot;Logitech&quot;i STsmart_- ile değiştirip tekrar denedim:</p><pre>/usr/bin/cam_app -i /dev/v4l/by-id/main-video-4 -t 0 -w 1280 -h 720 -f 15 -c<br>/usr/bin/mjpg_streamer -i input_memfd.so -t 0 -o output_http.so -w /usr/share/mjpg-streamer/www/ -p 8080</pre><p>Bu sefer ikisi de ayakta kaldı ve tarayıcıda http://&lt;yazıcı-ip&gt;:8080/?action=stream adresinde <strong>ilk görüntü geldi</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yfo9-7hFpzlt7wNl.jpg" /></figure><p>Birkaç dakika sonra görüntü kapkara oldu. Kamera bozuldu diye tam hata ayıklamaya başlayacaktım ki odanın ışığını kapattığımı fark ettim. Işığı açınca görüntü geri geldi:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JxI9fQBcazNAEaEE.jpg" /></figure><h3>Kalıcı yama</h3><p>Elle yazdığım dosya /tmp içinde duruyordu ve yeniden başlatınca silinecekti. Bu yüzden auto_uvc.sh&#39;ın yamalı bir kopyasını hazırladım (<a href="https://github.com/justicemilitia/bisonar-ai/blob/main/creality-usb-webcam/code/auto_uvc.sh">code/auto_uvc.sh</a>). Orijinalden iki farkı var:</p><ol><li>cam_util kameradan firmware bilgisi okuyamazsa betik /tmp/.cam_version dosyasını STsmart_- üretici adıyla kendisi yazıyor. Güncelleme seçeneğini kapalı bırakıyor (can_update: false). Yazıcı Logitech&#39;e Creality kamerasının firmware&#39;ini yüklemeye kalkmasın.</li><li>Kamera MJPG’de 1920×1080 vermiyorsa 1280×720 kullanıyor. Creality’nin kendi kamerası takılırsa yine 1080p çalışıyor.</li></ol><p>Kurulum iki komut:</p><pre>scp -O code/auto_uvc.sh root@&lt;yazıcı-ip&gt;:/tmp/auto_uvc.sh<br>ssh root@&lt;yazıcı-ip&gt; &quot;sh -n /tmp/auto_uvc.sh &amp;&amp; cp /tmp/auto_uvc.sh /usr/bin/auto_uvc.sh &amp;&amp; chmod +x /usr/bin/auto_uvc.sh&quot;</pre><p>sh -n önce sözdizimini kontrol ediyor, hata varsa kopyalama yapılmıyor. Geri dönmek de tek komut, çünkü orijinali /rom içinde duruyor:</p><pre>ssh root@&lt;yazıcı-ip&gt; &quot;cp /rom/usr/bin/auto_uvc.sh /usr/bin/auto_uvc.sh&quot;</pre><p>Yeniden başlattıktan sonra hiçbir komut çalıştırmadan kamera kendiliğinden açıldı. Yazıcının ana servisi de artık kamerayı görüyor:</p><pre>pack_camera_status: {&quot;cameras&quot;:{&quot;camera_main&quot;:{&quot;online&quot;:1},&quot;camera_sub&quot;:{&quot;online&quot;:0}}}<br>[Heartbeat] udisk0 = 0, ethernet = 0, camera0 = 1</pre><h3>Creality Print ve Creality Cloud</h3><p>Tarayıcıda görüntü vardı, ama Creality Print’te hâlâ yoktu. Bunun sebebi, Creality uygulamalarının görüntüyü 8080&#39;den değil, ayrı bir webrtc servisinden almaları. Bu servis görüntüyü cam_app&#39;ten H.264 olarak alıyor ve bağlantıyı yerel ağdan değil, Creality&#39;nin bulutu (api.crealitycloud.com) üzerinden kuruyor. Yazıcıda yerel bir WebRTC portu açık değil.</p><p>Creality Print bağlantıyı hiç başlatmadı. Creality Cloud masaüstü uygulamasında ise kamera alanında bir ▶ düğmesi çıktı, yani bulut kamerayı “var” olarak görüyor. Düğmeye basınca bağlantı kuruldu:</p><pre>&quot;pcPool&quot;: [{ &quot;iceState&quot;: &quot;connected&quot;, ... }]</pre><p>Ama ekran gri kaldı:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UL5unK2aiTbp0lfr.jpg" /></figure><p>Bağlantı açıkken webrtc %0 işlemci kullanıyordu, yani gönderdiği bir video yoktu. cam_app yazıcı çipinin H.264 kodlayıcısını (/dev/video1, helix-venc) açmıştı ama oraya kare ulaşmıyor gibiydi. Sebebini bir sonraki denemede buldum.</p><h3>OrcaSlicer ve asıl sebep: eksik Huffman tablosu</h3><p>OrcaSlicer’ı denedim. Yazıcıyı eklerken bağlantı türü olarak <strong>CrealityPrint</strong>’i seçtim, adres olarak yazıcının IP’sini verdim. Test ilk seferde geçti:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7bD-gR61t-THr_DD.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mOrA3WW-27nH4Eur.jpg" /></figure><p>Orca’nın <strong>Cihaz</strong> sekmesi, bağlantı ayarlarındaki “Cihaz kullanıcı arayüzü” adresini gösteriyor. Oraya kameranın adresini yazınca sayfa açıldı ama görüntünün yerinde kırık resim simgesi vardı. Canlı akış da, tek bir fotoğraf (?action=snapshot) da açılmadı. Aynı fotoğraf adresi Safari&#39;de de kırık çıktı, Chrome&#39;da ise sorunsuzdu.</p><p>Bir fotoğraf indirip içine baktım:</p><pre>snap.jpg: JPEG image data, baseline, precision 8, 1280x720, components 3<br>DHT (FFC4): 0   DQT (FFDB): 2   SOF0 (FFC0): 1</pre><p>Karede <strong>hiç Huffman tablosu (DHT) yok</strong>. Bu, MJPEG kameralarda bilinen bir kısayol. Huffman tablosu her karede aynı olduğu için kamera onu göndermiyor, çözücünün JPEG standardındaki tabloyu (ITU T.81, Ek K.3) kendisinin eklemesini bekliyor. Chrome bunu yapıyor. Safari’nin motoru WebKit ve macOS’un resim kütüphanesi yapmıyor. macOS’un sips aracı dosyanın boyutunu bile okuyamadı.</p><p>Kanıt için standart tabloyu (420 bayt) aynı karede FFDA (taramanın başladığı yer) işaretinden hemen önce ekledim. macOS dosyayı anında açtı:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kVMHj1JI6p4aKe8d.jpg" /></figure><p>Creality Cloud’daki gri ekranın da büyük ihtimalle sebebi bu: yazıcının H.264 hattındaki donanım JPEG çözücüsü de bu tablosuz kareleri açamıyor olmalı. Bunu kesin doğrulayamadım, çünkü cam_app kapalı kodlu.</p><h3>Çözüm: tabloyu sayfada eklemek</h3><p>İlk aklıma gelen, görüntüyü cam_app yerine mjpg_streamer&#39;ın kendi input_uvc eklentisiyle almaktı. Bu eklenti eksik tabloyu kendisi ekliyor. Ama Creality&#39;nin mjpg_streamer derlemesinde bu eklenti başlamadı.</p><p>Ben de tabloyu görüntüyü gösteren tarafta ekledim. Küçük bir sayfa yazdım: <a href="https://github.com/justicemilitia/bisonar-ai/blob/main/creality-usb-webcam/code/kamera.html">code/kamera.html</a>. Sayfa saniyede 5 kez ?action=snapshot ile bir kare çekiyor. Karede FFC4 yoksa standart Huffman tablosunu FFDA&#39;dan önce ekliyor ve sonucu bir Blob olarak &lt;img&gt; içinde gösteriyor.</p><p>Sayfayı yazıcının kendi mjpg_streamer klasörüne kopyaladım. Böylece aynı adresten (8080) açılıyor ve tarayıcının farklı kaynak (CORS) kısıtlamasına takılmıyor:</p><pre>scp -O code/kamera.html root@&lt;yazıcı-ip&gt;:/usr/share/mjpg-streamer/www/kamera.html</pre><p>Sonra OrcaSlicer’da “Cihaz kullanıcı arayüzü” alanına http://&lt;yazıcı-ip&gt;:8080/kamera.html yazdım. Cihaz sekmesinde Logitech&#39;in görüntüsü geldi. Sol alttaki saat her karede yenileniyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o9XJb-I_2JSqeDjF.jpg" /></figure><p>Aynı sayfa Safari’de de çalışıyor. Bu yöntemin güzel yanı, Creality’nin cam_app düzenine hiç dokunmaması. Yazıcı kamerayı &quot;takılı&quot; saymaya devam ediyor.</p><h3>Sonuç</h3><ul><li>Sıradan bir Logitech C310, Ender-3 V3 KE’nin <strong>kendi kamera servisiyle</strong> çalışıyor. Gereken tek şey auto_uvc.sh&#39;a küçük bir yama.</li><li>Yazıcı açılınca kamera kendiliğinden devreye giriyor. Chrome’da görüntü http://&lt;yazıcı-ip&gt;:8080/?action=stream adresinde.</li><li>Safari ve OrcaSlicer için kareye Huffman tablosu eklemek gerekiyor. Bunu kamera.html yapıyor, Orca&#39;nın Cihaz sekmesinde canlı görüntü var.</li><li>Creality Cloud kamerayı görüyor ve bağlanıyor ama görüntü gelmiyor. Creality Print hiç bağlanmıyor. Creality’nin kendi uygulamalarında izlemek istiyorsanız Creality’nin kamerası hâlâ en kolay yol.</li></ul><p>Firmware güncellemesi auto_uvc.sh yamasını ve kamera.html&#39;i silebilir. O zaman ikisini aynı komutlarla tekrar kopyalamak yeterli. Ekranda bir gün kamera firmware güncellemesi önerilirse kabul etmeyin.</p><h3>Bu bölümden öğrendiklerim</h3><ul><li><strong>Hata mesajı ekranda değil, günlükte.</strong> cam_app ekrana hiçbir şey yazmadan kapanıyordu. Gerçek sebep /usr/data/creality/userdata/log/ altındaki günlükteydi. Creality OS&#39;ta bir servis sessizce kapanıyorsa ilk bakılacak yer orası.</li><li><strong>İlk şüphe yanlış olabilir.</strong> Çözünürlük teorisi çok mantıklı görünüyordu ama yanlıştı. Hipotezi tek değişkenle test etmek (sadece çözünürlüğü değiştirmek) bunu birkaç dakikada gösterdi.</li><li><strong>“Marka kilidi” her zaman açık bir kontrol değildir.</strong> Yazılımda “sadece Creality kamerası” diye bir satır yoktu. Ama kameradan firmware sürümü okuyamayan bir zincir aynı sonucu doğuruyordu.</li><li><strong>Tarayıcıda çalışıyor olması, dosyanın doğru olduğu anlamına gelmez.</strong> Chrome eksik Huffman tablosunu sessizce tamamlıyor. Safari, macOS ve yazıcının donanım çözücüsü tamamlamıyor. Bir görüntü bir yerde açılıp başka yerde açılmıyorsa dosyanın baytlarına bakmak gerekiyor.</li><li><strong>Root ile çalışırken geri dönüş yolunu baştan belirlemek.</strong> Orijinal betik salt okunur /rom bölümünde durduğu için her değişiklik tek komutla geri alınabiliyordu. Bu, denemeleri rahat yapmamı sağladı.</li></ul><h3>Sırada ne var?</h3><p>Sırada sabit bir kamera tutucu basmak ve görüntüyü Home Assistant’a eklemek var. İkisini de bir sonraki bölümde yazacağım.</p><p>💻 Kod ve görseller GitHub’da: <a href="https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam">https://github.com/justicemilitia/bisonar-ai/tree/main/creality-usb-webcam</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=841df69e094b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>