@sdetweil
yeah, I started it via the mm2.sh script that had the “npm run server” command
I’ve now started the second instance as “pm2 start pm2_MagicMirror2_new.json” and “pm2 status” does show both instances running.
Ran “pm2 save”, rebooted the host and both instances are showing as expected - MM#1 on the display connected to the host device, with MM#1 and MM#2 via a browser on a remote device/devices.
Read the statement by Michael Teeuw here.
Latest posts made by DarrenO 0
-
RE: Multiple "Mirrors" from a single device
-
RE: Multiple "Mirrors" from a single device
@sdetweil
Fair enough.
So i’ll have to have a physical computer like a Pi, NUC or MiniPC attached to the TV via HDMI to display the MM via that computer’s browser.
Not a big deal as the TV would be used for viewing TV channels and online streaming content anyway. -
RE: Multiple "Mirrors" from a single device
@sdetweil
after running the mm2.sh script (runs as “npm run server”) and then I initiate a new SSH to the MM, I still only see a single instance (the original instance from mm.sh) of MM running when I issue a pm2 status command.
Although I can physically see the second MM displayed as desired in my browser, I’m not seeing the second instance via the pm2 status command. -
RE: Multiple "Mirrors" from a single device
@BKeyport
isn’t this to run two MM’s on a single display and have the second MM displayed from the 1920th pixel on the x axis?I’m wanting to run two MM’s, each instance on isolated displays - one on the display connected to the host in the traditional method and the other on a remote display like another computer, or TV with an in-built browser.
-
RE: Multiple "Mirrors" from a single device
@sdetweil
OK, so I launched the second instance of MM via mm2.sh with the “npm run server” command.
I then launched a second SSH session to the MM device and issued a “pm2 save” command.
Rebooted the MM device from the second SSH session but the second MM instance didn’t come up. -
RE: Multiple "Mirrors" from a single device
@sdetweil
so mm2.sh should/would be:
#!/bin/bash
cd ~/MagicMirror
export MM_CONFIG_FILE=config/config2.js
export MM_PORT=8081
npm run server
#DISPLAY=:0 npm startwhile mm.sh remains untouched
When I have this in place:
- instance #1 correctly displays on the screen attached to the MM host… tick
- i can also view instance #1 on a browser (on port 8080)… tick
- can view instance #2 in a browser (on port 8081)… tick
However, when I run mm2.sh while I am SSH’d to the MM, I am not returned to the command line so I can save the pm2 setup.
I just have a prompt saying “Ready to go! Please point your browser to http://ipaddress:8081”I have to Ctrl-C to cancel out, which then stops the server function and the #2 instance is no longer displayed
-
RE: Multiple "Mirrors" from a single device
@sdetweil
OK, so no requirement to update the “name” and “watch” values in the .json file, but it doesn’t hurt to do so from an fyi perspective, right???When I run “pm2 start config2.js”, I can then access the second instance via browser on another device with no issue, but it also takes over the display directly connected to the MM host device.
I can view both MM instances via a browser on different devices (great, as that was one of my original questions), but what if i want to view instance #1 via the display directly connected to the MM host device and instance #2 via a remote browser (or vice versa?My .sh files to start each MM instance are as follows:
mm.sh
#!/bin/bash
cd ~/MagicMirror
DISPLAY=:0 npm startmm2.sh
#!/bin/bash
cd ~/MagicMirror
export MM_CONFIG_FILE=config/config2.js
export MM_PORT=8081
npm start
#DISPLAY=:0 npm startShould I change anything, or what would I need to change, to have the desired outcome described above?
-
RE: Multiple "Mirrors" from a single device
@sdetweil
Thanks. That has sort of help me out and pointed me in the right direction.Is it just as simple as copying the existing:
and editing the pm2_MagicMirror2_new.json file to reference:
- the app name of MagicMirror2
- the script of mm2.sh (is there anything to change in this?)
- watching the config2.js file for changes
and then executing pm2 start config2.js --name MagicMirror2
-
Multiple "Mirrors" from a single device
Is it possible to run multiple mirrors from a single device?
My current MM utilises the default Calendar module to display family member calendars from Google in the top_left section and the MMM-CalendarWeek module in the bottom_bar section to display another Google calendar.
I know I can display the MM via a web browser on any number of devices, but this is just a duplicate of what I see from the directly-connected host device.I want to output the family calendars on one display while the other calendar displays on another.
This could be where one is displayed to a directly-connected output, while the other is viewed from a browser, or possibly, both are displayed via a browser if physically locating the host with either display isn’t possible.Is this sort of setup doable?
I had read online that I would have to create a second config.js file, configured as required for the alternate view.
Within that file, I would have to specify an alternate port (say 8081) and initiate a secondary instance of MM.
However, the instructions never indicated or specified how the second config.js file would be referenced in order to display the appropriate output. -
RE: Updating to latest MM version
@sdetweil Thanks Sam
I’ve removed the git reset --hard from my .sh script
I had some small changes (gap-body-top/right/bottom/left set to 10px) in main.css which were reset back to the default 60px when I ran the git reset --hard command, so added those line specifically in the custom.css file instead and left the default vaules in the main.css file.For the updatenotification module, does the git pull command, for the respective specified modules not work?
I thought having a git pull command for the modules would negate the need to update them rather than have something display. I’m happy for the core MM update notification but didn’t want notifications for installed modules.
Am I, instead better off updating them as per the .sh script above?One last thing, when I update the config.js file, MM would normally auto-restart with file being rewritten.
Now, for some reason, it doesn’t. How can I get it to do so?