• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Snilles Magic Mirror Project

Scheduled Pinned Locked Moved Show your Mirror
44 Posts 13 Posters 53.9k Views 19 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    Snille Module Developer @cowboysdude
    last edited by Jul 27, 2017, 9:18 PM

    @cowboysdude Thank you! :)

    If you cant find it, make it and share it!
    Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

    M 1 Reply Last reply Jul 27, 2017, 9:52 PM Reply Quote 1
    • M Offline
      Mykle1 Project Sponsor Module Developer @Snille
      last edited by Jul 27, 2017, 9:52 PM

      @Snille

      The word BRILLIANT comes to mind.

      Good stuff, Snille!

      Create a working config
      How to add modules

      S 1 Reply Last reply Jul 27, 2017, 9:54 PM Reply Quote 2
      • S Offline
        Snille Module Developer @Mykle1
        last edited by Jul 27, 2017, 9:54 PM

        @Mykle1 Thank you… :)

        If you cant find it, make it and share it!
        Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

        1 Reply Last reply Reply Quote 0
        • G Offline
          grillchips
          last edited by Aug 8, 2017, 12:37 PM

          Really nice work! I would like to know some more about your hardware, especially mirror type (seller, price etc) and what type of touch panel you’re using.
          Still in the planning stage of my build but since I’m doing all the software myself I still have some time to sort everything out. :D

          S 1 Reply Last reply Aug 8, 2017, 2:12 PM Reply Quote 0
          • S Offline
            Snille Module Developer @grillchips
            last edited by Snille Aug 8, 2017, 2:13 PM Aug 8, 2017, 2:12 PM

            @grillchips Hi! Thank you. I’m using a Pilkington MirrorView mirror. It’s a 50/50 mirror (bought it through my work) and it work well when it’s normal lighting I think. If I open the door in the hallway and the sun shines in to the hallway it’s hard to see what’s on the screen.
            Then I’m (for now) using a Raspberry Pi 3 and a IR Multitouch Overlay Frame to give the mirror “touch” capability. There where a bit of trickery to the setup of the IR-Frame, you can find the information in this thread.
            Then I’m using a LPD8806 LED Strip to light up behind the frame. Here I’m for the moment using PixelWeb with Bibliopixel 2.x as a back end. It’s not fully integrated yet with the mirror software. I built a small sh script that sends a json string to PixelWebs (in official) API. :)

            Hehe, As you can imagine, it’s still a long way to go on the software part, you know how it is. There is always something that can get a little better… :)

            I think that’s the important bits. Let me know if you want to know more. :)

            If you cant find it, make it and share it!
            Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

            1 Reply Last reply Reply Quote 0
            • C Offline
              cowboysdude Module Developer
              last edited by Aug 8, 2017, 8:25 PM

              Any chance we can get some close ups? :)

              S 1 Reply Last reply Aug 8, 2017, 9:08 PM Reply Quote 0
              • S Offline
                Snille Module Developer @cowboysdude
                last edited by Aug 8, 2017, 9:08 PM

                @cowboysdude Sure, what would you like to see? In the google gallery (the link above) there are lots of “close ups” but is it something in particular you are interested in?

                If you cant find it, make it and share it!
                Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                C 1 Reply Last reply Aug 8, 2017, 11:06 PM Reply Quote 0
                • C Offline
                  cowboysdude Module Developer @Snille
                  last edited by Aug 8, 2017, 11:06 PM

                  @Snille Sorry didn’t see the link!! That looks awesome. The bottom is a touch menu If I"m thinking correctly?

                  Please do share how you have the LED’s working for backlight… I’m very interested in that! :)

                  S 1 Reply Last reply Aug 9, 2017, 6:58 AM Reply Quote 0
                  • S Offline
                    Snille Module Developer @cowboysdude
                    last edited by Snille Aug 9, 2017, 7:08 AM Aug 9, 2017, 6:58 AM

                    @cowboysdude Thank you!! :) The LEDs you say. :) Ok, for the moment, the mirror is not “aware” of the leds. This is something I’m planing to implement. But as it works now I’m using PixelWeb with Bibliopixel 2.x as a back end. Then I’m using the below sh script to trigger different (predefined so far) animations.

                    #!/bin/bash
                    #-----------------------------------------------------------------------------
                    # 
                    # Snilles MagicMirror Led Conrol Script.
                    # Use in conjunction with PixelWEB.
                    #
                    #-----------------------------------------------------------------------------
                    # Connfigure here!
                    # URL to PixelWEB API On the MM.
                    apiurl="http://x.x.x.x:8081/api";
                    # Default program if no argument is set.
                    defprog="back";
                    # Default red amount if non is set.
                    defred="45";
                    # Default green amount if non is set.
                    defgreen="30";
                    # Default blue amount if non is set.
                    defblue="0";
                    # Default brightness amount.
                    defamount="50";
                    
                    ## -------------------------- Dont edit below!! --------------------------- ##
                    
                    while [[ $# -gt 0 ]] ; do
                    	case $1 in
                    		-h|-\?|--help)
                    			echo "Usage: mirrorleds.sh -p or --program [back, running, alarm, rainbow or thunder (rainbow and thunder needs no colors)] -r or -red [0-255] -g or --green [0-255] -b or --blue [0-255] -a or --amount [0-255]";
                    			exit;
                    			;;
                    		-p|--program)            
                    			if [ -n "$2" ]; then
                    				program="$2"
                    				shift
                    			else
                    				program="$defprog"
                    			fi
                    			;;
                    		-r|--red)
                    			if [ -n "$2" ]; then
                    				if [[ "$2" == ?(-)+([0-9]) ]]; then
                    					if [ "$2" -gt "255" ]; then
                    						red="255"
                    					elif [ "$2" -lt "0" ]; then
                    						red="0"
                    					else 
                    						red="$2"
                    					fi
                    					shift
                    				else
                    					red="$defred"
                    				fi
                    			fi
                    			;;
                    		-g|--green)
                    			if [ -n "$2" ]; then
                    				if [[ "$2" == ?(-)+([0-9]) ]]; then
                    					if [ "$2" -gt "255" ]; then
                    						green="255"
                    					elif [ "$2" -lt "0" ]; then
                    						green="0"
                    					else 
                    						green="$2"
                    					fi
                    					shift
                    				else
                    					green="$defgreen"
                    				fi
                    			fi
                    			;;
                    		-b|--blue)
                    			if [ -n "$2" ]; then
                    				if [[ "$2" == ?(-)+([0-9]) ]]; then
                    					if [ "$2" -gt "255" ]; then
                    						blue="255"
                    					elif [ "$2" -lt "0" ]; then
                    						blue="0"
                    					else 
                    						blue="$2"
                    					fi
                    					shift
                    				else
                    					blue="$defblue"
                    				fi
                    			fi
                    			;;
                    		-a|--amount)
                    			if [ -n "$2" ]; then
                    				if [[ "$2" == ?(-)+([0-9]) ]]; then
                    					if [ "$2" -gt "255" ]; then
                    						amount="255"
                    					elif [ "$2" -lt "0" ]; then
                    						amount="0"
                    					else 
                    						amount="$2"
                    					fi
                    					shift
                    				else
                    					amount="$defamount"
                    				fi
                    			fi
                    			;;
                    	esac
                    	shift
                    done
                    
                    # Default program if non was given. 
                    if [ -z "$program" ]; then
                    	program="$defprog"
                    fi
                    
                    # Default red amount if non was given. 
                    if [ -z "$red" ]; then
                    	red="$defred"
                    fi
                    
                    # Default green amount if non was given. 
                    if [ -z "$green" ]; then
                    	green="$defgreen"
                    fi
                    
                    # Default blue amount if non was given. 
                    if [ -z "$blue" ]; then
                    	blue="$defblue"
                    fi
                    
                    # Default amount if non was given.
                    if [ -z "$amount" ]; then
                    	amount="$defamount"
                    fi
                    
                    
                    # Compose the colors
                    colors="$red,$green,$blue";
                    
                    # 22 Pixel Alarm
                    if [ "$program" == "alarm" ]; then
                    	curl -H "Content-Type: application/json" -X POST --data '{"action":"startAnim","config":{"id":"ColorChase","config":{"end":-1,"start":0,"width":22,"color":['$colors']},"run":{"amt":1,"fps":300,"seconds":null,"max_steps":0,"untilComplete":false,"max_cycles":1}}}' $apiurl;
                    fi
                    
                    # Rainbowalarm (multi color spinning)
                    if [ "$program" == "rainbow" ]; then
                    	curl -H "Content-Type: application/json" -X POST --data '{"action":"startAnim","config":{"id":"ColorPattern","config":{"colors":[[255,0,0],[255,165,0],[255,255,0],[0,255,0],[0,0,255],[128,0,128]],"width":20},"run":{"amt":1,"fps":300,"seconds":null,"max_steps":0,"untilComplete":false,"max_cycles":1}}}' $apiurl;
                    fi
                    
                    # 1 Running Pixel
                    if [ "$program" == "running" ]; then
                    	curl -H "Content-Type: application/json" -X POST --data '{"action":"startAnim","config":{"id":"ColorChase","config":{"end":-1,"start":0,"width":1,"color":['$colors']},"run":{"amt":1,"fps":40,"seconds":null,"max_steps":0,"untilComplete":false,"max_cycles":1}}}' $apiurl;
                    fi
                    # Backlight
                    if [ "$program" == "back" ]; then
                    	curl -H "Content-Type: application/json" -X POST --data '{"action":"startAnim","config":{"id":"ColorPattern","config":{"colors":[['$colors']],"width":1},"run":{"amt":1,"fps":1,"seconds":null,"max_steps":0,"untilComplete":false,"max_cycles":1}}}' $apiurl;
                    fi
                    
                    # Thunder
                    if [ "$program" == "thunder" ]; then
                    	curl -H "Content-Type: application/json" -X POST --data '{"action":"startAnim","config":{"id":"WhiteTwinkle","config":{"max_led":null,"speed":2,"density":1,"max_bright":'$amount'},"run":{"amt":1,"fps":300,"seconds":null,"max_steps":0,"untilComplete":false,"max_cycles":1}}}' $apiurl;
                    fi
                    
                    # Stop everything
                    if [ "$program" == "stop" ]; then
                    	curl -H "Content-Type: application/json" -X POST --data '{"action":"stopAnim"}' $apiurl;
                    fi
                    
                    # Add a new line...
                    echo $"";
                    

                    Then I’m using Alexa (for now) to trigger different animations (via the HA-Bridge server). But later on this will be triggered by a module that “picks up” other modules communication so I can animate the leds depending on for example weather events, calendar events, memo events or whatever I can figure out. :) I just have to convince my wife that animating the leds IS a good thing… :)

                    If you cant find it, make it and share it!
                    Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                    C 1 Reply Last reply Aug 9, 2017, 11:29 AM Reply Quote 1
                    • C Offline
                      cowboysdude Module Developer @Snille
                      last edited by Aug 9, 2017, 11:29 AM

                      @Snille Awesome, Thank you!

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 1 / 5
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy