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

    Posts

    Recent Best Controversial
    • RE: MM-Navbar - Navigation Bar for Touchscreens to hide/show modules

      @TheHyp3

      Hello
      in navbar.css you can play with

      .center{
      position: fixed;
      left: 45%;
      }

      • personnaly i removed this class
      posted in System
      tidus5T
      tidus5
    • RE: MMM-Hue

      Hello @Mitchfarino

      Im trying to make your module “clickable” :-)

      could you help me with that ?

      Module.register(“MMM-Hue”, {

      defaults: {
          bridgeip: "",
          userid: "",
          colour: true
      },
      // Define required scripts.
      getScripts: function () {
          return [this.file("js/jquery.js")];
      },
      getStyles: function () {
      
          return ["font-awesome.css", "MMM-Hue.css"];
      },
      // Define start sequence.
      start: function () {
          //These will be moved to config in a later release
          this.lightsorgroups = "groups";
          this.updateInterval = 60 * 100; // 10000 updates every 10 minutes
          this.animationSpeed = 2 * 1000;
          this.initialLoadDelay = 0;
          //end
          var result = false;
          this.url = "http://" + this.config.bridgeip + "/api/" + this.config.userid + "/" + this.lightsorgroups;
          this.getData();
          setInterval(() => {
              this.getData();
          }, this.updateInterval);
      },
      
      // Override dom generator.
      getDom: function () {
          var wrapper = document.createElement("div");
          //alert("http://" + this.config.bridgeip + "/api/" + this.config.userid + "/" + this.config.lightsorgroups);
      
          if (this.result) {
      
              var table = document.createElement("table");
              table.classList.add("small", "table", "align-left");
      
              table.appendChild(this.createLabelRow());
      
              var lamps = Object.keys(this.result);
      
              for (var i = 0; i < lamps.length; i++) {
      
                  var row = document.createElement("tr");
                  var room = document.createElement("td");
                  room.innerHTML = this.result[lamps[i]].name;;
                  row.appendChild(room);
                  var lightsallLabel = document.createElement("td");
                  lightsallLabel.classList.add("centered");
      
                  var lightstatus = document.createElement("i");
                  //lightstatus.classList.add(“fa”, this.result[lamps[i]].state.reachable ? (this.result[lamps[i]].state.on ? “fa-lightbulb-o” : “fa-adjust” ) : “fa-times”);
      	
      	buttonlightstatus[i] = false;  // CUSTOM
      	buttonlight[i] = document.createElement("span");  // CUSTOM
      	//var buttonlightstatus[i] = false;  // CUSTOM
      	//var buttonlight[i] = document.createElement("span");  // CUSTOM
      
      	//weatherbutton.className = "wi wi-day-rain-mix navbar";
      	//var forecast = MM.getModules().withClass('weatherforecast');
      
      	if(this.result[lamps[i]].state.all_on)
      	{
      	lightstatus.classList.add("fa-lightbulb-o")
      	buttonlightstatus[i] = true;
      	}		
      	else if (this.result[lamps[i]].state.any_on)
      	{
      	lightstatus.classList.add("fa-adjust")
      	buttonlightstatus[i] = true;
      	}
      	else {
      	lightstatus.classList.add("fa-times")
      	buttonlightstatus[i] = false;
      	};
      	
      	// lightstatus.classList.add("fa", this.result[lamps[i]].state.all_on ? "fa-lightbulb-o" : (this.result[lamps[i]].state.any_on ? "fa-adjust" : "fa-times"));  // CUSTOM
                  if (this.config.colour) {
      
                      if (this.result[lamps[i]].state.all_on) {
                          lightstatus.classList.add("lights-all-on")
                      }
                      else {
                          if (this.result[lamps[i]].state.any_on) {
                              lightstatus.classList.add("lights-partial-on")
                          }
                      }
                  }
                  ;
                  lightsallLabel.appendChild(lightstatus);
          		wrapper.appendChild(buttonlight[i]);  //CUSTOM                
                  row.appendChild(lightsallLabel);
      
                  table.appendChild(row);
      
              }
              wrapper.appendChild(table);
             										//CUSTOM
              		$(buttonlight[i]).on("click", function(){
      					if(buttonlightstatus[i]){
      					alert('its work');
      					putJSON(t"http://" + this.config.bridgeip + "/api/" + this.config.userid + "/lights/" + buttonlightstatus[i] +"/state , ({'on':false});					
      						buttonlightstatus[i] = false;
      					}else{
      					putJSON(t"http://" + this.config.bridgeip + "/api/" + this.config.userid + "/lights/" + buttonlightstatus[i] +"/state , ({'on':true});	
      					buttonlightstatus[i] = true;
      						}
      					});
              
          } else {
              wrapper.innerHTML = "No Data returned";
          }
          return wrapper;
      },
      
      createLabelRow: function () {
          
          var labelRow = document.createElement("tr");
      
          var roomiconlabel = document.createElement("th");
          var typeIcon = document.createElement("room");
          typeIcon.classList.add("fa", "fa-home");
          roomiconlabel.appendChild(typeIcon);
          labelRow.appendChild(roomiconlabel);
      
          var lightsonlabel = document.createElement("th");
          lightsonlabel.classList.add("centered");
          var typeIcon = document.createElement("lightson");
          //typeIcon.classList.add("fa", "fa-lightbulb-o");
          typeIcon.innerHTML = "Lights On";
          lightsonlabel.appendChild(typeIcon);
          labelRow.appendChild(lightsonlabel);
      
          var lightsonlabel = document.createElement("th");
          lightsonlabel.classList.add("centered");
      
          return labelRow;
      }
      ,
      getData: function () {
          $.getJSON(this.url, (data) => {
              this.result = data;
              this.updateDom();
          });
      },
      

      });

      my brigde is in Amsterdam and im in Belgium for Christmas :-)

      posted in Utilities
      tidus5T
      tidus5
    • RE: MMM-Todoist - Your todoist tasks on your mirror

      Yop,

      i did it :-)

      0_1482838855804_Screen Shot 2016-12-27 at 12.37.48.png

      posted in Productivity
      tidus5T
      tidus5
    • RE: Wunderlist won't display entries

      https://forum.magicmirror.builders/topic/213/wunderlist-your-todos-on-the-mirror/90

      maybe that can help you
      same error

      posted in Troubleshooting
      tidus5T
      tidus5
    • RE: Wunderlist won't display entries

      @binderth said in Wunderlist won't display entries:

      accessToken: ‘xxxxxxxxxxxxxxxxxxxx’,
      clientID: ‘xxxxxx’,
      lists: [‘inbox’]

      Yop,

      you forgot to add your access token, client ID and (maybe) the folder you want.
      you have the answer in the log - ReferenceError: accessToken is not defined
      dont change the API URL and the callback

      in your wondurlist account you can found the key and all

      posted in Troubleshooting
      tidus5T
      tidus5
    • RE: MMM-Todoist - adding reminder priority owner

      Yop,

      i did it :-)

      @cbrooker could you just tell me - how you hide the task tagged like done ?
      if i understand correctly the API documentation in the form you receive all - so normally the checked’s status can be used. but i only have items with checked = 0

      thanks :-)

      0_1482769770022_Screen Shot 2016-12-26 at 17.27.30.png

      posted in Development
      tidus5T
      tidus5
    • RE: Home Assistant Module

      ohhhh yes!!!

      posted in Requests
      tidus5T
      tidus5
    • RE: MMM-Todoist - adding reminder priority owner

      Yop,

      im progressing ^^
      i understand how it’s working now - just dont know how to add an icon :-/

      Someone can help me ?

      if (JSON.parse(body).items[i].priority == '1') {icontodo ='P1'}
      	else if (JSON.parse(body).items[i].priority == '2') {icontodo ='P2'}
      	else if (JSON.parse(body).items[i].priority == '3') {icontodo ='P3'}
      	else {icontodo ='P4'};
      

      0_1481751363565_Screen Shot 2016-12-14 at 22.35.44.png

      icontodo = document.createElement(“span”);
      icontodo.className = “wi wi-day-rain-mix”;
      icontodo =‘img:wi wi-day-rain-mix’;

      any help is welcome :-)

      posted in Development
      tidus5T
      tidus5
    • RE: MM-Navbar - Navigation Bar for Touchscreens to hide/show modules

      @chrisyy yop everything is working perfectly

      i added a timing of 1000 on every hide/show
      without i had a little ugly mouvement sometimes :-)
      again thanks you !!!

      posted in System
      tidus5T
      tidus5
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 3 / 6