@choffmann - nice module.
Here’s a similar one I put together last year - https://github.com/ianperrin/MMM-YouTubeChannelStats
@choffmann - nice module.
Here’s a similar one I put together last year - https://github.com/ianperrin/MMM-YouTubeChannelStats
There is a (currently undocumented) debug
config option in the module which minimises the logging. By default it should be set to false, but you can explicitly set it yourself
i.e. debug: false,
In earlier versions it had little effect, but in the latest commit, it should significantly reduce the volume of logging.
See how it goes
@Alvinger interesting, I’ll check it out.
You may also be interested in taking a look at MMM-Remote-Control. It contains a heap of functions to control your mirror (including turning the monitor off and on, rebooting the pi, restarting the MM process etc) remotely.
I’ve been working with @Jopyth to expose this functionality via the use of sendNotification.
This should allow schedules like:
notification_schedule: [
{notification: 'REMOTE_ACTION', schedule: '30 9 * * *', payload: {action: 'MONITOROFF'}},
{notification: 'REMOTE_ACTION', schedule: '30 18 * * *', payload: {action: 'MONITORON'}}
]
Check out the repository on GitHub - the latest code includes this capability
You could also consider making the icon configurable via the options,
First add the default values for the options
defaults: {
max: 5,
format: false,
types: {
INFO: "dimmed",
WARNING: "normal",
ERROR: "bright"
},
icons: {
INFO: "info",
WARNING: "exclamation",
ERROR: "exclamation-triangle"
}
},
Then change the code to create the icon (and for bonus points, set class for the icon to the same as the message.
var iconCell = document.createElement("td");
var icon = document.createElement("i");
if(this.config.icons.hasOwnProperty(this.messages[i].type)){
icon.classList.add("fa", "fa-" + this.config.icons[this.messages[i].type]);
} else {
icon.classList.add("fa", "fa-question");
}
if(this.config.types.hasOwnProperty(this.messages[i].type)){
icon.classList.add(this.config.types[this.messages[i].type]);
}
iconCell.appendChild(icon);
callWrapper.appendChild(iconCell);
Warning - this code was entered directly here in the comment so may contain TyoPs ;)
Did you restart the mirror after the upgrade?
Are there any errors in the browser console?
What happens if debug is set to true?
@MichMich - some great ideas, keep them coming.
I’ve created issues (or rather enhancements) for these on GitHub - https://github.com/ianperrin/MMM-ModuleScheduler/issues. Feel free to review, comment etc.
Hi @dominic
The simplest approach would be to add a “br” element between the temperature and humidity.
However, I would consider putting them in an unordered list and take advantage of the inbuilt layout controls within FontAwesome. E.g.
getDom: function() {
var wrapper = document.createElement("div");
if(this.dataFile){
var humidityRegExp = /Humidity = (.*?) %/ig;
var humidity = humidityRegExp.exec(this.dataFile)[1];
var temperatureRegExp = /Temperature = (.*?) *C/ig;
var temperature = temperatureRegExp.exec(this.dataFile)[1];
var list = document.createElement("ul");
list.classList.add("fa-ul");
// add temperature
var temperature_item = document.createElement("li");
var temperature_symbol = document.createElement("i");
temperature_symbol.classList.add("fa", "fa-li", "fa-home");
temperature_item.appendChild(temperature_symbol);
temperature_item.appendChild(document.createTextNode(" " + temperature + "°C"));
list.appendChild(temperature_item);
// add humidity
var humidity_item = document.createElement("li");
var humidity_symbol = document.createElement("i");
humidity_symbol.classList.add("fa", "fa-li", "fa-tint");
humidity_item.appendChild(humidity_symbol);
humidity_item.appendChild(document.createTextNode(" " + humidity + "%"));
list.appendChild(humidity_item);
wrapper.appendChild(list);
} else {
wrapper.innerHTML = "No data";
}
return wrapper;
},
@zdenek the module currently only supports font awesome 4 so try video-camera
.
Unfortunately, raspberry-pi
is only available in font awesome 5 so you won’t be able to use it just yet. However, once the fix to an issue with font awesome compatibility has been released, which is expected in version 2.7, you should be able to use all font awesome 5 free icons
@Mitchfarino said in MMM-ModuleScheduler:
@cowboysdude @ianperrin how would would I implement a schedule so that a module appeared for 5 minutes, then disappear and reappear in 5 minutes time?
Try this
module_schedule: {from: '0/10 * * * *', to: '5/10 * * * *'},
Which should equate to the module being
@dominic - there’s no functionality within MagicMirror out of the box to achieve this, but I can think of two options