MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. strawberry 3.141
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Offline
    • Profile
    • Following 3
    • Followers 35
    • Topics 30
    • Posts 1,700
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Limit Sonos module to only show a specific speaker

      it will be an array so you need to put square brackets around it exclude: ['Bedroom', 'Living room', 'Bathroom']

      you don’t put a config file in the repository, that’s what the user has to add into his config file in ~/MagicMirror/config/config.js on it’s own.

      you would have to add the last line into defaults

       Module.register('sonos', {
      	defaults: {
      		showStoppedRoom: true,
      		showAlbumArt: true,
      		showRoomName: true,
      		animationSpeed: 1000,
      		updateInterval: 0.5, // every 0.5 minutes
      		apiBase: 'http://localhost',
      		apiPort: 5005,
      		apiEndpoint: 'zones',
                      exclude: []
      },
      
      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • RE: Limit Sonos module to only show a specific speaker

      just click on fork in the top right corner of github

      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • 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

      posted in Entertainment
      strawberry 3.141S
      strawberry 3.141
    • 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

      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • 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)

      posted in Sport
      strawberry 3.141S
      strawberry 3.141
    • 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

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: Screen Font is too big

      @Menn80 exactly

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • 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

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • 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

      posted in Entertainment
      strawberry 3.141S
      strawberry 3.141
    • 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?

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • 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);
      		});
      	}
      });
      
      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-ShipmentTracking

      @Argentum after a lot of struggling 17track is now supported as well, but there is only a correct time displayed, if you are in the same timezone as the carrier. I asked them and they told me the time is the local time of the specific carrier, but there is no information about which timezone it is and without configuring the timezone for all 170+ carriers, everyone has to calculate the difference for themself in their head. Pretty oldschool hah

      posted in Utilities
      strawberry 3.141S
      strawberry 3.141
    • RE: custom.css

      @ianperrin maybe i was quicker, but I learned it out of your contribution to my module ;)

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: custom.css

      a proper solution would be to do your changes in the custom.css only, so you’ll not lose your modification by an update

      in general you do the following rule

      .MODULE_NAME .CLASS_TO_CHANGE {
          /*CSS RULE*/
      }
      
      .compliments .xlarge {
          font-weight: bold;
      }
      

      this will only affect your compliments module

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: Parse HTML String

      I think it’s weird that this works, because your looking for attribute class = data_1 but it’s an id

      the css selector for an id is #, and when you put p behind it will look for paragraphs in the element with the id data_1

      when you replace

      $('div[class=data_1]').find('p').each(function (index, element) {
      	data_array.push($(element).text());
      });
      

      with

      data_array.push($('#data_1 p').text());
      

      does it still work? Not sure if it will return the element if just one occurance is found or will return an array anyways

      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • RE: .txt file include

      sry wasn’t aware of that a buffer gets returned instead of a string if there is no encoding specified

      fs.readFile('Test-temp.txt', 'utf8', (err, data) => {
      
      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: PIR sensor behind glass?

      well you could put your sensor outside of the mirror and hang it into a corner, so it’s not obvious that it belongs to the mirror itself

      posted in Hardware
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-Soccer - Standings, Schedules and Top Scorers

      I looked into this api and scotland is not supported

      I think that you will get your data in a different structure, so you can’t use this module for it as it is, but you can adjust this module for your needs :)

      posted in Sport
      strawberry 3.141S
      strawberry 3.141
    • RE: PIR sensor behind glass?

      it will not work behind glass but @alexyak wrote a module for webcams or pi cams to detect motion, which can be hidden behind glass https://forum.magicmirror.builders/topic/490/motion-detector

      posted in Hardware
      strawberry 3.141S
      strawberry 3.141
    • RE: .txt file include

      i think this should do the job

      fs.readFile('Test-temp.txt', (err, data) => {
      
      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • 1 / 1