InHome Location Tracker System

Good Evening everyone!

I hope this day finds you well. I’m here to introduce a new project that I and another developer (Ethan Seth) are working on. This project utilizes a few components that are very specific, so I would like to first apologize to the large portion of you for whom this will not work for :frowning: sad face is sad.

Requirements:
Wifi Routers IN YOUR AREA, they do not have to be your own.
Android Phone
IFTTT Account
webCoRE Account

This will require some hands on, but I’ll try to be as specific as humanly as possible. Those of you who are much better at developing, please, feel free to pitch in. This is more a community project than it is a personal one.

PURPOSE: The purpose of this project has been a long time dream of mine. I have always wanted to have the ability to ask my smart house, “Where is [item name]?” and it could say, “At the living room couch, of course.” I’d love for this particular system to become much more granular, but so far I haven’t been able to get it more granular than being able to find accurately a certain side of a certain room, and sometimes that’s a bit flaky. Either way, this is still way more accurate than any other system I’ve found out there. what’s more, it’s expandable.

Let’s get started.

STEP 1: Go ahead and grab the mobile app. You can find that here: https://play.google.com/store/apps/details?id=com.hcp.find

STEP 2: Go through the process of creating your locations. NOTICE: Ensure you already have as many Access Points you want setup as possible. This system uses wireless routers to triangulate your position. This includes other people’s routers, and it doesn’t have to be on any router in specific, or any at all, but wifi on your device DOES have to be turned on.

To do this, go to your location, and click “Learn”, name your location. Let your phone sit there for about five minutes. Then click “Stop Learning”. THEN and only after you’ve “stopped learning”, move to your next location. Repeat this for every location you want, then move to step three.

STEP 3: Create Virtual Switches for every location you’ve made. This can get quite numerous depending on all the locations you have, but bear with me. If you don’t know how to create a virtual switch, please go to https://graph.api.smartthings.com/ and click on “my devices”. Here you can create a new device, scroll down until you find “Simulated Switch”.

STEP 4: Grab the Smart App. Because this is so hands on and not automatic, it’s not just “install” and move on, you have to edit this smart app to your specific settings. https://github.com/lozaning/SmartApps

In order to install this, again go to the graph.api page, and click “My SmartApps”, then click “New SmartApp”. Copy and paste the smart app code. Here is where you’ll need to make changes: EVERYWHERE. Hopefully you don’t have as many locations as I did (I had over 30).

-In the top section starting at line 14, you’ll see preferences. Each of these “sections” needs to be reflective of your simulated switches you created in step three. You can name the input section anything you like (i.e.: upstairsCabinetSwitch can also be usCbSwitch)

-In the def whatRoom section (starting at line 49, you’ll want to input your group and username. These can be found in the FIND ANDROID APP.

IMPORTANT NOTE: This api seems to be somewhat quirky. I don’t know why, but as I was getting assistance with some developers, we found that the api flipped the username from all caps to lowercase and back again. Not sure why, but if you get “null” errors in your logs, this may be why. This change should occur at line 65, NOT line 53.

-Next is the “fun” part. If you’ve got a lot of locations like me, this is going to take you a little while. Best of luck. Starting at line 81, you have a series of if, else statements. Each IF and ELSE statement needs to include ALL of your switch handlers that you identified earlier. Every “ELSE” statement needs to have ALL the switches as off except the switch the else statement is about, that one should be “on”. You should repeat all this for every location you have. If you ever add a location, you’ll have to come back to the app and make all these changes again. It’s a hassel, I know.

When you’re done with that, click “Save” and carry on to “Publish > For Me”. If you didn’t change the name of the app in line 2, it will be Location Tracker IIII.

STEP 5: Open your mobile app (android or iphone works for this portion, but the tracker only works for android), go to “Automations”, then “Smart Apps”, then “My Apps” all the way at the bottom, search for the app you just made, and select it. Here, you’re going to choose all the Switches you created in Step Three. Make sure the switch corresponds with the item you’re selecting it for. Name your app and click save until you’re back at the home screen.

TEST: If everything is done right, when you open the tracker app and click “track”, it should turn one whichever simulated switch you’ve corresponded to your area. Well, this is fun and dandy, and if this is as far as you wanted to go, then that works fine. keep in mind you’ll probably have to create a new app setup AND simulated switches for each individual and item you want to track. (ugh, there’s gotta be a better way to do this!)

If you want to do MORE with this, then let’s carry over to step six!

STEP 6: Head on over to https://wiki.webcore.co/ and follow the instructions they’ve laid out to have webCoRE installed. If you already have it installed, head over to step seven.

STEP 7: Open up the mobile app, go to automations, then to SmartApps, then MyApps, and install the webCoRE apps. Then go back to the automations>SmartApps section, and click “webCoRE”. here you’re going to install a new piston. Select all of the simulated switches you created in Step Three. Once you’re done, head over to dashboard.webcore.co and click “Add a new piston”, then select “</> Create a blank piston”. The defaults should be fine unless you want to change the name of it. Doesn’t matter unless you intend to come back here again.

STEP 8: Create an If, Then, Else statement. The initial if condition should be:
Physical Devices: Select all of your simulated switches
Which interaction: Any Interaction
What kind of comparison? Change to
Compare to: Value | on

Next you should see “with”, and you should choose under devices:

device $currentEventDevice

Then under do, I’m going to be sending an IFTTT maker request. So let’s pause a second and make sure we have that setup (if you don’t already). You can save your piston and come back to it if you haven’t already set this up.

STEP 8a: Configure IFTTT

Go back to dashboard.webcore.co and then go to ‘settings’ on the left hand side. Click interactions, and then click in the IFTTT webhooks url section. You can get this URL from here: http://www.ifttt.com/maker. That url is your url, do not share it with anyone else.

Click apply and carry on.

Back to STEP 8:

Do: location Send an IFTTT Maker Event…
Event: Value | EricLocation (This is what your maker event will be, make sure you have this saved, you’ll need it later)
Value 1: Value | device $currentEventDevice
For values 2 and three leave as nothing selected.

Choose whatever mode you want to use this for, if any.

So you’re done with webCoRE for now, you can save it and go over to look at it’s logs as everything else happens.

STEP 9: Configure IFTTT’s applet

go to www.ifttt.com and create a new applet. Search for “Webhook”, and make sure the event name is what you created a few minutes ago. Mine was EricLocation…

Then, do whatever you want with that information. If you want to send another webook out to a server or app you’re working on or whatever, you can do that, whatever you want. Me personally, I’m just testing it so I’m sending myself a text with it. That’s pretty much it. Hopefully everything works out alright with you guys and we can get this working for you.

I hope over time we can make this much more dynamic and acceptable, and maybe get a live tracking map, and maybe fix this so we don’t need to make a ton of virtual switches. From what I’ve seen, this setup is accurate at least up to which room you’re in. I’ll still be testing to see if I can get it more granular, but we’ll see.

Anyways, good luck, let me know if you guys want to participate any :slight_smile:

6 Likes

Very interesting project. I will have to give it a try.

Have you considered using child smart apps that create child devices to make the setup a little easier to manage?

2 Likes

That I haven’t done, no. I should give that a shot too

Brilliant start! Have you considered incorporating more types of radios into the triangulation? I’m thinking about Bluetooth Beacons, specifically.

And I don’t know enough about WiFi radios… But what about incorporating fixed-position, non-AP devices in the triangulation? Such as WiFi thermostats, video doorbells, Echos, Google Homes, Rachios, WiFi bulbs like LifX, etc. If those give a measurable signal, they could be invaluable additions to the triangulation nodes.

I wish I could use bluetooth beacons, but the platform just isn’t built yet. I went out a few years back and bought a bunch of estimote beacons just for this, and nothing was ever built for them. They literally sit in a drawer. This program only works for wifi though, sorry.

1 Like

Neat idea. I have it at work with the wireless controllers I use. You can see where every user is on WiFi if you have 3 or more access points covering the area for the triangulation. It comes in handy if you ever need it for E-911.

1 Like

Ah, ok, I think I misunderstood who wrote the Android app. I thought you had.

I’m really surprised that beacons haven’t caught on more, yet. Especially with the increasing demand for location-aware services, being able to reliably know location seems like a broad need. But that’s not an area of my expertise, so of course it looks easier/simpler to me! HA!

Thanks for your reply Alex. I’ll go ahead and give a quick rundown as to
why the systems we need to have just aren’t there and what we as a
community can do to fix this blatant problem. This is a huge machine with
many moving parts, so I’ll try to keep it simple.

When it comes to in-home location tracking, there are TWO ways to do it.
One way is much easier and simpler than the second and is the way that most
companies have opted to go. Coincidentally, the second way is the way we
want to go, it’s the way this smartapp and system is designed to go, but to
do this in a large scale platform has some requirements, and a lot of
companies just don’t feel that those requirements are met.

-Demand. There’s really not much demand for this kind of setup. All the
demand seems to be ate up by people like us, but more so by larger
companies like stores and smart offices.

-Cost. Because the demand in the average household home is so low and
demand in large retail stores is so high, it just makes sense to make this
setup as expensive as humanly possible. And because of THAT, it makes sense
to find the cheapest possible route of those expenses.

-Availability. Because of the two reasons above, this means that there just
aren’t many companies making this kind of stuff, and if they are, they’re
making them for retail stores and not for in home smart houses.

I’ll give you a good example of this in play. Estimote is a smart bluetooth
beacon company. They make bluetooth beacons that you can stick all over the
place, and they work in a mesh network type system, so you don’t have to
have a hub to function. They’re amazing little buggers, and I have a few
myself. But here’s the problem with them:

  1. They only gave out an SDK. This means if you’re a developer, you could
    make a mobile app that can do whatever you want, wherever you want. But no
    developers have taken it on board.

  2. They use your phone as the reader and tracker. This because your phone
    already has all the sensors built into it, they don’t have to put those
    sensors anywhere else. The downside to that is that, well…you kinda want
    to use your phone for other stuff too, and it doesn’t work unless the app
    is open. It’s nice, but it falls very short.

What’s different between that system and this system?

Well the biggest difference is this system uses wifi, and that system uses
bluetooth. The second biggest difference is that this system makes you put
the “sensors” outside the phone. The sensors here are wifi routers, not
bluetooth beacons. But in this scenerio, imagine that you have phones
placed all over the place and you’re carrying a bluetooth beacon in your
hand and you’re tracking the beacon. That’s how this works, but with wifi.
Your routers are used to triangulate between each other and any other wifi
based devices. You can manage this without the need of your phone, and you
can track way more than just that app, you can track anything that has
wifi, AND you don’t have to buy the routers if you already live in a
neighborhood surrounded by wifi routers.

So, I hope you can see how there are two different methods to tracking
in-home devices like this, why we need the second option and not the first.
The app we have here is a really good start, but I think we can do much
better. I literally spent only $50 for five really cheap and crappy wifi
routers and positioned them throughout my house to try and make
triangulation better. So far no luck, but I’m hoping it does get better.
But just keeping your tracking to one location per room, or at max two, you
should have really high accuracy for tracking anything on your wifi network.

Thank you for the explanation.

Interesting! And I can see its utility for many instances. Wheelchair-bound people might benefit enormously from it, for example.

But personally, I will never carry something around with me to locate me within my own home. Not an NFC tag, not a smartphone…

Any system that can locate me in my home and thereby facilitate personalized automations that would otherwise not be possible has to find some other method. Some combo of body mass, voice print, height, chemical detection, etc to know “this is me” without me having to do anything special to indicate so.

1 Like

Hey Glen…um, I’m not sure if you know it, but this is the year 2018, not
the year 2058. What you’re asking isn’t within the realm of reality at the
moment. Right now even government facilities don’t have what you’re
suggesting – I know, I’ve worked in several. In FACT, government
facilities utilize RF Tags for securely unlocking doors and facilities.
What you’re asking for would require a ton more expense, an extreme amount
of calculation and computer knowledge. I’m afraid if you want that, you’ll
have to be very wealthy.

In the meantime, try one of the newest pathetic methods described above by
me :slight_smile: <3 lol

1 Like

Please edit and update this to https://account.smartthings.com (official login url). The graph.api… url might be your shard, but it’s not everybody else’s. When a person logs in through the link above, they are then automatically redirected to their correct shard (ie: na02-east1, na04-east-02, graph.api). By instructing people to that graph.api… shard they are still able to login to their account, but then when they goto add a SmartApp or Device Handler under that shard, it ends up messing things up on their account.

Thanks.

You aren’t going to make sure that the family is carrying their tag at home at all times?

Next, a clothing manufacturer is going to create a line of clothing to include one of these tags sewn into shirts, pants, underwear, pajamas.

Or perhaps we are going to get the tag injected under the skin.

I’m like you as I don’t see most people carrying these around in a home at all times, let alone a kid having these strapped to them and end up swallowing them. So not realistic for people in 2018. Great concept, but until this can be accomplished with transparency and a non physical device being necessary to achieve the same result (body weight, mass, height, heart rate, chemical composition, gate, stride or tied into a camera system with facial or retinal recognition, its never going to go anywhere. :slight_smile:

At work, i’m Ok with known access.

But at home, I won’t even step up to a camera when I enter a room. Retinal recognition to make the room be today what I thought I wanted it to be the last time I was in it??

To me, the fun will begin when systems do automatically do these things. You see… unless you live alone, this will create enormous friction in households. It will also delineate clear hierarchy in every detail of life, which is really not desirable in normal interaction among family members.

Here’s how it will play out IMO.

Little bobby likes teletubbies and warmth. So when he comes in, the tv will play teletubbies and the heat will go on.

Big sister julie likes it even warmer, and binge-watches outlander over and over. So when she walks in, the heat will go higher - and teletubbies will vanish. Every single time.

Dad likes the room cool, and watches hockey and soccer and golf. So every single time he sets foot in the room, the configurations for the kids will be obliterated in favor of sports and chilliness.

Dunno about you, but I can’t see how that will improve family relations. Automation will preclude negotiation.

Glen, what you’re talking about is certainly available in today’s
technological marketplace. Unfortunately, it’s generally designed for
larger customers, and therefore the costs are astronomical. If you want to
spend the money, by all means, do so, but I’m afraid it doesn’t really have
a place in this conversation and is off topic, regardless, interesting.

@shawneric Thank you for explaining your project. Looks like I have joined the party late.

Care to provoide inputs on what state the current project is at ?

Further, the App mentioned is no more available. Can you check ? Thx.

STEP 1: Go ahead and grab the mobile app. You can find that here: https://play.google.com/store/apps/details?id=com.hcp.find

Also, question on how we are making it possible ?

“Where is [item name]?” and it could say, “At the living room couch, of course.”

Are we finally going to use some kind of ML/Vision to make it happen ? Or this is far fetched goal for the project. Thanks.

Hey Swapan, I haven’t even looked at this in a very long time. It was proven that the system wasn’t extremely accurate to detailed locations. Room by room was ok as long as signals were strong, but that’s it.

1 Like

@shawneric

Are you still using this?