MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. shbatm
    3. Posts
    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: [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: Update Error of v.2.2.0 :(

      @afedriansyah it looks like you already have it cloned to the directory, if you really really want to start fresh (WARNING WILL DELETE YOUR EXISTING INSTALLATION): rm -R ~/MagicMirror and then rerun the script. If you just want to upgrade, after the git pull, do npm install.

      Finally, I wouldn’t recommend running MM as root, unless you know what you’re doing…

      posted in Troubleshooting
      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: Unsuccessful video streaming - help please :)

      @mwoodage The stream didn’t work in VLC player either (e.g. VLC by itself, nothing to do with MagicMirror)? Have you tried on your regular computer? Not playing in VLC may be signs of a bigger problem–unfortunately I can’t troubleshoot every camera out there… if you can get it working in VLC on the Pi, I can help try and get it working in the module.

      Also FYI to you and @evroom, I am working on an update to the module to use VLC to play the videos instead of OMXPlayer – see details here: https://forum.magicmirror.builders/topic/2743/mmm-rtspstream-video-streaming-from-live-feeds-security-cameras/163

      posted in Utilities
      S
      shbatm
    • RE: Network stream with vlc

      @fonfon said in Network stream with vlc:

      is it possible to open a network stream in a windows with vlc ?

      If you are still interested, I am working on an update to my MMM-RTSPStream module to do this:
      https://forum.magicmirror.builders/topic/2743/mmm-rtspstream-video-streaming-from-live-feeds-security-cameras/163

      posted in Troubleshooting
      S
      shbatm
    • RE: [MMM-RTSPstream] No RTSP stream with VLC and MM ...

      @wetronic Just saw this. Do you have autoStart: true in your config?

      posted in Troubleshooting
      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: Unsuccessful video streaming - help please :)

      @mwoodage Make sure you can reach the stream in VLC or something similar first. Then try using the args that were spit out in the log to run omxplayer by itself from the command line. You may have to play with the arguments until you can get it work by itself, then you can change the module settings to match.

      omxplayer –avdict rtsp_transport:tcp –win 334 796 686 1038 –live –video_queue 4 –fps 30 “rtsp://admin:*******@192.168.1.77:554//h264Preview_01_main”
      
      posted in Utilities
      S
      shbatm
    • RE: Unsuccessful video streaming - help please :)

      @mwoodage There are some issues with the latest release of that module. Please try reverting to an older version and see if it works. I am in the process of working on a fix for it:

      cd ~/MagicMirror/modules/MMM-RTSPStream
      git checkout f583553
      
      posted in Utilities
      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: [octomirror-module] Monitor & Control an OctoPrint 3D Printer Server

      Can you please post your config section? Have you enabled the API and provided an API key?

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

      @richland007 it sounds like something simple has to be missing and the module isn’t loading, otherwise you would be seeing an error.

      1. Please post your config anyways (or send to me in a chat if you prefer). It may be something simple missing.
      2. Confirm you are using a Raspberry Pi, on WiFi, using IPv4 (not IPv6 or ethernet–those are supported but require additional config options).
      3. Confirm there are no errors from the module in the logs. You can run pm2 restart mm && pm2 logs to follow the logs through the whole restart process.
      4. You can also add some console.log(...) statements in the initialize function in node_helper.js to see if you can diagnose any issues with it loading. Again, if it was making it that far and not loading you should have seen an error.
      posted in System
      S
      shbatm
    • RE: [MMM-OnScreenMenu] Simple On-Screen Menu for controlling the MagicMirror²

      MODULE UPDATED

      This module has been updated to Version 0.2.1 in the develop channel.

      Major Changes:

      • Removed all of the server-side functions in favor of using MMM-Remote-Control pending PR#104. When using this version, you will need to also have MMM-Remote-Control Version 2.0.0 or above installed for all functions to work. This is a strategic move to allow simplification of this module and focus on the front-end, while MMMRC handles the heavy lifting on the back-end.
      • You can now use MMMRC as a menu item, or the whole menu:
        0_1546389590028_Capture.PNG

      Once the pull request is accepted for MMM-Remote-Control, this will be merged into the master branch.

      posted in Utilities
      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: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

      @barnosch said in [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras:

      the delay between the switch is useless.

      I agree, unfortunately this is a an OMXPlayer problem – it takes anywhere from 5-10s to actually open and play a stream, so rotating the streams with OMXPlayer is limited unless you’re willing to accept the delay. I’ve played with everything I can think of to leave a stream open in the background–but nothing worked. The shutdown delay option only affects FFMPEG.

      @djuscha For some reason only 1 stream is being started (the PM2 status is showing STOPPED for the other stream). I think I must have broken something in one of the last releases, try reverting back to an old version and see if it works:

      cd ~/MagicMirror/modules/MMM-RTSPStream
      git checkout f583553
      

      I will work on troubleshooting and see what I broke.

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

      @richland007

      First, as requested, here is an example config section:

      {
         module: 'MMM-AlexaOnOff',
         config: {
            devices: [{
               name: "Magic Mirror",
               on: {
                  notification: "ONSCREENMENU_PROCESS_ACTION",
                  payload: {
                     actionName: 'monitorOn'
                  }
               },
               off: {
                  notification: "ONSCREENMENU_PROCESS_ACTION",
                  payload: {
                     actionName: 'monitorOff'
                  }
               },
            }]
         }
      },
      

      When you start MagicMirror, you should see a line like this in your log file. If you don’t, then it’s a problem with the module installation. Make sure you’ve run npm install from inside the MMM-AlexaOnOff folder.

      FauxMo service started. Listening on 192.168.1.100:21900
      

      And netstat -tulpn | grep electron should show something like this:

      tcp        0      0 0.0.0.0:21900           0.0.0.0:*               LISTEN      3554/electron
      tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      3554/electron
      

      Make sure your mirror and Alexa are on the same Wi-Fi. Make sure you delete any duplicate devices in your Alexa app or at https://alexa.amazon.com/spa/index.html#appliances then restart Discovery.

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

      @djuscha Try 256, and make sure you restart the Pi after each adjustment.

      Also, please check the MM logs and post if you see any errors. You should be seeing two calls to start omxplayer. You can also do pm2 status to make sure both streams are running.

      posted in Utilities
      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: is there a way to control MMM-carousel with buttons?

      @xela I’m very glad you could get it working, and I wish you a speedy recovery as well!

      posted in Troubleshooting
      S
      shbatm
    • RE: Displaying Metrics from an Excel Sheet

      You can use a Node.js module like this one: https://www.npmjs.com/package/excel-as-json to save the data in a convenient format (JSON) and then use a MM module like https://github.com/timdows/MMM-JsonTable to display it.

      posted in Requests
      S
      shbatm
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 10
    • 11
    • 5 / 11