Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. Snille
    • Profile
    • Following 0
    • Followers 4
    • Topics 17
    • Posts 226
    • Best 61
    • Groups 1

    Snille

    @Snille

    Module Developer

    3D-Printing geek with a passion for electronics and software. Work in Windows, prefer Linux, have the Amiga in my heart and FPV in my fingers!

    110
    Reputation
    6176
    Profile views
    226
    Posts
    4
    Followers
    0
    Following
    Joined Last Online
    Website www.snille.net Location Sweden Age 48

    Snille Follow
    Module Developer

    Best posts made by Snille

    • Snilles Magic Mirror Project

      Hi all!
      Here is my Mirror so far…
      0_1501179294803_Snilles-Mirror.jpg
      For more pictures and some building information se here.
      I have added a comment on every picture in the gallery so you know what you are looking at. 🙂

      Update: 2020-01-23: Video of some of the features…

      I still have a lot to do on the software side… 🙂

      Short backstory. I live in the south of Sweden (in a small city called Åstorp) with my wife and daughter.
      I work in Stockholm (the capital of Sweden). The distance between the cities are about 560 kilometer or 248 (US/UK) miles.
      So, to get to work I fly. I do this two days a week (four flights). As you probably know flights
      gets delayed from time to time and when this happens I don’t want my wife to worry (too much)
      and I don’t want to have to text her for every change…

      So, to solve this, I opened a gmail account for the mirror.
      Then I registered an account using the mirrors gmail on the site “Flight Aware”.
      The site can send tracking information mails about (maximum 5) flights (airlines) for free!
      I then use a small python script to login to gmail, parse the mails and present the latest information on a Memo (MMM-Memo).
      This way my Wife only have to glance at the mirror to see if I’m going to be late or not.

      Classes and Modules Information:
      • The modules with the “Default and Everyone” class are showed all the time (when not manually hidden).
      • The modules in the “None” class are only shown manually or with triggered events.
      • Each family member has a personal profile class (Erik, Camilla and Louise).
      • Then I have a set of specific classes for specific “themes”, those are: Jobba (Work), Media, Huset (The House), Växthuset (The Greenhouse) and Väder (Weather).
      • Modules with no class defined but used in other ways is MMM-Remote-Control, MMM-ModuleScheduler and MMM-ProfileSwitcher.
      For a list of all modules see end of this post.

      ModuleScheduler Information:
      Some profiles switches and functions are controlled by the scheduler (MMM-ModuleScheduler).

      Schedules: {
      	Global Schedule: {
      		Show class "Erik" at 05:25 and hide at 05:50 on Mondays and Wednesdays.
      		Show class "Camilla" at 05:51 and hide at 07:15 on Mondays to Fridays.
      		Show class "Jobba" at 07:16 and hide at 16:00 on Tuesdays, Thursdays and Fridays.
      		Show class "Väder" at 07:00 and hide at 18:00 on Saturdays and Sundays.
      		Show class "Media" at 20:30 and hide at 23:00 on all days.
      		
      	},
      	Function Schedule: {
      		Turn the screen on at 05:20 Mondays and Wednesdays.
      		Turn the screen on at 06:20 Tuesdays, Thursdays and Fridays.
      		Turn the screen on at 07:00 Saturdays and Sundays.
      		Turn the screen off at 00:00 every day.
      		Restart the MagicMirror at 04:00 every day.
      	}
      }
      

      ProfileSwitcher Information:
      • In the profile switcher (MMM-ProfileSwitcher) each profile has their own greeting and leave message.
      • The personal profiles and “Media” has a timeout of 3 minutes, after that the mirror goes back to the “default” profile (if triggered via TouchNavigation).
      • The weather has it’s own timeout set to 5 minutes and after that the mirror goes back to the “default” profile as well (if triggered via TouchNavigation).
      • The “Jobba” (Work) profile does not have a time out, because it’s suppose to be able to stay “all day” (When I work from home).

      TouchNavigation Information:

      • The "Text Clock" profile has a picture of an analog clock.
      • The "House" profile has a picture of our house.
      • The "Greenhouse" profile has a picture of our green house.
      • Each family profile has the persons own picture on the button.
      • The "Jobba" (Work) profile has a "gear" picture.
      • The "Media" profile has a "Camera Roll" picture.
      • The "Väder" (Weather) profile has a spinning globe (gif animation) picture.
      

      Alexa Information:
      We are also users of Amazons Alexa (Echo dot). So, I have setup a HA-Bridge (I actually already had this server setup for communication with my Z-Wave system) that the Echo can see.
      The HA-Bridge presents each device as a “Philips HUE Lamp” so you can give it three commands: Turn on, Turn off and Dim.
      Then I have configured the following voice commands (for now) to interact with the mirror.

      "Alexa, Turn on (or off)…

      Mirror Screen" – Turns off or on the screen behind the mirror by using the action=MONITOROFF or action=MONITORON command in the MMM-Remote-Control module.
      Erik’s (or Camilla's, Louise's, Work, Weather, House, Greenhouse or Media) Mirror" – Switches to the spoken profile (if off is said, then to default) Mirror profile by using the action=NOTIFICATION¬ification=CURRENT_PROFILE&payload="profile" in the MMM-Remote-Control module.
      Reload Mirror" – Reloads the MagicMirror by using the action=RESTART command in the MMM-Remote-Control module.
      Mirror" – Shuts down the mirror completely by using the action=SHUTDOWN command in the MMM-Remote-Control module.
      Bird Nest one (or two or three)" – Shows the MotionEye Bird Nest One (or two or three) video stream by triggering the motion command for the MotionEye module.
      Bird Nest Cameras" – Shows all MotionEye Bird Nest Cameras (one, two and three) video streams by triggering the motion command for the MotionEye modules.
      Louise (or Server or Printer) Camera" – Shows the MotionEye stream for spoken camera video stream by triggering the motion command for the MotionEye module.
      All Cameras" – Shows all MotionEye video streams by triggering the motion command for all the MotionEye modules.
      Text Clock" - Shows the big text clock.
      Back Light" - Turns the leds on the back of the frame to faint yellow-white (emulating normal light bulb).
      Thunder" - Turns the leds on the back of the frame to random "flashes".
      Spinning Rainbow" - Turns the leds on the back of the frame to fast running rainow all around the mirror.
      Blue Back Light" - Turns the leds on the back of the frame to faint blue.
      Running Blue" - Turns the leds on the back of the frame to a running blue pixel.
      Spinning Blue" - Turns the leds on the back of the frame to 22 fast running blue pixels.
      Green Back Light" - Turns the leds on the back of the frame to faint green.
      Running Green" - Turns the leds on the back of the frame to a running green pixel.
      Spinning Green" - Turns the leds on the back of the frame to 22 fast running green pixels.
      Pink Back Light" - Turns the leds on the back of the frame to faint pink.
      Running Pink" - Turns the leds on the back of the frame to a running pink pixel.
      Spinning Pink" - Turns the leds on the back of the frame to 22 fast running pink pixels.
      Purple Back Light" - Turns the leds on the back of the frame to faint purple.
      Running Purple" - Turns the leds on the back of the frame to a running purple pixel.
      Spinning Purple" - Turns the leds on the back of the frame to 22 fast running purple pixels.
      Red Back Light" - Turns the leds on the back of the frame to faint red.
      Running Red" - Turns the leds on the back of the frame to a running red pixel.
      Spinning Red" - Turns the leds on the back of the frame to 22 fast running red pixels.
      White Back Light" - Turns the leds on the back of the frame to faint white.
      Running White" - Turns the leds on the back of the frame to a running white pixel.
      Spinning White" - Turns the leds on the back of the frame to 22 fast running white pixels.
      Yellow Back Light" - Turns the leds on the back of the frame to faint yellow.
      Running Yellow" - Turns the leds on the back of the frame to a running yellow pixel.
      Spinning Yellow" - Turns the leds on the back of the frame to 22 fast running yellow pixels.
      

      Modulebar Information (left to right):

      • Clock
        Symbol: clock-o
      • MMM-Suncalc
        Symbol: sun-o
      • Calendar (Erik's)
        Symbol: calendar-check-o
      • Calendar (Louise)
        Symbol: calendar-o
      • Calendar_Monthly
        Symbol: calendar
      • MMM-Globe
        Symbol: globe
      • Currentweather
        Symbol: cloud
      • Weatherforecast
        Symbol: compass
      • MMM-WunderGround (Weather at Arlanda)
        Symbol: plane
      • MMM-SystemStats
        Symbol: microchip
      • MMM-cryptocurrency
        Symbol: btc
      • MMM-Sonos
        Symbol: music
      • MMM-MotionEye (3D-Printer Camera)
        Symbol: codepen
      • MMM-MotionEye (Server Camera)
        Symbol: cube
      • MMM-MotionEye (Louise Camera)
        Symbol: child
      • MMM-MotionEye (Bird Nest Camera One)
        Symbol: twitter
      • MMM-MotionEye (Bird Nest Camera Two)
        Symbol: twitter
      • MMM-MotionEye (Bird Nest Camera Three)
        Symbol: twitter
      • MMM-Chart (togels all 4 charts)
        Symbol: area-chart
      • iFrame (MMM-Remote-Control)
        Symbol: sliders
      • iFrame (SONOS Web Controler)
        Symbol: My own picture.
      

      Here are the defined classes and the modules they trigger.

      Profile classes: {
      	Eriks Modules: {
      		MMM-Profilepicture - Personal background picture.
      		Clock - The time (Default module).
      		Updatenotification - Information about MM updates (Default module).
      		MMM-SystemStats - Information about the MM-System (Temp, load and free RAM).
      		MMM-cryptocurrency - Current bitcoin price.
      		MMM-Suncalc - Shows actual day light time.
      		Calendar_Monthly - A visual view of the current month’s week layout (and dates).
      		Calendar - Erik’s Google calendar (Currently showing: Personal calendar, Swedish holidays and Week numbers).
      		MMM-newsfeedtouch - News from http://feber.se
      		MMM-newsfeedtouch - News form http://www.hd.se, "http://www.sydsvenskan.se and http://feeds.bbci.co.uk/news/world/europe.
      		Compliments - Personal compliments (from specified json file).
      		Currentweather - Local weather information at Mirrors location (Default module).
      		Weatherforecast - Local weather forecast at Mirrors location (Default module).
      		MMM-WunderGround - Weather information about current and forecast at ARN (Arlanda Airport, Stockholm, Sweden).
      	}, 
      	Camillas Modules: {
      		MMM-Profilepicture - Personal background picture.
      		Clock - The time (Default module).
      		MMM-Suncalc - Shows actual day light time.
      		Calendar_Monthly - A visual view of the current month’s week layout (and dates).
      		MMM-newsfeedtouch - News form http://www.hd.se, "http://www.sydsvenskan.se
      		Compliments - Personal compliments (from specified json file).
      		Currentweather - Local weather information at Mirrors location (Default module).
      		Weatherforecast - Local weather forecast at Mirrors location (Default module).
      		Compliments - Personal compliments (from file).
      	}, 
      	Louises Modules: {
      		MMM-Profilepicture - Personal background picture.
      		Clock - The time (Default module).
      		MMM-Suncalc - Shows actual day light time.
      		Calendar_Monthly - A visual view of the current month’s week layout (and dates).
      		Calendar - Louise Google calendar (Currently showing: Personal calendar, Swedish holidays and Week numbers).
      		Compliments - Personal compliments (from specified json file).
      		Currentweather - Local weather information at Mirrors location (Default module).
      		Weatherforecast - Local weather forecast at Mirrors location (Default module).
      		Compliments - Personal compliments (from file).
      
      	},
      	Jobbas Modules: {
      		MMM-Profilepicture - Personal background picture.
      		Updatenotification - Information about MM updates (Default module).
      		Clock - The time (Default module).
      		MMM-SystemStats - Information about the MM-System (Temp, load and free RAM).
      		MMM-cryptocurrency - Current bitcoin price.
      		MMM-Suncalc - Shows actual day light time.
      		Calendar_Monthly - A visual view of the current month’s week layout (and dates).
      		Calendar - Eriks Google calendar (Currently showing: Personal calendar, Swedish holidays and Week numbers).
      		Currentweather - Local weather information at Mirrors location (Default module).
      		Weatherforecast - Local weather forecast at Mirrors location (Default module).
      		MMM-WunderGround - Weather information about current and forecast at ARN (Arlanda Airport, Stockholm, Sweden).
      	},
      	Medias Modules: {
      		MMM-Profilepicture - Personal background picture.
      		MMM-plex-recently-added - Latest TV-Episodes added to my Plex Server.
      		MMM-plex-recently-added - Latest Movies added to my Plex Server.
      		MMM-newsfeedtouch - Movie news from http://www.fandango.com
      	},
      	Väders Modules: {
      		MMM-Profilepicture - Personal background picture.
      		MMM-Suncalc - Shows actual day light time.
      		MMM-SystemStats - Information about the MM-System (Temp, load and free RAM).
      		Calendar_Monthly - A visual view of the current month’s week layout (and dates).
      		MMM-newsfeedtouch - Weather news from https://www.smhi.se (Swedish weather service).
      		Currentweather - Local weather information at Mirrors location (Default module).
      		Weatherforecast - Local weather forecast at Mirrors location (Default module).
      		MMM-WunderGround - Weather information about current and forecast at ARN (Arlanda Airport, Stockholm, Sweden).
      		MMM-Globe - Full disc (Europe).
      	},
      	Husets Modules: {
      		MMM-Profilepicture - Personal background picture.
      		Clock - The time (Default module).
      		MMM-Suncalc - Shows actual day light time.
      		MMM-SystemStats - Information about the MM-System (Temp, load and free RAM).
      		MMM-Chart * 4 - Temp and Humidity for: Inside, outside, crawlspace and attic.
      	},
      	Växthusets Modules: {
      		MMM-Profilepicture - Personal background picture.
      		Clock - The time (Default module).
      		MMM-Suncalc - Shows actual day light time.
      		MMM-SystemStats - Information about the MM-System (Temp, load and free RAM)
      		Currentweather - Local weather information at Mirrors location (Default module).
      		Weatherforecast - Local weather forecast at Mirrors location (Default module).
      		MMM-Chart - Temp and Humidity for outside.
      	},
      	Default and Everyones Modules: {
      		Alert - Alert to everyone (Default module).
      		MMM-Memo - Displays memos (Used for displaying temporary information in my case).
      		MMM-TouchNavigation - Profile switching buttons.
      		MMM-Modulebar - Bar with buttons for toggling (show/hide) other modules.
      		MM-Hide-All - Temporarly hide everything on the mirror screen.
      	},	
      	Nones Modules: {
      		MMM-Sonos - Displays what's playing in my SONOS system when something is playing (or using MMM-Modulebar).
      		MMM-MotionEye - Displaying the Prusa i3 MK2 (3D-Printer) camera when in action (or using MMM-Modulebar).
      		MMM-MotionEye - Displaying our daughter’s room when someone is moving in there (or using MMM-Modulebar).
      		MMM-MotionEye - Displaying my Server camera (overview of the server, firewall and UPS) showed when movement is registered (or using MMM-Modulebar).
      		MMM-MotionEye - Displaying Bird nest 1, showing if there is movement in the nest (or using MMM-Modulebar).
      		MMM-MotionEye - Displaying Bird nest 2, showing if there is movement in the nest (or using MMM-Modulebar).
      		MMM-MotionEye - Displaying Bird nest 3, showing if there is movement in the nest (or using MMM-Modulebar).
      		iFrame - Displaying MMM-Remote-Control when showed (using MMM-Modulebar).
      		iFrame - Displaying SONOS-Web-Controler-Interface (for controlling my SONOS system) when showed (using MMM-Modulebar).
      	}
      }
      

      Module list:

      Full Module List and positions: {
      	• MMM-Remote-Control
      	  Position: None
      	• MMM-ModuleScheduler
      	  Position: None
      	• MMM-ProfileSwitcher
      	  Position: None
      	• MMM-Profilepicture * 7
      	  Position: fullscreen_below
      	• Alert
      	  Position: None
      	• Updatenotification
      	  Position: top_bar
      	• MMM-Memo
      	  Position: top_center
      	• Clock
      	  Position: top_left
      	• MMM-Suncalc
      	  Position: top_left
      	• MMM-SystemStats
      	  Position: top_left
      	• MMM-cryptocurrency
      	  Position: top_left
      	• Calendar_monthly
      	  Position: top_left
      	• Calendar * 2
      	  Position: top_left
      	• MMM-Sonos
      	  Position: top_center
      	• MMM-plex-recently-added
      	  Position: middle_center
      	• MMM-plex-recently-added
      	  Position: middle_center
      	  Position: top_left
      	• MMM-TouchNavigation
      	  Position: bottom_bar
      	• MMM-newsfeedtouch * 4
      	  Position: middle_center and lower_third
      	• Compliments * 3
      	  Position: lower_third
      	• MMM-JSONStatusChecker * 2
      	  Position: bottom_right
      	• Currentweather
      	  Position: top_right
      	• Weatherforecast
      	  Position: top_right
      	• MMM-WunderGround
      	  Position: top_right
      	• MM-Hide-All
      	  Position: bottom_left
      	• MMM-MyCommute
      	  Position: bottom_left
      	• MMM-MotionEye * 6
      	  Position: bottom_left, bottom_center and bottom_right
      	• MMM-Chart * 4
      	  Position: top_center
      	• MMM-TextClock
      	  Position: middle_center
      	• iFrame * 2 
      	  Position: lower_third
      	• MMM-Globe
      	  Position: middle_center
      	• MMM-Modulebar
      	  Position: bottom_bar
      }
      

      Here you have my conf and custom.css files.

      I don’t know if you noticed but the frame around the mirror is “changeable”. I thought if I can display different things on the screen, I should be able to change the physical appearance of the mirror as well without having to build a completely new mirror. So, the front frame can easily be removed by just pulling out the bottom part and lifting it up. I have made two different front frames (as you have seen in the pictures). But I’ll probably do another one in time. 🙂

      Let me know if you want to know anything more. 🙂
      Thank you all for helping out and being awesome!

      posted in Show your Mirror
      Snille
      Snille
    • MMM-Chart - View your graphs on your Mirror

      Description:

      This Module adds graphs to your MagicMirror 2.1 using your JSON source(s) from a URL.
      It’s built upon the chartjs “ecosystem”.

      I’m currently using small PHP scripts to pull information from my own “house-database” and then let PHP create the JSON string form the data. 🙂 You have to provide your own “data-source” of course. 🙂

      There are A LOT of configuration options in this module. I will update the README on git later on. But if you want to know more, just read the MMM-Chart.js. I have tried to document it fairly well.

      The source can be either a table of values for like this (updating the whole graph on every update):

       [["2017-04-21 15:58:00",8.3,95.5],["2017-04-21 14:55:00",9.3,90.5],["2017-04-21 12:56:00",10.7,87.7],["2017-04-21 11:53:00",10.5,87.7],["2017-04-21 11:01:00",10.6,88.8]]...
      

      That will give something like this:

      Screenshot:

      Two Line Graph
      Or you can use a “real time” source looking something like this (adding values to the graph on every update):

      [["2017-04-21 15:58:00",48.3,95.5,31]]
      

      Screenshot:

      Both together looks like this (video):
      Two Line Graph

      Download:


      Version 1.0

      • Initial release.

      This is a work in progress…
      OBS: I have not yet tested this module on my RPI!!
      Please come with feedback/PR:s Let me know how it works.

      The idea was triggered from the “dynchart module” by Chris van Marl. Thank you!

      posted in Utilities
      Snille
      Snille
    • MMM-Modulebar - A module that adds touch buttons for showing/hiding other modules.

      Description:

      This Module adds a touch menu to hide / show other the defined (in the config.js) modules.

      Screenshots:

      Module with symbols only in row mode:
      symbols row mode
      Module with symbols only in column mode:
      symbols column mode
      Module with symbols and text in column mode:
      symbols and text in column mode
      Module with symbols and text in row mode:
      symbols and text in row mode
      This is my own mirrors view (Bottom Bar) using some addition in the custom.css see below.
      my special

      Download:

      Custom-CSS

      Here is my CSS settings for the module that I have added to my custom.css to give it the extra special look. 🙂

      /* MMM-Modulebar ------------------------------------*/
      .modulebar-button {
        margin: 1px;
        padding: 1px 1px;
        border: 2px solid #fff; 
        background-color: #fff;
        color: #000;
        border-radius: 0px;
        border-radius: 50%;
        width: 60px;
        height: 60px;
      }
      .modulebar-picture {
        margin: 0px 0px;
        border-radius: 50%;
      }
      .modulebar-menu {
        align-items: flex-start;
      }
      /*****************************************************/
      

      Version 0.2

      • Had to change the button array format a bit. Make sure to update your config to the new “standard”.
        The reason for the change where to be able control each module separately even if it is the same module multiple times. 🙂

      Version 0.1

      • Initial release.
      posted in Utilities
      Snille
      Snille
    • MMM-HomeAssistant-Sensors (Development) - Show your HA Sensors on your Mirror

      I could not find a “good enough” Home Assistant Module for the Mirror, so I forked and developed a bit on the one I thought worked the best.

      Description:

      Adds the defined Home Assistant Sensors to your Magic Mirror.

      Screenshots:

      Simplest possible:
      simple
      Different pictures depending on values from the sensors (with some modified CSS):
      simple+css
      Different icons depending on values from the sensors:
      simple+icons

      And here is my personal advanced “look”… 🙂
      Advanced

      Download:

      posted in Utilities
      Snille
      Snille
    • RE: stronger Raspberry Pi 3 Alternatives

      I just found this one: https://www.kickstarter.com/projects/librecomputer/libre-computer-board-next-gen-4k-sbc-dev-board-for/description
      It may be an alternative. 🙂

      posted in Hardware
      Snille
      Snille
    • Plexpy Module...

      Hi all!
      I know there is a Plex module out there. But it’s a bit limited.
      I’m currently using Plexpy (and frankly anyone who runs a Plex-server and loves statistics should).
      There a very nice API for plexpy
      All in nice JSON format…
      So, If someone feels up to it please, give it a try. 🙂

      Thank you.

      posted in Requests
      Snille
      Snille
    • RE: Snilles Magic Mirror Project

      @Mykle1 Thank you! 🙂 And I have not yet published all the drawings and files for this this sculpture. 🙂

      posted in Show your Mirror
      Snille
      Snille
    • MagigMirror on Airtame!

      Hi all!
      Just wanted you all to know that you CAN actually use an Airtame to display the mirror!
      If you setup a “serveronly” instance of MM and then point your Airtame’s “Homescreen Backround” to a website and enter the URL to your MM (Server) there. It shows up!

      Of course you cant have any “touch” functionality and other “intelligence” on the Airtame. But if you just want to display stuff without interaction directly on the device it works great! You can also still use the “MMM-Remote” module to control what’s displayed on the device of course. Or why not MMM-Scheduler… 🙂

      I have tried this on an Airtime running with firmware version 3.0.0-b6.

      Enjoy!

      posted in Hardware
      Snille
      Snille
    • RE: Snilles Magic Mirror Project

      @ceddirr I saw your questions about the project… Answers below. 🙂

      First, I forgot to say thank you for your kind words!

      Question: “Which order is it? At first the IR frame, then the one way mirror, and finally the screen, is it correct?”

      Answer: Correct, from the “front” the IR-Frame is first, placed directly on to the mirror and behind the mirror sits the screen. 🙂

      Question: “I can see that the custom css of the MMM-Memo is already written in css file from the module’s folder. But, how do you manage to use it, and have this look with your memos? Mine are just white and simple… Thank you =)”

      Answer: Well, I’m actually not doing so much in the CSS file. The only thing I set in the custom.css is the size of the Memo. The rest is “built in”.

      This is the CSS part (in my custom.css file):

      /* MMM-Memo -----------------------------------------*/
      .MMM-Memo .small {
      	font-family: "Roboto Condensed", sans-serif;
      }
      .note {
        width: 500px;
        height: 200px;
      }
      /*****************************************************/
      

      And this is in my config.js:

      {
      	module: "MMM-Memo",
      	position: "upper_third",
      	classes: "default everyone",
      	config: {
      		memoTitle: "Flyginformation",
      		memoDisplayIfEmpty: false,
      		memoRotation: -4,
      		format: "YYYY-MM-DD - HH:mm",
      		memoWidth: 500,
      		memoDisplayHeader: true,
      		memoDisplayDuration: true,
      		memoDisplayId: true,
      		memoColorBackground: "LightGoldenrod",
      		memoDisplayNotification: true,
      	}
      },
      

      You can see all the options for the config on the MMM-Memo’s git.
      There are lot’s and lot’s of options for colors and themes. 🙂

      posted in Show your Mirror
      Snille
      Snille
    • Multi module install script

      Just to help you other people out there doing the same I’m doing, I made this little script to clone all the modules I’m using to a “new” mirror without any fuzz.
      First change the “Moddir” path to the correct one for you.

      array in script (I have all of mine in there, but just change or comment them out. 🙂

      Make the script executable (chmod +x installmodules.sh)
      And execute it.

      Each module will then be cloned and “npm installed” automatically.

      When it’s done, just copy the config.js and the custom.css files in place from your “other” mirror.
      Restart the “new” mirror (pm2 restart mm). Done! 🙂

      Here is the “installmodules.sh” script:

      #!/bin/bash
      
      ## ----------------------------------------------------------------------------
      ## Snilles automatic module clone and install script for MM2.
      ## ----------------------------------------------------------------------------
      
      ## Don't forget to add your public SSH key to your GIT profile!
      ## If you don't, nothing will be cloned!
      
      ## If you don't have an SSH key. This is how you get one.
      ## Generate SSH key(s).
      # cd ~
      # ssh-keygen -t rsa
      
      ## Press: Enter, Enter, Enter...
      
      ## See the public Key...
      # cat ~/.ssh/id_rsa.pub
      
      ## Copy the SSH public key and add it to you GIT SSH keys.
      
      ## ----------------------------------------------------------------------------
      ## Config below.
      ## ----------------------------------------------------------------------------
      
      ## The module install directory.
      Moddir='/home/pi/MagicMirror/modules'
      #Moddir='/home/linaro/MagicMirror/modules'
      #Moddir='/var/www/html/magicmirror/mm/modules'
      #Moddir='/var/www/html/magicmirror/m/modules'
      
      ## Package file
      Packfile='package.json'
      
      ## All the modules repos from Git.
      Repos[1]='git@github.com:KirAsh4/calendar_monthly.git'
      #Repos[2]='git@github.com:desertblade/iFrame.git'
      Repos[3]='git@github.com:masters1222/mm-hide-all.git'
      #Repos[4]='git@github.com:valmassoi/MMM-bitcoin.git'
      #Repos[5]='git@github.com:barnabycolby/MMM-Carousel.git'
      Repos[6]='git@github.com:Snille/MMM-Chart.git'
      Repos[7]='git@github.com:matteodanelli/MMM-cryptocurrency.git'
      #Repos[8]='git@github.com:cowboysdude/MMM-DailyQuote.git'
      #Repos[9]='git@github.com:brobergp/MMM-doomsDay.git'
      Repos[10]='git@github.com:LukeSkywalker92/MMM-Globe.git'
      Repos[11]='git@github.com:shbatm/MMM-JSONStatusChecker.git'
      Repos[12]='git@github.com:schnibel/MMM-Memo.git'
      Repos[13]='git@github.com:Snille/MMM-Modulebar.git'
      Repos[14]='git@github.com:Snille/MMM-ModuleScheduler.git'
      Repos[15]='git@github.com:CatoAntonsen/MMM-MotionEye.git'
      #Repos[16]='git@github.com:Tueti/MMM-MovieListings.git'
      #Repos[17]='git@github.com:Snille/MMM-MovieListings.git'
      Repos[18]='git@github.com:jclarke0000/MMM-MyCommute.git'
      #Repos[19]='git@github.com:ianperrin/MMM-NetworkScanner.git'
      Repos[20]='git@github.com:brobergp/MMM-newsfeedtouch.git'
      #Repos[21]='git@github.com/shbatm/MMM-OnScreenMenu.git'
      #Repos[22]='git@github.com:Snille/MMM-PiLights.git'
      #Repos[23]='git@github.com:Snille/MMM-PlexNowPlaying.git'
      Repos[24]='git@github.com:Gyran/MMM-plex-recently-added.git'
      Repos[25]='git@github.com:Snille/MMM-Profilepicture.git'
      Repos[26]='git@github.com:tosti007/MMM-ProfileSwitcher.git'
      Repos[27]='git@github.com:Jopyth/MMM-Remote-Control.git'
      Repos[28]='git@github.com:Snille/MMM-Sonos.git'
      Repos[29]='git@github.com:janbanan007/mmm-suncalc.git'
      Repos[30]='git@github.com:BenRoe/MMM-SystemStats.git'
      Repos[31]='git@github.com:brobergp/MMM-TextClock.git'
      Repos[32]='git@github.com:tosti007/MMM-TouchNavigation.git'
      Repos[33]='git@github.com/tosti007/MMM-TouchNotifications.git'
      Repos[34]='git@github.com:RedNax67/MMM-WunderGround.git'
      Repos[35]='git@github.com/jclarke0000/MMM-MyCalendar.git'
      Repos[36]='git@github.com/TheBogueRat/MMM-iFrameReload.git'
      
      ## ----------------------------------------------------------------------------
      
      ## Start!
      cd "$Moddir"
      for t in "${Repos[@]}"
      	do
      		git clone $t
      		#echo "Cloning $t"
      done
      
      echo "Cloning Done."
      echo "Now npm installing..."
      
      for f in *;
      	do
      		if [[ -d $f ]]; then
      			installmodule=$(basename $f)
      			[[ $installmodule =~ ^(default|node_modules)$ ]] && continue
      			cd "$installmodule"
      			if [ -e "$Packfile" ]; then
      #				npm install --production
      				npm install
      			fi
      			cd ".."
      		fi
      	done
      
      echo "All done."
      echo "Now you have to add all the modules to your config (or copy your old one) and don't forget your custom.css file."
      

      Enjoy! 🙂

      posted in Troubleshooting
      Snille
      Snille

    Latest posts made by Snille

    • RE: Touchscreen Mirror

      Hi @Schmaniel, yes. It works. That’s the way I have my Mirror setup. 🙂 More info here…

      posted in Hardware
      Snille
      Snille
    • RE: What is your backup and restore method?

      @swvalenti Ok… 🙂
      You need a “server” (a location where you can “wget” files from for this to work.
      I have a specific backup directory on my own webserver, but you can use any server as long as you can wget from it.

      Then the “Toinstall” part is just me having more the one config files in the backup dir.
      Basically I have 2 different install possibility’s “house” and “NUC”.
      So my backup config files are named “config-house.js” and config-NUC.js".
      I enable the one I want to restore.

      “ConfigName” is the actual name of the config file when it’s copied to it’s destination. This is probably always going to be “config.js” for the MM2. 🙂

      “User” is in what directory the “MagicMirror” is located (when you cloned it).

      “Moddir” is where your modules will be installed (this is probably always going to the same for MM2 as well).

      “DownloadFrom” is where to download your backed up files from.

      Then it’s just two "array"s with the files and folders with the backup files and where to copy them when restoring.
      Files[1] = “file1-to-copy”
      Dirs[1] = “Where/to/copy/file-1”
      And so on…

      Files[3] Is the script I use to set the screen to sleep and wake it up (Using MMM-Remote-Control).
      Files[4] Is the script I use to automatically update the mirror and the modules (manually).

      Files[7-9] It’s the “compliment-files” (used in the compliments module).

      And Files[11] Is the MagicMirror start script I use (for starting the mirror with pm2).

      “Packfile” Is the name of the file to look for when installing moduls. If it’s there, the npm install will be executed when installing the module.

      Last but not least it’s all the git-repos for the modules I use in my mirror.
      These will be cloned in the “Moddir” and installed (with npm if “Packfile” exists").

      That’s about it. 🙂

      Let me know if you have any more questions. 🙂

      posted in Troubleshooting
      Snille
      Snille
    • RE: What is your backup and restore method?

      Hi there! Manual “backup” of the config, CSS and compliments files when I change them (just copying it to my server). Then when reinstalling, I’m using a script (that I can wget down to the new install) containing all modules to reinstall and it copy back the config, CSS and compliments from the backup location… 🙂

      See script below…

      #!/bin/bash
      
      ## ----------------------------------------------------------------------------
      ## Snilles automatic module clone and install script for MM2.
      ## ----------------------------------------------------------------------------
      
      ## Don't forget to add your public SSH key to your GIT profile!
      ## If you don't, nothing will be cloned!
      
      ## If you don't have an SSH key. This is how you get one.
      ## Generate SSH key(s).
      # cd ~
      # ssh-keygen -t rsa
      
      ## Press: Enter, Enter, Enter...
      
      ## See the public Key...
      # cat /home/pi/.ssh/id_rsa.pub
      
      ## Copy the SSH public key and add it to your GIT SSH keys on GitHUB.
      
      ## ----------------------------------------------------------------------------
      ## Config below.
      ## ----------------------------------------------------------------------------
      
      # System to install (what config to use).
      ## Housesystems Server Install
      Toinstall='house'
      ## NUC install (On the actual Mirror, this is not used anymore)
      #Toinstall='NUC'
      
      # Real Name of the config file.
      ConfigName='config.js'
      
      ## The Install Folder.
      ## Local install.
      ## On NUC
      #User='/home/snille'
      ## On Raspberry Pi
      #User='/home/pi'
      ## Install om Homesystems Server.
      User='/var/www/html/magicmirror'
      
      ## The module install directory.
      Moddir=$User'/MagicMirror/modules'
      
      ## Configuration and other files backup location (from previous installation).
      DownloadFrom='https://yoursite.com/mmbackup/'
      
      ## Configuration file. 
      Files[1]='config-'$Toinstall'.js'
      ## Where to put the Configuration file.
      Dirs[1]=$User'/MagicMirror/config/'
      
      ## Custom CSS file.
      Files[2]='custom.css'
      ## Where to put the CSS file.
      Dirs[2]=$User'/MagicMirror/css/'
      
      ## Custom screen on/off scripts.
      Files[3]='screen.sh'
      ## Where to put the screen script files.
      Dirs[3]=$User'/'
      
      ## Not used moved to "screen.sh"
      #Files[4]='turnoffscreen.sh'
      #Dirs[4]=$User'/'
      #Files[5]='turnonscreen.sh'
      #Dirs[5]=$User'/'
      
      ## Custom Magic Mirror update script.
      Files[6]='update.sh'
      ## Where to put the update script file.
      Dirs[6]=$User'/'
      
      ## Custom compliment files.
      Files[7]='compliments-Snille.json'
      ## Where to put the compliment file.
      Dirs[7]=$User'/MagicMirror/modules/default/compliments/'
      
      Files[8]='compliments-Camilla.json'
      Dirs[8]=$User'/MagicMirror/modules/default/compliments/'
      
      Files[9]='compliments-Louise.json'
      Dirs[9]=$User'/MagicMirror/modules/default/compliments/'
      
      #Files[10]='compliments-Martin.json'
      #Dirs[10]=$User'/MagicMirror/modules/default/compliments/'
      
      # Start file for the MagigMirror
      Files[11]='MacigMirror.sh'
      Dirs[11]=$User'/'
      
      ## Package file
      Packfile='package.json'
      
      ## All the modules repos from Git.
      Repos[1]='git@github.com:Snille/MMM-HideAll.git'
      Repos[2]='git@github.com:matteodanelli/MMM-cryptocurrency.git'
      Repos[3]='git@github.com:basknol/MMM-Globe.git'
      Repos[4]='git@github.com:Snille/MMM-Modulebar.git'
      Repos[5]='git@github.com:Snille/MMM-ModuleScheduler.git'
      Repos[6]='git@github.com:CatoAntonsen/MMM-MotionEye.git'
      Repos[7]='git@github.com:Gyran/MMM-plex-recently-added.git'
      Repos[8]='git@github.com:Snille/MMM-Profilepicture.git'
      Repos[9]='git@github.com:tosti007/MMM-ProfileSwitcher.git'
      Repos[10]='git@github.com:Jopyth/MMM-Remote-Control.git'
      Repos[11]='git@github.com:Snille/MMM-Sonos.git'
      Repos[12]='git@github.com:brobergp/MMM-TextClock.git'
      Repos[13]='git@github.com:tosti007/MMM-TouchNavigation.git'
      Repos[14]='git@github.com:bugsounet/MMM-Tools.git'
      Repos[15]='git@github.com:timdows/MMM-JsonTable.git'
      Repos[16]='git@github.com:derekn/MMM-TautulliActivity.git'
      #Repos[17]='git@github.com:Snille/MMM-IFTTT.git' # For development of the IFTTT module, the one below is used.
      Repos[18]='git@github.com:jc21/MMM-IFTTT.git'
      Repos[19]='git@github.com:NolanKingdon/MMM-MoonPhase.git'
      Repos[20]='git@github.com:Snille/MMM-homeassistant-sensors.git'
      #Repos[21]='git@github.com:schnibel/MMM-Memo.git' # Replaced by module below, I changed some things.
      Repos[22]='git@github.com:Snille/MMM-Memo.git'
      Repos[23]='git@github.com:almerica/MMM-ImageFit.git'
      Repos[24]='git@github.com:Snille/MMM-Videoplayer.git'
      Repos[25]='git@github.com:MartinGris/MMM-GoogleMaps-Tracking.git'
      
      ## ----------------------------------------------------------------------------
      
      ## Start!
      cd "$Moddir"
      for t in "${Repos[@]}"
      	do
      		git clone $t
      		#echo "Cloning $t"
      done
      
      echo "Cloning Done."
      echo "Now npm installing..."
      
      for f in *;
      	do
      		if [[ -d $f ]]; then
      			installmodule=$(basename $f)
      			[[ $installmodule =~ ^(default|node_modules)$ ]] && continue
      			cd "$installmodule"
      			if [ -e "$Packfile" ]; then
      #				npm install --production
      				npm install
      			fi
      			cd ".."
      		fi
      	done
      
      echo "Download and install done."
      echo "Now restoring backup files from $DownloadFrom."
      
      ## Counts through the array of files (and uses the dirs to know where to put them).
      for ((i=1; i<=${#Files[@]}; i++)); do
      	if [[ $(wget $DownloadFrom${Files[i]} -O-) ]] 2>/dev/null
      	then
      		wget $DownloadFrom${Files[i]}
      		printf 'Moving %s to %s...\n\n' "${Files[i]}" "${Dirs[i]}"
      		mv ${Files[i]} ${Dirs[i]}
      	fi
      done
      
      ## Rename the config.
      mv ${Dirs[1]}${Files[1]} ${Dirs[1]}$ConfigName
      
      echo "Installation and restore done!"
      echo "You can now start your Magic Mirror."
      
      exit
      
      
      posted in Troubleshooting
      Snille
      Snille
    • RE: New Bathroom-Mirror

      @kwaeksler Ah, ok, so controlled from the RPi I/O pins? 🙂 I’m currently trying to control my leds from the serial-port (because I’m not running the mirror on a RPi), but I have not yet found a MM-module that supports talking to the serial-port (in the correct way). For the moment I’m have a Arduino Nano that CAN control the leds, but I want to send commands (via USB-Serial) to the Nano to do stuff with the leds… 🙂

      posted in Show your Mirror
      Snille
      Snille
    • RE: New Bathroom-Mirror

      @kwaeksler Looking good! How are you controlling the LEDs?

      posted in Show your Mirror
      Snille
      Snille
    • RE: MagicMirror 5"

      @lucas781 Nice! Great idea as well!

      posted in Show your Mirror
      Snille
      Snille
    • RE: My Smart Mirror

      @boybay7 Nice frame! Looking good!

      posted in Show your Mirror
      Snille
      Snille
    • RE: MMM-ModuleScheduler Loading Wrong Date

      @pattanner92 I noticed the same with the scheduler, normally cron has MAR as 3 but for some reson the scheduler does not. The month are from 0-11. 🙂

      posted in Troubleshooting
      Snille
      Snille
    • RE: MMM-Videoplayer - Play video files on your mirror

      @elitecybernet Hi! Yes, default is “no sound”, because if you set it to yes, it will not “autoplay”. But you can just change the option: muted to false.

      {
        module: 'MMM-Videoplayer',
        position: 'middle_center',
        config: {
          muted: false,
        }
      },
      

      Like so… 🙂

      posted in Entertainment
      Snille
      Snille
    • RE: Module position

      @George Oh, no, not really, but I’m sure it’s possible with CSS, so it would be in your “custom.css” file you should do what’s needed…
      Maybe some one else knows? 🙂

      posted in Forum
      Snille
      Snille