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

    cmille34

    @cmille34

    4
    Reputation
    620
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    cmille34 Unfollow Follow

    Best posts made by cmille34

    • RE: 27" custom framed magic mirror - fun to get done

      @wbleek I achieved the cameras on my mirror pretty easily with Blue Iris. I simply made a custom .HTM file and placed it in the /modules directory of the MagicMirror then using iFrameReload i just call the /modules/custom.htm URL to load the cameras. Below is my custom.htm file I am calling in the iFrameReload module:

      
      <table>
      <tr>
      </tr><tr>
      <td>
      <img src="http://192.168.1.108:81/mjpg/BackyardCam/video.mjpg?q=25&amp;s=25" alt="BackyardCam" />
      </td>
      <td>
      <img src="http://192.168.1.108:81/mjpg/FrontDoor/video.mjpg?q=40&amp;s=40" alt="DrivewayCam" />
      </td>
      </tr>
      <tr>
      <td>
      <img src="http://192.168.1.108:81/mjpg/DriveWayCam/video.mjpg?q=25&amp;s=25" alt="FrontdoorCam" />
      </td>
      </tr>
      </table>
      
      

      In lieu of having blue iris you could possibly simply pull the mjpg streams straight from each cameras individually and slap them in the img tag. That may be a better way actually but it seems to be working fine for me through Blue Iris this way.

      Below is the code from my config.js showing how I am calling this custom HTM file:

      {
      	module: 'MMM-iFrameReload',
      	position: 'bottom_bar', // This can be any of the regions.
      		config: {
      		// See 'Configuration options' for more information.
      		url: "http://192.168.1.108:9000/modules/custom.htm",
      		width: "100%", // Optional. Default: 400px
      		height: "850px", // Optional. Default: 800px
      		scrolling:"no",
      		refreshInterval: 600, //Optional. Default: 3600 = 1 hour
      		animationSpeed: 4000,
      		}
      	},
      

      My setup is similar to the OP in terms of running the MagicMirror server on a central server and simply running fullpageos on the raspberry pi to call the magicmirror page.

      Hope this helps.

      posted in Show your Mirror
      C
      cmille34
    • RE: 27" custom framed magic mirror - fun to get done

      @iwaldrum said in 27" custom framed magic mirror - fun to get done:

      sudo nano /etc/crontab
      
      Add:
      0  0    * * *   root    reboot
      */30 *   * * *   pi     /home/pi/scripts/refresh
      

      Brilliant! I forgot I was calling that script when I woke the screen with the motion sensor
      already. Hopefully adding it to cron every 30 minutes like you’ve shown will help get the calendar to update more regularly. Thanks for the quick help!

      posted in Show your Mirror
      C
      cmille34
    • RE: 27" custom framed magic mirror - fun to get done

      @iwaldrum said in 27" custom framed magic mirror - fun to get done:

      @cmille34

      I’d love to hear how you have your motion sensor setup with fullpageOS. On my todo list…

      This is far from perfect but it appears to work for me. Generally the screen is dim when I look at the mirror from afar or an angle but if I walk near it, it comes to life. I’m using the cheapie ol’ HC-SR501 motion sensor for this. I think I got a 5 pack for like 5 bucks on eBay. I actually have my sensor dangling at the bottom of my mirror, essentially aiming at the floor. These things are pretty darn sensitive it seems.

      I essentially have the sensor hooked up to the Pi and and have converted the following Python script to a service that runs at startup. The monitor still has power but the HDMI signal is essentially disabled when motion isn’t detected with the tvservice command (whatever it is! ha).

      /home/pi/motiondetector.py

      import os
      import subprocess
      import time
      from gpiozero import MotionSensor
      
      pir = MotionSensor(4)
      while True:
              pir.wait_for_motion()
              print("Motion!")
              subprocess.call(["/bin/sh","/home/pi/scripts/refresh"])
              os.system("tvservice -p; fbset -depth 8; fbset -depth 16")
              pir.wait_for_no_motion()
              print("No motion...")
              os.system("tvservice -o")
      

      The sources I used to cobble this together:

      Install gpiozero
      https://gpiozero.readthedocs.io/en/stable/

      I think I had some issue getting the gpiozero module to load, but this thread looks familiar. I think the issue is I started with Jessie Lite.
      https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=126320

      Script as service
      http://www.diegoacuna.me/how-to-run-a-script-as-a-service-in-raspberry-pi-raspbian-jessie/

      Sensitivity Adjustment (this takes some tinkering for sure)
      http://henrysbench.capnfatz.com/henrys-bench/arduino-sensors-and-input/arduino-hc-sr501-motion-sensor-tutorial/

      You could probably gather all this with a few minutes of googling but I figured I’d share what I’ve cobbled together so far. A short range IR type sensor may be better if you only want the screen to activate when you get right in front of it, if you just want some mostly automated way of turning the screen off, this should work though.

      posted in Show your Mirror
      C
      cmille34

    Latest posts made by cmille34

    • RE: 27" custom framed magic mirror - fun to get done

      @iwaldrum said in 27" custom framed magic mirror - fun to get done:

      @cmille34

      I’d love to hear how you have your motion sensor setup with fullpageOS. On my todo list…

      This is far from perfect but it appears to work for me. Generally the screen is dim when I look at the mirror from afar or an angle but if I walk near it, it comes to life. I’m using the cheapie ol’ HC-SR501 motion sensor for this. I think I got a 5 pack for like 5 bucks on eBay. I actually have my sensor dangling at the bottom of my mirror, essentially aiming at the floor. These things are pretty darn sensitive it seems.

      I essentially have the sensor hooked up to the Pi and and have converted the following Python script to a service that runs at startup. The monitor still has power but the HDMI signal is essentially disabled when motion isn’t detected with the tvservice command (whatever it is! ha).

      /home/pi/motiondetector.py

      import os
      import subprocess
      import time
      from gpiozero import MotionSensor
      
      pir = MotionSensor(4)
      while True:
              pir.wait_for_motion()
              print("Motion!")
              subprocess.call(["/bin/sh","/home/pi/scripts/refresh"])
              os.system("tvservice -p; fbset -depth 8; fbset -depth 16")
              pir.wait_for_no_motion()
              print("No motion...")
              os.system("tvservice -o")
      

      The sources I used to cobble this together:

      Install gpiozero
      https://gpiozero.readthedocs.io/en/stable/

      I think I had some issue getting the gpiozero module to load, but this thread looks familiar. I think the issue is I started with Jessie Lite.
      https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=126320

      Script as service
      http://www.diegoacuna.me/how-to-run-a-script-as-a-service-in-raspberry-pi-raspbian-jessie/

      Sensitivity Adjustment (this takes some tinkering for sure)
      http://henrysbench.capnfatz.com/henrys-bench/arduino-sensors-and-input/arduino-hc-sr501-motion-sensor-tutorial/

      You could probably gather all this with a few minutes of googling but I figured I’d share what I’ve cobbled together so far. A short range IR type sensor may be better if you only want the screen to activate when you get right in front of it, if you just want some mostly automated way of turning the screen off, this should work though.

      posted in Show your Mirror
      C
      cmille34
    • RE: 27" custom framed magic mirror - fun to get done

      @iwaldrum said in 27" custom framed magic mirror - fun to get done:

      sudo nano /etc/crontab
      
      Add:
      0  0    * * *   root    reboot
      */30 *   * * *   pi     /home/pi/scripts/refresh
      

      Brilliant! I forgot I was calling that script when I woke the screen with the motion sensor
      already. Hopefully adding it to cron every 30 minutes like you’ve shown will help get the calendar to update more regularly. Thanks for the quick help!

      posted in Show your Mirror
      C
      cmille34
    • RE: 27" custom framed magic mirror - fun to get done

      @iwaldrum said in [27" custom framed magic mirror - fun to get done] Since I’m using FullpageOS as my mm frontend I have the page refresh every 30 minutes which then pulls an updated image.

      How is you have the page reload every 30 mins in fullpageOS? My calendar app doesn’t appear to be updating, I’m hoping a page reload every 30 mins will fix that.

      posted in Show your Mirror
      C
      cmille34
    • RE: 27" custom framed magic mirror - fun to get done

      @wbleek I achieved the cameras on my mirror pretty easily with Blue Iris. I simply made a custom .HTM file and placed it in the /modules directory of the MagicMirror then using iFrameReload i just call the /modules/custom.htm URL to load the cameras. Below is my custom.htm file I am calling in the iFrameReload module:

      
      <table>
      <tr>
      </tr><tr>
      <td>
      <img src="http://192.168.1.108:81/mjpg/BackyardCam/video.mjpg?q=25&amp;s=25" alt="BackyardCam" />
      </td>
      <td>
      <img src="http://192.168.1.108:81/mjpg/FrontDoor/video.mjpg?q=40&amp;s=40" alt="DrivewayCam" />
      </td>
      </tr>
      <tr>
      <td>
      <img src="http://192.168.1.108:81/mjpg/DriveWayCam/video.mjpg?q=25&amp;s=25" alt="FrontdoorCam" />
      </td>
      </tr>
      </table>
      
      

      In lieu of having blue iris you could possibly simply pull the mjpg streams straight from each cameras individually and slap them in the img tag. That may be a better way actually but it seems to be working fine for me through Blue Iris this way.

      Below is the code from my config.js showing how I am calling this custom HTM file:

      {
      	module: 'MMM-iFrameReload',
      	position: 'bottom_bar', // This can be any of the regions.
      		config: {
      		// See 'Configuration options' for more information.
      		url: "http://192.168.1.108:9000/modules/custom.htm",
      		width: "100%", // Optional. Default: 400px
      		height: "850px", // Optional. Default: 800px
      		scrolling:"no",
      		refreshInterval: 600, //Optional. Default: 3600 = 1 hour
      		animationSpeed: 4000,
      		}
      	},
      

      My setup is similar to the OP in terms of running the MagicMirror server on a central server and simply running fullpageos on the raspberry pi to call the magicmirror page.

      Hope this helps.

      posted in Show your Mirror
      C
      cmille34
    • RE: 27" custom framed magic mirror - fun to get done

      This mirror looks great! It’s been the inspiration to take a stab at making one as well. I like the idea of running MM on an existing windows server I have in the house and just rely on the Pi3 to load the webpage.

      With your mirror do you turn off the screen when no motion is detected or does it display everything constantly? If you do turn off the screen, how are you triggering it on and off? I see there are PIR modules for MM but since you’ve made the decision to simply view the MM page remotely, I was wondering if you had some way to turn off the screen?

      Thanks for taking the time to detail this out!

      posted in Show your Mirror
      C
      cmille34