Live data from Hacker News

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

matthew.science

131–140 of 221 posts

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

#131

Can you use the variation of RSSI to track movement? I know thst it's multipath and cannot be really reliable, but maybe it can provide some useful information. Or maybe using 2 tracking devices and correlate the results.

I do something like that for my home assistant: I have a few shelly smart plugs that can scan BLE. They filter for apple watches and send the MAC and RSSI to my home assistant where a small neural net then tries to detect the location within my apartment. It works better than I expected given the high variance of signal strength, even when standing still.

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

#132
post #67
post #59

Earlier quoted context omitted.

That is why so many amateur projects look ugly: making a pretty package is a whole new skill set. 3d printing is the easiest acceptable solution, but it isn't the best. Best would be a custom designed injection molded housing, but that is even more work to design. Nothing about making a nice presentation is beyond what amateurs can do. However it is a lot more effort and so most decide it isn't worth it.

I don't care if it's "beautiful" or ultra-compact or looks as nice as some Apple device. All I want is to buy one thing without wires and an exposed board.

There are not enough of you to make it worth the effort most likely. If you disagree then you should invest in the business opportunity.

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

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

I am by no means an expert, but I wrote up a bunch of words on how I did this personally for a family Xmas present here. The tl;dr; is a custom PCB in my case: https://kevinmitchell.io/blog/mitchine-esp8266-wooden-thinki...

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

#134

Earlier quoted context omitted.

It’s definitely not a reliability issue, with the platform - ESP32 in general is very popular so it’s surely an issue with my usage. I’m fairly certain it’s just a cheap manufacturer issue I ran into. I bought essentially a no-name ESP32 at first and that’s the one that refused to last. Proper manufacturer solved that issue for me and now ESP32 works just fine. The raspberry pi actually never worked, largely because…

> I don’t think it’s a power issue as it’s getting 5V1A from a power outlet directly to USB-C into the device. It's not the total voltage/wattage the PSU can provide, but the voltage at the processor. The ESP's varying current draw notoriously causes too much noise and a lot of boards don't have large enough decoupling capacitors so the voltage drops too much and it glitches out. Also a warning that USB PSU's can ver…

This is correct, I thought it wasn't and was going crazy trying to debug my Pi 3 resetting my 3D printer every time, with any of ten power supplies I tried, including a configurable bench PSU.

I switched to the official Pi PSU after someone said "trust me on this" online, and yep, zero issues in all the years since.

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

#135
post #64

Always surprised to see people running around with their Bluetooth needlessly enabled. Maybe I worry to much about battery usage, but I just got used to always enable WiFi, Bluetooth, or NFC, only at the moment of usage, and disabled afterwards.

I have a smartwatch and airpods, turning off Bluetooth would cause both not to work. I'm more surprised that anyone ever turns it off, battery use is negligible compared to the cellular modem as I browse the web/listen to music.

Well, I said needlessly because of the amount of times I saw people leaving Bluetooth enabled while not using any BT devices. Their phone enabled it by default, and that's how it stays for its lifetime. Even if it's small amounts, it must be chipping battery away!

Of course if you got a smartwatch you'll want to leave BT enabled to get calls messages and such. At least that's a good reason to leave it on.

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

#136
post #71
post #64

Always surprised to see people running around with their Bluetooth needlessly enabled. Maybe I worry to much about battery usage, but I just got used to always enable WiFi, Bluetooth, or NFC, only at the moment of usage, and disabled afterwards.

I feel like you’re an extreme outlier. It’s not at all surprising, given the convenience in a range of modern day activities like driving a car, listening to music, being in a workplace, or simply being at home.

But that's what I meant, using it when there is a purpose makes a lot of sense of course. I'd just enable BT, drive, then leave the car and disable BT before putting the phone in my pocket. Why leave it enabled during times that it's not paired with any other device?

To me it sounds like leaving home and keeping WiFi enabled. It eats battery because it's still sending beacons and trying to find some known device to connect to.

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

#137
Very impressive. This made me chuckle:

> I asked campus IT to whitelist the MAC address

Back at my uni this would have been a multi week endeavour with a number of forms and likely a denial. This was 15 years ago so hopefully things have changed there now.

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

#138
Really should point out this is for BLE. I thought it was based on heartbeats, heat, ingress/egress, or something more physical.

Also, ESP32 Rx sensitivity is kinda poor: -94 dBm, most devices are pushing -100, -102 and even -104 dBm. Makes a big difference.

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

#139

Earlier quoted context omitted.

I use Bluetooth maybe once or twice a year because I don't want to be tracked everwhere. Wired headphones. Phone in airplane mode much of the day. I suppose I am a privacy outlier, and I'm also not a slave responding to calls/texts.

> 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.

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

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

I designed a carrier board for my module to slot into. You can also solder the header pins directly to some perfboard and build off that.
Post reply on HN