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

    imdickie

    @imdickie

    0
    Reputation
    556
    Profile views
    10
    Posts
    1
    Followers
    0
    Following
    Joined
    Last Online

    imdickie Unfollow Follow

    Latest posts made by imdickie

    • RE: [MMM-OnThisDayWikiApi] - Get Wikipedia's OnThisDay using the Wikimedia API

      @greedyvegan said in [MMM-OnThisDayWikiApi] - Get Wikipedia's OnThisDay using the Wikimedia API:

      @imdickie said

      The title seems to ignore the forced maxWidth. Is there any way to force the title to align to the body?!

      I’ve had this issue before
      try the developer view in a browser to see your options
      the default settings doesn’t prohibit you

      It didn’t accomplish what I wanted, but I can see you did send me down the right path. I’ll do some investigating some Custom CSS statements.

      Thanks.

      posted in Showcase
      I
      imdickie
    • RE: [MMM-OnThisDayWikiApi] - Get Wikipedia's OnThisDay using the Wikimedia API

      The title seems to ignore the forced maxWidth. Is there any way to force the title to align to the body?MMM-OnThisDay.png

      posted in Showcase
      I
      imdickie
    • RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

      Getting closer. Hoping to get some help based on the new info below.

      I was able to get a video stream, but…

      It only works in the middle_center position and the video orientation is rotated 90 deg.

      I tried using the rotateDegree switch, and it does rotate it, but the video frame stays in the portriat oreintation.

      Video Oreintation

      I am using the below config file.

      	modules: [
      		{
      			module: "alert",
      		},
      		{
      			module: "updatenotification",
      			position: "top_bar"
      		},
      		{
      			module: "clock",
      			position: "top_left"
      		},
      		{
      			module: "calendar",
      			header: "Family Calendar",
      			position: "top_left",
      			config: {
      				colored: "true",
      				calendars: [
      					{
      						symbol: "calendar-check-o ",
      						color: "#34a95f",
      						url: "https://calendar.google.com/calendar/ical/xxx/basic.ics"
      					},
      					{
      						symbol: "calendar-check-o ",
      						color: "#b1002c",
      						url: "https://calendar.google.com/calendar/ical/xxx/basic.ics"
      					},
      				]
      			}
      		},
      		{
      		  module: "MMM-DarkSkyForecast",
      		  header: "Weather",
      		  position: "top_right",
      		  classes: "default everyone",
      		  disabled: false,
      		  config: {
      		    apikey: "xxx",
      		    latitude: "33.481613",
      		    longitude: "-117.061959",      
      		    iconset: "5c",
      		    concise: false,
          		    forecastLayout: "table",
      		    units: "us"
      		    }
      		},		
      		{
      		module: 'MMM-RTSPStream',
      		position: 'middle_center',
      		config: {
      		    autoStart: true,
      		    moduleWidth: 642,
      		    moduleHeight: 362,
      		    localPlayer: 'omxplayer',     
      		    stream1: {
      			name: '',
      			url: 'rtsp://xxx:xxx@192.168.x.xxx:554/Streaming/Channels/102/',
      			snapshotUrl: '',
      			snapshotRefresh: 10, // Seconds
      			frameRate: "30",
      			width: 640,
      		        height: 360,
      			port: 9999,
      		    }
      		}
      	},
      		{
      			module: "compliments",
      			position: "bottom_center"
      		},
      		{
      			module: "newsfeed",
      			position: "bottom_center",
      			config: {
      				feeds: [
      					{
      						title: "New York Times",
      						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
      					}
      				],
      				showSourceTitle: true,
      				showPublishDate: true
      			}
      		},
      	        {
      	            module: 'MMM-GoogleMapsTraffic',
      	            position: 'bottom_center',
      	            config: {
      	                key: 'xxx',
      	                lat: xxx,
      	                lng: -xxx,
      	                height: '360px',
      	                width: '360px',
      	                styledMapType: "",
      	                disableDefaultUI: true,
      	                backgroundColor: 'hsla(0, 0%, 0%, 0)',
      	            }
      		},
      	]
      
      };
      
      posted in Utilities
      I
      imdickie
    • RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

      I’m going from a working Raspi3 to a Raspi4 and using the exact same working module configuration I cannot get video on omxplayer using this module.

      I set up a pristine image and loaded everything one at a time, but this one fails. I pulled out all of the modules to make sure there was nothing in them that was causing the issue.

      Below is my module config and my logs pulled using pm2 logs mm. There is an error, but I don’t know enough about this to determine the cause. Can anyone review the logs and provide some direction?

      Thanks.

       		 {
      		    module: "MMM-RTSPStream",
      		    position: "bottom_bar",
      		    config: {
      		        autoStart: true,
      		        rotateStreams: true,
      		        rotateStreamTimeout: 10,
      		        moduleWidth: 642,
      		        moduleHeight: 362,
      		        localPlayer: 'omxplayer',
      		        remotePlayer: 'none',
      		        showSnapWhenPaused: true,
      		        remoteSnaps: true,
      		        stream1: {
      		            name: '',
      		            url: 'rtsp://xxx:xxx@192.168.1.164:554/Streaming/Channels/102/',
      		            frameRate: '10',
      		            snapshotType: 'url',
      		            snapshotRefresh: 10,
      		            width: 640,
      		            height: 360,
      		            },
      		        }
      		}
      

      pi@raspberrypi:~ $ pm2 logs mm --lines 100
      [TAILING] Tailing last 100 lines for [mm] process (change the value with --lines option)
      /home/pi/.pm2/logs/mm-error.log last 100 lines:
      0|mm | [2020-04-08 14:17:49.908] [ERROR] TypeError: Cannot convert undefined or null to object
      0|mm | at Function.keys ()
      0|mm | at stopProcs (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_helper.js:469:32)
      0|mm | at /home/pi/MagicMirror/modules/MMM-RTSPStream/node_helper.js:498:17
      0|mm | at /home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/pm2/lib/API.js:606:19
      0|mm | at /home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/pm2-axon-rpc/lib/client.js:45:10
      0|mm | at Parser. (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/pm2-axon/lib/sockets/req.js:67:8)
      0|mm | at Parser.emit (events.js:200:13)
      0|mm | at Parser._write (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_modules/amp/lib/stream.js:91:16)
      0|mm | at doWrite (_stream_writable.js:417:12)
      0|mm | at writeOrBuffer (_stream_writable.js:401:5)

      /home/pi/.pm2/logs/mm-out.log last 100 lines:
      0|mm |
      0|mm | > magicmirror@2.11.0 start /home/pi/MagicMirror
      0|mm | > DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js
      0|mm |
      0|mm | [2020-04-08 14:17:48.507] [LOG] Starting MagicMirror: v2.11.0
      0|mm | [2020-04-08 14:17:48.514] [LOG] Loading config …
      0|mm | [2020-04-08 14:17:48.519] [LOG] Loading module helpers …
      0|mm | [2020-04-08 14:17:49.292] [LOG] Initializing new module helper …
      0|mm | [2020-04-08 14:17:49.293] [LOG] Module helper loaded: MMM-RTSPStream
      0|mm | [2020-04-08 14:17:49.293] [LOG] All module helpers loaded.
      0|mm | [2020-04-08 14:17:49.399] [LOG] Starting server on port 8080 …
      0|mm | [2020-04-08 14:17:49.421] [LOG] Server started …
      0|mm | [2020-04-08 14:17:49.422] [LOG] Connecting socket for: MMM-RTSPStream
      0|mm | [2020-04-08 14:17:49.423] [LOG] PM2: Stopping all OMXPlayer Streams…
      0|mm | [2020-04-08 14:17:49.424] [LOG] Sockets connected & modules started …
      0|mm | [2020-04-08 14:17:49.531] [LOG] Launching application.
      0|mm | [2020-04-08 14:17:49.908] [LOG] Whoops! There was an uncaught exception…
      0|mm | [2020-04-08 14:17:49.916] [LOG] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      0|mm | [2020-04-08 14:17:49.916] [LOG] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      0|mm | [2020-04-08 14:17:53.508] [LOG] Starting stream stream1 using: omxplayer --avdict rtsp_transport:tcp --win 282,1501,922,1861 --live --video_queue 4 --fps 30 --no-osd rtsp://xxx:xxx@192.168.1.164:554/Streaming/Channels/102/
      0|mm | [2020-04-08 14:17:53.527] [LOG] Starting PM2 for omx_stream1
      0|mm | [2020-04-08 14:17:53.698] [LOG] PM2 started for omx_stream1

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

      I was able to get the overlay to match perfectly without using the moduleOffset variable by setting the module to the bottom bar.

      0_1502386724479_mmm-rstpstream_2.PNG

      It offsets when I positioned it other spots. Also, since you are working on this I noticed when the RTSPStream module is placed near another module that can shift in size like newsfeed it will sift the overlay. That was why I thought to place it in the bottom bar so it became the anchor in the bottom justification.

      Thanks again for a great module. It really helped with the wife acceptance factor.

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

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

      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).

      I read through everything I can find and am stuck at the final setting. Can you provide the exact syntax for for the moduleOffset setting?

      I tried several iterations and finally got it to shift, but it shifts an equal amount vertically and horizontally.

      First I tried this:

      moduleOffset:
           {
           top: x
           right: x
           bottom: x
           left: x
           },
      

      and that put the video smack dab in the center and flipped between the two streams.

      Then I tried this:

      moduleOffset: -20,
      
      

      and it shifted the video up and left 20 pixels.

      What I am trying to accomplish is shift the videos up but stay the same left/right.

      Thanks.

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

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

      …

      That did it. Thanks a ton.

      Not sure if it is omxplayer or not, but the stream seems to be much clearer. There is definitely less lag.

      Excellent work, thanks again.

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

      @shbatm Changing the ports did allow me to see separate streams.

      However, when I did the && git status command it did come up On Branch Master so I ran git checkout wip. When I kicked off the MM script after that change my screen just goes black. I went back to master with the different port numbers for now.

      I am not running pm2. I can rebuild from scratch and set it up though. This is all pretty new to me and I am learning as I go.

      Ctl+q doesn’t stop MM when in the black screen. I had to alt+tab to the console window and ctl+c to stop the script.

      Below is the console from when I ran the MM script and it went to a black screen. Hopefully that gives you some idea what is going on.

      Thanks again for the help.

      pi@raspberrypi:~/MagicMirror $ npm start
      
      > magicmirror@2.1.2 start /home/pi/MagicMirror
      > sh run-start.sh
      
      Starting MagicMirror: v2.1.2
      Loading config ...
      Loading module helpers ...
      No helper found for module: alert.
      Initializing new module helper ...
      Module helper loaded: updatenotification
      No helper found for module: clock.
      Initializing new module helper ...
      Module helper loaded: calendar
      No helper found for module: compliments.
      No helper found for module: currentweather.
      Initializing new module helper ...
      Module helper loaded: newsfeed
      Initializing new module helper ...
      Module helper loaded: MMM-WunderGround
      WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'ps-tree'
      Loading module helpers ...
      No helper found for module: alert.
      Initializing new module helper ...
      Module helper loaded: updatenotification
      No helper found for module: clock.
      Initializing new module helper ...
      Module helper loaded: calendar
      No helper found for module: compliments.
      No helper found for module: currentweather.
      Initializing new module helper ...
      Module helper loaded: newsfeed
      Initializing new module helper ...
      Module helper loaded: MMM-WunderGround
      App threw an error during load
      Error: Cannot find module 'ps-tree'
          at Module._resolveFilename (module.js:470:15)
          at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
          at Function.Module._load (module.js:418:25)
          at Module.require (module.js:498:17)
          at require (internal/module.js:20:19)
          at Object. (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_helper.js:15:16)
          at Object. (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_helper.js:188:3)
          at Module._compile (module.js:571:32)
          at Object.Module._extensions..js (module.js:580:10)
          at Module.load (module.js:488:32)
      Whoops! There was an uncaught exception...
      { Error: Cannot find module 'ps-tree'
          at Module._resolveFilename (module.js:470:15)
          at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
          at Function.Module._load (module.js:418:25)
          at Module.require (module.js:498:17)
          at require (internal/module.js:20:19)
          at Object. (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_helper.js:15:16)
          at Object. (/home/pi/MagicMirror/modules/MMM-RTSPStream/node_helper.js:188:3)
          at Module._compile (module.js:571:32)
          at Object.Module._extensions..js (module.js:580:10)
          at Module.load (module.js:488:32) code: 'MODULE_NOT_FOUND' }
      MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      Launching application.
      ^C
      pi@raspberrypi:~/MagicMirror $
      
      posted in Utilities
      I
      imdickie
    • RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras

      @shbatm Thanks for the quick response. I changed them both to the correct names. Same result though, one stream in both windows.

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

      Great module. Allows my family to see the front door as they walk to answer it.

      I am trying to use multiple streams so it shows the camera on my driveway and front door side by side. The layout is setup but, it duplicates the camera feed listed under stream1.

      What is the reason why it is not seeing the second stream?

      I’ve validated my RSP 3 can see both rtsp streams. In fact, if I swap the ip addresses my MM still shows just the first one listed.

      Here is the code I am using.

      {
      module: 'MMM-RTSPStream',
      position: 'bottom_center',
      config: {
      	autoStart: true,
              rotateStreams: false,
              rotateStreamTimeout: 10,
              showSnapWhenPaused: false,
              moduleWidth: 704,
              moduleHeight: 240,
      	localPlayer: 'omxplayer',
              	stream1: {
                      name: 'Front Door',
                      url: 'rtsp://xxxxx:xxxxx@192.168.1.164:554/Streaming/Channels/102/',
                      snapshotUrl: '',
                      snapshotRefresh: 10, // Seconds
                      frameRate: "30",
                      port: 9999,
      		width: "320",
      		height: "240",
      		},
                      stream2: {
                      name: 'Front Door',
                      url: 'rtsp://xxxxx:xxxxx@192.168.1.163:554/Streaming/Channels/102/',
                      snapshotUrl: '',
                      snapshotRefresh: 10, // Seconds
                      frameRate: "30",
                      port: 9999,
      		width: "320",
      		height: "240",
                      }
                  }
              },
      

      Here is the result:

      0_1502297117801_mmm-rstpstream.PNG

      posted in Utilities
      I
      imdickie