this post was submitted on 11 May 2024
30 points (81.2% liked)

homeassistant

12107 readers
107 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 1 year ago
MODERATORS
 

I've been in the HA world since the time the government placed the world under house arrest. Since then I've seen all sorts of amazing things people can do with an esp32 device.

So I'm late to the game. I always thought it may become a dangerous rabbit hole so I've just avoided it. But apparently I have 4 coming today so it's about time to ask you guys what you do.

My first project was gonna be getting some Bluetooth tracking going on around the house to get some room prescence going on.

I also read I can make some seat/bed sensors with a little wire, aluminium foil, paper and a folder-insert, that sounds like it could be fun.

I have a breadboard and a bunch of components I bought when I first got a Pi. I don't know how compatible these components are with esp32s or what the hell I can do.

I don't have a soldering iron (yet).

So basically: noob post, gimme some easy projects that don't require a lot, or wow me with your esp projects.

top 21 comments
sorted by: hot top controversial new old
[–] ScottE@lemm.ee 9 points 6 months ago

ESPHome is amazing - there's so much you can do without writing a single line of code.

I have built a few projects around the platform - a boiler monitor that tells me temperatures and state of zone valves, an energy monitoring system tracking electricity usage and solar export, and a hot tub mod that inhibits the heater to reduce grid import and maximize self consumption of solar. They have all been rock-solid stable.

[–] nis@feddit.dk 7 points 6 months ago (1 children)

I just added two temperature probes to a esp32 using esphome in HA. It's going to measure the temperatures in a still πŸ™‚

[–] Lifebandit666@feddit.uk 1 points 6 months ago

Now this is an idea I can get behind, send me some of the results :D

[–] solidgrue@lemmy.world 6 points 6 months ago* (last edited 6 months ago) (3 children)

I have two Digi WLED controllers a handful of project kits, myself.

The WLED boards drive some addressable LED strings in my living room and on my patio. They hardly count as "project" kits, but learning about interfacing TTL logic with the LED driver boards was a helpful experience. I learned a lot about the different GPIO uses and modes.

For the project kits I've built, I've been focused around presence and environment sensors. Using esphome I've successfully built PIR (AM312) + mmWave radar module (R60A) presence sensors, natural gas detectors for kitchen and basement utility areas, and a water leak sensor for the laundry area. I had goals of building a 5-in-1 presence sensor, but you can buy products for those now; its a solved problem.

I've been considering a design for a sump pit depth gauge because that sounds like useless information that I'd like to have for some reason.

I'll probably get interested in energy management soon, and will look into current clamps and tracking usage at smart receptacles.

[–] dream_weasel@sh.itjust.works 2 points 6 months ago (1 children)

I don't suppose you can dumb it down 2 notches? What do the kits do? PIR and Radar I don't get the application for, and I don't know the meaning of addressable led strings.

I have one esp32 I was starting to configure for room assistant and gave up. This is not your problem, but I feel like the HA world is deep and it's easy to start in the kiddie pool end, but I can't even understand the deep end and I don't know how to keep moving forward with more than just more switches and more random sensors.

[–] solidgrue@lemmy.world 5 points 6 months ago

Sure. Think of it like Lego bricks or one of those 1000-in-1 electronics kits. These kits don't do anything specific, they're building blocks you use to address a need you have in your home automation vision.

The ESP32 kits are just an ESP32 development board (mine are WROOM boards from Freenove) which has the microprocessor, headers breaking out the IO pins, and a "loader" module that facilities uploading code and is used to power the device with a USB cable. The boards also have onboard WiFi and Bluetooth radios. The -CAM variety has a low profile header to seat a small camera module (included). Look for "Freenove ESP32 WROOM" on your preferred online marketplace.

There are several ways to interact with (program) your ESP32 boards. The easiest and most straightforward is to use the ESPHome add-on in HA from the HACS store, along with the companion integration. The ESPHome add-on provides a software ecosystem of drivers and functions for a laundry list of hardware devices you can use in your project-- sensors, switches, lights, speakers, etc. The ESPHome wiki is sort of a catalog of supported peripherals you can easily use in your build projects. Many times, you can substitute components or extend an existing component driver. Mostly you assemble your components and the controller, and then write some YAML do tell ESPHome what devices are plugged into what pins. ESPHome more or less handles the rest.

The ESP32 integration creates HA devices and entities of the devices and sensors in the ESPHome add-on for use as triggers, conditions or actions in automation.

As for my specific doodads:

PIR is a Passive Infrared Receiver. It monitors its field of view for a change in infrared light (heat) which indicates a "hot.blob" has entered or left its field of view. The model I use, AM312, is designed to signal a change in IR light by raising a signal pin to +3 volts, which has applications in presence detection. It is fast, but not accurate. It also tends to "go blind" when the hot blob stops moving, and can be subject to false positives when the HVAC kicks on or by dappled sunlight

The mmWave radar is a Seeed R60A 60Ghz radar module. This particular module is optimized for human presence detection and fall detection. It uses millimeter wave radar to acquire and track humans in its field of view. 60GHz gives enough resolution to detect heartbeat, respiration and micromkvements like fidgeting. It talks to the ESP32 over the I2C bus (a digital IO bus similar to USB). It has advantages over the PIR sensor because it actively tracks its targets and can even tell if there are multiple people. Its less prone to false positives from environmental changes and smaller animals. Unfortunately, it can take several seconds to acquire a target and begin tracking it. In a presence application, a human could walk across several steps into the field of view within that time, giving the impression of a slow response.

Using both sensors in a presence application is a sort of belt-and-suspenders approach. You can compare the state of both sensors in your automations to determine presence with greater accuracy.

As for learning HA itself: we all started in a similar place not even knowing what we didn't know yet. You sort of poke and play and build some bad automations. Then you start to research new projects and start to learn what you don't know yet. That's OK: its a roadmap to future knowledge.

In my rig, I use HA to solve problems or address nuisance situations around the house. Wife and kids are forever leaving doors open with the HVAC on. I programmed HA to watch the HVAC (ecobee thermostat) and the states of the windows doors. If a door gets left open for more than 10 minutes, HA starts flashing lights as an indicator for someone to check notifications. After 20 minutes of the door/window being open, it turns off the HVAC and sends a push notification to my phone that someone is being a dumbass.

Another one is to shut off the basement lights at 10pm because the kids never remember to after they're done gaming down there.

Eventually you want to do.more sophisticated things, and that when the rabbit hole gets real deep.

[–] xylem@mander.xyz 2 points 6 months ago (1 children)

I'm planning to do a sump pump depth gauge too at some point as an emergency "pump is busted!" alarm - very interested if you don't mind sharing your thoughts for that design.

[–] solidgrue@lemmy.world 3 points 6 months ago

My sump pit is pretty shallow, and is dry about half of the time. My challenge is that the sump is on a float switch which doesn't activate until the water level is just about an inch (15mm) below the bottom of my slab. It doesn't take much of a delay for it to overflow.

There are three sensor types I'm aware of: a resistive "dipstick," ultrasonic distance gauge, and a bathymetric depth gauge.

The resistive dipsticks are only about 6in (15cm) in length, and would be good to determine if the water is within that distance of a target water line. I would position it on the side of the pit with the effective upper end set some buffer below the top surface of the slab floor, and possible gram the logic to alert when the water lever rises above the bottom of the slab. I would otherwise be blind to the water level if it is below Tue bottom of to sensor.

The ultrasonic sensor looked interesting, but I have pets and I try to avoid ultrasonics in the environment when I can. It also strikes me as perhaps the least reliable (or most crosstalk-prone) of the sensors because it has a larger field of view, and might be fooled by the equipment in the pit.

That leaves the bathy sensor. Its basically a diaphragm and a pressure sensor you screw to a waterproof housing, and submerge. Placed near the bottom of the pit, it would read the depth of the water by the pressure of the column above it. Most accurate, but also the most expensive. Last I checked, the sensor itself was US$60 on the usual online markets.

Ultimately I'll probably do a length of copper pipe with a 90 elbow and a cap. I'll drill and tap a port through the cap and thread and seal the bathy sensor into it, and feed the wire back up the pipe to the controller. I'm not sure if there a driver for it in ESPHome, but if nothing else I expect I can probably just read the analog voltage and alert on a set point.

I haven't really fleshed it out as a design yet, but that's what I'm most likely to do.

[–] Lifebandit666@feddit.uk 1 points 6 months ago

This all sounds awesome.

My energy supplier (Octopus UK) rolled out these beta test monitoring gadgets that sit on the network and connects to my smart meter, super convenient, hooks straight in to HA with an add-on someone made.

Before I got one of those I was looking at the clamps Myself

[–] mipadaitu@lemmy.world 5 points 6 months ago

Saw a neat ESP32 IR blaster on sparkfun. Might try to set it up to control some LED string lights.

[–] aniki@lemm.ee 5 points 6 months ago* (last edited 6 months ago) (1 children)

Are you familiar with WLED and ESPHome? You generally have two sets of pin outs, analog [pwm] and digital. You can hook almost anything up if you program your pin-outs to respond correctly. If you're trying to get into programming on the ESP32, start with some Arduino programs. They both use the same C libraries.

[–] Lifebandit666@feddit.uk 4 points 6 months ago

This is good info thanks!

[–] unknowing8343@discuss.tchncs.de 5 points 6 months ago (1 children)

Also bought an ESP and some components but haven't yet done anything.

Just make sure you have a prototyping board.

I hate soldering, so I will only cross that road once I have a very solid project and idea.

[–] Lifebandit666@feddit.uk 3 points 6 months ago (1 children)

Yeah I played a little with the breadboard when I first got the pi but didn't do anything spectacular. I need to have a look but I feel like I may have a camera module in my bag of tricks so I guess I could theoretically knock up a camera doorbell or something with some tinkering.

Soldering looks like it's a whole thing but I feel like if I bought an iron I'd get the hang of it really easily.

But then I feel like I'll just be soldering everything and my family will get exasperated with me.

[–] Naate@lemmy.world 3 points 6 months ago (1 children)

Learning to solder is incredibly helpful with getting your esphome devices off the desk and into real-world use.

Don't cheap out on the iron, though. Hakko and Weller are the two brands I'm familiar with and "everyone" seem to trust. You don't need to spend hundreds of dollars, but the quality gap between $30 and $60 is very obvious.

This is one of those instances where the idea of "a poor craftsman blames his tools" falls apart. I was using a crappy non-adjustable pen and could never achieve good, reliable results despite having proper technique. Then I got a decent Weller adjustable unit, and suddenly everything was "perfect".

If you're looking for additional toys, a 3D printer is insanely useful for creating bespoke cases for your projects ;)

[–] Lifebandit666@feddit.uk 4 points 6 months ago (1 children)

If you're looking for additional toys, a 3D printer is insanely useful for creating bespoke cases for your projects ;)

Oh look, the rabbit hole lol

[–] solidgrue@lemmy.world 2 points 6 months ago (2 children)

I've had an Ender 3 in my cart for months and just can't quiiite justify pulling that trigger. One of these days, tho.... Any day now.

[–] aniki@lemm.ee 1 points 6 months ago

Don't. Ender 3 is ancient garbage. I upgraded an ender 3 to a k1c and I'll never go back. The only time I don't get FLAWLESS prints is because the filament isn't fast enough. I can print benchy in 30 minutes in the slow speed. And best of all I never have to fuck with it. Ever.

[–] Lifebandit666@feddit.uk -3 points 6 months ago

I've got a friend that I've basically lost over the last couple of years because he bought an Ender 3 in lockdown and now he's fat and pasty white because he just stays home making things with his printer.

Don't buy it and don't look into robotics, you don't need to make a automated robot that can kill other robots Luke.

Sorry I'm projecting lol

[–] ALERT@sh.itjust.works 3 points 6 months ago

if you have a laptop cooling pad, you could control it depending on your CPU and GPU temperatures with my https://github.com/ALERTua/iets-speed-control

If you also enjoy 3D printing, there’s a fun project to make an NFC tag reader with ESPHome. I use it for a jukebox where my playlists are NFC chips with the corresponding Spotify URLs. It lets anyone in the house tap a playlist to play. Much easier than having to get your phone out, and it’s reminiscent of flipping through CDs back in the day.