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-Swipe - Hand gestures

      To anyone still looking to continue development of this module or to adjust it so the Mirror does not need to be run as sudo: I started work on a fork to change to using the onoff node module which doesn’t require sudo.

      The new version is about 90% there and just needs some additional testing to make sure everything works as intended. Unfortunately, after I put the effort into re-writing a lot of the code, I realized that the sensors and my dog do not get along so I need to try something else.

      I’m putting the code out there in case anyone is interested in taking it any further… there are some development notes on the readme page to explain some of the differences in the two versions.

      Thank you to @mochman for the original development and inspiration.

      [card:shbatm/MMM-Swipe]

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

      Great! I’m glad it’s working!

      Still trying to find a more robust way for getting the right location for the overlay that doesn’t get messed up by margins and borders.

      Starting on line 321 of MMM-RTSPStream.js try changing the +47 at the end of each line. I’d start with making them 0 and see if that helps:

      box: {
          top: rect.top + 47,       // Compensate for Margins 
          right: rect.right + 47,   // Compensate for Margins
          bottom: rect.bottom + 47, // Compensate for Margins
          left: rect.left + 47      // Compensate for Margins
      }
      

      ICYW: The 47 comes from a combo of the body margin, padding and borders on my setup.

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

      @bhepler Have you tried the omxplayer method above? This should be using hardware acceleration–on my RPi3 this is using ~10% CPU.

      Note: I have updated the development branch to use omxplayer by default for the local screen. You do not need to change anything in your config, just switch to the branch using:

      cd ~/MagicMirror/modules/MMM-RTSPStream
      git checkout wip
      # Update node modules
      npm run-script update
      

      See the updated README here for more details – once tested I’ll update the main branch:
      https://github.com/shbatm/MMM-RTSPStream/tree/wip

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

      @Niggich Just letting you know that I’m testing an alternate method for displaying the video if you want to test it out. It uses omxplayer to overlay the video stream directly onto the display, which uses hardware acceleration. It only works on the local display and is still a work in progress, but there is minimum latency since it’s a direct stream.

      To use, make sure you have omxplayer installed and then switch to the development branch:

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

      And update your module config to add: player: 'omx' (outside of the streamX configs).

      Future plans include:

      • Ability to play full screen
      • Show thumbnails on remote screen when playing locally with OMX
      • Show ffmpeg stream on remote screen when playing locally with OMX
      posted in Utilities
      S
      shbatm
    • RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

      I have some things to try when I get back in town this week. Please make sure you have hideFfmpegOutput: false in your stream config section and post any errors. Were you able to get it back working after reverting the changes?

      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
    • [MMM-OnScreenMenu] Simple On-Screen Menu for controlling the MagicMirror²

      Description

      The MMM-OnScreenMenu Module provides a small, customizable, material-style floating action button menu for controlling the MagicMirror².

      Basic Functions:

      1. Control the power to the screen (On/Off/Toggle).
      2. Manage the Mirror (Shutdown/Reboot/Restart MM²/Refresh Window).
      3. Module Visibility (Show/Hide/Toggle).
      4. Send Notifications to Other Modules:
        • Switch Profiles in MMM-ProfileSwitcher
        • Perform other module functions from a button in the menu.

      The menu is designed to be controllable from multiple devices:

      • Mouse Control
      • Touchscreen Control
      • Keyboard Control
      • Bluetooth Remote via MMM-KeyBindings
      • Module Notifications from other modules

      Screenshots

      SEE LIVE DEMO/MOCKUP HERE: https://codepen.io/shbatm/pen/OggMbr/



      First: Touch Mode; Middle: Hidden/Mouseover Mode; Last: Demo

      Download:

      [card:shbatm/MMM-OnScreenMenu]


      Version 0.1.3

      • Added menu options for minimizing, toggle fullscreen mode, opening DevTools, stopping MM via PM2,
      • Added delayed menu items (e.g. call a function after a certain timeout–like to turn off the mirror after X seconds)
      • Added external control of the menu/functions from other modules via notifications–includes the ability to call any function the module knows how to handle, even if it’s not in the menu. This lets you use modules like MMM-Buttons or MMM-MPR121 to control the menu.

      Version 0.0.9

      • Initial Public Release for Testing – please let me know via this thread or GitHub Issues if you find any bugs or have any feature requests; always open to feedback!
      posted in Utilities
      S
      shbatm
    • RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

      @Niggich - There is something I found that you can try. Please let me know if this tweak helps and I’ll roll it into the module.

      For any suggested ffmpeg changes, you’ll need to edit Line 14 (or 15, depending on version) of the following file, whichever has the ffmpeg argument list:

             ~/MagicMirror/modules/MMM-RTSPStream/node_modules/node-rtsp-stream-es6/src/mpeg1muxer.js
      
      1. Ignore audio stream: add "-an", after "mpeg1video", and before "-bf",

      As I find more things to try, I’ll post them back on here.

      posted in Utilities
      S
      shbatm
    • RE: Synchronus socketNotification ?

      I’m not sure how you would block JavaScript to actually make it synchronous since it is an asynchronous language. I use the “circular” method I described in one of my modules with very little lag; yes you would have to break it up into two functions for part A and part B.

      Is the GET you are mentioning just getting a config value from the module’s config? If so, why not just pass the config value you need with a module.js->node_helper socket notification and have the node_helper store the value until you need it? Any time it needs to be updated, just resend the notification; that way node_helper always has the latest value available.

      node_helper.js:

      module.exports = NodeHelper.create({
          config: {},
          socketNotificationReceived: function(notification, payload) {
              if (notification === 'CONFIG') {
                  this.config = payload;
              }
          },
          yourFunction: function(variables) {
              configValueNeeded = this.config.valueNeeded;
              ... // do something
          },
          ...
      });
      

      module.js:

      start: function() {
          this.updateConfig();
      },
      
      updateConfig: function() {
          this.sendSocketNotification('CONFIG', this.config);
      },
      
      someFunction: function() {
          // config changed for some reason
          this.updateConfig();
      },
      

      If you’re getting a config value from some third-party service: in your node_helper you can use the request module:

      getData: function() {
          // DO STUFF
          var request = require('request');
          request({
              url: apiUrl,
              method: 'GET',
          }, (error, response, body) => {
              if (!error && response.statusCode == 200) {
              // CONTINUE DOING YOUR STUFF
              } else if (response.statusCode === 401) {
                  console.error(this.name, error);
              } else {
                  console.error(this.name, "Could not load data.");
              }
          });
      },
      
      posted in Troubleshooting
      S
      shbatm
    • RE: Synchronus socketNotification ?

      Can’t you just send a socketNotification back to the associated js file when the information is received and call a function? Both node_helper and the module.js file have both socketNotificationReceived: function(notification, payload) and sendSocketNotification(notification, payload) methods.

      posted in Troubleshooting
      S
      shbatm
    • 1
    • 2
    • 17
    • 18
    • 19
    • 20
    • 21
    • 19 / 21