Image 1 — Simple Ceiling Lamp with Presence Detection
Image 2 — Simple Ceiling Lamp with Presence Detection
Image 3 — Simple Ceiling Lamp with Presence Detection
Image 4 — Simple Ceiling Lamp with Presence Detection
Image 5 — Simple Ceiling Lamp with Presence Detection
Image 6 — Simple Ceiling Lamp with Presence Detection
Image 7 — Simple Ceiling Lamp with Presence Detection
▲ 51 r/Esphome+1 crossposts

Simple Ceiling Lamp with Presence Detection

I always like to combine multiple functionalities into one device to avoid cable clutter and keep my plugs available for other stuff. So I again built a ceiling lamp that has a presence sensor built right into it so with one appliance my room can turn on and off the lights based on presence.

This one I'll use for my friends bathroom.

The parts;
- ESP32-S3 Microcontroller
- LD2410C mmWave Presence Sensor
- SK6812 Addressable LED Strip (5V with dedicated white channel)
- AC to DC 5V 6A Power Supply
- 3D Printed Enclosure (Designed in Tinkercad :)

The case has 3 parts. One mounts to the ceiling directly, second one is a plate that holds my led strip and my components and fits in the ceiling mounting part by inserting and twisting. For the cover I used transparent filaments which I kind of like but think could be better printed. Maybe in vase mode or something.

It is completely home assistant friendly of course and built with esphome.

For the automations I learned that we can create automations directly from esphome so we don't need to rely on home assistant alone for the lights to trigger on and off. Code could be better but there is always room for improvement.

STL and Code: https://github.com/rgnyldz/rgnlabs-bathroom-ceiling-lamp

Build process: https://www.youtube.com/watch?v=2E1V8GT9j3o

u/rgnyldz — 6 days ago
▲ 7 r/Esphome+1 crossposts

I thought building a water leak sensor was easy, I was wrong :)

So I recently bought a portable cooler for my office/mancave. Because It's the top floor and summer get's quite hot. The cooler I bought has a water exhaust where "like every normal person" I place a vase or a big bottle to collect the water and empty it periodically when it's full.

But because I have very bad memory and most of the time deepdive into my work it is possible that I forget to empty the vase and cause water leak near the cooler.

So I thought of using a simple esp D1 mini and connect two wires that will act like a binary sensor and place it at the edge of the vase so if the water reaches the level of the wires they will close the circuit and I can trigger some automations to notify me about the water in the vase.

Where technically I was correct, I WAS WRONG :)

The resistance of the water was higher than I thought. I believed that I could get away with it by placing the wires close together so it will close the circuit, but it didn't.

So after some research (with AI) I found out that the proper way to build a binary sensor that can work in water was with a bc457 semiconductor and a couple 10k resistors.

So with some very ugly soldering and prototyping I got it working by bridging the 3.3v to D7 with a 10k resistor from the top side of the esp. from the other side of D7 I connected the Collector pin of my BC547. The emmiter of the BC547 goes into Ground and the base goes into the water with also a 10k resistor on it.

I also added a buzzer in the mix so if Home assistant or my network is down for some reason I still get a notification as sound from the buzzer.

I also found out about rtttl stuff which is very interesting :) But that's for another post maybe :)

As always the build process: https://www.youtube.com/watch?v=JTvTLLE3cXM

u/rgnyldz — 2 months ago

Boilerplate for ESP32-S3 Voice Assistant

I noticed a lot of esp32-s3 DIY Voice Assistant codes are copy/paste/patched from other voice assistants with lots of things included. I even came across with my own code that I also got from somewhere else added to another code :) I noticed it because of some custom wake words I use.

So I tried to create a working simple boilerplate Voice Assistant yaml code so people can use it and modify/improve based on their own need like add custom sensors etc.

I tried to keep it as simple as possible and will keep improving it over time hopefully. I added sendspin tho :)

Hope this helps somebody, anybody.

https://github.com/rgnyldz/rgnlabs-boilerplate-esp32-s3-voice-assistant

u/rgnyldz — 2 months ago

Give your Voice Assistant Memory so it remembers past conversations.

So for a long time we use Voice Assistant to control our house. But as always we wanted more :)

My dream was to have a Jarvis like AI assistant. An AI Family member that grows with us. Remembers what we talked about and gives answers based on past conversations.

I wanted for my whole family to talk with the same AI every time and not just a one time spawn assistant.

So the first thing I had to figure our was memory. I found several ways to add memory to voice assistant. Still not where I want them to be but it is a very good starting point.

1- AI Long Term Memory
https://github.com/Riscue/ha-ai-memory

So AI Long Term Memory is kind of plugging itself to your existing conversation agent and adds a "Memory Management" checkbox. If checked it will automatically start to add and extract memory while you have a conversation with your LLM

2- Home-Mind / Nives
https://github.com/hoornet/nives

This one I used for a while. There is an active development going on and constantly adding new features. The working principle is it adds a home-mind server with shodh database between home assistant and your LLM. It also gives you a conversation agent to use. After installing it you will see a new conversation agent that you can use in your Voice assistant pipeline.

You can install home-mind yourself in your local environment and use its own conversation agent integration if you like to tinker stuff.
https://github.com/hoornet/home-mind / https://github.com/hoornet/home-mind-hacs

and my current favorite;

3- Hermes agent as Conversation agent.
https://github.com/WolframRavenwolf/hermes-ha-integration
https://github.com/WolframRavenwolf/hermes-ha-addon

Yes that's right. You can use hermes as a conversation agent for your voice assistant. It already has lot's of things as you might know, including memory. There are two ways to use hermes agent. One is to install it inside home assistant directly as an app (hermes-ha-addon) which includes both the hermes agent and the conversation agent. Or if you have already a hermes instance running you can use the conversation agent directly to connect to your existing hermes instance (hermes-ha-integrtion)

At this point all actions are taken by hermes via the home assistant skills and tools. So a long lived key is needed from home assistant to give hermes access to your home assistant.

There is also an openclaw version of this: https://github.com/RetiredWizard/openclaw-conversation

I made a memory comparison between these options here: https://www.youtube.com/watch?v=ssQfQ8elyzU

u/rgnyldz — 2 months ago

Sendspin ile evin tüm odalarında senkron müzik çalma

Uzun zamandır sendspin'i düzgün şekilde çalıştırmaya çalışıyorum. Son esphome güncellemeleri ile daha stabil hale geldi ve evdeki kendi yaptığım media oynatıcılarını sendspin uyumlu hale getirdim.

Şimdi bütün evdeki hoparlörlerden senkron ev partisi verebiliyorum :)

Evdeki medya oynatıcılarımı kendim esp32-s3 ve bir audio DAC ile yapıyorum. Var olan standart hoparlörleri bağladığımda home assistant uyumlu bir medya player'a dönüşüyor. Youtube kanalımda bununla ilgili bir video var. Kanal Ingilizce bu arada, idare edin.

Ama asıl bomba son çektiğim videoda. https://www.youtube.com/watch?v=euekbLwdgTY Sendspin ile evdeki tüm medya player'ları senkronize ettim sonunda.

Ve açıkçası çok stabil ve iyi çalışıyor. Ben aynı zamanda müzisyenim, dolayısıyla kayıt vs tecrübem de var ve senkron müzik olayının ne kadar zor ve zahmetli bir iş olduğunu biliyorum.

Ancak sendspin olayı komple değiştiriyor. Yani artık çok pahalı wifi destekli medya oynatıcı kullanmamıza gerek kalmıyor. birkaç küçük parça ile en fazla 500₺ ye wifi destekli ve home assistant uyumlu çok iyi bir medya oynatıcı yapabiliyoruz. Hoparlör olarak istediğimiz hoparlörü kullanabiliriz. Ister ucuz 200-300₺ lik, istersek pahalı hifi sistemler.

Çok karışık yazdım çok özür :) Biraz heyecan yaptım 😅

u/rgnyldz — 3 months ago
▲ 33 r/Esphome+1 crossposts

Multiroom Audio setup with DIY media players, Music Assistant and Sendspin

So I have lots of esp32-s3 based voice assistants throughout my house. In the kitchen as a ceiling light, in my house entrance, in the kids room also as a ceiling light and in the office. The thing I could not get together was synced music with music assistant. I always had issues with sendspin and the yaml. But since esphome has sendspin directly integrated now this is no longer an issue.

So I changed all my esphome media player device codes to be sendspin compatible. After some time wrestling with the media player code I got it working inside home assistant without any problems.

Music Assistant had also some issues finding the devices but eventually that one worked also :)

So now I have created a synced media player group inside music assistant with which I can play music in sync and give announcements. Kids and Wife love it.

I also exposed that "Whole house" player to airplay and spotify so they can easily push music directly from the apps into the players through music assistant.

I didn't expect them to be that synced. I'm a musician with experience in recordings etc so I know how important and difficult it is to sync music. But sendspin is just working great.

I have a demo at the end of my video here; https://www.youtube.com/watch?v=euekbLwdgTY Video is about different ways you can group your existing players but the house party demo is at the end :)

So I guess we don't need expensive wifi audio systems anymore. We can build our own esphome / wifi based devices that can play music and announcements fully synced.

I feel like this is huge 😅

u/rgnyldz — 3 months ago

Çok yavaş ilerliyor gibi sanki.

İngilizce bir kanal açtım. Kendi evime kendi yaptığım akıllı iot cihazlarını nasıl yaptığım ile ilgili bir kanal. Para kazanmayı aktif etmeye çalışıyorum ama akıntıya karşı kürek çekiyormuşum gibi geliyor. Yani evet düzenli aralıklarla videolar atmıyorum ama videolarımın o kadar kötü olduğunu da düşünmüyorum. Her şeyi kendim yapıyorum. çekimler, edit vs.

Genelde sadece reddit'te paylaşıyorum videoları. Daha doğrusu video ile ilgili bir post değilde daha çok yaptığım aleti tanıtıyorum. sonuna da video linki ekliyorum. genelde bunu homeassistant ve esphome sub'larında yapıyorum.

Bunun gibi yaptığınız paylaşım yöntemleri var mı? Nerelerde nasıl paylaşmak faydalı?

https://www.youtube.com/watch?v=tusBsekrjUY

u/rgnyldz — 3 months ago

Böyle bir sub varmış hiç söylemiyorsunuz :)

Şöyle bir dashboard ile selam vermiş olayım madem :)

Uzun süredir akıllı evimi geliştiriyorum. Artık kendi kameralı kapı zilimi, kendi tavan ışıklarımı ve türlü türlü cihazlarımı kendim yapıyorum. Genelde esp cihazları ile çeşitli modüller kullanarak ve 3d yazıcı ile bulnara case basarak hallediyorum işimi.

Ana sunucum olarak eski makinemi kullanıyorum ( ryzen 7 3700 / rtx3090 / 32GB ram / 2TB nvme / birkaç eski hdd yedek ve kamera kayıtları için). Resimlerde duvara çakılı olan :) Üzerinde proxmox koşuyor, içinde ollama, frigate, pihole, hermes ve tabi ki home assistant çalıştırıyorum. Yapay zeka ile evimin belirli yerlerinden konuşarak aksiyon alabiliyorum. Mesela çocukların odasına minecraft lambası yaptım, mikrofonlu, hoparlörlü, derece ve varlık sensörlü. Çocuklar ok_nabu diye sesleniyor ve lokaldeki hermes ajanı ile konuşup odalarını kontrol edebiliyor. Benzer bir tavan lambasını mutfağa da yaptım. Aynı şekilde evi kontrol edebiliyorum.

Home assistant üzerinden doğrudan ollamaya bağlanmak yerine hermes'i conversation agent olarak kullanıyorum. Böylece evimde kullandığım yapay zekanın hafızası da olmuş oluyor. Doğum günümü veya daha önce konuştuklarımızı ailecek hatırlayabiliyor belirli bir noktaya kadar.

Evim müstakil olduğu için burada biraz daha rahatım tabi ancak kiralık olduğu içinde evin kablo tesisasına çok fazla girmemeye çalışıyorum.

Evimin üst katı tamamen güneç enerjisinden besleniyor. 3 adet 585W panel, bir tane 3kw invertör ve iki adet 24V 100Ah pil mevcut. Gayet yetiyor. Hatta aşağıdaki çamaşır makinesini ve buzdolabını da bağladım :) Çok nadir gece şebekeden çekmek zorunda kalıyor.

Evde malum dünya kadar otomasyon mevcut. Tüm odalarda ve banyolarda mmwave sensörü mevcut. Dolayısıyla biz artık ışık anahtarı kullanmıyoruz. Gün batımı sonrasında ışıklar otomatik yanıyor ve kapanıyor. 12'den sonra ise loş veya kırmızı yanıyor ışıklar.

Hatta bu yaptığım aletler için bir youtube kanalı da açmıştım. Hem denemek için hem de yaptıklarımı bir seride toplamak için.

Bir sub ve like alırım :)

https://www.youtube.com/@rgnlabs

u/rgnyldz — 3 months ago
▲ 200 r/Esphome+1 crossposts

First line of defense in a smart home: Contact sensors

So I wanted a simple door sensor so I know if my front garden door is open or closed and wanted to make some automations based on that.

Where I live such ready made devices are dead expensive unfortunately. So I built my own with an esp D1 Mini and a simple Magnetic Reed switch.

With my ultimate pro tinkercad skills I designed two parts to hold my magnet and the device so I can just attach them to my gate.

I thought about using batteries but since I already have an EV charging station near the door I went with a simple usb cable from the box to the door.

For my automations I have 3 , first one is triggering when the door is opened and it turns on a light on my desk so I have visual notification that the door is open. Then it takes a snapshoot and sends me and my wife a critical notification if we are away with that image attached to the notification. It also sends the same notification if its past 23:30 till 8:30 in the morning.

Second one is just to turn off my led if the door is closed.

The last one is triggering if the door is left open for 3 minutes. It basically announces that the outer door has been left open. Because of kids you know :)

Here is the build process: https://www.youtube.com/watch?v=x-RSV8m9yns

Other than that I first wanted to get the door open/close info into home assistant but then I realized that this is actually the first line of defense in a smart home (or at least in my case) and we do not think about security as much as we do for automations etc.

u/rgnyldz — 3 months ago
▲ 62 r/Esphome+1 crossposts

I replaced my dumb light switch with a DIY Scene Switcher... With 4 buttons, a rotary encoder and presence sensor :)

So we all know the dilemma where you install a smart bulb in your living room everything seems to be awesome until someone flips the physical switch and turns of power to the smartbulb. So you have to turn it back on and set it from your phone etc.

I built a Scene Switcher to replace my light switch to have full control over both the light and the switch. I also added a presence sensor to make my room really smart and automate based on presence.

I can automate the 4 buttons as I like. For example the first button is to turn on and off the tv. Second button is for guest mode, third is for sleep mode and 4th button is to announce that dinner is ready :)

The main wheel controls the main light. so one push is toggle on and off. Turning the wheel changes the brightness. (turns on and off also with turning the wheel) Pushing the button AND turning the wheel gets you into color mode and you can change the color. Release and it goes back to brightness control mode to default. Double click turns it back to white.

I wanted to print dedicated icons to the buttons but I wasn't sure which will be doing what :) but that is also an option. First I have to put my printer into maintenance as you can see the prints are not that good.

So the parts I used are;

  • ESP32-S3 N16R8
  • KY-040 Rotary encoder (with screw body and button)
  • 4x simple push buttons
  • 1x toggle switch
  • 1x 220V to 5V AC/DC converter.

I'm in the EU so we have these prebuilt-in holes for switches and outlets. So the bigger parts go into that and the device itself can be as thin as an esp board. Design could be better of course :) Not a pro here.

But I like how it turned out. What do you think?

As always the build process is here; https://www.youtube.com/watch?v=jDEeNjR3Npw

STL files and code will be uploaded in short time.

u/rgnyldz — 4 months ago