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.

    MMM-whoshome A way to know who is home based on cellular phones

    Scheduled Pinned Locked Moved Showcase
    19 Posts 6 Posters 5.0k Views 7 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.
    • R Offline
      rewie85 @yedidia
      last edited by sdetweil

      @yedidia, its quite a big log but maybe it helps. Thanks!

      /home/rwieners/.pm2/logs/mm-out.log last 15 lines:
      0|mm       |       [Symbol(kCapture)]: false,
      0|mm       |       [Symbol(kSetNoDelay)]: false,
      0|mm       |       [Symbol(kSetKeepAlive)]: false,
      0|mm       |       [Symbol(kSetKeepAliveInitialDelay)]: 0,
      0|mm       |       [Symbol(kBytesRead)]: 0,
      0|mm       |       [Symbol(kBytesWritten)]: 0
      0|mm       |     }
      0|mm       |   ],
      0|mm       |   [Symbol(shapeMode)]: false,
      0|mm       |   [Symbol(kCapture)]: false
      0|mm       | }
      0|mm       | [2024-09-30 20:02:15.322] [LOG]   Rene F0:EE:7A:45:XXXXXX 0
      0|mm       | [2024-09-30 20:02:15.380] [LOG]   Kathi F0:EE:7A:4XXXXXXX 0
      0|mm       | [2024-09-30 20:02:15.381] [LOG]   Final state:
      0|mm       | [2024-09-30 20:02:15.383] [LOG]   [ [ 'Rene', 0, '' ], [ 'Kathi', 0, '' ] ]
      
      0|mm  | [2024-09-30 20:03:15.204] [LOG]   MMM-whoshome received a socket notification: FETCH_PEOPLE - Payload: [object Object]
      0|mm  | [2024-09-30 20:03:15.204] [LOG]   Mapping mac addresses...
      0|mm  | [2024-09-30 20:03:15.238] [LOG]   Mapping output:
      0|mm  | [2024-09-30 20:03:15.245] [LOG]   <ref *1> ChildProcess {
      0|mm  |   _events: [Object: null prototype] {
      0|mm  |     close: [Function: exithandler],
      0|mm  |     error: [Function: errorhandler]
      0|mm  |   },
      0|mm  |   _eventsCount: 2,
      0|mm  |   _maxListeners: undefined,
      0|mm  |   _closesNeeded: 3,
      0|mm  |   _closesGot: 0,
      0|mm  |   connected: false,
      0|mm  |   signalCode: null,
      0|mm  |   exitCode: null,
      0|mm  |   killed: false,
      0|mm  |   spawnfile: '/bin/sh',
      0|mm  |   _handle: Process {
      0|mm  |     onexit: [Function (anonymous)],
      0|mm  |     pid: 58752,
      0|mm  |     [Symbol(owner_symbol)]: [Circular *1]
      0|mm  |   },
      0|mm  |   spawnargs: [
      0|mm  |     '/bin/sh',
      0|mm  |     '-c',
      0|mm  |     'modules/MMM-whoshome/mapmacs.sh F0:EE:7A:XXXXXX F0:EE:7A:XXXXXX '
      0|mm  |   ],
      0|mm  |   pid: 58752,
      0|mm  |   stdin: <ref *2> Socket {
      0|mm  |     connecting: false,
      0|mm  |     _hadError: false,
      0|mm  |     _parent: null,
      0|mm  |     _host: null,
      0|mm  |     _closeAfterHandlingError: false,
      0|mm  |     _events: {
      0|mm  |       close: undefined,
      0|mm  |       error: undefined,
      0|mm  |       prefinish: undefined,
      0|mm  |       finish: undefined,
      0|mm  |       drain: undefined,
      0|mm  |       data: undefined,
      0|mm  |       end: [Function: onReadableStreamEnd],
      0|mm  |       readable: undefined
      0|mm  |     },
      0|mm  |     _readableState: ReadableState {
      0|mm  |       highWaterMark: 16384,
      0|mm  |       buffer: [],
      0|mm  |       bufferIndex: 0,
      0|mm  |       length: 0,
      0|mm  |       pipes: [],
      0|mm  |       awaitDrainWriters: null,
      0|mm  |       readable: false,
      0|mm  |       [Symbol(kState)]: 1054468
      0|mm  |     },
      0|mm  |     _writableState: WritableState {
      0|mm  |       highWaterMark: 16384,
      0|mm  |       length: 0,
      0|mm  |       corked: 0,
      0|mm  |       onwrite: [Function: bound onwrite],
      0|mm  |       writelen: 0,
      0|mm  |       bufferedIndex: 0,
      0|mm  |       pendingcb: 0,
      0|mm  |       [Symbol(kState)]: 17564420,
      0|mm  |       [Symbol(kBufferedValue)]: null
      0|mm  |     },
      0|mm  |     allowHalfOpen: false,
      0|mm  |     _maxListeners: undefined,
      0|mm  |     _eventsCount: 1,
      0|mm  |     _sockname: null,
      0|mm  |     _pendingData: null,
      0|mm  |     _pendingEncoding: '',
      0|mm  |     server: null,
      0|mm  |     _server: null,
      0|mm  |     [Symbol(async_id_symbol)]: 6616,
      0|mm  |     [Symbol(kHandle)]: Pipe { [Symbol(owner_symbol)]: [Circular *2] },
      0|mm  |     [Symbol(lastWriteQueueSize)]: 0,
      0|mm  |     [Symbol(timeout)]: null,
      0|mm  |     [Symbol(kBuffer)]: null,
      0|mm  |     [Symbol(kBufferCb)]: null,
      0|mm  |     [Symbol(kBufferGen)]: null,
      0|mm  |     [Symbol(shapeMode)]: true,
      0|mm  |     [Symbol(kCapture)]: false,
      0|mm  |     [Symbol(kSetNoDelay)]: false,
      0|mm  |     [Symbol(kSetKeepAlive)]: false,
      0|mm  |     [Symbol(kSetKeepAliveInitialDelay)]: 0,
      0|mm  |     [Symbol(kBytesRead)]: 0,
      0|mm  |     [Symbol(kBytesWritten)]: 0
      0|mm  |   },
      0|mm  |   stdout: <ref *3> Socket {
      0|mm  |     connecting: false,
      0|mm  |     _hadError: false,
      0|mm  |     _parent: null,
      0|mm  |     _host: null,
      0|mm  |     _closeAfterHandlingError: false,
      0|mm  |     _events: {
      0|mm  |       close: [Function (anonymous)],
      0|mm  |       error: undefined,
      0|mm  |       prefinish: undefined,
      0|mm  |       finish: undefined,
      0|mm  |       drain: undefined,
      0|mm  |       data: [Function: onChildStdout],
      0|mm  |       end: [Function: onReadableStreamEnd],
      0|mm  |       readable: undefined
      0|mm  |     },
      0|mm  |     _readableState: ReadableState {
      0|mm  |       highWaterMark: 16384,
      0|mm  |       buffer: [],
      0|mm  |       bufferIndex: 0,
      0|mm  |       length: 0,
      0|mm  |       pipes: [],
      0|mm  |       awaitDrainWriters: null,
      0|mm  |       [Symbol(kState)]: 200354052,
      0|mm  |       [Symbol(kDecoderValue)]: [StringDecoder],
      0|mm  |       [Symbol(kEncodingValue)]: 'utf8'
      0|mm  |     },
      0|mm  |     _writableState: WritableState {
      0|mm  |       highWaterMark: 16384,
      0|mm  |       length: 0,
      0|mm  |       corked: 0,
      0|mm  |       onwrite: [Function: bound onwrite],
      0|mm  |       writelen: 0,
      0|mm  |       bufferedIndex: 0,
      0|mm  |       pendingcb: 0,
      0|mm  |       [Symbol(kState)]: 17564420,
      0|mm  |       [Symbol(kBufferedValue)]: null
      0|mm  |     },
      0|mm  |     allowHalfOpen: false,
      0|mm  |     _maxListeners: undefined,
      0|mm  |     _eventsCount: 3,
      0|mm  |     _sockname: null,
      0|mm  |     _pendingData: null,
      0|mm  |     _pendingEncoding: '',
      0|mm  |     server: null,
      0|mm  |     _server: null,
      0|mm  |     [Symbol(async_id_symbol)]: 6617,
      0|mm  |     [Symbol(kHandle)]: Pipe { reading: true, [Symbol(owner_symbol)]: [Circular *3] },
      0|mm  |     [Symbol(lastWriteQueueSize)]: 0,
      0|mm  |     [Symbol(timeout)]: null,
      0|mm  |     [Symbol(kBuffer)]: null,
      0|mm  |     [Symbol(kBufferCb)]: null,
      0|mm  |     [Symbol(kBufferGen)]: null,
      0|mm  |     [Symbol(shapeMode)]: true,
      0|mm  |     [Symbol(kCapture)]: false,
      0|mm  |     [Symbol(kSetNoDelay)]: false,
      0|mm  |     [Symbol(kSetKeepAlive)]: false,
      0|mm  |     [Symbol(kSetKeepAliveInitialDelay)]: 0,
      0|mm  |     [Symbol(kBytesRead)]: 0,
      0|mm  |     [Symbol(kBytesWritten)]: 0
      0|mm  |   },
      0|mm  |   stderr: <ref *4> Socket {
      0|mm  |     connecting: false,
      0|mm  |     _hadError: false,
      0|mm  |     _parent: null,
      0|mm  |     _host: null,
      0|mm  |     _closeAfterHandlingError: false,
      0|mm  |     _events: {
      0|mm  |       close: [Function (anonymous)],
      0|mm  |       error: undefined,
      0|mm  |       prefinish: undefined,
      0|mm  |       finish: undefined,
      0|mm  |       drain: undefined,
      0|mm  |       data: [Function: onChildStderr],
      0|mm  |       end: [Function: onReadableStreamEnd],
      0|mm  |       readable: undefined
      0|mm  |     },
      0|mm  |     _readableState: ReadableState {
      0|mm  |       highWaterMark: 16384,
      0|mm  |       buffer: [],
      0|mm  |       bufferIndex: 0,
      0|mm  |       length: 0,
      0|mm  |       pipes: [],
      0|mm  |       awaitDrainWriters: null,
      0|mm  |       [Symbol(kState)]: 200354052,
      0|mm  |       [Symbol(kDecoderValue)]: [StringDecoder],
      0|mm  |       [Symbol(kEncodingValue)]: 'utf8'
      0|mm  |     },
      0|mm  |     _writableState: WritableState {
      0|mm  |       highWaterMark: 16384,
      0|mm  |       length: 0,
      0|mm  |       corked: 0,
      0|mm  |       onwrite: [Function: bound onwrite],
      0|mm  |       writelen: 0,
      0|mm  |       bufferedIndex: 0,
      0|mm  |       pendingcb: 0,
      0|mm  |       [Symbol(kState)]: 17564420,
      0|mm  |       [Symbol(kBufferedValue)]: null
      0|mm  |     },
      0|mm  |     allowHalfOpen: false,
      0|mm  |     _maxListeners: undefined,
      0|mm  |     _eventsCount: 3,
      0|mm  |     _sockname: null,
      0|mm  |     _pendingData: null,
      0|mm  |     _pendingEncoding: '',
      0|mm  |     server: null,
      0|mm  |     _server: null,
      0|mm  |     [Symbol(async_id_symbol)]: 6618,
      0|mm  |     [Symbol(kHandle)]: Pipe { reading: true, [Symbol(owner_symbol)]: [Circular *4] },
      0|mm  |     [Symbol(lastWriteQueueSize)]: 0,
      0|mm  |     [Symbol(timeout)]: null,
      0|mm  |     [Symbol(kBuffer)]: null,
      0|mm  |     [Symbol(kBufferCb)]: null,
      0|mm  |     [Symbol(kBufferGen)]: null,
      0|mm  |     [Symbol(shapeMode)]: true,
      0|mm  |     [Symbol(kCapture)]: false,
      0|mm  |     [Symbol(kSetNoDelay)]: false,
      0|mm  |     [Symbol(kSetKeepAlive)]: false,
      0|mm  |     [Symbol(kSetKeepAliveInitialDelay)]: 0,
      0|mm  |     [Symbol(kBytesRead)]: 0,
      0|mm  |     [Symbol(kBytesWritten)]: 0
      0|mm  |   },
      0|mm  |   stdio: [
      0|mm  |     <ref *2> Socket {
      0|mm  |       connecting: false,
      0|mm  |       _hadError: false,
      0|mm  |       _parent: null,
      0|mm  |       _host: null,
      0|mm  |       _closeAfterHandlingError: false,
      0|mm  |       _events: [Object],
      0|mm  |       _readableState: [ReadableState],
      0|mm  |       _writableState: [WritableState],
      0|mm  |       allowHalfOpen: false,
      0|mm  |       _maxListeners: undefined,
      0|mm  |       _eventsCount: 1,
      0|mm  |       _sockname: null,
      0|mm  |       _pendingData: null,
      0|mm  |       _pendingEncoding: '',
      0|mm  |       server: null,
      0|mm  |       _server: null,
      0|mm  |       [Symbol(async_id_symbol)]: 6616,
      0|mm  |       [Symbol(kHandle)]: [Pipe],
      0|mm  |       [Symbol(lastWriteQueueSize)]: 0,
      0|mm  |       [Symbol(timeout)]: null,
      0|mm  |       [Symbol(kBuffer)]: null,
      0|mm  |       [Symbol(kBufferCb)]: null,
      0|mm  |       [Symbol(kBufferGen)]: null,
      0|mm  |       [Symbol(shapeMode)]: true,
      0|mm  |       [Symbol(kCapture)]: false,
      0|mm  |       [Symbol(kSetNoDelay)]: false,
      0|mm  |       [Symbol(kSetKeepAlive)]: false,
      0|mm  |       [Symbol(kSetKeepAliveInitialDelay)]: 0,
      0|mm  |       [Symbol(kBytesRead)]: 0,
      0|mm  |       [Symbol(kBytesWritten)]: 0
      0|mm  |     },
      0|mm  |     <ref *3> Socket {
      0|mm  |       connecting: false,
      0|mm  |       _hadError: false,
      0|mm  |       _parent: null,
      0|mm  |       _host: null,
      0|mm  |       _closeAfterHandlingError: false,
      0|mm  |       _events: [Object],
      0|mm  |       _readableState: [ReadableState],
      0|mm  |       _writableState: [WritableState],
      0|mm  |       allowHalfOpen: false,
      0|mm  |       _maxListeners: undefined,
      0|mm  |       _eventsCount: 3,
      0|mm  |       _sockname: null,
      0|mm  |       _pendingData: null,
      0|mm  |       _pendingEncoding: '',
      0|mm  |       server: null,
      0|mm  |       _server: null,
      0|mm  |       [Symbol(async_id_symbol)]: 6617,
      0|mm  |       [Symbol(kHandle)]: [Pipe],
      0|mm  |       [Symbol(lastWriteQueueSize)]: 0,
      0|mm  |       [Symbol(timeout)]: null,
      0|mm  |       [Symbol(kBuffer)]: null,
      0|mm  |       [Symbol(kBufferCb)]: null,
      0|mm  |       [Symbol(kBufferGen)]: null,
      0|mm  |       [Symbol(shapeMode)]: true,
      0|mm  |       [Symbol(kCapture)]: false,
      0|mm  |       [Symbol(kSetNoDelay)]: false,
      0|mm  |       [Symbol(kSetKeepAlive)]: false,
      0|mm  |       [Symbol(kSetKeepAliveInitialDelay)]: 0,
      0|mm  |       [Symbol(kBytesRead)]: 0,
      0|mm  |       [Symbol(kBytesWritten)]: 0
      0|mm  |     },
      0|mm  |     <ref *4> Socket {
      0|mm  |       connecting: false,
      0|mm  |       _hadError: false,
      0|mm  |       _parent: null,
      0|mm  |       _host: null,
      0|mm  |       _closeAfterHandlingError: false,
      0|mm  |       _events: [Object],
      0|mm  |       _readableState: [ReadableState],
      0|mm  |       _writableState: [WritableState],
      0|mm  |       allowHalfOpen: false,
      0|mm  |       _maxListeners: undefined,
      0|mm  |       _eventsCount: 3,
      0|mm  |       _sockname: null,
      0|mm  |       _pendingData: null,
      0|mm  |       _pendingEncoding: '',
      0|mm  |       server: null,
      0|mm  |       _server: null,
      0|mm  |       [Symbol(async_id_symbol)]: 6618,
      0|mm  |       [Symbol(kHandle)]: [Pipe],
      0|mm  |       [Symbol(lastWriteQueueSize)]: 0,
      0|mm  |       [Symbol(timeout)]: null,
      0|mm  |       [Symbol(kBuffer)]: null,
      0|mm  |       [Symbol(kBufferCb)]: null,
      0|mm  |       [Symbol(kBufferGen)]: null,
      0|mm  |       [Symbol(shapeMode)]: true,
      0|mm  |       [Symbol(kCapture)]: false,
      0|mm  |       [Symbol(kSetNoDelay)]: false,
      0|mm  |       [Symbol(kSetKeepAlive)]: false,
      0|mm  |       [Symbol(kSetKeepAliveInitialDelay)]: 0,
      0|mm  |       [Symbol(kBytesRead)]: 0,
      0|mm  |       [Symbol(kBytesWritten)]: 0
      0|mm  |     }
      0|mm  |   ],
      0|mm  |   [Symbol(shapeMode)]: false,
      0|mm  |   [Symbol(kCapture)]: false
      0|mm  | }
      0|mm  | [2024-09-30 20:03:15.321] [LOG]   Rene F0:EE:7A:XXXXXX
      0|mm  | [2024-09-30 20:03:15.363] [LOG]   Kathi F0:EE:7A:XXXXXX
      0|mm  | [2024-09-30 20:03:15.364] [LOG]   Final state:
      0|mm  | [2024-09-30 20:03:15.369] [LOG]   [ [ 'Rene', 0, '' ], [ 'Kathi', 0, '' ] ]
      
      1 Reply Last reply Reply Quote 0
      • R Offline
        rewie85 @yedidia
        last edited by

        @yedidia The state folder exists but is empty

        Y 2 Replies Last reply Reply Quote 0
        • Y Offline
          yedidia @rewie85
          last edited by

          @rewie85
          Please try to use non capital letters on mac address, maybe this is the problem…
          And also, what is your home network address ? netmask ?

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

            @rewie85 @DarrenHill
            The main version was broken, sorry.

            Just fixed and updated the git repo.
            simply do git pull in modules/MMM-whoshome directory and it should work.

            –Yedidia

            D R 2 Replies Last reply Reply Quote 0
            • D Offline
              DarrenHill @yedidia
              last edited by DarrenHill

              @yedidia - just updated and also made all the MAC addresses lower case, and now looks to be working.

              The colours are rather muted, so it’s difficult to tell at a glance who is actually home (aside from not having a last seen line).

              Will look into it more tomorrow, just back from a business trip and rather tired. But thanks again for the good work and useful module!

              D 1 Reply Last reply Reply Quote 0
              • R Offline
                rewie85 @yedidia
                last edited by

                @yedidia Hi, now it works! Thanks a lot! :-)

                1 Reply Last reply Reply Quote -1
                • D Offline
                  DarrenHill @DarrenHill
                  last edited by

                  @yedidia - one more quick question.

                  As mentioned above, I’m trying to tweak the css to show the names for people who are present and away in different colours.
                  What I’ve done so far via custom.css is :

                  .whoshome {
                      color: lime;
                  }
                  .person-away {
                      color: red;
                  }
                  
                  

                  Which works, except it changes the title (the “Who’s Home”) as well.
                  Is there any way to do this and keep the title the original colour to match the rest of the mirror modules?

                  I tried changing .person rather than .whoshome, but then both the title and people who are home revert to the white that is defined in the css of the module itself.

                  S 1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @DarrenHill
                    last edited by sdetweil

                    @DarrenHill I don’t know the direct answer, but you can use the developers window element tab to see and test how to adjust the css changes

                    See the second link in my signature below for an explanation how to use the dev window

                    in css, the part before the { is called the selector clause

                    It selects the elements the stuff inside the {} will be applied to

                    I use this cheatsheet to help me remember, you can combine them

                    . Means class
                    # means id
                    No prefix means tag name
                    

                    https://www.w3schools.com/cssref/css_selectors.php

                    The selector ALWAYS selects ALL elements that match. So you may have to get very specific

                    I had to hide an element created by a form library

                    .possibly-hidden-tab div:nth-child(2)  > div > div >div >ul >li:only-child >a[rel*="Item%201"] {
                      display: none;
                    }
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    D 1 Reply Last reply Reply Quote 0
                    • D Offline
                      DarrenHill @sdetweil
                      last edited by

                      @sdetweil - Thanks Sam. Looks like a job for the weekend.

                      D 1 Reply Last reply Reply Quote 0
                      • D Offline
                        DarrenHill @DarrenHill
                        last edited by

                        OK, I think I have it.
                        Using the window I confirm that the home people are using the same class (whoishome) as the title window.

                        To get that to work properly, I changed the MMM-whoishome.js line 34 from

                        html = html + '<img class="person" src="' + this.config.TRACK[this.peopleArray[i][0]].image + '"> ' + this.peopleArray[i][0] + '<BR>';
                        

                        to

                        html = html + '<img class="person" src="' + this.config.TRACK[this.peopleArray[i][0]].image + '"> <span class="person">' + this.peopleArray[i][0] + '</span><BR>';
                        

                        and then the people who are home use class person, which can then be used to configure the colour separately to the header title.

                        @yedidia - is this something worth adding into the module for better flexibility?
                        Sorry I’m not good at GH, so have no idea how to submit a PR for it.

                        1 Reply Last reply Reply Quote 1
                        • T Offline
                          tintinmaster
                          last edited by

                          This modules looks very similar to https://github.com/ianperrin/MMM-NetworkScanner

                          Also be aware that MAC-Adresses could change on modern devices through MAC-Adress Randomization

                          S R 2 Replies Last reply Reply Quote 0
                          • S Do not disturb
                            sdetweil @tintinmaster
                            last edited by

                            @tintinmaster yes, they change at least every hour… SO much fun

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              rewie85 @tintinmaster
                              last edited by

                              @tintinmaster if you read description you can find this topic. You can deactivate it separate for every Network. At least i have no issues to keep my mac address in my home wifi.

                              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