MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. cruunnerr
    3. Posts
    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

    Posts

    Recent Best Controversial
    • RE: Can i search for my own created Topics?

      embarrassing… -_____-

      Thank you mate ^^

      I was sure, that this option doesn’t exist 'cause i didn’t see it ^^

      posted in Forum
      cruunnerrC
      cruunnerr
    • Can i search for my own created Topics?

      Hi guys,

      in my profile i can only see my posts i did.

      Is or would it be possible to add a function, where i can see my created topics?

      Because i find it laborious to search my topics ^^

      thx

      posted in Forum
      cruunnerrC
      cruunnerr
    • RE: Displaying data from MySQL database

      Don’t know if it helps and i am trying to keep it short…

      I build an Oiltank measurement system with another raspberry pi.
      The results will be written to a mysql database and to a JSON file, which will be uploaded to my NAS.
      On the NAS i run the database and a web server.
      To Display the results on a webpage i used this php script: https://github.com/cruunnerr/OilTank-Graph-WebPage

      To display the results on my MM i got some very much help from our user @doubleT
      He wrote this module for me: https://github.com/cruunnerr/MMM-Oiltank
      The module grabs the data from a JSON file and shows it on the MM.

      Maybe this could help :/

      MagicMirror:

      1_1522492360079_Bildschirmfoto 2018-03-31 um 12.30.56.png

      Web Page:

      0_1522492360077_Bildschirmfoto 2018-03-31 um 12.30.12.png

      posted in Development
      cruunnerrC
      cruunnerr
    • RE: [German only] Umfrage zu Smart Mirror Systemen

      erledigt :)

      posted in General Discussion
      cruunnerrC
      cruunnerr
    • RE: Turning monitor on/off when not in use.

      i would think the other way…

      let the cronjob execute a script which checks if there are mobile phones online.

      the script should do it like this:

      1. is there a phone nearby?
      
      2.
            yes --> turn on the monitor
      
            no --> don't do anything
      

      need to google for this kind of script, but shouldn’t be too difficult.

      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: Why does my installation show 2 instances?

      Because u used the automatic installer and pressed “yes” when it asked you for starting MagicMirror automatically ;)

      try

      pm2 stop mm

      pm2 delete mm

      pm2 save

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • RE: Not sure what doing wrong :( adding modules

      @pinsdorf said in Not sure what doing wrong :( adding modules:

      {
      module: ‘uptimerobot’,
      position: ‘top_right’,
      config: {
      useColors: true
      api_key:‘u505342-b40737465f0eada9bb8a’,
      },

      Missing comma behind the “true”.

      Must look like this:

      {
      		module: 'uptimerobot',
      		position: 'top_right',
              		config: {
      		useColors: true,
      		api_key:'u505342-b40737465f0eada9bb8a'
      	},
      

      Just a copy/paste failure from Mykle ;)

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • RE: Trouble with PIR sensor

      hmm… I will check this tomorrow and will give a result

      Installed a fresh Raspbian Stretch Desktop and just created the relayPIR.py which runs perfectly. can start and stop whenever i want the script and even autostart on reboot works great.

      Hmm… so we used several options and nothing seems to work… You should delete all things we made and start again.

      Maybe just try to create the relay script on point 5.2

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • RE: Trouble with PIR sensor

      @jheller333

      Do u have a link to your relay? Do u hear it clicking?

      posted in Troubleshooting
      cruunnerrC
      cruunnerr
    • 1 / 1