I got it working. The problem was a misconfiguration in one of the modules (not carousel).
Read the statement by Michael Teeuw here.
Posts
-
RE: MMM-Carousel breaks with multiple instances of module by using positional
-
RE: MMM-Carousel breaks with multiple instances of module by using positional
Thanks. I tried Pages, but it seems like it’s an all or nothing situation. Each page has to be set up and it would change all the elements between pages. What I like about Scenes2 is if I don’t have a class from a scene assigned to an element, that element remains unaffected. This is why with a combination of Scenes2 and Carousel I can have multiple areas changing independently at different times. So I have the “Weather” area rotating between options there that appear all the time, and then the calendars rotating independently. I may be missing something but I don’t think I can do that with Pages.
-
RE: Pollen module
@joey as far as I can tell it’s working for me. It’s not throwing any errors and the values change each day.
-
MMM-Carousel breaks with multiple instances of module by using positional
Re: MMM-Carousel - how to configure a module multiple times on the SAME page?
I looked through that thread but it doesn’t quite help with my issue.
I’m using scenes 2 on my calendars to rotate between the various family calendars.In the top_left in trying to display weather info that rotates separately and aren’t part of the scenes . I’m trying to do that with carousel. It works great with 3 modules all different. The moment I had another instance of weather into the mix the last module no longer shows. I just get a blank area when it should show that module .
Any pointers on where to look?
-
RE: Periodic Table of Elements
@Divis you wouldn’t need to make a module. You could use even use the default newsfeed module. You’d just need to create the XML file in the right format with the content to display.
-
RE: Periodic Table of Elements
@Divis said in Periodic Table of Elements:
friend that is a chemist. I have done extensive digging but cannot seem to find any modules that are related to chemistry. My ideal module would be something that would go through the periodic table of elements and randomly choose an element to give facts, history, and/or a story on its discovery. Something similar to the “today in history” but not time associate
If you want to create the data, you can probably use an RSS reader to go through it
-
RE: Wayland question
@sdetweil I think that worked. I was able to start it with pm2.
-
RE: Wayland question
@sdetweil said in Wayland question:
MagicMirror/installers/mm.sh
I have a theory…I did the install via ssh and not directly on the pi. Maybe that broke it?
-
Wayland question
I know this has been fixed (at least I think it has) I just can’t find what the fix is. My SD got corrupted so I’m re-installing. Clean install of PiOS on a Pi4b. Used @sdetweil script to install.
Starting with npm run start:wayland seems to work but when I reboot and it tries to start it doesn’t work.
What do I need to change?
-
Updated MMM-Dynamic-Modules
If anyone’s interested I updated MMM-Dynamic-Modules and added some functionality.
Orginal module by Toreke (https://github.com/Toreke/)
Magic Mirror² Module: MMM-Dynamic-Modules
MMM-Dynamic-Modules moves modules without need to restart Magic Mirror. Module also allows to hide or show modules. Module has method to change configured positions back. Can also dynamically adjust based on screen orientation and update based on notifications received that aren’t sent specifically to the module.
Example
These use the same config file and only minimal changes to CSS for landscape. My primary screen that’s on all the time is in portrait. The clock and MMM-BMW-PW was shifted from top_bar to upper_third. The newsfeed was moved from bottom_left to bottom_bar. MMM-News-QR was moved from bottom_right to bottom_bar. More drastic maneuvirng can be accomplished by incorporating CSS changes like the example posted here https://forum.magicmirror.builders/topic/13197/change-the-regions-positions
PORTRAIT:

LANDSCAPE:

Installationcd ~/MagicMirror/modules git clone https://github.com/gonzonia/MMM-Dynamic-Modules.git ConfigThe entry in config.js can include the following options:
Option | Description swapOrientation | true or false, whether to move modules based on the screen orientation LandscapeConfig | JSON string for moving/hiding when in landscape PortraitConfig | JSON string for moving/hiding when in portrait UpdateNotifications | List of notifications that will trigger the update based on orientation. (Will always include the system, "DOM_OBJECTS_CREATED"){ module: "MMM-Dynamic-Modules", classes: 'SceneFamily SceneSam', config: { swapOrientation: true, LandscapeConfig: '{"newsfeed":{"position": "bottom_bar","visible": true},"MMM-News-QR":{"position":"bottom_bar"},"MMM-BMW-PW":{"position":"upper_third"},"clock":{"position": "upper_third"}}', UpdateNotifications:"NEWS_FEED_UPDATE" }, },How to use
Module can be used by sending an change notification with a payload:
this.sendNotification('CHANGE_POSITIONS', modules = { 'clock':{ visible: 'true', position: 'top_right', }, 'MMM-WeeklySchedule':{ visible: 'true', position: 'top_left', }, 'MMM-AirQuality':{ visible: 'true', position: 'bottom_bar', } } );Sending a notification to reset to positions according to your config:
this.sendNotification(CHANGE_POSITIONS_DEFAULTS);OR move based on orientation the Config passed to LanscapeConfig or PortraitConfig must be valid JSON in a format like the one below. The slightest typo and it won’t work.
swapOrientation: true, LandscapeConfig: '{"newsfeed":{"position": "bottom_bar","visible": true},"MMM-News-QR":{"position":"bottom_bar"},"MMM-BMW-PW":{"position":"upper_third"},"clock":{"position": "upper_third"}}',Order of the modules matters. If there is multiple modules in the same position, first module will be top, second module under it, and so on. If multiple instances of a module are being used, they will ALL be moved or hidden.
Tips: Best when used in conjunction with CSS. Use
@media (orientation: landscape) { }and
@media (orientation: portrait) { }to create stylesheets for specific screen orientations.
You can also add
and (max-width: 3840px)to either one if you want to create something that is for 4K. This would come in handy if say your main mirror is 1080p but you want to have a separate browser somewhere else showing the mirror on a TV or higher resolution monitor.
-
RE: Change layout based on orientation?
@sdetweil I’m going to make it more dynamic. There’s actually screen.orientation.type that works to get landscape vs portrait
-
RE: Change layout based on orientation?
@sdetweil Maybe. I find it easier to build on someone else’s code. After I have some basic stuff functioning, I’ll look for a module template to work from. I’m also not sure the dynamic module will work (it’s 7 years old) so it might need to be updated anyhow.
-
RE: Change layout based on orientation?
@sdetweil That’s a thought. I think I can probably adapt the Dynamic Modules to allow for a config option to adjust based on orientation and that gets triggered at the ALL_MODULES_STARTED notification from the core.
Let me fork that and see if I can make that work.
-
RE: Change layout based on orientation?
@sdetweil Yeah the challenge I’m having with the way I’ve chosen to lay things out is that I have things in the top left, top center, and top right. They are just below things in the top bar on the vertical screen. Using the CSS from the post that shifts them They are still below the top bar but I kind of want them to the right of the top bar. I’m plying with it to see what I can do, but since they are all part of the same container, I’m not sure I can.
-
RE: Change layout based on orientation?
@sdetweil That’s on the server side though. I was thinking more at the client side, so that you could have multiple clients using a single server with different views.
For example:
I have a pi hooked up to a monitor in the kitchen running MM in portrait.It might be nice to have it up on the TV in another room or on a second monitor while I’m working. Those will be in landscape.
I think it can be done with shifting CSS mostly(https://forum.magicmirror.builders/topic/13197/change-the-regions-positions). But modules that use full screen might be a challenge.
-
Change layout based on orientation?
I’ve had my mirror in a portrait for a long time. I was thinking of playing around with changing it to landscape and started wondering if i was possible to have the layout change based on browser orientation. I know there’s CSS that can be used to move things around based on orientation (https://developer.mozilla.org/en-US/docs/Web/CSS/@media/orientation) , but I was wondering if there was any way to use that to actually move which modules were in what region.
-
RE: Google Photos API changing - MMM-GooglePhotos will stop working soon.
@sdetweil MMM-BackgroundSlideshow seems to do exactly what I want, but I think your handling of formatting the images is better.
-
RE: Google Photos API changing - MMM-GooglePhotos will stop working soon.
@sdetweil Thanks. That’s helpful. But I think it’s still above my pay-grade. I may poke around and see if I can figure something out, but I’m not sure I can. I conceptually understand what’s happening, but don’t see it in the code in a way that is clicking for me such that I can just make a call to an Exif method where it pulls the data from the file.
I’ve come across a couple of other modules who are doing some of it, but again, I’m not quite sure I understand how the data is being passed around so that I can correctly apply the logic in the right place.
-
RE: Google Photos API changing - MMM-GooglePhotos will stop working soon.
@sdetweil Thanks. I got that up and running. One thing I wish it had (and I don’t think any module does). I’d like to show some of the EXIF data.
At a minimum, the date the photo was taken, but ideally, also lookup the location and display that in a friendly manner (i.e. City, State, Country)I thought, “that shouldn’t be too hard” but I don’t understand modules and the relationship of node helper to the main js. I’m not sure how to load the appropriate library to access the exif data.