Proximity detection: "What if your lights could turn on as you pull into the driveway?"


#1

I’m excited to apply the use-case teased in the Kickstarter video showing a car’s (or the driver’s phone) causing lights in the house to turn on when approached, but while reading your reference documentation I didn’t see APIs for these kinds of things yet. It looks so easy in the video :wink:

Do you have any advice on available APIs for recognizing other device addresses and their distance? Is there something better than SNR ratio or power guessing like a GPS-to location beacon mode for your devices that only your other devices can hear? Or a clever way of receiving that can measure signal reflections or determine rough direction? “I heard it ping in my left ear 10% stronger than in my right ear.” I suppose that’d need a couple of antennas.

It’d be great if recognized devices were stored in the cloud library like the “Your Photons” list available in the IDE. That’d make setting up a second (or third) Bluz chip to recognize the family car easier. New projects started months later can quickly reference your other established stuff, old projects can easily talk to new stuff.

Can IDs be cloned? I would think so, which would imply that recognition requires connection to validate keys.
Keep up the good work, and thanks for dreaming about the IoT. Having super-long battery life with internet connectivity is incredible. It’s a lot of fun, and you’re helping make it great.


#2

Any pointers on secure, smart, proximity detection?


#3

There are several ways to make the car/driveway/lights demo work. You could have a DK in the car and a gateway in the house, when the car gets home the DK connects and sends an event to turn the lights on. That isn’t really proximity sensing, howeve, it is more on/off then telling how far things are away from eachother.

You could also do an app with geofencing, so an app triggers the event and some Particle device on the other side turns on the lights. This is using proximity, but is using GPS on the phone and not RF measurements.

To do proximity with bluz, to see how far you are away from something, you will have a hard time using anything other than RSSI. iBeacons, for example, have a way to range how far you are from a device. The iBeacon packet sends out the normal power received from 1m, which is calibrated by the manufacturer, and then you can use it to figure out approximate distance. All of this is highly dependent on the environment, however, so it isn’t terribly accurate.

I am sure there are crazy ways to get more accurate measurements, but not with bluz and its one antenna. The only way I can think of is to implement somethings similar to the iBeacon where you transmit out the power you expect to see at some distance, and the use RSSI to estimate actual distance.


#4

Hi Eric,

thanks for the answer, I’d like to use the RSSI for a specific use case and install a DK in a fixed location and make it react to certain devices in its proximity. For example “Simon’s iPhone is near, set D0 HIGH.” Are there ways to determine which bluetooth device connected to the DK? Identified by the MAC address of the device for example? I could not find anything in the API, maybe I’m missing something there or I lack a basic understanding concerning the capabilities of BLE peripherals.
Could you point me in the right direction? Apart from that I’m really happy with my DK, have been building my own MQTT/BLE bridge in node.js and try my best to get it to work in Python now. I really like the idea you guys had. Thanks for the great device!

Kind regards,
Simon


#5

Hmmm… Interesting thought. We could probably come up with some system that is more intuitive, for example you could set a name in the gateway and that would alert the DK when it connects. This way you could group things together.

We have plans to make sub-networks of bluz where you assign a name to a DK and the gateway would only connect to specifically named devices. But perhaps it makes sense for this concept to work the other way as well, where a gateway can report it’s name to the DK.

I opened a ticket here to track this: https://github.com/bluzDK/bluzDK-firmware/issues/29