Read the statement by Michael Teeuw here.
Local IP address
-
Hey guys…
I’m planning to use MM2 as the main interface for our home automation project already started since 1 year… I would like to show the local IP address somewhere very discret and small at the bottom right…
Any suggestion?
-
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”
-
@strawberry-3.141 But, what’s about the screen location ? I didn’t find any builtin position like that…
-
bottom_right https://forum.magicmirror.builders/topic/286/regions
-
@strawberry-3.141 and I will need to handle the text size from the module itself to be very small and discrete!?
-
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 :) -
@strawberry-3.141
Would you mind making that a module for everyone to use? (and I like the idea of “discreet” -
i will have a look on this later today ;)
-
@amanzimdwini I agree ;)
-
it’s already done https://forum.magicmirror.builders/topic/409/mmm-ip
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