Read the statement by Michael Teeuw here.
Local IP address
-
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