Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

HM3301: https://wiki.seeedstudio.com/Grove-Laser_PM2.5_Sensor-HM3301...

Attached over I2C to an ESP32 running ESPHome: https://esphome.io/#air-quality Which in turn reports to a raspberry pi running Home Assistant: https://www.home-assistant.io/installation/ Took about 20 mins to set everything up.



> Took about 20 mins to set everything up.

Given you have Home Assistant installed and have previously used ESPHome. And attached wires.

Otherwise, you may be up to a journey that takes many hours/days. That's the difference experience makes :)


The only thing set up was the raspberry pi having an OS installed. Had never used HA or ESPHome before. I was shocked how easy it was if you're comfortable with a terminal. I'd never even used docker before.

My steps were:

1. Install docker

2. Install/run HA through docker

3. Install/run ESPHome through docker (there's a config wizard)

4. Edit the ESPHome .yaml from (3) to my preferences

5. Connect 4 wires from the ESP32 to the air quality sensor

6. Plug ESP32 USB to RPi

7. Run docker esphome on the above yaml. This compiles, flashes, and boots your ESP32, auto-connecting to your network

8. Add the ESP air quality sensor to HA through the web GUI


That's (almost) exactly what I did and without prior docker experience. I must admin it was less hassle with docker, but still docs for particular containers had to be read to understand configuration options.

+ setting up for external access, letsencrypt and tying that everything within docker-compose. I didn't manage to do it in 20minutes, but more like full working day maybe?

Anyway, HA is recommended. Haven't tried ESPHome, but Tasmota is an alternative that also does the job, if you someone ever wants to research the options.


Turnkey microcontroller projects can be really quick. Adafruit and Sparkfun sell many of their breakout boards with special cables for I2C now, so you might not even have to solder anything. From there, you can drag a Python script to the microcontroller (which appears on your PC as a flash drive).

Building enclosures for these projects used to be an annoyance, but everyone provides CAD models of their stuff now, so you just kind of lay it out in your CAD program, extrude a box around it, and print it out.

Never been a better time than now to be building sensors and that sort of thing. (Even with the STM32 shortage!)

As for the Raspberry Pi -- my rule is to treat embedded systems like hardware. Download a Linux image with the software you want on it, copy it to an SD card, plug that in, and go. I use this model for Octopi and while I might have changed the password and uploaded a profile for my printer file, that's it. If the RPI blows itself up, $35 and 5 minute fix. What version of systemd is running? Don't care. How close is the clock to Coordinated Universal Time? Don't care. It's an appliance and the time on the front is blinking :P

(I spent most of my free time this week unbreaking my Beaglebone that I ostensibly don't treat that way -- I log in and fuck with shit. Though when debugging failed I just blew everything away and copied over what I saved in the project's Git repo. It was enough to be back up and running with no loss of functionality. I guess the key is: don't let it run away from you -- it can be an endless time and energy sink.)


A 3D printer alone is a many-weeks learning experience, not to mention learning CAD if you've never done it before.


BTW, a 3D printer running is a potent source of VOC pollution and particulates, meriting an activated-carbon filtration system for wherever it is.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: