location services in Indigo

Posted on
Thu Oct 17, 2019 10:17 am
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

location services in Indigo

I am wondering what people are using to do at least medium-resolution (minimum -- identify which people are in which rooms) location services? GPS works well in the open but either not reliably or not at all indoors. iBeacon looks promising but range-from-beacon based on RSSI is unreliable due to what medium is between the transmitter and receiver. Still, it looks like an option. Is there anything else that people are using?

I just ran across Marvelmind's indoor positioning system:

https://marvelmind.com/

which purports to give +/- 2cm positioning accuracy indoors. Clearly this is aimed at providing accurate positioning for autonomous devices but could be interesting for people too. (They mention VR as an application.) This may be overkill but it certainly solves the problem.

Posted on
Thu Oct 17, 2019 11:54 am
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Re: location services in Indigo

Pibeacon. With a rpi in most rooms it should tell you what room an iPhone or something with beacon key fob attached is in.


Sent from my iPhone using Tapatalk

Posted on
Thu Oct 17, 2019 12:19 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: location services in Indigo

Thanks for the reply.

Yes, that is based on iBeacon. I could easily use that as I have Pi's in most rooms being used as audio media players for Roon.

But how well does it work to accurately determine what room someone is in? 50%? 90%? 99%? 99.999%? My iPhone is [almost] always in my pocket so that is an attractive feature. Still, I really want to know what room someone is in.

Posted on
Thu Oct 17, 2019 1:01 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: location services in Indigo

If i needed this functionality asap, and if i trusted my family members to carry beacons, then pibeacon would be my approach.

Do you need to know WHO is in each room, or just if the room is occupied by one or more people?

Posted on
Thu Oct 17, 2019 1:43 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: location services in Indigo

mundmc wrote:
If i needed this functionality asap, and if i trusted my family members to carry beacons, then pibeacon would be my approach.


There are only two of us who live in my house and we each carry an iPhone all the time. I think that has that issue covered.

Have you tried putting a pibeacon in each room and determining accuracy of localizing an iBeacon or iPhone? iBeacon is what I was initially leaning toward but before I run off down that road I would like to get a read as to how well it actually works in the wild. 2.4GHz is interesting for its propagation. As I understand it, iBeacon (PiBeacon) depends on the received signal strength indication (RSSI) to determine distance between emitter and receiver. Walls attenuate the signal but not completely. I could play games with shielding and reflectors but now I am creating other problems.

I found the Marvelmind system interesting because it is using ultrasonic audio to do localization. That has the advantage that walls stop it cold. Even a single beacon "chirping' in the room would give very accurate room occupancy information. This strikes me as an improvement over iBeacon.

Do you need to know WHO is in each room, or just if the room is occupied by one or more people?


Occupancy determination is the first goal. That will allow the house to be smart about things like lights, shades, displays, etc. The second goal is knowing who is in what room. The latter allows me to have audio and video "follow" someone from room to room, or even have notifications piped into the audio stream for the room the person is currently occupying. This is a component for a truly 'active' house. After all, the goal as I see it is true automation where the house 'knows' what I need so I don't need to be pushing buttons on my phone.

Thanks!

Posted on
Thu Oct 17, 2019 1:49 pm
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

location services in Indigo

It works ok as long as your walls are the same material. If not then it doesn't know that a lower signal is caused by distance or brick wall vs drywall and can get the rooms wrong.

Actually that only applies if there is a room with no rpi, like a hallway. Otherwise it seems pretty good. Definitely faster to register presence that using WiFi from a phone.

Sent from my iPhone using Tapatalk

Posted on
Thu Oct 17, 2019 7:13 pm
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: location services in Indigo

^ I agree- if you are willing to load up enough rpi’s, they won’t get confused. Also, Karl is amazingly responsive to any issues.

I like what you are wanting to implement. Your use case should work well. I’ve been toying with room awareness for a while, but the tech (and my coding) isn’t at the point that I’m ready to roll my own yet.

I’ve just trained my first several neural networks with custom data- I’m hoping to use this approach with sensor data... just need to figure out how to clean up training data.

Posted on
Thu Oct 17, 2019 7:58 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: location services in Indigo

Neural networks and learning? Wow! I wanna see THAT in Python!

And here I would be happy with just a state machine to deal with events, actions, and state changes.

Posted on
Fri Oct 18, 2019 4:37 am
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Re: location services in Indigo

I think this could be the way we go especially if built into iPhones and Macs should be able to read the chips for location natively. But likely a few years away.

viewtopic.php?f=118&t=22899

Posted on
Fri Oct 18, 2019 7:53 am
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: location services in Indigo

siclark wrote:
I think this could be the way we go especially if built into iPhones and Macs should be able to read the chips for location natively. But likely a few years away.


That does seem like overkill to me. The reality is, I have clear events, i.e. someone entering and leaving a room. There are things I want to do when that happens, For now that is a pretty fixed list. I do expect to have some conditional state transitions and different actions on different state transitions, which is why I mentioned a state machine. But down the road I can see the value of learning the behaviors of specific individuals and then executing actions based on learned preferences. One of the big ones that comes to mind initially is that my girlfriend likes rooms darker than I do so a learned behavior would be to look at the light level in a room and then adjust it to match her preference when she enters the room instead of mine.

One of the obvious automations is to turn off things that people aren't using, e.g. lights, fans, displays, audio sources, etc., when everyone leaves a room. This does not require learning behavior. OTOH, for this to work there needs to be maintenance of an "occupied" state for a room. I can also see the advantage of having a "room" object to which other objects belong, just to make it easier to find them and change their states when a room becomes occupied or vacant. Interestingly enough, I already do this in Indigo by creating a folder for each room or logical grouping. I needed to do that because Indigo already controls 125 devices for me. (I have a mix of Z-wave, Insteon, and IP-controlled devices.)

Posted on
Fri Oct 18, 2019 7:57 am
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Re: location services in Indigo

I do the simple state per room as you mention with a timer per room. Restarted every time there is motion etc then when expires the lights go out. Different length timers operate in day and evening, for instance evening we still motionless for longer watching TV. What we can't do with today's tech is know who's walked into a room. For that ibeacons aren't good enough to deal with turning on lights to specific level etc, that's why I think we need something more granular


Sent from my iPhone using Tapatalk

Posted on
Fri Oct 18, 2019 8:16 am
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: location services in Indigo

siclark wrote:
I do the simple state per room as you mention with a timer per room. Restarted every time there is motion etc then when expires the lights go out.


Yes, I have been doing that for several years now. The problem is that I often sit motionless reading or looking at a display (computer, TV). I am forced either to set the timer too long or accept false negatives and end up in the dark.

Different length timers operate in day and evening, for instance evening we still motionless for longer watching TV. What we can't do with today's tech is know who's walked into a room. For that ibeacons aren't good enough to deal with turning on lights to specific level etc, that's why I think we need something more granular


Uh, why can't iBeacon tell who has walked into a room? Each person either has their own unique emitter, or unique receiver. If my iPhone is my emitter then the receiver in the room knows which phone entered the room. If used in the reverse direction the iPhone knows which room it has entered and can communicate that back to Indigo. It seems to me this is a logical extension to Indigo Touch, to have it transmit to Indigo any iBeacons it is receiving and their RSSI value. Hmm, when Indigo Touch connects to Indigo, does it identify the device it is running on and thus imply who is doing what?

My only concern with iBeacon is that iBeacon uses RF, which goes through walls, creating a problem with false positives. That is why I like the ultrasonic approach. Walls stop it. The beacons clearly illuminate a room and only that room. Refraction and diffraction ensure that there are few shadows, which would be a problem with an optical beacon (IR emitter).

Hmm, I wonder what the upper frequency limit is of the microphone in a smart phone. Could it detect the ultrasonic signal? That would mean you wouldn't have to carry a special emitter/receiver with you.

Posted on
Wed Oct 23, 2019 4:17 am
siclark offline
Posts: 1961
Joined: Jun 13, 2017
Location: UK

Re: location services in Indigo

brianlloyd wrote:

Uh, why can't iBeacon tell who has walked into a room? Each person either has their own unique emitter, or unique receiver. If my iPhone is my emitter then the receiver in the room knows which phone entered the room.


Its the speed with which it can tell you are entering a room. A PIR will trigger immediately, whereas pibeacon only pings every x seconds. Less if a device is already seen, more frequently if its down. So if you are in one room and pibeacon sees that, and you move to another room, it could be up to a minute (default) before it repings your phone. You can change that, but possibly at a battery life cost, or network issue. Even then, its going to be a number of seconds delay. Maybe have lights come on full then adjust a short period after once you know who is in the room.

The other issue is in knowing that the person is actually in the room, and not say just the other side of the wall, which is iffy as it relies on simple interpolation of the signal strength. Here the fact that RF doesnt go through the wall could be your advantage. Tune the rPi in each room to only detect a beacon in that room, and not a weaker one that is coming through a wall, and you should more robustly detect presence in that room, and not get false positives.

You do then lose the ability to know that that beacon is in the house, but in a room not covered with a rPi, so it depends on what your objectives are, or use a different presence means for whole house presence.

brianlloyd wrote:
If used in the reverse direction the iPhone knows which room it has entered and can communicate that back to Indigo. It seems to me this is a logical extension to Indigo Touch, to have it transmit to Indigo any iBeacons it is receiving and their RSSI value. Hmm, when Indigo Touch connects to Indigo, does it identify the device it is running on and thus imply who is doing what?

Wouldnt this have a drain on the iphone battery? And yes, think that it would involve Indigo touch having users setup, which I recall being on the wish list for Indigo Touch, but no idea when or if that would make it in.

Posted on
Wed Oct 23, 2019 9:19 am
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: location services in Indigo

siclark wrote:

Its the speed with which it can tell you are entering a room. A PIR will trigger immediately, whereas pibeacon only pings every x seconds. Less if a device is already seen, more frequently if its down. So if you are in one room and pibeacon sees that, and you move to another room, it could be up to a minute (default) before it repings your phone.


Yeah, that would be unacceptable for actually determining position.

You can change that, but possibly at a battery life cost, or network issue. Even then, its going to be a number of seconds delay. Maybe have lights come on full then adjust a short period after once you know who is in the room.


I can't really see this as a network issue. We are not moving a lot of bits here. Battery life, yes.

Perhaps an answer is to combine sensors? PIR responds immediately. If a room is unoccupied and the PIR triggers, trigger the iBeacon device to ping immediately to try to determine who entered the room. The only problem then is, how long the PIR remains triggered.

Most rooms have a "funnel", the doorway. To get into a room you must pass through the funnel. Short-range sensing, e.g. RFID, would work there. The only issue then is direction.

brianlloyd wrote:
The other issue is in knowing that the person is actually in the room, and not say just the other side of the wall, which is iffy as it relies on simple interpolation of the signal strength. Here the fact that RF doesnt go through the wall could be your advantage. Tune the rPi in each room to only detect a beacon in that room, and not a weaker one that is coming through a wall, and you should more robustly detect presence in that room, and not get false positives.


siclark wrote:
You do then lose the ability to know that that beacon is in the house, but in a room not covered with a rPi, so it depends on what your objectives are, or use a different presence means for whole house presence.


It seems to me that one is trying to put too much on iBeacon then. Use geofencing to determine presence or absence from the house. Use per-room beacons to determine localization within the house. I keep coming back to needing multiple layers of functionality to achieve what I want. Until I can reliably place all the people in the house, I am limited as to the next level of automation.

And the answer may be cameras located at doorways feeding a recognition algorithm running in a neural net machine. Yeah, that may seem overkill but we are getting to the point where that may be approaching cost-effective.

brianlloyd wrote:
If used in the reverse direction the iPhone knows which room it has entered and can communicate that back to Indigo. It seems to me this is a logical extension to Indigo Touch, to have it transmit to Indigo any iBeacons it is receiving and their RSSI value. Hmm, when Indigo Touch connects to Indigo, does it identify the device it is running on and thus imply who is doing what?

siclark wrote:
Wouldnt this have a drain on the iphone battery? And yes, think that it would involve Indigo touch having users setup, which I recall being on the wish list for Indigo Touch, but no idea when or if that would make it in.


It would be a potential drain on the battery. That does seem like a relatively straight-forward addition. Apple maintains a LOT of identifying information in a phone.

The more I think about iBeacon the more it is feeling to me like, "when all you have is a hammer, everything looks like a nail." I don't think iBeacon will work well for high-reliability localization of people within a building. I would love to hear more from people who have implemented it.

Posted on
Wed Oct 23, 2019 10:21 am
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: location services in Indigo

For people willing to tolerate cameras in every room, the hardest part of training a neural network with person detection is collecting and presenting clean training data, then it’s kinda trivial with the right framework (i’m using fastai). Adding facial recognition on top is doable.

I’m hoping some company creates. Non-cloud-based product for this.

Who is online

Users browsing this forum: No registered users and 5 guests