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

    Posts

    Recent Best Controversial
    • RE: Custom Commands in @MMM-Remote-Control

      @sdetweil - thank you very much for your prompt response. I have not learned about curl commands yet ( although i know i have copied and pasted one during installation of modules.

      Are you able to point me towards an example or a good page that i may be able to lean the relevant things quickly please.

      posted in Troubleshooting
      G
      gkchimz
    • Custom Commands in @MMM-Remote-Control

      I am using a raspberry pi 4. I have a radio frequency transmitter attached to one of my GPIO pins and I am using running a python script through the terminal to send a command that will turn on/off and change the colour of my led lights. (See link below). I have said these files in my MagicMirror folder.

      Is it possible to use custom commands to do this? If so can you help me understand how. Attached are the shell files that are executable and work( when i double click the files in desktop mode - the lights change). How do i link this to MMM-Remote-Control or do the same action in MMM-Remote-Control?

      Config.js

      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw https://michaelteeuw.nl
       * MIT Licensed.
       *
       * For more information on how you can configure this file
       * See https://github.com/MichMich/MagicMirror#configuration
       *
       */
      
      var config = {
      	address: "0.0.0.0", 	// Address to listen on, can be:
      	//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 or empty, is "localhost"
      	port: 8080,
      	basePath: "/", 	// The URL path where MagicMirror is hosted. If you are using a Reverse proxy
      					// you must set the sub path here. basePath must end with a /
      	ipWhitelist: [], 	// Set [] to allow all IP addresses
      	//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"],
      
      	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
      	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
      	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true
      
      	language: "en",
      	logLevel: ["INFO", "LOG", "WARN", "ERROR"],
      	timeFormat: 24,
      	units: "metric",
      	// serverOnly:  true/false/"local" ,
      	// local for armv6l processors, default
      	//   starts serveronly and then starts chrome browser
      	// false, default for all NON-armv6l devices
      	// true, force serveronly mode, because you want to.. no UI on this device
      
      	modules: [
      
      		{
      		    	module: 'MMM-Remote-Control',
      		    	// uncomment the following line to show the URL of the remote control on the mirror
      		     	position: 'bottom_right',
      		    	// you can hide this module afterwards from the remote control itself
      		    	config: {
      				customCommand: {},  // Optional, See "Using Custom Commands" below
      				showModuleApiMenu: true, // Optional, Enable the Module Controls menu
      				// uncomment any of the lines below if you're gonna use it
      				// customMenu: "custom_menu.json", // Optional, See "Custom Menu Items" below
      				// apiKey: "",         // Optional, See API/README.md for details
      		    		},
      			customCommand: {
      				monitorOnCommand: 'cd ./MagicMirror python3 send.py -p 396 -t 1 11717633',
      				
      			    }
      
      
      
      
      		},
      		{
        			module: "MMM-Remote-Control-Repository",
      		},
      				
      	]
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      

      Shell Script

      cd ./MagicMirror
      python3 send.py -p 396 -t 1 11717633
      

      send.py

      #!/usr/bin/env python3
      
      import argparse
      import logging
      
      from rpi_rf import RFDevice
      
      logging.basicConfig(level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S',
                          format='%(asctime)-15s - [%(levelname)s] %(module)s: %(message)s',)
      
      parser = argparse.ArgumentParser(description='Sends a decimal code via a 433/315MHz GPIO device')
      parser.add_argument('code', metavar='CODE', type=int,
                          help="Decimal code to send")
      parser.add_argument('-g', dest='gpio', type=int, default=17,
                          help="GPIO pin (Default: 17)")
      parser.add_argument('-p', dest='pulselength', type=int, default=None,
                          help="Pulselength (Default: 350)")
      parser.add_argument('-t', dest='protocol', type=int, default=None,
                          help="Protocol (Default: 1)")
      parser.add_argument('-l', dest='length', type=int, default=None,
                          help="Codelength (Default: 24)")
      parser.add_argument('-r', dest='repeat', type=int, default=10,
                          help="Repeat cycles (Default: 10)")
      args = parser.parse_args()
      
      rfdevice = RFDevice(args.gpio)
      rfdevice.enable_tx()
      rfdevice.tx_repeat = args.repeat
      
      if args.protocol:
          protocol = args.protocol
      else:
          protocol = "default"
      if args.pulselength:
          pulselength = args.pulselength
      else:
          pulselength = "default"
      if args.length:
          length = args.length
      else:
          length = "default"
      
      logging.info(str(args.code) +
                   " [protocol: " + str(protocol) +
                   ", pulselength: " + str(pulselength) +
                   ", length: " + str(length) +
                   ", repeat: " + str(rfdevice.tx_repeat) + "]")
      
      rfdevice.tx_code(args.code, args.protocol, args.pulselength, args.length)
      rfdevice.cleanup()
      

      apt-get install python3-pip

      pip3 install rpi-rf

      https://github.com/milaq/rpi-rf/tree/master/scripts

      posted in Troubleshooting
      G
      gkchimz
    • MM Video Call

      With the new capable RPi 4 (esp 4gb and 8gb) I wonder if it would be possible to do video calls on the MM

      posted in Requests
      G
      gkchimz
    • RE: Run MM2 from within Home Assistant

      @sdetweil - what does it mean to ‘fork’ it?

      posted in General Discussion
      G
      gkchimz
    • RE: MMM-VolvoOnCall

      @Sean is this using OBD II? I was thinking of looking for similar modules - something to tell me how much fuel is left in the car. How do you get OBD to communicate to the mirror?

      posted in Transport
      G
      gkchimz
    • RE: First Mirror Complete

      @esilfies what have you learnt? What do you wish you’d known before starting. I am about to start a 23" mirror too and hoping it won’t take me too long.

      posted in Show your Mirror
      G
      gkchimz
    • RE: 22'' Display + 40cmx50cm IKEA Frame + PIR Sensor

      @ryck , yes please a photo will be helpful, just to illustrate.

      Also - was the visibility in the film ok? or was it too transparent?

      posted in Show your Mirror
      G
      gkchimz
    • RE: Wooden frame with 24" screen

      @joeben said in Wooden frame with 24" screen:

      Since I wanted to avoid to see the screen behind the mirror, the visible si

      I am also looking to create a mirror that is the same size as my 23" monitor (for the same reason as you - so that the monitor is not visible. Did you get the glass cut to be the exact same size or was it a few mm larger?

      posted in Show your Mirror
      G
      gkchimz
    • 1
    • 2
    • 3
    • 3 / 3