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

    Posts

    Recent Best Controversial
    • RE: MagicMirror project for sister

      hi, all I did is to set a higher but not too high sensitivity via alsa mixer or on desktop - right click on audio - audio input - input device settings and adjust the sesitivity:
      alt text

      did you test your mic? arecord test.wav -> aplay test.wav?

      posted in Show your Mirror
      B
      blaukon
    • RE: MagicMirror project for sister

      @bachoo786
      sadly, I do not have more pictures or access to the mirror at the moment - alt text

      But I made 3d modell in tinkercad to show you the necessary construction:

      front:
      alt text
      -> orange: mirrorglass (bigger than the hole)
      alt text

      -> monitor right onto the glass
      alt text

      backside:
      alt text

      the frame is massiv, about 2-2.5cm wood, I have absolutly no worries that this frame would brake by itself :)
      and that’s basically how it’s mounted:
      alt text

      posted in Show your Mirror
      B
      blaukon
    • RE: MagicMirror project for sister

      @banbutcher hey, I’m using Version 2 from https://github.com/eouia/MMM-AssistantMk2 and the newest version of https://github.com/eouia/MMM-Hotword. Removed the presence on the mirror of both when nothing is decected and I belive that’s all I’ve changed :)

      posted in Show your Mirror
      B
      blaukon
    • RE: MagicMirror project for sister

      sure :-)
      Uploaded my config.js and custum.css files (https://drive.google.com/open?id=16hNIqnGdpdmm9KeE-jcLGc0-fB80OpML)

      You have to add your credit card to use googlemapstraffic, but you’ll have a free contingent per month which I never exceeded.
      The ring my phone thingy is already implemented in the original google-assistant - as long as you use the same google account, you might have to grant the rights to use this function.

      posted in Show your Mirror
      B
      blaukon
    • RE: MagicMirror project for sister

      sure, might not be great, but it works well for me: https://gist.github.com/blaukon/1e6c4c9ad6ae98ad62545e1659555ecd

      Might not work with every smartphone, for example, it works well with my Samsung Galaxy S8, but not without turning deepsleep off at my parents S7. Also did not work properly on my Sisters Huawei P20. Tried every setting but Android does turn Wifi off although “keep wifi alive even in standby” setting is active.
      Just added my sisters Laptop IP and so far, it’s working fine at her place.

      Added a picture of the mounted mirror: https://drive.google.com/open?id=1Qg0bFbfYzMh_SpuGu-rBGkeVRfeSMuOe

      posted in Show your Mirror
      B
      blaukon
    • MagicMirror project for sister

      I’ve recently finished my sister’s magicmirror running a 27" monitor and pilkington mirropane chrome spy 4mm glass.
      Adopted many great modules (thank you authors!), added my own modules as well as embedded custom voice commands and a custom wake word.
      Run into m a n y issues during the whole process until it finally hang at the desired wall. (3 1/2 years :/ due to stacked schedules)
      Funniest problem was that the mirror wasn’t able to recognise my sister’s voice, but had no problem with my deeper voice.

      problems

      • sdcard failure
        solution: replaced sd card, frequent sdcard image backups after bigger software changes, removed auto-restart every day and replaced it with auto-reload MM instead
      • MMM-GoogleMapsTraffic crashing the software
        solution: auto-reload MM twice a day
      • MMM-AssistantMk2 v2 having slow reaction time on first request (mirror start/reload)
        solution: added useWelcomeMessage: “hi” and simultaneously mute the sound output and put it back on after 60seconds
      • voice of sister not being recognised
        solution: raised mic sensitivity and added custom wakeword with her voice
      • performance and temperature
        solution: used a stretch and buster version simultaneously and let it run for a month - stretch version was slower, hotter and crashed 3 times
        buster was flawless and cooler / similar temperature (even without an active fan)

      used modules

      • weatherforecast by MichMich
      • currentweather by MichMich
      • mmm-systemtemperature by MichMich
      • compliments by MichMich
      • newsfeed by MichMich
      • calendar by MichMich 3x (customized)
      • MMM-pages by edward-shen
      • MMM-Remote-Control by Jopyth
      • MMM-AssistantMk2 by eouia (customized)
      • MMM-Hotword by eouia (customized)
      • MMM-Wunderlist by paviro (customized)
      • MMM-NetworkScanner by ianperrin (customized)
      • MMM-cryptocurrency by matteodanelli (customized)
      • calendar_monthly by KirAsh4 (customized)
      • MMM-GoogleMapsTraffic by sdetweil (customized)
      • custom modules:
        logo
        notification
        frame

      MMM-Page has 3 pages configured - normal screen | fullscreen google maps | “guest screen”, hiding calendar, todo,… - module is controlled by MMM-AssistantMk2

      currently running beside the MM software

      • flask webserver
      • openvpn for maintenance
      • python script that searches for devices in her network (smartphone, notebook) to detect if someone’s home and therefore turns the display on - otherwise display is off
      • the same script also restarts the mirror in case of getting 80 degrees and restarts the openvpn connection on failure

      hardware

      • Raspberry Pi 3b+
      • Transcend Ultimate microSDHC 8GB Class 10 UHS-I
      • kinobo mini akiro usb microphone
      • 27" fullhd monitor AOC i2770PQ
      • spy-mirror-glass Pilkington Mirropane Chrome Spy 4mm

      enough issues, here’s the mirror and a live demonstration:
      alt text

      alt text

      alt text

      alt text

      alt text

      alt text

      alt text

      Pictures and Files:
      https://drive.google.com/open?id=16hNIqnGdpdmm9KeE-jcLGc0-fB80OpML

      video was recorded with the stretch version and rpi3b
      https://youtu.be/fZR0dvKM5q8

      I am also running a “terminal” on my desk with an old netbook display and MM software and will soon finish my own mirror.

      posted in Show your Mirror
      B
      blaukon
    • RE: Multiple requests within one function

      yeey, I got it working, although I don’t know why :P

       var NodeHelper = require("node_helper");
       var request = require('request');
       var Promise = require("promise");
       
       var result = new Array();
       
       module.exports = NodeHelper.create({
          start: function() {
              console.log("Starting node_helper for module [" + this.name + "]");
          },
          // subclass socketNotificationReceived
          socketNotificationReceived: function(notification, payload){
              if (notification === 'get_values') {
                  this.getJSON(payload);
              }
          },
      		
      		
      	requestp: function(url, key, name) {
      		return new Promise(function (resolve, reject) {
      			request({url:url, method: 'GET'}, function (err, res, body) {
      				if (err) {
      					return reject(err);
      				} else if (res.statusCode !== 200) {
      					err = new Error("Unexpected status code: " + res.statusCode);
      					err.res = res;
      					return reject(err);
      				}
      				
      				result.push({url: url, name: name, temp: body});
      				resolve(body);
      			});
      		});
      	},
      		
          getJSON: function(object) {		
              var self = this;
      		
      		for (var key in object) {
      			//console.log(object[key]);
      			
      			self.requestp(object[key].url, key, object[key].name).then(function (info) {
      					//console.log(info);
      				}, function (err) {
      					console.error("%s; %s", err.message, url);
      					console.log("%j", err.res.statusCode);
      			});
      			
      		}
      		//console.log(result);
      		self.sendSocketNotification('received_values', result);
      		result = [];
          }
       });
      

      I wasn’t able to add a “temp” property to the original object - it was actually added, but it did not want to work outside the .then function :(

      posted in Troubleshooting
      B
      blaukon
    • Multiple requests within one function

      Hello community :-)

      I’m kinda despairing with this problem :-(
      The idea: requesting the system temperatures of all raspberrys listed in the config file (they are all running a flask server)
      But I can’t get the object working.

      node_helper gets the object from my config file:

       {
                              module: 'getTemps',
                              header: 'RPi Temperatures',
                              position: 'top_right',
                              config: {
                                       devices: [
                                                   {
                                                        url: 'http://10.0.0.83:2222/temp',
                                                        name: 'Alarmpi'
                                                   },
                                                   {
                                                        url: 'http://10.0.0.25:2222/temp',
                                                        name: 'Mediapi'
                                                   },
                                                   {
                                                        url: 'http://10.0.0.25:2222/temp',
                                                        name: 'Camerapi'
                                                   }
                                      ]
                              }
                      },
      

      my node_helper.js:

          getJSON: function(object) {
              var self = this;
              var data = object;
              console.log(data);
              for (var key in data) {
                      console.log(data[key]);
                      request({url: data[key].url, method: 'GET'}, function(error, response, body)
                      {
                              if (!error && response.statusCode == 200)
                              {
                                      data[key].temp=body;
                                      console.log(body);
                                      console.log(data);
                              }
                              else
                              {
                                      console.log(" Error: " + response.statusCode);
                                      data[key].temp = 'offline';
                              }
                      });
              }
              console.log(data);
              self.sendSocketNotification('received_values', data);
          }
      

      just one run creates two outputs and the final content of “data” is missing the temperature values.
      And as shown in the console output, the received temperature value is always added (it looks like temporary) to the last object in the list.

      [ { url: ‘http://10.0.0.83:2222/temp’, name: ‘Alarmpi’ },
      { url: ‘http://10.0.0.25:2222/temp’, name: ‘Mediapi’ },
      { url: ‘http://10.0.0.25:2222/temp’, name: ‘Camerapi’ } ]
      { url: ‘http://10.0.0.83:2222/temp’, name: ‘Alarmpi’ }
      { url: ‘http://10.0.0.25:2222/temp’, name: ‘Mediapi’ }
      { url: ‘http://10.0.0.25:2222/temp’, name: ‘Camerapi’ }
      [ { url: ‘http://10.0.0.83:2222/temp’, name: ‘Alarmpi’ },
      { url: ‘http://10.0.0.25:2222/temp’, name: ‘Mediapi’ },
      { url: ‘http://10.0.0.25:2222/temp’, name: ‘Camerapi’ } ]
      51.0
      [ { url: ‘http://10.0.0.83:2222/temp’, name: ‘Alarmpi’ },
      { url: ‘http://10.0.0.25:2222/temp’, name: ‘Mediapi’ },
      { url: ‘http://10.0.0.25:2222/temp’,
      name: ‘Camerapi’,
      temp: ‘51.0’ } ]
      51.5
      [ { url: ‘http://10.0.0.83:2222/temp’, name: ‘Alarmpi’ },
      { url: ‘http://10.0.0.25:2222/temp’, name: ‘Mediapi’ },
      { url: ‘http://10.0.0.25:2222/temp’,
      name: ‘Camerapi’,
      temp: ‘51.5’ } ]
      59.1
      [ { url: ‘http://10.0.0.83:2222/temp’, name: ‘Alarmpi’ },
      { url: ‘http://10.0.0.25:2222/temp’, name: ‘Mediapi’ },
      { url: ‘http://10.0.0.25:2222/temp’,
      name: ‘Camerapi’,
      temp: ‘59.1’ } ]

      (Mediapi and Camerapi have the same IP in this example)

      thanks for your help :-)

      posted in Troubleshooting
      B
      blaukon
    • 1 / 1