Live data from Hacker News

Building an occupancy sensor with a $5 ESP32 and a serverless DB

matthew.science

201–210 of 221 posts

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#201
post #21

Awesome write up, I liked how accessible the writing is, as well as the fun tone. I have a problem where I will need to monitor the soil moisture of 20 trees in San Francisco. My current thought is to strap an ESP32, Lora module, battery, and capacitive soil moisture sensor and to send data once every 6 hours or so. I was wondering if off the cuff you have any suggestions or pointers on how to best approach this. Tha…

Would the Pimoroni Grow help you out? https://learn.pimoroni.com/article/plant-monitoring-with-env...

grab that, a pi pico, and some batteries (which should last months they claim), and set up an MQTT for data.

It is pretty expensive at scale. But if you want "no fuss" I think it would do the trick for you.

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#202
post #38

You can also get pretty check 24ghz radar that does reliable sensing till like 3m. Much much more accurate than the IR based stuff

While yes, these devices are cool and I use them in a couple of projects (mostly centered around home automation), I think there is no good way to count people that way (other than placing them above ingress and egress points).

I think the original use case is not to know whether a dining hall is occupied at all but about how occupied it is (and if he should go to lunch now or wait another 20 minutes).

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#203
post #119

Outstanding write-up! We actually built a business based on this technology (occuspace.io) and have had to address almost all the questions that you brought up. To answer some of them here: Q: How accurate is BLE beacon count, as a proxy for occupancy? A: It's very highly correlated but different dining locations, classrooms and library floors have very different correlation factors. Consider using other, perhaps mor…

The differing correlation factors seems like a difficult problem for productizing this. I would expect a STEM college building to have maybe >3 BT devices per person, while other venues may have less than 1.

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#204
post #119

Outstanding write-up! We actually built a business based on this technology (occuspace.io) and have had to address almost all the questions that you brought up. To answer some of them here: Q: How accurate is BLE beacon count, as a proxy for occupancy? A: It's very highly correlated but different dining locations, classrooms and library floors have very different correlation factors. Consider using other, perhaps mor…

> How accurate is BLE beacon count, as a proxy for occupancy?

But how often is an accurate count needed? The initial requirement of the project was just for the OP to "avoid crowds in the dining hall", and for that all one needs is a general idea of highs and lows.

In your business, do customers expect high accuracy? All of them, or some of them?

Also, regarding MAC address, even if they're randomized, isn't there a way to know what kind of device it is? (to count only phones for example, and discard headphones, etc.)

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#205
post #90

Since this was done by a student at a university, and at some level this involves tracking people, that's an opportunity to ask a professor about what human subjects protocols you'd need if this was research. (A professor might be easier to ask than the university human subjects board -- who might refuse to talk with you because this isn't under their jurisdiction, or might get alarmed because you didn't talk with th…

I wonder what the "rules" are for things like tracking beacons. They're being broadcast, and they're almost certainly collected without consent everywhere we go. I happen to live at a junction where my home is regularly surrounded by large numbers of Bluetooth devices; I had considered setting up a BLE tracker purely for "fun" to see what I could collect and discern from the data. For example, one thing I'm certain o…

Depends on local laws and jurisdiction. US famously has no communication secrecy laws, some countries states broadcast is free to listen, etc.

But I think the point made in GP is tracking people, although indirectly, could qualify as `human subject research`, the same technical category as Stanford prison experiment, MKULTRA project, standard website A/B testing, etc. I don't think it's going to be a problem per se, but can be an opportunity to discuss and learn about ethics and processes.

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#206
post #43

How do people "productize" their ESP32 projects? (Edit: not talking about mass-producing something, I just want a self-contained unit rather than a board with a bunch of wires sticking out) I see a lot of pages where they show some bare-looking board, but in the real world you want to package that up. If you're a software guy like me, you would likely prefer to pay a bit extra to just have that tidied up for you rath…

If you're not wiring anything but power, LilyGo T-Dongle-S3 is an ESP in a USB-A thumb drive form factor complete with a shell and optionally a 160x80 color LCD.

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#207

I'm wondering how accurate this might prove measuring automobile traffic on a relatively busy street? I've been pondering some way to track the number of vehicles that pass my house each day, and would like (but not ideal) to get their average speed too. Was thinking about computer vision, and even audio doppler approaches, but this seems simpler - if only the bluetooth sensing might work on a device moving at 50mph+…

I have an unorthodox suggestion: get a bicycle rear radar like the Garmin Varia. They communicate via Bluetooth LE incoming cars, their count, and an average speed (in a set of ranges like 0-15km/h, 15-30km/h, …). Mount this with a usb cable somewhere, add an ESP32 or anything with Bluetooth somewhere else to accumulate.

Seems workable - thanks!

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#208
post #90

Since this was done by a student at a university, and at some level this involves tracking people, that's an opportunity to ask a professor about what human subjects protocols you'd need if this was research. (A professor might be easier to ask than the university human subjects board -- who might refuse to talk with you because this isn't under their jurisdiction, or might get alarmed because you didn't talk with th…

I wonder what the "rules" are for things like tracking beacons. They're being broadcast, and they're almost certainly collected without consent everywhere we go. I happen to live at a junction where my home is regularly surrounded by large numbers of Bluetooth devices; I had considered setting up a BLE tracker purely for "fun" to see what I could collect and discern from the data. For example, one thing I'm certain o…

I don't understand your last paragraph. Do you mean it correlates to lots of internal combustion engines nearby (e.g. pollution)? How else would this possibly affect your air quality?

Re: Building an occupancy sensor with a $5 ESP32 and a serverless DB

#210

Earlier quoted context omitted.

> and I'm also not a slave responding to calls/texts. You do you, but I enjoy talking with my friends and family and I don't see responding to them as "slavery".

Yes, I enjoy experience of life in real life.

You're also very judgmental. My family lives far away, thankfully my phone allows me to maintain contact.
Post reply on HN