MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Who is home? Presence tracking

    Scheduled Pinned Locked Moved Utilities
    17 Posts 7 Posters 6.8k Views 8 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • zdenekZ Offline
      zdenek
      last edited by

      @tc60045 how do u track them via IFTTT? specially at school?

      tnanks, Zdenek

      ? 1 Reply Last reply Reply Quote 0
      • ? Offline
        A Former User @zdenek
        last edited by

        @zdenek show us IFTTT recipe, we can make webhook easily with existing module or by creating one.

        1 Reply Last reply Reply Quote 0
        • T Offline
          tc60045
          last edited by

          Thanks everyone for your interest on this – this is quite a nice welcome!!

          The process on IFTTT is pretty simple, with caveats:

          • I’m not sure it works on Android, but I know it works with iOS
          • Users (family) must have IFTTT accounts, have IFTTT app on their phones, and have location / privacy / background settings on so that it reports location. Battery drain from that is nothing that I have noticed, ever
          • Then you set up rules specific to any locations that you want

          There is no way that I know of to take all the rules from one user and transfer them to another user, so sadly, I’ve just had to gut it out and reproduce all the rules in each account. Oh well.

          The “this” is a location trigger; the “that” is whatever you want (email, text, action from something else). In this case, the “that” we want to use is a web hook, so that we can POST or PUT the information to a web server with certain pieces of information: who (multiple users), did what (entered/exited), location (where), when (timestamp).

          I will post the pictures of the process in just a second, but let’s talk guts. I use docker, python and Redis for everything that I can. So I had intended to set up a small apache container on a custom port to receive the POST, then have a python script running to parse the log and push location states to Redis, and then have a small .js module simply grab location state information from Redis. That setup works for me, but it won’t work for everyone. I’m happy to re-factor that logic and learn some new things to make this happen – in a way that doesn’t require docker, redis or python, but nevertheless maintains persistent data stores.

          Here’s the IFTTT setup:
          0_1561041379657_by default 2019-06-20 at 9.16.17 AM.jpg

          0_1561041395943_by default 2019-06-20 at 9.16.29 AM.jpg

          0_1561041409387_by default 2019-06-20 at 9.17.09 AM.jpg

          0_1561041421400_by default 2019-06-20 at 9.17.17 AM.jpg

          0_1561041444769_by default 2019-06-20 at 9.17.28 AM.jpg

          0_1561041465040_by default 2019-06-20 at 9.17.39 AM.jpg

          0_1561041480364_by default 2019-06-20 at 9.18.07 AM.jpg

          0_1561041517877_by default 2019-06-20 at 9.18.33 AM.jpg

          0_1561041496943_by default 2019-06-20 at 9.18.23 AM.jpg

          0_1561041547646_by default 2019-06-20 at 9.18.45 AM.jpg

          0_1561041559020_by default 2019-06-20 at 9.18.55 AM.jpg

          Note that you can push information in the body or url to reflect the of the person whom you are tracking, and you can specify a if you like, too, like “Work”, “Church”, “Club”, “Grocery”, “Boyfriend!!!”, “Beach”, “etc”. I think the only limits are your creativity and time, as IFTTT doesn’t make this easy to replicate from family member to family member…

          Thoughts welcome – let’s collaborate and get started!

          1 Reply Last reply Reply Quote 0
          • T Offline
            tc60045
            last edited by

            And this is what I was thinking about for layout:

            0_1561043129182_by default 2019-06-20 at 10.04.34 AM.jpg

            ? 1 Reply Last reply Reply Quote 0
            • ? Offline
              A Former User @tc60045
              last edited by A Former User

              @tc60045
              Like this?
              0_1561061779723_ttt.png

              After more tests, will be released.

              ADDED
              Now I’m adding additional feature - command executing when Someone entered or exited. (e.g: Play Spotify when Dad entered Home)

              T 1 Reply Last reply Reply Quote 0
              • T Offline
                tc60045 @Guest
                last edited by

                @Sean – yes! But please tell me you are using geo location and not MAC address / ARP results snippet from iOS security guide discussed here?

                I want to create many locations based on geofencing. How can I / we help you with this?

                ? 1 Reply Last reply Reply Quote 0
                • ? Offline
                  A Former User @tc60045
                  last edited by A Former User

                  @tc60045 I didn’t use MAC Address. I just put who: "dad", location:"Home" in body of IFTTT recipe. I think each recipe should be created per people and location, so hardcoded is enough.

                  T 1 Reply Last reply Reply Quote 0
                  • T Offline
                    tc60045 @Guest
                    last edited by

                    @Sean PERFECT – thank you. Can’t wait to test!

                    ? 1 Reply Last reply Reply Quote 0
                    • ? Offline
                      A Former User @tc60045
                      last edited by

                      @tc60045 Here is midnight, so I’ll go to sleep at this moment. Tomorrow I’ll release it after some tests. You can help me to test, and to make a manual (English is not my mother tongue, so… :D)

                      1 Reply Last reply Reply Quote 0
                      • ? Offline
                        A Former User
                        last edited by

                        [card:eouia/MMM-Whereis]
                        alt text

                        • Static IP/Domain or DDNS or Dataplicity portforwarding REQUIRED
                        • Your IFTTT app of smartphone is needed.
                        • You should allow your location service of app on phone as always
                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          tc60045
                          last edited by

                          OK, some solid testing this afternoon. First off: Love the icons. Love the configurability. You’ve done great work here. I think the key is just testing out the problem with IFTTT.

                          1. Using curl to post the data on local network works for “entered,”
                            {“who”:“user”, “location”:“Church”, “EnteredOrExited”:“Entered”} – will be reflected immediately

                          2. Doing same for “exited” doesn’t show anything different.
                            {“who”:“user”, “location”:“Church”, “EnteredOrExited”:“Exited”} – nothing new gets posted. Suggest you say “Left Church” (x min ago) as an action description after trapping the condition.

                          3. Trying to post the data via IFTTTT body isn’t working with the Ingredient

                          4. When I hard code all the BODY, it works perfectly – /whereis is trapping the data when it comes through.

                          5. Problem is with the {{EnteredOrExited}} ingredient.

                          6. I’m trying using different escaping to see if it that helps. But my team of IFTTT testers are off with their friends and I won’t get a chance to test locations more until tomorrow. I’ll report back.

                          7. Last thing: You have https – emphasis on s – in your IFTTT recipe. I’m not opening up 443 and dealing with certs and stuff, so I’m only using http on a custom port. YMMV.

                          ? 1 Reply Last reply Reply Quote 0
                          • ? Offline
                            A Former User @tc60045
                            last edited by

                            @tc60045

                            • I think “EnteredOrExited” should have “entered” or “exited” (not uppercase) : need to confirm.
                            • I used https but http could also work. (I used dataplicity and nginx for wormhole of fixed domain and port 80 using). Usually ppl would use ddns, http would be enough.
                            1 Reply Last reply Reply Quote 0
                            • G Offline
                              Gurdt
                              last edited by

                              Nice peace of work guys!!
                              Only if got an question, is it possible to save the data into a file or on a server?

                              And of course after writing a file or put it on a server get the last location?

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                shiitbiird
                                last edited by

                                Hey guys- are you still maintaining this?

                                Y 1 Reply Last reply Reply Quote 0
                                • Y Offline
                                  yedidia @shiitbiird
                                  last edited by

                                  @shiitbiird and All
                                  Hi,

                                  I started a new project that has more or less the same functionality.
                                  It’s based on tracking cellular devices on home wifi/lan.

                                  see : https://github.com/yedidiaklein/MMM-whoshome
                                  it looks like this:
                                  who is home
                                  (and I even added recently “last seen” info)

                                  Your suggestions will be appreciated.

                                  –Yedidia

                                  1 Reply Last reply Reply Quote 1

                                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                  With your input, this post could be even better 💗

                                  Register Login
                                  • 1 / 1
                                  • First post
                                    Last post
                                  Enjoying MagicMirror? Please consider a donation!
                                  MagicMirror created by Michael Teeuw.
                                  Forum managed by Sam, technical setup by Karsten.
                                  This forum is using NodeBB as its core | Contributors
                                  Contact | Privacy Policy