Live data from Hacker News

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

matthew.science

11–20 of 221 posts

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

#11

Earlier quoted context omitted.

Are you sure that the system isn't still running, but it has just disconnected from wifi and is failing to reconnect? I have a few status LED's flashing to show the main CPU is still running, and it often is, even when the device has fallen off the network. I find that happens fairly frequently unfortunately, and haven't managed to track down the cause.

Hm, that’s a good call. I have a callback on the connection dropped to reconnect but it’s possible it needs a full reboot? I’m going to have to sit in on the serial monitor and wait until something happens and see. Thanks for the tip!

I live in a very wifi-busy area (hundreds of networks), and I suspect that the wifi logic somehow hangs itself waiting for some packet/message/state which gets lost and never comes.

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

#13
I've heard talks of the toll tag companies wanting to be able to detect occupants in a car so they can properly charge the correct amount of fees when the occupancy changes the amount. I never looked into how that might happen, but I'm guessing Bluetooth would not be a solve here as it's too easy to circumvent if passengers disable bluetooth

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

#15

I've heard talks of the toll tag companies wanting to be able to detect occupants in a car so they can properly charge the correct amount of fees when the occupancy changes the amount. I never looked into how that might happen, but I'm guessing Bluetooth would not be a solve here as it's too easy to circumvent if passengers disable bluetooth

Or (shudder) have more or less than the requisite single phone.

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

#16
post #12

is something like this possible for an outdoor setting like a beach?

Definitely, if there’s a solar panel and a battery hooked up + some sort of internet connection. Though I would worry about durability outdoors, probably needs to be sealed pretty tightly

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

#17

I've heard talks of the toll tag companies wanting to be able to detect occupants in a car so they can properly charge the correct amount of fees when the occupancy changes the amount. I never looked into how that might happen, but I'm guessing Bluetooth would not be a solve here as it's too easy to circumvent if passengers disable bluetooth

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

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

#18

I've heard talks of the toll tag companies wanting to be able to detect occupants in a car so they can properly charge the correct amount of fees when the occupancy changes the amount. I never looked into how that might happen, but I'm guessing Bluetooth would not be a solve here as it's too easy to circumvent if passengers disable bluetooth

That’s much worse of an automobile usage case than the ones I read about (measuring vehicle travel speeds to improve travel time estimates)!

Occupancy based pricing for vehicles seems too hard to enforce anyway, change the pricing scheme to something more practical IMO

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

#20
post #5

And with more of these, you could track where everyone is all the time! Here's a camera based video people counter.[1] This is a bit less intrusive. [1] https://github.com/saimj7/People-Counting-in-Real-Time

Given manufacturer’s trends of enabling the privacy feature of randomizing the MAC address every n minutes, it would take some serious effort and analysis to reverse these general trends into individuals. I’ve linked a relevant article in the bibliography about these kinds of attacks [1] but in general, at least with user numbers in the hundreds, it would be very difficult. [1]: https://ieeexplore.ieee.org/document/9…

Just skimming that paper, it doesn't look like they made use of any kind of fingerprinting. The paper below shows how BLE devices can be profiled to extract a potentially unique fingerprint. I don't know how well this would scale to large numbers of devices, but I'd imagine if you used such a fingerprint, you could dramatically improve the association between randomized MAC addresses even if the fingerprint is not 100% unique.

https://inria.hal.science/hal-02359914/document

Post reply on HN