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

    cruunnerr

    @cruunnerr

    129
    Reputation
    6.2k
    Profile views
    279
    Posts
    7
    Followers
    3
    Following
    Joined
    Last Online

    cruunnerr Unfollow Follow

    Best posts made by cruunnerr

    • {HowTo} turn on/off your monitor (Time based, PIR/Button, App)

      Hi all ;)

      Since there were several questions in the Forum for the best way to turn off and on the monitor i wrote this tutorial and try to show the mostly used options.

      The meaning of this tutorial is to get the most used options at the same place :)
      So i hope it is ok for the developers of the modules/scripts when i maybe write the installation guide a second time. :D

      Please keep in mind, that i wrote some parts just out of my head. I tried all options listed here some time ago and all were working. Nevertheless it could be that i forget some points, but if so don’t hesitate to hit my face :P

      Many thanks to all developers, who wrote these great modules and/or scripts.
      @paviro (MMM-PIR)
      @Jopyth (MMM-Buttons)
      @cowboysdude (pir script)
      @mochman (Whitelist HowTo)

      Oh…and i am open for any suggestion

      So…

      The very important thing is, that your monitor supports HDMI-CEC or ARC. Otherwise u will not be able to turn it on or off via HDMI.
      To reassure you, most monitors do this ;)
      To check if it works just go into terminal via ssh and type:

      sudo tvservice -o to turn off
      sudo tvservice -p to turn on

      edit: for some monitors the following commands work better. Please use them if your monitor needs it:

      vcgencmd display_power 0 to turn off
      vcgencmd display_power 1 to turn on

      We will define in several possibilities:

      Using

      1. Software handling via Cronjob (time based)

      2. PIR-Sensor (HC-SR501)
        1.module version
        2.external version

      3. App

      4. Button
        1.module version
        2.external version

      5. Relays (monitor will be totally shut down!)
        1.button version (toggle function, on/off with every press)
        2.PIR version

      6. Just turn monitor content black (monitor is still on, but u got a black screen)


      1. Using Cronjobs

      So lets start with the most easiest way. There is no optional hardware needed and u will be able to turn on or off the monitor at specific days and daytimes.

      For your understanding how cronjobs works u should note the following:

      * * * * * user executive_command
      ┬ ┬ ┬ ┬ ┬
      │ │ │ │ │
      │ │ │ │ └──── Weekday (0-7, Sunday is 0 or 7)
      │ │ │ └────── Month (1-12)
      │ │ └──────── Day (1-31)
      │ └────────── Hour (0-23)
      └──────────── Minute (0-59)
      

      Next steps we will do as root to be sure it works. Maybe not the best way, but i am just a simple guy, who is still learning the stuff. ^^

      Lets say we want to turn on the monitor every day at 6am and turn off at 8pm:

      sudo nano /etc/crontab (to open the crontab)

      write this into the file:
      0 6 * * * root /usr/bin/tvservice -p >/dev/null 2>&1
      0 20 * * * root /usr/bin/tvservice -o >/dev/null 2>&1

      your crontab file should look like this:

      # /etc/crontab: system-wide crontab
      # Unlike any other crontab you don't have to run the `crontab'
      # command to install the new version when you edit this file
      # and files in /etc/cron.d. These files also have username fields,
      # that none of the other crontabs do.
      
      SHELL=/bin/sh
      PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
      
      # m h dom mon dow user  command
      17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
      25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
      47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
      52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
      0 6     * * *   root    /usr/bin/tvservice -o >/dev/null 2>&1
      0 20    * * *   root    /usr/bin/tvservice -p >/dev/null 2>&1
      #
      

      This was simple, right?

      So now we want to turn on the monitor every Mo-Fr from 6-9am and from 4-10pm. On saturday and sunday it will be turned on from 8am-10pm. That would be look like this:

      0 6,16  * * 1,2,3,4,5   root  /usr/bin/tvservice -p >/dev/null 2>&1
      0 9,22  * * 1,2,3,4,5   root  /usr/bin/tvservice -o >/dev/null 2>&1
      0 8     * * 6,7   root  /usr/bin/tvservice -p >/dev/null 2>&1
      0 22    * * 6,7   root  /usr/bin/tvservice -o >/dev/null 2>&1
      

      Alright, thats it. Please keep in mind that this way is the easiest, but probably the most expensive because on at the predefined times even if you don’t look at your mirror.













      2.1 Using PIR-Module

      Probably the most used option is using a PIR and paviro’s MMM-PIR module.

      cd MagicMirror/modules
      git clone https://github.com/paviro/MMM-PIR-Sensor.git
      cd MMM-PIR-Sensor
      npm install
      cd
      sudo usermod -a -G gpio pi (the „pi“ at the end stands for your username)
      sudo chmod u+s /opt/vc/bin/tvservice && sudo chmod u+s /bin/chvt
      nano MagicMirror/config/config.js

      Add the following somewhere between your existing modules:

      {
      	module: 'MMM-PIR-Sensor',
      	config: {
      	powerSavingDelay: 120 // (seconds) how long the monitor will be turned on
      	}
      },
      

      Save the file by typing „ctrl+c“ and „y“

      Connect your PIR as shown here:

      0_1516488144217_PIR.jpg

      We use GPIO-Pin 22 as it is used by default in the MMM-PIR module.
      For all next options in this tutorial we will use pin 22, too.

      Please note: It can be that after you start your MM you have to move once through the PIR to make the module work.













      2.2 Using PIR-Script

      Why using an external script, when there is already a module for that?!
      Well, in my case i use the PIR for several operations. My PIR tuns on the monitor and at the same time a LED stripe is turning on. To do this we need two shell scripts and one python script, which will be activated when booting your Pi.

      cd
      nano monitor_on.sh

      write this in this file:

      sudo tvservice -p
      

      Save the file by typing „ctrl+c“ and „y“

      nano monitor_off.sh

      write this in this file:

      sudo tvservice -o
      

      Save the file by typing „ctrl+c“ and „y“

      chmod +x monitor_on.sh (to make it executable)
      chmod +x monitor_off.sh

      If you want to do other things happen when monitor turns on or off you can simple add your commands or scripts to this file :)

      So now you have two options. Write a python script to automatically start the shell scripts by using a GPIO or just put the Shell scripts into a cronjob.

      Here is the first way:

      nano pir.py (creates a script which executes the *.sh files via PIR or Button)

      write this into the file:

      #!/usr/bin/env python
      
      import sys
      import time
      import RPi.GPIO as io
      import subprocess
      
      io.setmode(io.BCM)
      SHUTOFF_DELAY = 120 # in seconds, how long the monitor will be on until next button press or PIR detection
      PIR_PIN = 22       # 15 on the board (this needn't to be a PIR. Can be a button also)
      LED_PIN = 16      # optional, don't use as Relay-PIN. It just shows detection time of the PIR without delay time
      
      def main():
          io.setup(PIR_PIN, io.IN)
          io.setup(LED_PIN, io.OUT)
          turned_off = False
          last_motion_time = time.time()
      
          while True:
              if io.input(PIR_PIN):
                  last_motion_time = time.time()
                  io.output(LED_PIN, io.LOW)
                  print ".",
                  sys.stdout.flush()
                  if turned_off:
                      turned_off = False
                      turn_on()
              else:
                  if not turned_off and time.time() > (last_motion_time + 
                                                       SHUTOFF_DELAY):
                      turned_off = True
                      turn_off()
                  if not turned_off and time.time() > (last_motion_time + 1):
                      io.output(LED_PIN, io.HIGH)
              time.sleep(.1)
      
      def turn_on():
      	subprocess.call("sh /home/pi/monitor_on.sh", shell=True)
      
      def turn_off():
      	subprocess.call("sh /home/pi/monitor_off.sh", shell=True)
      
      if __name__ == '__main__':
          try:
              main()
          except KeyboardInterrupt:
              io.cleanup()
      
      

      Save the file by typing „ctrl+c“ and „y“

      chmod +x pir.py

      You can check if your button works by simply typing python pir.py. Every time u move through the PIR or press the button it will show you several …
      End the test with “ctrl+c”

      now we editing the rc.local to start the script after booting the Pi:

      sudo nano /etc/rc.local

      write this in the file (above the “exit 0”):

      python /home/pi/pir.py &

      Save the file by typing „ctrl+c“ and „y“

      after all it should look like this:

      #!/bin/sh -e
      #
      # rc.local
      #
      # This script is executed at the end of each multiuser runlevel.
      # Make sure that the script will "exit 0" on success or any other
      # value on error.
      #
      # In order to enable or disable this script just change the execution
      # bits.
      #
      # By default this script does nothing.
      
      # Print the IP address
      _IP=$(hostname -I) || true
      if [ "$_IP" ]; then
        printf "My IP address is %s\n" "$_IP"
      fi
      
      python /home/pi/pir.py
      
      exit 0
      

      Here comes the second way:

      Next steps are nearly the same as the first option shown in this tutorial.

      Lets say we want to turn on the monitor every day at 6am and turn off at 8pm:

      sudo nano /etc/crontab (to open the crontab)

      write this into the file:
      0 6 * * * root /home/pi/monitor_on.sh >/dev/null 2>&1
      0 20 * * * root /home/pi/monitor_off.sh >/dev/null 2>&1

      Save the file by typing „ctrl+c“ and „y“













      3. Using App

      First i need to say that this isn’t really an App. But you can make it look a like. I just know how to do it with iPhone devices so in this example i will show you how to do it with that.

      We need to install the MMM-Remote-Control module:

      cd MagicMirror/modules
      git clone https://github.com/Jopyth/MMM-Remote-Control.git
      cd MMM-Remote-Control
      npm install
      cd

      In the next step we will add the module to our config.js. To get access to our mirror u should notice the „Whitelist HowTo“.

      nano MagicMirror/config/config.js

      Add the following somewhere between your existing modules:

      {
          module: 'MMM-Remote-Control'
          // uncomment the following line to show the URL of the remote control on the mirror
          // , position: 'bottom_left'
          // you can hide this module afterwards from the remote control itself
      },
      

      Save the file by typing „ctrl+c“ and „y“

      and restart your MagicMirror.

      I suppose that you are knowing the IP-address of your Pi, otherwise u should google how to find out ;)
      Lets say your Pi has this IP: 192.168.178.240

      so know u should be able to get access to the Mirror by typing the following in your Safari-Browser on the iPhone:

      http://192.168.178.240:8080/remote.html

      You should see this:

      0_1516561977045_noname.png

      Tap the „share button“ and tap „Add to home screen“. After that a new „app“ will appear on your home screen.

      If you tap on it u will get a full screen of the Remote-Control module and will be able to turn on and off your monitor :)













      4.1 Using Button module

      To use the MMM-Button it is totally necessary to already get the MMM-Remote-Control module running!

      cd MagicMirror/modules
      git clone https://github.com/Jopyth/MMM-Buttons.git
      cd MMM-Buttons
      npm install (this can take a while)
      cd
      nano MagicMirror/config/config.js

      Add the following somewhere between your existing modules:

      {
      	module: 'MMM-Buttons',
      		config: {
       		buttons: [
       		{
        		pin: 22,
       		name: "monitor_control",
      		longPress: {
      		notification: "REMOTE_ACTION",
      		payload: {action: "MONITOROFF"}
      		},
      		shortPress: {
      		notification: "REMOTE_ACTION",
      		payload: {action: "MONITORON"}
      		}
                 }
              ]
          }
      },
      

      So if you press your button shortly (0 - 0,5 seconds) the monitor will turn on. A longer press (> 3 seconds) will turn off the monitor.

      Connect the button like shown in the next step.







      4.2 Using Button script

      Why it can be necessary to use an external script i already wrote above.
      And luckily the way to use a button with an external script is the same way as using a PIR.
      So turn back to point 2.2 and do it exactly like described there. Maybe u want to rename the pir.py to button.py, but then you also have to change the cronjob commands or the rc.local entry ;)

      Connect it like this:

      0_1516519962774_Bildschirmfoto 2018-01-21 um 08.31.09.png













      5. Relay
      If you want to safe money or your monitor doesn’t support HDMI-CEC you can simply breaks off the current to your monitor by using a Relay. To keep it simple i will use the srd-05vdc-sl-c relay.

      Keep in mind, that some monitors don’t start automatically by giving them power.

      5.1 - Use Relay with a button:

      Note: The script below toggles the output for the relay. If u want to use the relay with time delay u can use the scripts on point 5.2 and just replace the PIR with a button.

      Note: Some relays are active low. That means, that they are active while the GPIO is set to “0” or “False”. in this case u need to turn the commands for turn_on and turn_off in the python script. So for monitor on u need to write “io.output(RELAY_PIN, False)” and for monitor off “io.output(RELAY_PIN, True)”

      cd
      nano relay.py

      put this code into the file:

      #!/usr/bin/env python
      
      import subprocess
      import time
      import RPi.GPIO as gpio
      import sys
      
      gpio.setwarnings(False)
      gpio.setmode(gpio.BCM)
      BUTTON_PIN = 22
      RELAY_PIN = 27
      
      
      def main():
          gpio.setup(BUTTON_PIN, gpio.IN, pull_up_down=gpio.PUD_DOWN)
          gpio.setup(RELAY_PIN, gpio.OUT)
          gpio.output(RELAY_PIN, False)
          count = 0
      
          while True:
              gpio.wait_for_edge(BUTTON_PIN, gpio.FALLING)
              t = time.time()
              time.sleep(.3)
              gpio.wait_for_edge(BUTTON_PIN, gpio.RISING)
              count += 1
      
              if count > 1:
                  count = 0
      
              if count == 0:
                  print "Turn screen on"
                  gpio.output(RELAY_PIN, True)
              if count == 1:
                  print "Turn screen off"
                  gpio.output(RELAY_PIN, False)
      
      if __name__ == '__main__':
          try:
              main()
          except KeyboardInterrupt:
              gpio.cleanup()
      

      Save the file by typing „ctrl+c“ and „y“

      make it executable:

      chmod +x relay.py

      You can test by simply typing python relay.py. Every time you push the button your screen will toggle to go on or off.
      So your first push turns off the screen content and your second push turns it on :)
      Between every press, u need to wait 5 seconds.
      its that simple…

      Connect the button and the relay like this:

      0_1516558469012_Bildschirmfoto 2018-01-21 um 18.58.16.png







      5.2 - Use Relay with a PIR:

      Note: Some relays are active low. That means, that they are active while the GPIO is set to “0” or “False”. in this case u need to turn the commands for turn_on and turn_off in the python script. So for monitor on u need to write “io.output(RELAY_PIN, False)” and for monitor off “io.output(RELAY_PIN, True)”

      nano relayPIR.py

      put in this:

      #!/usr/bin/env python
      
      import sys
      import time
      import RPi.GPIO as io
      import subprocess
      
      io.setmode(io.BCM)
      SHUTOFF_DELAY = 120 # in seconds, how long the monitor will be on until next button press or PIR detection
      PIR_PIN = 22       # 15 on the board (this needn't to be a PIR. Can be a button also)
      LED_PIN = 17    # 11 on the board (optional): It just shows detection time of PIR without delay time
      RELAY_PIN = 27  # 13 on the board
      
      def main():
          io.setup(PIR_PIN, io.IN)
          io.setup(LED_PIN, io.OUT)
          io.setup(RELAY_PIN, io.OUT)
          turned_off = False
          last_motion_time = time.time()
      
          while True:
              if io.input(PIR_PIN):
                  last_motion_time = time.time()
                  io.output(LED_PIN, io.LOW)
                  print ".",
                  sys.stdout.flush()
                  if turned_off:
                      turned_off = False
                      turn_on()
              else:
                  if not turned_off and time.time() > (last_motion_time + 
                                                       SHUTOFF_DELAY):
                      turned_off = True
                      turn_off()
                  if not turned_off and time.time() > (last_motion_time + 1):
                      io.output(LED_PIN, io.HIGH)
              time.sleep(.1)
      
      def turn_on():
              io.output(RELAY_PIN, True)
      
      def turn_off():
              io.output(RELAY_PIN, False)
      
      if __name__ == '__main__':
          try:
              main()
          except KeyboardInterrupt:
              io.cleanup()
      

      save with “ctrl+x” and “y”

      chmod +x relay.py

      You can check if your button works by simply typing python relayPIR.py. Every time u move through the PIR or press the button it will show you several …
      End the test with “ctrl+c”
      The Shutoff delay in the script defines how long the relay will be turned on after last detection through the pir.

      Connect it like this:

      0_1516964458968_Bildschirmfoto 2018-01-26 um 11.59.18.png

      now we editing the rc.local to start the script after booting the Pi:

      sudo nano /etc/rc.local

      write this in the file (above the “exit 0”):

      python /home/pi/relayPIR.py &

      Save the file by typing „ctrl+c“ and „y“

      after all it should look like this:

      #!/bin/sh -e
      #
      # rc.local
      #
      # This script is executed at the end of each multiuser runlevel.
      # Make sure that the script will "exit 0" on success or any other
      # value on error.
      #
      # In order to enable or disable this script just change the execution
      # bits.
      #
      # By default this script does nothing.
      
      # Print the IP address
      _IP=$(hostname -I) || true
      if [ "$_IP" ]; then
        printf "My IP address is %s\n" "$_IP"
      fi
      
      python /home/pi/relayPIR.py
      
      exit 0
      












      6. Just turn black

      Alright, for some reason you might want to be able to just set your monitor content black instead of turning it to standby.
      That can be necessary, if you still want to use your monitor speaker.

      We can do this nearly the same way as shown with the normally used PIR/button script shown above.

      cd
      nano screen_on.sh

      put this into the file:

      export DISPLAY=:0
      xset dpms force on
      

      Save the file by typing „ctrl+c“ and „y“

      nano screen_off.sh

      put this into the file:

      export DISPLAY=:0
      xset dpms force off
      

      Save the file by typing „ctrl+c“ and „y“

      make them executable:

      chmod +x screen_on.sh
      chmod +x screen_off.sh

      Now at this point you got three options.

      1. Use it with cronjob (do it like described at section 1 & 2.2 from this tutorial)
      2. Use a PIR (just replace the *.sh scripts from the section 2.2 and change the shell script names in the commands within the pir.py script)
      3. Use a single push button

      For using the push button you need to connect your button the same way as shown at section 4.2.

      Alright, here comes the script:

      cd
      nano screenbutton.py

      put in the following content:

      #!/usr/bin/env python
      
      import subprocess
      import time
      import RPi.GPIO as gpio
      import sys
      
      gpio.setwarnings(False)
      gpio.setmode(gpio.BCM)
      BUTTON_PIN = 22
      
      #turn screen on at startup
      subprocess.call("sh /home/pi/screen_on.sh", shell=True)
      
      def main():
          gpio.setup(BUTTON_PIN, gpio.IN, pull_up_down=gpio.PUD_DOWN)
          count = 0
      
          while True:
              gpio.wait_for_edge(BUTTON_PIN, gpio.FALLING)
              t = time.time()
              time.sleep(.5)
              gpio.wait_for_edge(BUTTON_PIN, gpio.RISING)
              count += 1
      
              if count > 1:
                  count = 0
      
              if count == 0:
                  print "Turn screen on"
                  subprocess.call("sh /home/pi/screen_on.sh", shell=True)
              if count == 1:
                  print "Turn screen off"
                  subprocess.call("sh /home/pi/screen_off.sh", shell=True)
      
      if __name__ == '__main__':
          try:
              main()
          except KeyboardInterrupt:
              gpio.cleanup()
      

      Save the file by typing „ctrl+c“ and „y“

      make it executable:

      chmod +x screenbutton.py

      You can test by simply typing python screenbutton.py. Every time you push the button your screen will toggle to go on or off.
      So your first push turns off the screen content and your second push turns it on :)
      its that simple…

      now we editing the rc.local to start the script after booting the Pi:

      sudo nano /etc/rc.local

      write this in the file (above the “exit 0”):

      python /home/pi/screenbutton.py &

      Save the file by typing „ctrl+c“ and „y“

      after all it should look like this:

      #!/bin/sh -e
      #
      # rc.local
      #
      # This script is executed at the end of each multiuser runlevel.
      # Make sure that the script will "exit 0" on success or any other
      # value on error.
      #
      # In order to enable or disable this script just change the execution
      # bits.
      #
      # By default this script does nothing.
      
      # Print the IP address
      _IP=$(hostname -I) || true
      if [ "$_IP" ]; then
        printf "My IP address is %s\n" "$_IP"
      fi
      
      python /home/pi/screenbutton.py
      
      exit 0
      






      posted in Tutorials
      cruunnerrC
      cruunnerr
    • My First Mirror... until now ^^

      Hey all,

      first i want to say, that this is a great community and it makes fun to be a part of it.

      Since i decided to build a MagicMirror i was more and more interested what you can do with it. So now i want to show you my first exemplar. At least one more is in planning.

      The original plan was to install the mirror, so that you can only see the front frame. I had to postpone that later. That’s why he’s hanging on the wall now.

      I build the frame with wood, but i put some acrylic glass on the front and on the sides.
      I drilled a hole in the middle for the PIR.
      In addition, speakers are installed, but are not yet in operation (I still explore the applications / modules and think about what I still want to process)

      Fun fact: Because the PIR always detected the movement of my dog i put some clear nail polish on the lower half of the PIR :) Works great.

      I just used one 12V / 5A power supply. The 12V is used for the 23" Monitor and the LED Stripe. For the rPi i used a Step Down Converter and put it to 5.1V

      Next time i hang the mirror up, i will take some pics from behind ;)

      Installed modules:

      calendar_monthly
      MMM-EasyPix (for Wifi-QR-Code)
      MMM-GoogleMapsTraffic
      MMM-MyCalendar
      MMM-PIR-Sensor
      MMM-MyCommute
      MMM-NOAA
      MMM-Scrobbler
      MMM-Remote-Control
      MMM-Remote-Control-Repository
      MMM-SystemStats
      MMM-Watchdog
      MMM-Wunderlist
      MMM-internet-monitor (not visible)

      I also have a wifi watchdog installed because my wifi connection sometimes breaks off.
      It automatically turn the wifi controller off and on again, when the pi can’t ping my router.

      I found the LED Stripe somewhere in my house. It is a RGB Stripe 5050.
      Since there is no Module for this Stripe i used some mosfet’s and an external Application and wrote a script to turn it slowly on and off when movement is detected by the PIR.

      For the Wifi-QR code i used this guide and let the picture show via MMM-EasyPix (thanks to @mykle1 ;) ).

      For the background image i used the custom.css

      Hope you enjoy :)

      https://youtu.be/DHIKPTTG0q4

      0_1514833163710_IMG_2072JPG.jpg

      0_1514833178666_IMG_2073JPG.jpg

      0_1514833197194_IMG_2068JPG.jpg

      0_1514833215032_IMG_2064JPG.jpg

      0_1514833239937_IMG_2071JPG.jpg

      posted in Show your Mirror
      cruunnerrC
      cruunnerr
    • RE: Notice for MMM-CalendarEXT and MMM-Assistant

      You dont Need to apologize. We all understand that there is still a private and business life. But thank you anyway. ;)

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • RE: Request for help: LED Control module for and 5050smd strip

      Hey mate,

      here u can see my result: https://forum.magicmirror.builders/topic/6048/my-first-mirror-until-now/2

      i used this tutorial: https://dordnung.de/raspberrypi-ledstrip/

      its not a module for MM. But you can use Pigpio with an external script.
      Just use the PIR or a button to turn on and off the lights.

      in my case the PIR starts a script where it turns on the monitor and turn on the mosfets slowly.

      For the PIR i used this:

      #!/usr/bin/env python
      
      import sys
      import time
      import RPi.GPIO as io
      import subprocess
      import pigpio
      
      io.setmode(io.BCM)
      SHUTOFF_DELAY = 119 # seconds
      PIR_PIN = 25       # 22 on the board
      LED_PIN = 16
      
      def main():
          io.setup(PIR_PIN, io.IN)
          io.setup(LED_PIN, io.OUT)
          turned_off = False
          last_motion_time = time.time()
      
          while True:
              if io.input(PIR_PIN):
                  last_motion_time = time.time()
                  io.output(LED_PIN, io.LOW)
                  print ".",
                  sys.stdout.flush()
                  if turned_off:
                      turned_off = False
                      turn_on()
              else:
                  if not turned_off and time.time() > (last_motion_time +
                                                       SHUTOFF_DELAY):
                      turned_off = True
                      turn_off()
                  if not turned_off and time.time() > (last_motion_time + 1):
                      io.output(LED_PIN, io.HIGH)
              time.sleep(.1)
      
      def turn_on():
              subprocess.call("sh /home/pi/lights_on.sh", shell=True)
      
      def turn_off():
              subprocess.call("sh /home/pi/lights_off.sh", shell=True)
      
      if __name__ == '__main__':
          try:
              main()
          except KeyboardInterrupt:
              io.cleanup()
      

      And the script (lights_on and lights_off) which will be executed by detection looks like this:

      lights_on:

      sudo tvservice -p
      
      sleep 0.02
      
      pigs p 17 1
      pigs p 22 1
      pigs p 24 1
      
      sleep 0.06s
      
      pigs p 17 2
      pigs p 22 2
      pigs p 24 2
      
      sleep 0.06s
      
      pigs p 17 3
      pigs p 22 3
      pigs p 24 3
      
      sleep 0.06s
      
      pigs p 17 4
      pigs p 22 4
      pigs p 24 4
      
      sleep 0.06s
      
      pigs p 17 5
      pigs p 22 5
      pigs p 24 5
      
      sleep 0.06s
      
      pigs p 17 6
      pigs p 22 6
      pigs p 24 5
      
      sleep 0.06s
      
      pigs p 17 7
      pigs p 22 7
      pigs p 24 6
      
      sleep 0.06s
      
      pigs p 17 8
      pigs p 22 8
      pigs p 24 7
      
      sleep 0.06s
      
      pigs p 17 9
      pigs p 22 9
      pigs p 24 8
      
      sleep 0.06s
      
      pigs p 17 10
      pigs p 22 10
      pigs p 24 9
      
      sleep 0.06s
      
      pigs p 17 11
      pigs p 22 11
      pigs p 24 10
      
      sleep 0.06s
      
      pigs p 17 12
      pigs p 22 12
      pigs p 24 11
      

      lights_off:

      pigs p 17 12
      pigs p 22 12
      pigs p 24 11
      
      sleep 0.06s
      
      pigs p 17 11
      pigs p 22 11
      pigs p 24 10
      
      sleep 0.06s
      
      pigs p 17 10
      pigs p 22 10
      pigs p 24 9
      
      sleep 0.06s
      
      pigs p 17 9
      pigs p 22 9
      pigs p 24 8
      
      sleep 0.06s
      
      pigs p 17 8
      pigs p 22 8
      pigs p 24 7
      
      sleep 0.06s
      
      pigs p 17 7
      pigs p 22 7
      pigs p 24 6
      
      sleep 0.06s
      
      pigs p 17 6
      pigs p 22 6
      pigs p 24 5
      
      sleep 0.06s
      
      pigs p 17 5
      pigs p 22 5
      pigs p 24 5
      
      sleep 0.06s
      
      pigs p 17 4
      pigs p 22 4
      pigs p 24 4
      
      sleep 0.06s
      
      pigs p 17 4
      pigs p 22 4
      pigs p 24 4
      
      sleep 0.06s
      
      sudo tvservice -o
      pigs p 17 3
      pigs p 22 3
      pigs p 24 3
      
      sleep 0.06s
      
      pigs p 17 2
      pigs p 22 2
      pigs p 24 2
      
      sleep 0.06s
      
      pigs p 17 1
      pigs p 22 1
      pigs p 24 1
      
      sleep 0.06s
      
      pigs p 17 0
      pigs p 22 0
      pigs p 24 0
      
      
      posted in Requests
      cruunnerrC
      cruunnerr
    • RE: My First Mirror... until now ^^

      Hey @metalldetector

      I already did somewhere in the forum ^^

      You need to install PIGPIOD.

      sudo apt-get install build-essential python-dev unzip wget

      wget http://abyz.me.uk/rpi/pigpio/pigpio.zip && unzip pigpio.zip && cd PIGPIO && sudo make install

      Connect the PIR like shown at Part 2.2 and follow the guide:
      https://forum.magicmirror.builders/topic/6291/howto-turn-on-off-your-monitor-time-based-pir-button-app?page=1

      When creating the pir.py and fill ist with this code:

      #!/usr/bin/env python
      
      import sys
      import time
      import RPi.GPIO as io
      import subprocess
      import pigpio
      
      io.setmode(io.BCM)
      SHUTOFF_DELAY = 119 # seconds
      PIR_PIN = 25       # 22 on the board
      LED_PIN = 16
      
      def main():
          io.setup(PIR_PIN, io.IN)
          io.setup(LED_PIN, io.OUT)
          turned_off = False
          last_motion_time = time.time()
      
          while True:
              if io.input(PIR_PIN):
                  last_motion_time = time.time()
                  io.output(LED_PIN, io.LOW)
                  print ".",
                  sys.stdout.flush()
                  if turned_off:
                      turned_off = False
                      turn_on()
              else:
                  if not turned_off and time.time() > (last_motion_time + 
                                                       SHUTOFF_DELAY):
                      turned_off = True
                      turn_off()
                  if not turned_off and time.time() > (last_motion_time + 1):
                      io.output(LED_PIN, io.HIGH)
              time.sleep(.1)
      
      def turn_on():
      	subprocess.call("sh /home/pi/monitor_on.sh", shell=True)
      
      def turn_off():
      	subprocess.call("sh /home/pi/monitor_off.sh", shell=True)
      
      if __name__ == '__main__':
          try:
              main()
          except KeyboardInterrupt:
              io.cleanup()
      
      

      For the monitor_on.sh use this:

      vcgencmd display_power 1
      
      pigs p 17 1
      pigs p 22 1
      pigs p 24 1
      
      sleep 0.06s
      
      pigs p 17 2
      pigs p 22 2
      pigs p 24 2
      
      sleep 0.06s
      
      pigs p 17 3
      pigs p 22 3
      pigs p 24 3
      
      sleep 0.06s
      
      pigs p 17 4
      pigs p 22 4
      pigs p 24 4
      
      sleep 0.06s
      
      pigs p 17 5
      pigs p 22 5
      pigs p 24 5
      
      sleep 0.06s
      
      pigs p 17 6
      pigs p 22 6
      pigs p 24 5
      
      sleep 0.06s
      
      pigs p 17 7
      pigs p 22 7
      pigs p 24 6
      
      sleep 0.06s
      
      pigs p 17 8
      pigs p 22 8
      pigs p 24 7
      
      sleep 0.06s
      
      pigs p 17 9
      pigs p 22 9
      pigs p 24 8
      
      sleep 0.06s
      
      pigs p 17 10
      pigs p 22 10
      pigs p 24 9
      
      sleep 0.06s
      
      pigs p 17 11
      pigs p 22 11
      pigs p 24 10
      
      sleep 0.06s
      
      pigs p 17 12
      pigs p 22 12
      pigs p 24 11
      
      

      For monitor_off.sh use this:

      pigs p 17 12
      pigs p 22 12
      pigs p 24 11
      
      sleep 0.06s
      
      pigs p 17 11
      pigs p 22 11
      pigs p 24 10
      
      sleep 0.06s
      
      pigs p 17 10
      pigs p 22 10
      pigs p 24 9
      
      sleep 0.06s
      
      pigs p 17 9
      pigs p 22 9
      pigs p 24 8
      
      sleep 0.06s
      
      pigs p 17 8
      pigs p 22 8
      pigs p 24 7
      
      sleep 0.06s
      
      pigs p 17 7
      pigs p 22 7
      pigs p 24 6
      
      sleep 0.06s
      
      pigs p 17 6
      pigs p 22 6
      pigs p 24 5
      
      sleep 0.06s
      
      pigs p 17 5
      pigs p 22 5
      pigs p 24 5
      
      sleep 0.06s
      
      pigs p 17 4
      pigs p 22 4
      pigs p 24 4
      
      sleep 0.06s
      
      pigs p 17 4
      pigs p 22 4
      pigs p 24 4
      
      sleep 0.06s
      
      pigs p 17 3
      pigs p 22 3
      pigs p 24 3
      
      sleep 0.06s
      
      pigs p 17 2
      pigs p 22 2
      pigs p 24 2
      
      vcgencmd display_power 0
      
      sleep 0.06s
      
      pigs p 17 1
      pigs p 22 1
      pigs p 24 1
      
      sleep 0.06s
      
      pigs p 17 0
      pigs p 22 0
      pigs p 24 0
      
      

      Hope that helps. Try to find your best way and ask, if u need more help :)

      Edit:
      Oh and u need to start Pigpio on reboot with rc.local. ;)

      posted in Show your Mirror
      cruunnerrC
      cruunnerr
    • RE: Trying to use MMM-MyCommute, config.js doesn't look right

      There are some ``` in your clock module.

      in your MyCommute u use the wrong " " (try to use another editor in future)

      no comma , behind the apikey

      in the normal calendar module there is no comma , behind the URL

      missing semicolon in last line

      So try this:

      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       *
       * For more information how you can configurate this file
       * See https://github.com/MichMich/MagicMirror#configuration
       *
       */
      
      var config = {
              address: "localhost", // Address to listen on, can be:
                                    // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                                    // - another specific IPv4/6 to listen on a specific interface
                                    // - "", "0.0.0.0", "::" to listen on any interface
                                    // Default, when address config is left out, is "localhost"
              port: 8080,
              ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
                                                                     // or add a specific IPv4 of REDACTED :
                                                                     // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                                                                     // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                                                                     // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
      
              language: "en",
              timeFormat: 12,
              units: "metric",
      
              modules: [
                      {
                              module: "alert",
                      },
                      {
                              module: "updatenotification",
                              position: "top_bar"
                      },
                      {
                              module: "clock",
      
                              position: "top_left"
                      },
                      {
                              module: "calendar",
                              header: "Today",
                              position: "top_left",
                              config: {
                                      maximumEntries: 5,
                                      calendars: [
                                              {
                                                      symbol: "calendar",
                                                      url: "calendarURL",
                                                      auth:{
                                                              user: "username",
                                                              pass: "secretpassword",
                                                              method: "basic"
                                                      }
                                              },
                                      ],
                              }
                      },
                      {
                              module: "MMM-WunderGround",
                              position: "top_right",
                              config: {
                                      apikey: "secretAPI",
                                      pws: "weatherstationID",
                                      units: "imperial",
                                      hourly: "1",
                                      fctext: "1",
                                      coloricon: "true",
                                      fcdaycount: "1",
                                      hourlyinterval: "3",
                                      hourlycount: "2",
                                      alerttime: "10000",
                                      roundTmpDecs: 0,
                                      layout: "vertical"
                                      }
                      },
                      {
                              module: "MMM-DailyBibleVerse",
                              position: "bottom_bar",
                              config: {
                                      feeds: [
                                              {
                                                      version: "ESV"
                                              }
                                      ],
                              },
                      },
                      {
                              module: "MMM-MyCommute",
                              position: "bottom_left",
                              header: "My Drive",
                              config: {
                                      apikey: "AIzaSyBfJfAgexEpef8VbtTEv6XfyiYTx-4QAge8",
                                      origin: "123 My Street, My City, ST 12345",
                                      startTime: "20:00",
                                      endTime: "22:00",
                                      hideDays: [0,6],
                                      destinations: [
                                              {
                                                      destination: "456 Work Address, City, State ZIP",
                                                      label: "work",
                                                      mode: "driving",
                                              },
                                      ],
                              },
                      },
      //              {
      //                      module: 'MMM-Xmas',
      //                      position: 'fullscreen_above'
      //              }
              ]
      
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      

      if u run into this problem again, try www.jshint.com ;)

      or use ssh and do this: https://forum.magicmirror.builders/topic/5399/how-to-check-your-config-for-errors-for-absolute-beginners

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • RE: MMM-Openhab

      Even if i have no OpenHAB System running, your module looks great :)
      keep it up :) Well done

      posted in Utilities
      cruunnerrC
      cruunnerr
    • RE: MMM-PIR-Sensor: Everything works fine, just one thing not...

      one idea is to just put the tvservice -o command in your rc.local.
      before that u should do a little sleep.

      like this:

      sudo nano /etc/rc.local

      #!/bin/sh -e
      #
      # rc.local
      #
      # This script is executed at the end of each multiuser runlevel.
      # Make sure that the script will "exit 0" on success or any other
      # value on error.
      #
      # In order to enable or disable this script just change the execution
      # bits.
      #
      # By default this script does nothing.
      
      # Print the IP address
      _IP=$(hostname -I) || true
      if [ "$_IP" ]; then
        printf "My IP address is %s\n" "$_IP"
      fi
      
      sleep 60 &
      
      tvservice -o
      
      exit 0
      

      So on every reboot it will wait 60 seconds (just to let everything start like MM) and then turn the monitor off.

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • RE: Server connection

      i did the same mistake on my first time. Think this is a german guys problem XD

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • RE: {HowTo} turn on/off your monitor (Time based, PIR/Button, App)

      @nikobelohlav

      yes it is.

      Just use the external script from this tutorial. Change the content of the monitor_off.sh and monitor_on.sh to the following:

      monitor_off:

      export DISPLAY=:0
      xset dpms force off
      

      monitor_on:

      export DISPLAY=:0
      xset dpms force on
      

      I will add this options to the tutorial later. ;)

      posted in Tutorials
      cruunnerrC
      cruunnerr

    Latest posts made by cruunnerr

    • RE: {HowTo} turn on/off your monitor (Time based, PIR/Button, App)

      @andi-aw-weiss

      Hey hey,

      So what exactly doesn’t work? My English isn’t the best

      In my case I am turning on a LED Stripe with the pir.

      When I cold start the raspi, the LED stripe turns on for a few seconds (could be the turnoff delay time).
      After a while it turns off.
      From this moment on it should work as you expect. When movement is detected, the led (or relay) turns on for the delay time and extend the delay time for every new movement within the original delay time.

      posted in Tutorials
      cruunnerrC
      cruunnerr
    • RE: "No Signal" message when PIR sensor is triggered

      Long time ago I visited this forum, so I don’t know if this will help. but the MMM-ModuleScheduler can hide all modules per notifications. So maybe you can trigger the module with your pir-module.
      Or take a look at point 6 in this tutorial
      https://forum.magicmirror.builders/topic/6291/howto-turn-on-off-your-monitor-time-based-pir-button-app/2

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • RE: newsfeed doesn't load anymore

      yep…they seem to quit their feed -.-

      sorry for the dumb question

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • RE: newsfeed doesn't load anymore

      @sdetweil said in newsfeed doesn't load anymore:

      did u miss part of the url?

      Thanks for your reply. No, didn’t miss something. But it has always been like this :/

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • newsfeed doesn't load anymore

      Hi guys,

      i can’t say exactly when the problem started, but my newsfeed doesn’t load anymore.
      The standard “http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml” loads without issues.

      my config:

              {
                  disabled: false,
                  module: "newsfeed",
                  position: "top_left",
                  config: {
                      feeds: [
                              {
                              title: "Neues Wort",
                              url: "http://feeds.feedburner.com/neueswort",
                              },
                      ],
                      showDescription: true,
                      logFeedWarnings: true,
                  }
              },
      

      Log-File says:

      0|mm  | Create new news fetcher for url: http://feeds.feedburner.com/neueswort - Interval: 300000
      0|mm  | [15:52:19.431] [ERROR]  
      0|mm  | (node:14628) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
      
      cruunnerr@MagicMirror:~$ node -v
      v10.16.0
      cruunnerr@MagicMirror:~$ nodejs -v
      v10.16.0
      cruunnerr@MagicMirror:~$ npm -v
      6.13.4
      

      Any thoughts?

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • RE: My First Mirror... until now ^^

      @blackeaglece said in My First Mirror... until now ^^:

      I have your own PIR, could you give me a hand, help me? Thank you very much

      https://forum.magicmirror.builders/topic/6291/howto-turn-on-off-your-monitor-time-based-pir-button-app?page=1

      ;)
      Try to find a solution in this post. Otherwise ask again, if you need more help :)
      And Merry X-Mas

      @kusselin said in My First Mirror... until now ^^:

      Hi, can you post the Wallpapers here please

      Sorry, but i don’t have them anymore :(

      posted in Show your Mirror
      cruunnerrC
      cruunnerr
    • RE: My First Mirror... until now ^^

      Meanwhile i changed my background but cannot find the girl-wallpaper. Sorry bro :(

      Here is my whole css

      /*****************************************************
       * Magic Mirror                                      *
       * Custom CSS                                        *
       *                                                   *
       * By Michael Teeuw http://michaelteeuw.nl           *
       * MIT Licensed.                                     *
       *                                                   *
       * Add any custom CSS below.                         *
       * Changes to this files will be ignored by GIT. *
       *****************************************************/
      
       body {
      	background-image: url("background2.jpg");
      	background-size: cover;
      	margin-left: 0px;
      	margin-right: 30px;
      	margin-top: 15px;
      	margin-bottom: 15px;
        	position: absolute;
        	height: calc(100% - 28px);
        	width: calc(100% - 22px);
      }
      .MMM-SystemStats  {
              color: #CEF6CE;
              } 
      .MMM-MyCalendar {
        max-width: 300px;
      }
      .MMM-MovieListings {
        max-width: 400px;
      }
      .left header {
          border-bottom: none; /* instead of 1px solid #666; to remove all lines from all the headers */
          width: 70%;          /* add this to change the width of all module headers */
      }
      .right header {
          border-bottom: none; /* instead of 1px solid #666; to remove all lines from all the headers */
          width: 70%;          /* add this to change the width of all module headers */
      }
      .newsfeed .small{
        color: #FFFFFF;
      }
      .newsfeed .medium{
        color: #D8D8D8;
      }
      .newsfeed {
       max-width: 280px;
      }
      .region.top.right {
       max-width: 330px;
      }
      .MMM-ioBroker {
       width: 550px;
       zoom: 75%;
      }
      
      
      posted in Show your Mirror
      cruunnerrC
      cruunnerr
    • RE: config.js help

      Try this, but you really need to clean up ;) :P

      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       *
       * For more information how you can configurate this file
       * See https://github.com/MichMich/MagicMirror#configuration
       *
       */
      
      var config = {
      	address: "localhost", // Address to listen on, can be:
      	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
      	                      // - another specific IPv4/6 to listen on a specific interface
      	                      // - "", "0.0.0.0", "::" to listen on any interface
      	                      // Default, when address config is left out, is "localhost"
      	port: 8080,
      	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
      	                                                       // or add a specific IPv4 of 192.168.1.5 :
      	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
      	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
      	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
      
      	language: "en",
      	timeFormat: 24,
      	units: "metric",
      
      	modules: [
      		{
                              module: "MMM-Remote-Control-Repository",
                      
                      },
                      {
                              module: "alert",
                      
                      },
                      {
                              module: "MMM-Remote-Control",
                              position: "center",
                      
                      },
                      {
                              module: "clock",
                              position: "top_left"
                      
                      },
                      {
                             module: "mmm-hue-lights",
                             position: "bottom_right",
                             config: {
                             bridgeIp: "192.168.1.23",
                             user: "",
                             updateInterval: "1000",
                             hideOff: "false",
                             displayMode: "groups",
                             displayType: "list",
                             minimalList: "true",
                             coloredList: "true",
                             hideFilter: ["home-away"],
                             alignment: "right"
                     				 }
                     },
                     {
                            module: "compliments",
                            position: "lower_third",
                     },
                     {
                            module: "MMM-NOAA3",
                            position: "top_right",
                            config: {
                            provider: "darksky",
                            apiKey: "",
                            airKey: "", 
                            css: "NOAA3",
                            updateInterval: 15,
                            userlat: "51.806460",
                            userlon: "-0.778230"
                    				}
                    },  
                    {
                           module: "calendar",
                           header: "Calendar",
                           position: "top_left",
                           config: {
                           timeFormat:"absolute",
                           titleReplace: {"United Kingdom:" : ""},
                           urgency: 0,
                           getRelative: 6,
                           fullDayEventDateFormat: "D MMMM",
                           dateFormat: "D MMMM - H:mm:ss",
                           fetchInterval: 4000000,
                           colored: true,
                           coloredSymbolOnly: true,
                           maximumEntries: 9,
                           showEnd: false,
                           Calendars: [
                   {
                           symbol: "calendar-check-o ",
                           url: "https://www.officeholidays.com/ics/ics_country_code.php?iso=GB",
                   
                   }
                             ]
                   }
                   },
                   {
                          module: "mmm-nest-status",
                          position: "bottom_left", // pick whichever position you want
                          config: {
                          token: "",
                          displayMode: "all",
                          displayType: "list",
                          thermostatsToShow: "all",
                          units: "metric",
                          updateInterval: "50000",
                          thermostatSize: "small",
                          alignment: "left",
                   // ... and whatever else configuration options you want to use
                  				}
                  },
                  {
                          module: "MMM-SystemStats",
                          position: "Top_Center", 
                          updateInterval: 5000,
                          align: "right",
                          units: "metric",
                          label: "text"
                  
                  },
                  {
                          module: "newsfeed",
                          position: "bottom_bar",
                          config: {
                          feeds: [
                  				{
                          title: "BBC NEWS UK",
                          url: "http://feeds.bbci.co.uk/news/uk/rss.xml"
                   				}
                   ],
                   },
                         showSourceTitle: true,
                         showPublishDate: true
                  }
              
          ]
      };
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      

      For the future u can put in your code here: https://jshint.com

      Just to analyze what maybe went wrong

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • RE: My First Mirror... until now ^^

      Blau und schwarz beschreibt nur die Farbe des Streifens selber (nicht der LED). Also für die Funktion egal.

      Naja, also die Temperaturen kommen von meinem IoBroker Server. Um ehrlich zu sein habe ich schon länger nicht mehr an meinem Spiegel gearbeitet, sondern andere Projekte gestartet und vollendet.
      Mein ganzes Haus ist mittlerweile steuerbar (Licht, Thermostate, Lautsprecher etc…). Unter anderem habe ich eben auch Temperatursensoren von Xiaomi im Einsatz, die ihre Werte an meinen Server schicken.
      Auf dem Spiegel zeige ich die Werte dann mit dem MMM-iobroker Modul an.

      Aber ich habe auch viel mit ESP’s gemacht. Habe derzeit ca. 8 Stück im Einsatz. Einer steuert meine komplette Heizung. Einer steuert meine Klingel. Einer wertet meine Alarmanlage aus. Zwei sind für meinen Infinity Tisch… etc. pp… ^^
      Macht ziemlich viel Spaß


      Blue and black only describes the color of the strip itself (not the LED). So no matter for the function.

      Well, so the temperatures come from my IoBroker server. To be honest, I have not worked on my mirror for some time, but started and completed other projects.
      My whole house is now controllable (lights, thermostats, speakers etc …). Among other things, I have also used temperature sensors from Xiaomi, which send their values to my server.
      On the mirror I then display the values with the [MMM-iobroker] (https://github.com/ioBroker/MMM-ioBroker) module.

      But I also did a lot of ESP’s. Currently have about 8 pieces in use. One controls my entire heater. One controls my bell. One evaluates my alarm system. Two are for my infinity table … etc. pp … ^^
      It’s a lot of fun

      posted in Show your Mirror
      cruunnerrC
      cruunnerr
    • RE: My First Mirror... until now ^^

      https://de.aliexpress.com/item/1m-2m-3m-4m-5m-ws2812b-ws2812-led-strip-individually-addressable-smart-led-strip-black-white/32682015405.html?spm=a2g0x.search0104.3.9.4eef3dc9EKAZdz&ws_ab_test=searchweb0_0,searchweb201602_3_10065_10068_10547_319_317_10548_10696_10084_453_10083_454_10618_10304_10307_10820_10821_537_10302_536_10843_10059_10884_10887_321_322_10103,searchweb201603_6,ppcSwitch_0&algo_expid=b24b32fc-d347-41f0-b20b-702e47e2d79c-1&algo_pvid=b24b32fc-d347-41f0-b20b-702e47e2d79c&transAbTest=ae803_3

      I have got this one. 5m with 60 LEDs per meter for about 17€

      posted in Show your Mirror
      cruunnerrC
      cruunnerr