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

    Posts

    Recent Best Controversial
    • RE: is there a way to control MMM-carousel with buttons?

      Which version of MMM-Carousel are you using? If you use this one: MMM-Carousel w/ Slide Navigation you can navigate left and right or jump to a particular slide by sending a notification from another module.

      Just pushed an update to make this even easier. See the details at the bottom of the README

      posted in Troubleshooting
      S
      shbatm
    • RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

      @imdickie If you were on the Master branch it makes sense now why you were getting duplicate views, it was using ffmpeg and looking at only the first port for both cameras. The work-in-progress branch does not use websockets/ports for local playback since OMXPlayer just draws directly on top of the MM’s browser window.

      For the black screen: I forgot the wip branch has an additional node package required. This should take care of your problem:

      cd ~/MagicMirror/modules/MMM-RTSPStream
      git checkout wip
      git pull
      npm install
      

      You may or may not need to also add a moduleOffset config option: see the posts above for pictures, if the video doesn’t line up with the border, you can add moduleOffset: X to shift the video over (where X is a number of pixels).

      For more information about the wip branch, there is an updated README on the Github page: https://github.com/shbatm/MMM-RTSPStream/tree/wip

      For pm2: it’s definitely not a requirement, but I find it’s nice to have; I included in the note above just in case you were already using it. It will automatically run the MM script for you on startup. See this page if you want more information.

      To all using the module: Thanks for bearing with me, I haven’t had a lot of time this past month to finish out the hardware-accelerated version (wip/development branch) but I hope to get it done in the next month or so. I really do appreciate any feedback / issues you have to help me improve this module.

      posted in Utilities
      S
      shbatm
    • [MMM-AlexaOnOff] Simple Mirror Control from External Home Assistant (Alexa/Google Home/HASS.io)

      Description:

      Simple Mirror Control and module notifications from your existing (external) Home Assistant (Alexa/Google Home/HASS.io) with minimal setup using the Wemo protocol.

      Yes, this is yet-another-Alexa-module; however, I hadn’t found one that did not require setting up some special Alexa skill or configuring an AWS account, etc.

      This module uses the Belkin Wemo protocol (via fauxmojs) to receive on/off notifications from an Amazon Echo (or Google Home Hub, or anything that can discover and control a Wemo device). It creates “virtual” Wemo devices on your network that the home assistant can find, and then receives ON or OFF commands for those devices. The module simply takes these, and converts them to module notifications for other modules to work with.

      Main Features:

      • Simple setup. Install the module, then say, “Alexa, discover my devices”. The virtual devices will populate and you can start controlling them.
      • Doesn’t add redundant features.
        • I didn’t want to keep baking in the same functions that so many other modules already have, so this module just takes an ON or OFF command, and turns that into whatever notification you need it to be. Customize all the details in your config file.

      Examples:

      • Create a “Magic Mirror” virtual device, use a module like MMM-OnScreenMenu or MMM-RemoteControl to turn on and off the screen when you say “Alexa, turn on Magic Mirror”. – See detailed example here
      • Create a “device” for each profile in MMM-ProfileSwitcher. Setup the notification so when you say “Alexa, turn on Mary’s Mirror” it tells MMM-ProfileSwitcher to switch to that profile.

      Download:

      [card:shbatm/MMM-AlexaOnOff]


      Current Version 0.1.1 – CHANGELOG

      posted in System
      S
      shbatm
    • RE: Can I control a relay on MagicMirror2?

      You may want to take a look at the MMM-PIR-Sensor module and see if you can adapt it for your needs. It includes the ability to control a relay for turning on/off the monitor.

      posted in Development
      S
      shbatm
    • RE: is there a way to control MMM-carousel with buttons?

      @cyberphox - You may be interested in checking this out too: https://forum.magicmirror.builders/topic/9291/mmm-remote-control-v2-dev-extensible-rest-api-and-socket-communication-update

      posted in Troubleshooting
      S
      shbatm
    • RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

      @Johans Which other modules are you using? It looks like you may be using something like MMM-ProfileSwitcher, there may be a conflict between these modules or it may be because of the % symbol in the password.

      Also, when you switched to the wip branch, did you remember to re-run npm install in that folder? There are some additional dependencies for the wip branch.

      posted in Utilities
      S
      shbatm
    • RE: [MMM-AlexaOnOff] Simple Mirror Control from External Home Assistant (Alexa/Google Home/HASS.io)

      @richland007 Yes, it can, in conjunction with another module like MMM-Remote-Control or MMM-OnScreenMenu.

      Config section to do this with MMM-Remote-Control (see here for specifics on the module identifier needed):

      {
          module: 'MMM-AlexaOnOff',
          config: {
              devices: [{ 
                    name: "Clock Module",
                    on: { 
                      notification: "REMOTE_ACTION",
                      payload: { action: "SHOW", module: "module_1_clock" }
                    },
                    off: { 
                      notification: "REMOTE_ACTION",
                      payload: { action: "HIDE", module: "module_1_clock" }
                    },
              }]
          }
      }
      

      Config section to do this with MMM-OnScreenMenu:

      {
          module: 'MMM-AlexaOnOff',
          config: {
              devices: [{ 
                    name: "Clock Module",
                    on: { 
                      notification: "ONSCREENMENU_PROCESS_ACTION",
                      payload: { actionName:'moduleShow1', name: 'clock' }
                    },
                    off: { 
                      notification: "ONSCREENMENU_PROCESS_ACTION",
                      payload: { actionName:'moduleHide1', name: 'clock' }
                    },
              }]
          }
      }
      
      posted in System
      S
      shbatm
    • RE: Multiple Pages of Modules using CSS

      @strawberry-3-141 @Anhalter42 – Wanted to thank you both for the suggestions.

      I was able to fork and tweak @barnabycolby’s MMM-Carousel to manually switch between slides and show the page dots and navigation arrows without touching any core code. I also added the ability to move or change appearances of each module on a per-slide basis.

      If anyone is interested my fork w/ navigation enabled is here: MMM-Carousel w/ Navigation & Moveable Modules – the navigation uses my module MMM-KeyBindings, which isn’t necessary if you just want to use a mouse or touchscreen.

      0_1495391253670_20170520_201316.jpg

      posted in Development
      S
      shbatm
    • RE: Library error after full reinstallation (full version Raspbian and MagicMirror version 2.5.0)

      @bhepler said in Library error after full reinstallation (full version Raspbian and MagicMirror version 2.5.0):

      I would advise against using the Magic Mirror installation script at this time. It hasn’t been tested as well as the rest of the system. Perform a manual installation for better results.

      Second this.

      For anyone who comes across this error:

      /home/pi/MagicMirror/node_modules/electron/dist/electron: /lib/arm-linux-gnueabihf/libc.so.6: version GLIBC_2.27’ not found (required by /home/pi/MagicMirror/node_modules/electron/dist/electron) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR!

      It may be caused by npm trying to install electron v4.0.0, this version has some reference errors on the Pi: https://github.com/electron/electron/issues/16205 and a lower version (v3.0.13) should be used.

      posted in Troubleshooting
      S
      shbatm
    • RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

      Version 1.2.1 (Updated 15 Oct 2017) Now Available on ‘master’ branch

      • Now uses hardware-accelerated OMXPlayer as default player for local video
      • Resolved latency issues
      • Uses PM2 to control stream playback – automatically restarts streams when they close
      • Fullscreen, custom window and offset options now available.
      • Important - please update your configurations after updating this module. as some settings have changed. This new version includes a new configuration tool for building your configuration section.

      Fresh Install:

      See the installation instructions on the README.

      To switch back from the ‘wip’ branch:

      (Only necessary if you want to, the ‘wip’ and ‘master’ are the same currently, but I will update the ‘wip’ with new features and bug-fixes first for testing. If you want to beta test, stay on ‘wip’)

      cd ~/MagicMirror/modules/MMM-RSTPStream
      git checkout master
      git pull
      npm install
      http-server -p 9999
      # From a web browser, navigate to http://mirror-ip:9999/config.html
      # Once your config is made, press Ctrl+C to exit the config builder
      # Restart your mirror and test!
      
      posted in Utilities
      S
      shbatm
    • RE: [MMM-AlexaOnOff] Simple Mirror Control from External Home Assistant (Alexa/Google Home/HASS.io)

      @richland007 said in [MMM-AlexaOnOff] Simple Mirror Control from External Home Assistant (Alexa/Google Home/HASS.io):

      What do you think?? i do not see any errors

      I’m at a loss. I ran the install on a fresh install of MagicMirror (v2.7.0-dev) on the latest version of Raspbian with Desktop (Nov’18) and I got the output shown in this Gist: https://gist.github.com/shbatm/886fc811d314d136ccedeaf5663e5881. Notice the FauxMo service started. Listening on 192.168.10.92:21900 on the third to last line.

      When I copy and paste your config section into my config it works fine. I run Discover Devices on Alexa and she finds “Horoscope Module” as a Wemo Switch.

      What version of MagicMirror, node, and Raspbian are you using? Is it the most recent?

      Try running FauxMo by itself and see if you can find the “fake” devices it creates:

      cd ~/MagicMirror/modules/MMM-AlexaOnOff/node_modules/fauxmojs/example
      node example.js
      

      You should see: started.. and then be able to discover ‘office light’ and ‘office fan’

      Edit: I did notice one thing: unless you’re using my fork of MMM-Remote-Control, the SHOW/HIDE functions require the module identifier, not the module name. The identifier will be something of the form module_4_MMM-horoscope and is the HTML ID of the module’s container (you can find this by using DevTools or digging into MMM-Remote-Control further.

      posted in System
      S
      shbatm
    • RE: [MMM-Remote-Control](v2-dev) Extensible REST API, Dynamic Menus, and Socket Communications, plus other updates

      Additional Features Added:

      • Dynamic Module Control menu – uses the new API to create a Module Control menu on the remote page to control other modules via notifications.
      • Custom Menu – ability to specify your own custom menu items from a file (for advanced users)
      • Use PM2 API to control restarts/stops of MM. Can also support starting/stopping other PM2 scripts by passing processName: “scriptToUse” in the query payload.

      Example Dynamic Menu for MMM-Carousel w/ Navigation

      0_1546390145459_ModuleMenuExample.png

      posted in Development
      S
      shbatm
    • RE: Clean installation... fails left and right

      I’m seeing issues with the newest “Raspbian Stretch with desktop image” (Nov 2018–non-bloatware) as well – I did a fresh, manual installation, no errors, but electron will not start with the OpenGL driver (full KMS or fake KMS) enabled. It runs through everything fine on npm start but then just stalls at “Launching application.” If I disable OpenGL, it works fine.

      Tested at Tag v2.6.0 and on the develop branch (2.7.0-dev), same issues.

      EDIT: Definitely an issue with electron: adding app.disableHardwareAcceleration(); in js/electron.js makes it open fine.

      EDIT 2: Opened an issue for this #1500, looks like Electron v3.0.13 works.

      posted in Bug Hunt
      S
      shbatm
    • RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

      @djuscha If you switch the order, does the opposite one show up? You may need to change the CPU/GPU memory split in your Pi – sudo raspi-config find the “Memory Split” option and increase from 64 to 128.

      posted in Utilities
      S
      shbatm
    • RE: Multipages

      @RamblingGeekUk – Check out my fork of MMM-Carousel with Pages/Navigation. You can find it here (also now linked in the bottom of the post above).
      [card:shbatm/MMM-Carousel]

      posted in Feature Requests
      S
      shbatm
    • RE: [MMM-AlexaOnOff] Simple Mirror Control from External Home Assistant (Alexa/Google Home/HASS.io)

      The example runs on different ports (10000, 10001 I think) but I don’t know why Alexa wouldn’t find the devices. There must be something with your network or firewall causing an issue.

      The module may not be starting properly because it has a minimum MM version of 2.5.0. If you don’t want to upgrade, you can try changing line 21 in MMM-AlexaOnOff.js to match your version.

      About MMM-Remote-Control: see https://github.com/Jopyth/MMM-Remote-Control#list-of-actions for more details. The IDs are created by MM when it starts, and yes it should match the order in your config. The easiest way I’ve found to get these is to open the remote.html page on your computer, go to Edit View, and right-click > Inspect Element on one of the menu items. You’ll get something like this:
      0_1546541069499_Capture.PNG

      I have a Pull Request for MMM-Remote-Control pending that will let you use the names directly, but it hasn’t been incorporated yet.

      posted in System
      S
      shbatm
    • RE: Clean installation... fails left and right

      @dazza120

      cat ~/MagicMirror/node_modules/electron/package.json | grep '"version":'
      

      Upgrade with:

      cd ~/MagicMirror/
      npm install electron@3.0.13
      
      posted in Bug Hunt
      S
      shbatm
    • RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

      STATUS UPDATE

      Just wanted to give everyone a quick status update about this module.

      Bad news first: the current version in the master branch is malfunctioning. Please revert to a previous version (see post above) until I get time to undo the commit.
      EDIT - I’ve reverted the changes that I think broke the master channel. Please try updating your module to the current master branch and test.

      Good news! The reason I haven’t fixed the main branch yet is because the most recent version of the Raspbian image (Nov '18) has introduced a native version of VLC with hardware acceleration. I am actively working on a version of this module that will abandon OMXPlayer in favor of VLC, and have a working prototype in the develop branch for anyone interested in testing!

      Requirements:

      • Must have the most recent version of Raspbian with Desktop (> Nov '18). Google how to upgrade, but you may be better off starting with a fresh image.
      • Enable OpenGL (Fake KMS) driver in raspi-config
      • Increase GPU/CPU Memory Split to at least 128 (do this after enabling OpenGL because it will reset it to 64).
      • Upgrade Electron to v3.0.13 (v2.0.16 in MM v2.6 is not working with OpenGL–see MM Issue #1500:
          cd ~/MagicMirror
          # Remove the node_modules folder to start fresh
          rm -R ./node_modules
          # Either manually update the required electron version in package.json to 3.0.13 or use the sed command below
          sed -i 's/electron": "\^2\.0\..*",/electron": "^3.0.13",/g' package.json
          # Re-install the MM node modules
          npm install
      
      • Delete your MMM-RTSPStream module directory and use the new installer script to install everything:
          rm -R ~/MagicMirror/modules/MMM-RTSPStream
          bash -c "$(curl -s https://raw.githubusercontent.com/shbatm/MMM-RTSPStream/develop/scripts/installer.sh)"
      
      • Update your config.js section to use VLC: localPlayer: 'vlc'

      Working:

      • VLC windows “placed” on top of the main Electron window inside the module’s box
      • Plays quickly, minimal lag, low CPU usage (4 streams @ ~35%)
      • Visible in VNC client (couldn’t do this with OMXPlayer)
      • Fast switching between streams – all VLC windows will remain open, and wmctrl utility used to toggle which one is on top.
        • Make sure to set a shutdownDelay for in your module config section make it longer than it takes to rotate back to that stream time (e.g. if you have rotateStreamTimeout: 10, and 3 streams, then it will take 20s to get back to the first stream, so you should set shutdownDelay: 22– 20s + 2s buffer).
      • Suspend/Restore functions
      • New version of Raspbian also has a hw-accelerated version of FFMPEG; I’ve added a hwAccel: true option for ffmpeg users to use HW-accelerated decoding. FFMPEG still has a big CPU impact for the encoder though.

      Not-yet-tested / left to-do:

      • Test if sound works
      • Figure out what I broke in the OMXPlayer version

      Not-gonna-happen:

      • Embedding VLC into Electron window (NPAPI-plugins are no longer supported and this is the only way I know how to do that).
      • Using VLC as the viewer for “remote” windows (other web browser instances of the MM) – same reason as above.

      Known Bugs:

      • When VLC windows are first created, you see them move around the screen. After they’re “put in the box” it they won’t fill up the box right away. After ~7 secs they should fill the box.
        • I am using devilspie2 to remove window decorations and move the VLC windows; however, for some reason I have to call it twice (~7s apart) to get VLC to resize it’s video properly. Shouldn’t be an issue in the long-term, unless you are hiding/showing the module often.
      posted in Utilities
      S
      shbatm
    • RE: [MMM-AlexaOnOff] Simple Mirror Control from External Home Assistant (Alexa/Google Home/HASS.io)

      @djsunrise19

      Please check the same things:

      1. Check your MagicMirror version, if it’s lower than v2.5.0 and you don’t want to upgrade, you can try changing line 21 in MMM-AlexaOnOff.js to match your version.
      2. You should see FauxMo service started. Listening on 192.168.x.x:21900 in your log file if the service started.
      3. You can try testing with the example:
          cd ~/MagicMirror/modules/MMM-AlexaOnOff/node_modules/fauxmojs/example
          node example.js
      

      You should see: started.. and then be able to discover ‘office light’ and ‘office fan’ on your Alexa.
      4. Make sure you try discovery from alexa.amazon.com, not just your Echo.

      posted in System
      S
      shbatm
    • RE: HELP to use a cam with MM PLEASE

      @axel said in HELP to use a cam with MM PLEASE:

      see my usb cam in live on the mirror!

      If you can get an RTSP stream URL from your IP camera you can use my module: MMM-RTSPStream. Use the develop branch right now–and search this forum if you’re having issues getting it to work.

      If you want to stream your USB camera by hooking it up to the Pi, you can look at something like mjpg-streamer (Google ‘OctoPrint mjpg-streamer setup’ for some good guides) and then use MMM-iframe to show the image.

      posted in Troubleshooting
      S
      shbatm
    • 1 / 1