News for hackers. Stuff that matters.
Re:ESPHome by balloob on Wednesday April 24, 2024 @03:22AM (#40141607)
One of the people leading ESPHome here. Let me know if there any questions.

Last Saturday we announced that ESPHome is now owned by the Open Home Foundation. The Open Home Foundation fights for privacy, choice, and sustainability for smart homes. And for every person who lives in one. Learn more at https://www.openhomefoundation.org/blog/announcing-the-open-...

Re:ESPHome by Gazebra12 on Wednesday April 24, 2024 @03:49AM (#40141768)
No questions, only praise. This project is simply awesome, I've been astonished time and time again by the features. I had done a complete dive into the Espressif SDK trying to implement a wireless switch with temperature sensor and mqtt and had nearly finished the project when I stumbled on ESPHome obsoleting all of my work at once. It was just everything I had written so far plus many added features and obsoleted all my work at once.
Re:ESPHome by rubenbe on Wednesday April 24, 2024 @04:40AM (#40142006)
I agree, programming is fun, but using ESPHome to quickly have project finished and working reliably is arguably even more satisfying.
Re:ESPHome by freedomben on Wednesday April 24, 2024 @12:37PM (#40146558)
I both love and hate when this happens. Discoverability seems like the hardest challenge. I always do quite a bit of searching for existing stuff before rolling my own, and it can be really hard to find stuff. Most of the time I stumble on it serendipitously at some point later.
Re:ESPHome by jtwaleson on Wednesday April 24, 2024 @04:41AM (#40142010)
Thank you! I've rarely been as impressed by how well software works. Flashing, compiling, logging and OTA updates were always a PITA and with ESPHome it's a breeze. Logging over wifi feels like it shouldn't be that simple. I've created a mini IR receiver / transmitter to control my sound system with my TV remote. It was super simple to set up, and the integration with Home Assistant is great!
Re:ESPHome by balloob on Wednesday April 24, 2024 @06:04AM (#40142496)
If there are people reading this and are excited to try out ESPHome: try it out without writing a single line of configuration by installing some of our ready-made projects: https://esphome.io/projects/

It allows you to turn a cheap microcontroller into a voice assistant, bluetooth proxy or media player directly from your browser.

Re:ESPHome by 3abiton on Wednesday April 24, 2024 @06:07AM (#40142522)
I already got my ESP gadgets to tinker, what's missing is the time. It's super fun, and looking so forward for it, but my to-do list cannot give me a break. Great job what you guys are doing!
Re:ESPHome by bobby_the_whal on Wednesday April 24, 2024 @06:09AM (#40142536)
Are you not concerned the foundation will ever work against your interests?
Re:ESPHome by balloob on Wednesday April 24, 2024 @06:29AM (#40142662)
The foundation can only work in the interest of privacy, choice and sustainability for the smart home. It is important that we have a thriving ecosystem of communities and companies working towards this goal. You cannot do this with just a single player. If, at some hypothetical point in the future, that means it will work against my interests, then the foundation is doing exactly what we created it for.
Re:ESPHome by sslalready on Wednesday April 24, 2024 @06:50AM (#40142807)
ESPHome is awesome. Any chance you can get MQTT running on RP2040W?
Re:ESPHome by mairusu on Wednesday April 24, 2024 @07:11AM (#40142938)
I have one! ESPHome is awesome but I'm trying to steer away from Wifi IoT - a big reason is that I like the idea of self-healing meshes that can work entirely offline, without having to deal with a lot of configuration.

Espressif seems to have a few devices with ZigBee capabilities, think there will be a way of building our own ZigBee device in the future?

Re:ESPHome by andai on Wednesday April 24, 2024 @01:28PM (#40147255)
Fascinating. When I read your comment my first thought was to use something like LoRa, though perhaps broadcasting your data for miles is an antifeature.
Re:ESPHome by ianburrell on Wednesday April 24, 2024 @01:50PM (#40147528)
There is no reason that Wifi devices can't work without internet. Most ESP32 devices don't talk to internet, but to other device on local network. Wifi doesn't really need mesh since has longer range.

I hope ESPHome is working on Matter support cause protocol that can switch between Wifi, Bluetooth, and Thread is a big advantage.

Re:ESPHome by londons_explore on Wednesday April 24, 2024 @04:11PM (#40148982)
ESP devices have support for sending raw wifi packets, so you can implement your own mesh protocol if you like.

They have software support for both wifi and bluetooth meshing as well.

Re:ESPHome by bdavbdav on Saturday April 27, 2024 @05:32PM (#40183754)
Re:ESPHome by ahaucnx on Wednesday April 24, 2024 @07:22AM (#40143006)
First of all many thanks for helping to maintain such a great project!

The feedback I have right now is that for the ESP32-C3 chip, provisioning over USB (Improv_serial) is not supported. So then the only option is to do provisioning over BLE if you want to get the "Made for ESPHome" certification.

However, this blew up our partition size from 1.2 MB to 1.9 MB and basically prevented us to add any further code and we got stuck there (we now develop a native HA integration).

So my feedback would be to try and reduce the overhead for the provisioning.

Re:ESPHome by RobotToaster on Wednesday April 24, 2024 @08:15AM (#40143462)
You need to update your homepage, it still says it's owned by Nabu Casa at the bottom of the sidebar :).
Re:ESPHome by blagie on Wednesday April 24, 2024 @09:00AM (#40143833)
The ESPHome project is unusually competent, user-centric, and almost uncanny in how well it works.

I'll tell you what I want, though. I'm not sure this is in-scope for ESPHome, or how it's possible to even implement cleanly:

I want to be able to make devices which have tight feedback loops and more complex on-board algorithms

What I really want is e.g. a light sensor controlling lightbulbs. Here, I want the lightbulbs changing almost continuously by almost imperceptible amounts, things like Kalman filters, and similar, to keep a fixed light level and light temperature based on time-of-day.

I'd like to have my air filters, ventilation, heating, humidification, dehumidification, and cooling continuously controlled such that:

1) All run at the right level continuously to keep environmentals and power optimized.

2) Ventilation reduces CO2 / TVOC levels, but increase PM2.5 levels and lets in external temperature

3) Cooling / heating / ventilation impact humidity in complex ways

4) Space heaters cost a lot more than baseline heating, but are sometimes necessary on very cold days

5) This is all less important when I'm not home, and some things change. When I'm home, I want liveable humidity. When I'm not, I want to minimize humidity.

... and so on.

(A second thing I want is ESPHome to allow me to make Zigbee, rather than just wifi, devices)

Re:ESPHome by bobchadwick on Wednesday April 24, 2024 @10:42AM (#40144961)
I use Home Assistant for doing most of what you're asking for. This integration works great for adjusting light level and temperature: https://github.com/basnijholt/adaptive-lighting.

My home has an ERV and I use a couple Shelly relays (one for power and the other to boost airflow) integrated into HA to modulate the amount of fresh air I bring in, currently based on indoor/outdoor temperature and humidity. I don't have an air quality sensor, but if I had one I could easily integrate that into my automations.

Re:ESPHome by winsome on Wednesday April 24, 2024 @03:31PM (#40148548)
I would love to hear more about the integration you've setup. I, too, have an ERV but it's on a dumb controller right now.

I don't use HA yet, but it's a project I plan to tackle soon. I've also been doing some research on ESP and energy monitoring, so it sounds like what you've done is right up the same alley.

Re:ESPHome by blagie on Wednesday April 24, 2024 @08:00PM (#40151478)
Woah. That looks awesome.

A red flag, relative to what I would do is: "Frequency to adapt the lights, in seconds." I would like to be able to make tight feedback loops, which means much less than seconds. I use HA + ESPHome as well, and that's on my list of issues I'd like to see resolved. To understand why this matters for a lot of controllers:

https://en.wikipedia.org/wiki/Gain%E2%80%93bandwidth_product

Audio amplifiers are often in the 50MHz range, in order to achieve good performance in the <20kHz range. Add to that, in this case, the desire for steady transitions so I don't have sudden light or noise changes (stepping through 255 states takes .

That said, holistically, this does what I want better than how I was going to do it.

The other major issue I have with HA is reliability. About 10% of the time, some automations don't work. I'd really like to be able to set state (blinds are down after 8pm) rather than actions (blinds go down at 8pm). If you have suggestions....

Re:ESPHome by wildekek on Thursday April 25, 2024 @09:51AM (#40157594)
I have done all this using ESPHome. There a quite some control loop components you can utilize for this, such as bang-bang and pid thermostat.

My thermostat: https://github.com/wildekek/esphome-opentherm-templates

My air cleaner: https://github.com/wildekek/BlitzHome-BH-AP2501

My bathroom hygrostat uses Home Assistant: https://www.home-assistant.io/integrations/generic_hygrostat...

Re:ESPHome by K0balt on Wednesday April 24, 2024 @09:08AM (#40143923)
Nothing but respect and gratitude for ESPhome.

I do have a question though, is there a way to use modbus-TCP with ESPhome?

Re:ESPHome by mtrio on Wednesday April 24, 2024 @09:21AM (#40144067)
If my understanding is correct, ESPHome need to be re-compiled and uploaded every time the config yaml is changed. Is it possible to separate the binary and the config so that for some config changes, there is no need to re-compile and upload the binary? Thanks.
Re:ESPHome by alright2565 on Wednesday April 24, 2024 @09:56AM (#40144478)
In practice, this is absolutely no problem. It generally only needs to re-compile a file or two for small changes, which takes seconds, and the OTA update functionality works perfectly so you don't need to unplug it/bring it to your desk.
Re:ESPHome by wdfx on Wednesday April 24, 2024 @09:24AM (#40144105)
I believe this is because the yaml is in fact the instructions for what to include in the binary. It wouldn't be feasible for the firmware to include all possible device and peripheral code and enable parts at run time.

I think you can see the esphome intermediate code generation in the file tree during compilation and see how the yaml sections map to blocks of C/C++ code being built.

Re:ESPHome by cyberax on Wednesday April 24, 2024 @10:51AM (#40145065)
It would be great to support more PoE devices and Ethernet-based provisioning. And also alternative wired buses, such as BACNET or a generic RS-485.

The other axis: Zigbee devices and battery power. ESPs can be used with batteries, but right now it's not a great fit.

And the last feature: better reuse support for custom devices. E.g. if I have 20 similar custom devices.

Re:ESPHome by wkat4242 on Wednesday April 24, 2024 @11:09AM (#40145287)
Yes the modules with rpi2040 and Ethernet would be so great to have supported.

I'm pretty unhappy with the WiFi 8266 modules I have. They regularly go into unavailable in home assistant for a few minutes even though my WiFi is working fine

Re:ESPHome by sirtaj on Wednesday April 24, 2024 @01:20PM (#40147158)
Could it be that they're simply idle sleeping to save power? My first ESPhome device confused me by dropping off and on and it turned out that was the problem, idle sleep was configured by default - the device would wake up, report its status and go back to sleep.
Re:ESPHome by wkat4242 on Wednesday April 24, 2024 @03:42PM (#40148686)
Hmm I don't know. It could be but it's very intermittent. Sometimes it happens a lot, sometimes it doesn't.

I'll try to find out the sleep settings though, thanks for the tip!

Re:ESPHome by epcoa on Wednesday April 24, 2024 @11:08AM (#40145275)
> generic RS-485

You can already hook up an RS-485 transceiver to the UART ports and use it today with the UART driver. Esphome also has a Modbus controller component. What are you referring to by “generic” RS-485 that isn’t available already?

Re:ESPHome by cyberax on Wednesday April 24, 2024 @11:44AM (#40145782)
RS-485 is a shared bus, so you need to use some kind of a protocol to arbitrate access, and to make sure you don't flash unintended devices.

BACnet is one example, but other protocols can work too.

Re:ESPHome by epcoa on Wednesday April 24, 2024 @12:48PM (#40146756)
Re:ESPHome by cyberax on Wednesday April 24, 2024 @04:21PM (#40149087)
It doesn't allow firmware updates over modbus. The same would also apply to Zigbee.
Re:ESPHome by WhyNotHugo on Wednesday April 24, 2024 @11:10AM (#40145292)
I want to connect a temperature sensor to an esp, and trigger a radiator valve based in temperature range.

Valves are mostly zigbee. Can I somehow control one with ESPHome without Home Assistant or zigbee2mqtt?

I want to understand if I can avoid adding a full blown Linux server into the equation.

Re:ESPHome by Doe-_ on Wednesday April 24, 2024 @11:25AM (#40145508)
You can bind a device to another, so while you would need the ability to issue the command, a server wouldn't be required to handle the state propagation.

https://smarthomescene.com/guides/how-to-bind-zigbee-devices...

Re:ESPHome by jbensan on Wednesday April 24, 2024 @11:28AM (#40145551)
"mostly zigbee?" not sure what you mean there. But ESPHome can be controlled directly without HA. You should read the website, specifically the sections on "Networking" and "Management and Monitoring".

If you are starting at zero there is a big learning curve, but if you're into it, it is a lot of fun.

Re:ESPHome by Larrikin on Wednesday April 24, 2024 @03:47PM (#40148731)
Why do you want to avoid Home Assistant? From what I've found setting up my automations is that once you have it doing something useful you find you have a lot of ideas to further make your life better. I might be wrong but I suspect you'll spend a lot of time doing something that is simple in HA only then find you want to do something else similar.
Re:ESPHome by asdefghyk on Thursday April 25, 2024 @01:19PM (#40160381)
Question: On a typical ESPHome device, reporting temperature (say every 15 minutes) via wireless to HomeAssistant, what battery life is possible ?
Re:ESPHome by pcollins123 on Friday April 26, 2024 @10:17AM (#40169755)
With a $10 18650 rechargeable battery you could probably get a couple months on a single charge. Esphome can deep sleep between readouts: https://esphome.io/components/deep_sleep.html Deep sleep pulls the power draw down to 50uA.

Of course if you also wire a solar charger next to the battery… maybe it will never run out.

Re:ESPHome by JoBrad on Thursday April 25, 2024 @10:04PM (#40165191)
I’ve been using Home Assistant for about 3 years now, and talk about it to pretty much anyone who will listen. Thanks for keeping home automation open and focused on the users!