just click on fork in the top right corner of github
Read the statement by Michael Teeuw here.
Posts made by strawberry 3.141
-
RE: Limit Sonos module to only show a specific speaker
-
RE: MMM-MovieInfo
Changelog
new config options:
* hide genre
* hide rating
* hide plot
* use language from config instead of default english, this can have missing data from api -
RE: Limit Sonos module to only show a specific speaker
@dinkybluebug245 can’t test this, because I don’t have sonos speakers, but this would be an quick an ugly solution
$.each(data, function (i, item) { if(item.coordinator.roomName === 'Kitchen'){ var room = item.coordinator.roomName; var state = item.coordinator.state.zoneState; var artist = item.coordinator.state.currentTrack.artist; var track = item.coordinator.state.currentTrack.title; var cover = item.coordinator.state.currentTrack.absoluteAlbumArtURI; var streamInfo = item.coordinator.state.currentTrack.streamInfo; if(item.members.length > 1){ room = ''; $.each(item.members, function (j, member) { room += member.roomName + ', '; }); room = room.slice(0, -2); } text += this.renderRoom(state, artist, track, cover, room); } }.bind(this));
personally i would fork the repository add a config option exclude: [‘LivingRoom’, ‘Bathroom’] etc. to have normal behaviour for all people updating the module without need to change the config to get their familiar result. and then i would check
$.each(data, (i, item) => { if(this.config.exclude.indexOf(item.coordinator.roomName) === -1){
and then submit a pull request
-
RE: NFL Score Module
due to the different timezone, it would be nice if some of you could test my alpha version of live match detecting on the next matchday, by doing
git fetch git checkout feature/live-matches
start your mirror and report here how it goes, it should detect live matches automatically and while at least one match is running it fetches every minute for new data, otherwise it will stay by the standard 3hours interval
it’s not tested yet, but if it works you should see that the time of a quarter get’s updated and the score as well. it will also show which team is in ball possession and if the team is entering the redzone it will start to flash the indicator. if something is not working pls provide the errors from the terminal and the electron console (cmd+shift+I)
-
RE: Screen Font is too big
you can put as much css rules into the curly braces as you want
you changed the small class for everything in the body tag and everything displayed on the mirror is in the body tag, so it’s affected for all elements using the small class, the other rule affected only the small class using elements in the specific module
-
RE: Screen Font is too big
@Menn80 thats wrong Syntax in Plain CSS You can’t Nest like this. You have to do:
.modulename .small { font-size: 10px; }
and don’t put it between the Curly braces of body, that is just an example and Not necessary -
RE: MMM-MovieInfo
sorry forgot about your post
the problem is that the fields which are not provided in the selected language don’t have anymore a fallback to english (like in previous api versions) and therefore will be empty, that’s why I chose to take allways english, so all data is provided.
But I can add a config option, so everyone can decide for himself
-
RE: .txt file include
do you get any error in the console or in the electron console (cmd+shift+I)
did you place your Test-temp.txt in ~/MagicMirror or somewhere else?
-
RE: .txt file include
this works for me you had everywhere weird quotes and the updateinterval was also wrong
Module.register("sensor",{ defaults: { updateInterval: 30 * 60 * 1000 //reads the file every 30 mins }, start: function(){ this.sendSocketNotification("START", this.config); }, socketNotificationReceived: function(notification, payload) { if(notification === "DATA"){ this.dataFile = payload; this.updateDom(); } }, getDom: function(){ var wrapper = document.createElement("div"); if(this.dataFile){ wrapper.innerHTML = this.dataFile; } else { wrapper.innerHTML = "No data"; } return wrapper; } });
const NodeHelper = require("node_helper"); const fs= require("fs"); module.exports = NodeHelper.create({ //here comes the part of the nodehelper after the 3 dots as posted above socketNotificationReceived: function(notification, payload) { if(notification === "START"){ this.config = payload; this.readData(); setInterval(() => { this.readData(); }, this.config.updateInterval); } }, readData: function(){ //to read a file to do the following fs.readFile("Test-temp.txt", "utf8", (err, data) => { if (err) throw err; this.sendSocketNotification("DATA", data); }); } });