Live data from Hacker News

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

matthew.science

151–160 of 221 posts

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

#151
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…

Does this type of occupancy tracking work accurately outdoors? I'm assuming it would be difficult because signals would travel further. (My startup needs occupancy tracking for tennis courts.)

Maybe I could mount a BT device at a corner of the outdoor space and use its signal strength as the threshold value.

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

#152
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…

Does this type of occupancy tracking work accurately outdoors? I'm assuming it would be difficult because signals would travel further. (My startup needs occupancy tracking for tennis courts.) Maybe I could mount a BT device at a corner of the outdoor space and use its signal strength as the threshold value.

You could mount one at each corner and use a directional antenna to help.

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

#153
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…

Does this type of occupancy tracking work accurately outdoors? I'm assuming it would be difficult because signals would travel further. (My startup needs occupancy tracking for tennis courts.) Maybe I could mount a BT device at a corner of the outdoor space and use its signal strength as the threshold value.

You could use the BLE AoA extension as well to derive an angle: https://www.bluetooth.com/blog/new-aoa-aod-bluetooth-capabil...

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

#154
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…

Does this type of occupancy tracking work accurately outdoors? I'm assuming it would be difficult because signals would travel further. (My startup needs occupancy tracking for tennis courts.) Maybe I could mount a BT device at a corner of the outdoor space and use its signal strength as the threshold value.

If you want to get really spicy, you can use two antennas and an SDR to compute angle of arrival using nothing but a BLE advertisement's data . This is different from BLE AoA as it doesn't require a cooperative transmitter.

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

#155

Earlier quoted context omitted.

Cameras work well for front occupants. They're already being used to check if commercial drivers are wearing seat belts.

if a toll tag required me to power it and allow it to record video of the interior of my car at all times, then FUCK THAT NONSENSE!!!! even if they had it setup so that the camera was only turned on briefly by a signal as you approached and then turned off again as you passed the gates, that's still a hard no from me.

Uh you're over thinking it. They just have cameras in the toll booths that snap a photo when the car crosses the sensor.

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

#156

While I don’t discourage learning a new language the immediate toss aside of rust on esp32 was perplexing. It sounds like a lot of the memory issues would have been mitigated by sticking with a language better understood. Rust’s esp32c3 support is pretty good IMO, that’s all I use. Writing in C++ makes me feel dirty in ways that even COBOL doesn’t. I also think I would have implemented presence by TTL, updating the T…

The hash map was definitely not robust enough, that’s why I ultimately switched back to the default behavior and increased the memory available on the board! Also, I am a Rust fanatic. I do nearly everything in it! I gave a talk on it at our last hackathon! I even wear a Rust t-shirt regularly! So rest assured I will be exploring my options with Rust. I would love to get rid of my dependence on Arduino. But C++ was e…

No that’s awesome. Experiment and enjoy. But I would check out the esp33 toolchain for rust. It’s remarkably mature. Awesome project btw.

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

#157
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…

Does this type of occupancy tracking work accurately outdoors? I'm assuming it would be difficult because signals would travel further. (My startup needs occupancy tracking for tennis courts.) Maybe I could mount a BT device at a corner of the outdoor space and use its signal strength as the threshold value.

You the same george ashworth that used to work at d&b?

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

#159
post #52
post #49

Earlier quoted context omitted.

There are lots of options. Most of what you see they don't: this is a one off project for the hacker and if others find it useful great, but not the goal. As such packaging isn't needed, sometimes you shove it in a box. If you want something nice, that can be done, now you need to pay someone (could be yourself!) to design a package. ESP32 is designed to be easy to put into your own products, this means design a circ…

I'm not really talking about producing something at scale, just the bare minimum of not having a board with wires coming out of it. Say I want to do some one-off project and put it outside somewhere, out of the weather, with some batteries to power it. Or an indoor thing with an AC hookup of some kind. Doesn't have to be perfect or beautiful or as tiny as possible; just sort of a complete package.

Time for me to shill m5stack.com again

I don't work for them, I just really like their products and own about 10 of them. Downside, the documentation is rudimentary so you should enjoy steep learning curves (but not too steep - The ESP-IDF and MicroPython docs will get you through most problems).

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

#160
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 it uses Bluetooth you're theoretically on the hook for thousands of dollars if you want to sell your ESP32 project as a product. (IANAL; it may take a lawyer to truly understand if you have to pay or not.)
Post reply on HN