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.

    Local IP address

    Scheduled Pinned Locked Moved General Discussion
    10 Posts 3 Posters 5.5k Views 3 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.
    • strawberry 3.141S Offline
      strawberry 3.141 Project Sponsor Module Developer
      last edited by strawberry 3.141

      one way would be a module with a node_helper something like

      const NodeHelper = require('node_helper');
      const exec = require('child_process').exec;
      
      module.exports = NodeHelper.create({
        socketNotificationReceived: function(notification, payload) {
          if (notification === 'GET_IP') {
          exec('host raspberrypi', (error, stdout, stderr) => {
           if (error) {
             console.error(`exec error: ${error}`);
             return;
          }
        this.sendSocketNotification('IP', stdout);
      });
      }
        }
      });
      

      stdout will be something like “raspberrypi has address 192.168.1.20”

      Please create a github issue if you need help, so I can keep track

      PointPubMediaP A 2 Replies Last reply Reply Quote 0
      • PointPubMediaP Offline
        PointPubMedia @strawberry 3.141
        last edited by

        @strawberry-3.141 But, what’s about the screen location ? I didn’t find any builtin position like that…

        1 Reply Last reply Reply Quote 0
        • strawberry 3.141S Offline
          strawberry 3.141 Project Sponsor Module Developer
          last edited by

          bottom_right https://forum.magicmirror.builders/topic/286/regions

          Please create a github issue if you need help, so I can keep track

          PointPubMediaP 1 Reply Last reply Reply Quote 0
          • PointPubMediaP Offline
            PointPubMedia @strawberry 3.141
            last edited by

            @strawberry-3.141 and I will need to handle the text size from the module itself to be very small and discrete!?

            1 Reply Last reply Reply Quote 0
            • strawberry 3.141S Offline
              strawberry 3.141 Project Sponsor Module Developer
              last edited by strawberry 3.141

              you can add something like .ip-font { font-size: 8px; } in custom.css and use this class for your displaying dom or create an own css file for your module because it’s only module related :)

              Please create a github issue if you need help, so I can keep track

              1 Reply Last reply Reply Quote 0
              • A Offline
                amanzimdwini @strawberry 3.141
                last edited by

                @strawberry-3.141
                Would you mind making that a module for everyone to use? (and I like the idea of “discreet”

                PointPubMediaP 1 Reply Last reply Reply Quote 0
                • strawberry 3.141S Offline
                  strawberry 3.141 Project Sponsor Module Developer
                  last edited by

                  i will have a look on this later today ;)

                  Please create a github issue if you need help, so I can keep track

                  1 Reply Last reply Reply Quote 0
                  • PointPubMediaP Offline
                    PointPubMedia @amanzimdwini
                    last edited by

                    @amanzimdwini I agree ;)

                    strawberry 3.141S 1 Reply Last reply Reply Quote 0
                    • strawberry 3.141S Offline
                      strawberry 3.141 Project Sponsor Module Developer @PointPubMedia
                      last edited by

                      it’s already done https://forum.magicmirror.builders/topic/409/mmm-ip

                      Please create a github issue if you need help, so I can keep track

                      1 Reply Last reply Reply Quote 1
                      • 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