News for hackers. Stuff that matters.
Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by gedy on Thursday May 26, 2022 @02:10PM (#31521608)
This is a really handy project for low code ESP32 & ESP8266 use in Home Assistant. I recently made a 8 switch irrigation system with < $20 in parts and just a few lines of yaml.
Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by heffer on Thursday May 26, 2022 @02:19PM (#31521699)
Now that's a blog post I'd read.
Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by tamu_nerd on Thursday May 26, 2022 @04:04PM (#31522755)
It's actually pretty straightforward: just wire in the relays (shift register required for ESP8266) then turn them on and off as desired. With your valves exposed via wifi to Home Assistant or MQTT the world is your oyster as far as using inputs (weather, rain, etc) to bring intelligence into your irrigation scheduling. I loosely followed this guide when I built mine: https://selfhostedhome.com/diy-wifi-sprinkler-controller-usi...
Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by cptskippy on Thursday May 26, 2022 @06:19PM (#31524002)
> shift register required for ESP8266

Why? A D1 Mini has 8 Digital I/O ports that could drive a 3.3.v relay module.

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by tamu_nerd on Thursday May 26, 2022 @07:51PM (#31524643)
Not sure, I didn't try, but using one was a good excuse to learn how. The blog post suggests that despite there being 8 they're not all suitable for use (maybe due to high on boot or something)
Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by cptskippy on Friday May 27, 2022 @12:12AM (#31525954)
Ah... that makes sense. It looks like IO0 needs to be pulled high to boot.

Still looks like you could redefine RX to a GPIO and still have 8 if you didn't need serial input. I vaguely remember running into this issue with some load cell AMPs.

A Shift Register or IO Expander seem like the more interesting and less frustrating route. I'd probably end up using an ESP01 and i2c IO Expander because I'm a masochist and love trying to squeeze as much as I can out of the ESP01.

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by gedy on Thursday May 26, 2022 @05:34PM (#31523624)
I actually referenced tamu_nerd's link below, but my approach was simpler as I used an ESP32 (more pins, so no shift register needed), and I powered the ESP32 with its own USB charger (so no AC to DC converter needed). I can add something to GitHub and will reply here)
Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by baldeagle on Thursday May 26, 2022 @02:57PM (#31522110)
I second this. I’ve been toying with irrigation for a while, but valves have always been the issue
Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by moffkalast on Thursday May 26, 2022 @04:54PM (#31523235)
> recently

> $20 in parts

With how much ESPs go for right now I kinda doubt that, what's the whole BOM?

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by gedy on Thursday May 26, 2022 @05:04PM (#31523350)
Bear in mind I already had irrigation system with 24v valves in place. The <$20 is the adding the ESP32 , 8 switch relay rail, plus the plexiglass, standoffs, and USB charger.
Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by moffkalast on Thursday May 26, 2022 @07:38PM (#31524570)
Ah alright that's more believable, though still quite a bargain.
Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by cptskippy on Friday May 27, 2022 @10:50AM (#31530303)
The thing you have to understand is that controlling an irrigation system is easy, the valves work just like light switches but on lower voltage.

The cost of an irrigation system is making it user friendly for a customer.

Example: https://www.amazon.com/Hunter-Sprinkler-XC400-4-Station-Cont...

Like the OP's solution, it is a microcontroller hooked up to a relay array, but it also has:

* AC/DC Transformer

* Real-Time-Clock

* Battery backup

* User Interface

* Secure, weather proof housing

* Printed Instructions

And it costs less than $90. They're making a profit on them, so the BOM is probably closer to $20-30.

The solution is completely plug-n-play compared to building from scratch, setting up a home automation system, and programming a microcontroller.

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by cptskippy on Thursday May 26, 2022 @06:17PM (#31523987)
> With how much ESPs go for right now I kinda doubt that

D1 Minis are like $1.50 and ESP01s are $0.95.

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by moffkalast on Thursday May 26, 2022 @07:38PM (#31524568)
Good luck controlling an 8 pin relay with 4 accessible pins hah.

The 01s are cheap for a reason - they're useless for most projects, hell I'm always running out of pins even on the esp32-cams.

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by cptskippy on Thursday May 26, 2022 @09:58PM (#31525359)
The ESP01 works perfectly for most sensor projects. It can handle I2C and serial IO simultaneously.

If you really need more GPIO you can get an I2C based IO Expander to add 10 more GPIO.

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by moffkalast on Friday May 27, 2022 @06:41PM (#31535757)
Meh, those cost extra and don't really do analog in or PWM out and have dreadful response time. Plus you have to deal with i2c which adds complexity.

I suppose in this case you could do it in that roundabout way by stacking two of those for relay control since it's as basic as it gets.

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by dekhn on Thursday May 26, 2022 @08:47PM (#31524972)
Do you mean this? https://www.amazon.com/CANADUINO-WEMOS-Minikit-240MHz-Blueto... because it has a lot more than 4 accessible pins.
Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by moffkalast on Friday May 27, 2022 @06:43PM (#31535784)
Nope, I mean this: https://www.amazon.com/MakerFocus-Wireless-Transceiver-DC3-0...

8 pins, half of those gnd, vin, reset, and something else. 4 are usable I think.

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by cptskippy on Sunday May 29, 2022 @04:41PM (#31552700)
That's an ESP-01. It has 4 GPIO with some restrictions but you are able to simultaneously run an I2C bus and Serial bus giving you tremendous flexibility.

You can get those in bulk for less than a dollar each and are my most used microcontroller. They're so easy to deploy and ear easily powered of USB wall warts with a regulator.

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by tekstar on Thursday May 26, 2022 @03:12PM (#31522270)
Can you explain this more? I've been getting into home automation and my wife would like programmable irrigation for when we're not at home. Did you interface with existing wifi valves or are you doing the circuit yourself?

I recently got rtlsdr to read my water meter so I can detect leaks, which is pretty cool

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by cptskippy on Friday May 27, 2022 @11:06AM (#31530471)
What the OP did was build a simple irrigation controller for an existing irrigation system. Most irrigation systems use electronic solenoid valves that open when very low current 24 VAC power is applied to the two terminals.

Take a look at the Spec for a valve from Rainbird:

https://www.rainbird.com/sites/default/files/media/documents...

Electrical Specifications:

• Power: 24 VAC 50/60 Hz (cycles/second) GBS25 Solenoid

• Inrush Current: 0.41 A (9.84 VA)

• Holding Current: 0.20 A (4.80 VA) at 60 Hz, 0.23 A (5.40 VA) at 50 Hz

If you have a sprinkler system, you can replace the on/off valve with a solenoid valve and then you're able to control the system electronically using a 24 VAC power supply and a switch. The OP replaced the switch with a relay, which is a switch that can be actuated by the lower voltage from something like a microcontroller.

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by godsfshrmn on Thursday May 26, 2022 @05:06PM (#31523374)
12v valves off Amazon. Don't get the cheap plastic ones. Get the brass versions

as long as you don't run several at once, can power from old wall wart with a few amps rating. I'm using a meanwell PSU so I can power a few other things - IR lights mostly

Re:ESPHome – Connect ESP32 with Sensors to HomeAssistant by michaelmior on Thursday May 26, 2022 @04:08PM (#31522799)
With existing WiFi valves, there would likely be no need for ESPHome.