-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiply configs #51
Comments
I am far from an expert on this, but i found a workaround for this problem By modify the code in "MMM-NetworkScanner.js" and add three lines of code updateInterval: 20
hide: false, // <- This line is added
sort: true, And then add fallowing code getDom: function() {
var self = this;
if (self.config.hide) { // <- This line is added
this.style.display = "none"; // <- This line is added
} // <- This line is added And then do the config in the following way // MMM-NetworkScanner
{
module: 'MMM-NetworkScanner',
position: 'top_left',
header: "Dummy",
config: {
devices: [
// Network
{
macAddress: "1a:1b:1c:1a:1b:1c",
name: "Desktop",
icon: "desktop"
},
{
macAddress: "2a:2b:2c:2a:2b:2c",
name: "Server",
icon: "server"
},
// Phone
{
macAddress: "3a:3b:3c:3a:3b:3c",
name: "Me",
icon: "mobile"
},
{
macAddress: "4a:4b:4c:4a:4b:4c",
name: "Other",
icon: "mobile"
},
],
showUnknown: false,
showOffline: true,
showLastSeen: true,
showLastSeenWhenOffline: true,
keepAlive: 300,
updateInterval: 5,
hide: true
}
},
{
module: 'MMM-NetworkScanner',
position: 'top_left',
header: "Network",
config: {
devices: [
{
macAddress: "1a:1b:1c:1a:1b:1c",
name: "Desktop",
icon: "desktop"
},
{
macAddress: "2a:2b:2c:2a:2b:2c",
name: "Server",
icon: "server"
},
],
showUnknown: false,
showOffline: true,
showLastSeen: true,
showLastSeenWhenOffline: true,
keepAlive: 300,
updateInterval: 5
}
},
{
module: 'MMM-NetworkScanner',
position: 'top_left',
header: "Phones",
config: {
devices: [
{
macAddress: "3a:3b:3c:3a:3b:3c",
name: "Me",
icon: "mobile"
},
{
macAddress: "4a:4b:4c:4a:4b:4c",
name: "Other",
icon: "mobile"
},
],
showUnknown: false,
showOffline: true,
showLastSeen: true,
showLastSeenWhenOffline: true,
keepAlive: 300,
updateInterval: 5,
sort: false
}
}, Then it actually work as expected, hopefully someone come whit a better solution then this but it has to work for now! |
@TimerWolf
Can you please take a look on it. ??? |
It seems like it not possible to have multiply configs, when i have everything in one it seems to work fine, but when i have it separated it seems to be harder for it to work.
And that's a bit fun, as the other starts works as well when everything is in the first one, anyways i could be good whit more then only "one" headline" for the differtent things you will check...
I have try to do it like this
And if i change the two mac-adresses from the "Phones" to the "Network", both starts to work just fine....
The text was updated successfully, but these errors were encountered: