Code Monkey home page Code Monkey logo

mmm-wallpaper's Introduction

Module: MMM-Wallpaper

The module allows you to add wallpapers from various online sources. Useful for MagicMirror installations that aren't actually mirrors.

Installation

In your terminal, go to your MagicMirror's Module folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/kolbyjack/MMM-Wallpaper.git

Install the module dependencies:

cd MMM-Wallpaper
npm install

Configure the module in your config.js file.

Note: After starting the Mirror, it will take a few seconds before the wallpapers start to appear.

Using the module

To use this module, add it to the modules array in the config/config.js file:

modules: [
  {
    module: "MMM-Wallpaper",
    position: "fullscreen_below",
    config: { // See "Configuration options" for more information.
      source: "bing",
      slideInterval: 60 * 1000 // Change slides every minute
    }
  }
]

Configuration options

The following properties can be configured:

Option Default Description
source "bing" The image source to use. See table below for supported sources.
caption true Whether to display the image caption/attribution when available.
fadeEdges false Whether to fade the top and bottom 10% of the image.
updateInterval 60 * 60 * 1000 How often (in ms) to check the source for new wallpapers.
slideInterval 5 * 60 * 1000 How often (in ms) to change images.
maximumEntries 10 The maximum number of images to load from the source.
filter "grayscale(0.5) brightness(0.5)" The CSS filter to apply to the images, to improve readability of other modules' text
orientation "auto" The image orientation to retrieve. Choices are "vertical," "horizontal," and "auto." Only used by the pexels and bing sources.
crossfade true Whether to crossfade between images when loading a new wallpaper, or just replace the current image.
maxWidth MAX_SAFE_INTEGER Maximum width of selected variant (only supported for reddit & flickr sources).
maxHeight MAX_SAFE_INTEGER Maximum height of selected variant (only supported for reddit & flickr sources).
nsfw true Whether to allow 18+ images to be chosen (only supported for reddit sources).
shuffle true Whether to randomly select images from those sources that support it, or cycle through the latest.
size cover Sizing policy for images. Similar to CSS background-size. Choices are "cover," "contain," and "auto."
userPresenceAction "none" What action to take when a USER_PRESENCE notification is received. Choices are "none," "show," and "hide."
fillRegion true Whether to fill the region where the module is positioned, or to add a div in the normal flow of the page. When set to false, the width and height properties may be set to restrict the size of the module.
width "auto" Width of the content when fillRegion is false.
height "auto" Height of the content when fillRegion is false.
Source Description
"apod" Cycles through the most recent daily wallpapers from NASA's Astronomy Picture of the Day (standard resolution).
"apodhd" Cycles through the most recent daily wallpapers from NASA's Astronomy Picture of the Day (high resolution).
"bing" Cycles through the most recent daily wallpapers from Bing.
"chromecast" Cycles through random selections of the Chromecast wallpapers (thanks TheLukaBoss).
"firetv" Cycles through random selections of the FireTV wallpapers.
"flickr-api:<source>" Cycles through random selections of the specified flickr photos. See below for details.
"http(s)://url" Reloads the specified url at the configured interval.
"icloud:<album id>" Cycles through random selections of the specified album.
"lightroom:<user.myportfolio.com/album>" Cycles through random selections of the specified album.
"local:</path/to/directory>" Cycles through random selections of the images in the specified local directory.
"synology-moments:<url>" Cycles through the latest images from the specified Synology moments album.
"/r/<subreddit>" Cycles through the most recent hot image posts from the subreddit.
"/user/<username>/m/<subreddit>" Cycles through the most recent hot image posts from the specified multireddit.
"metmuseum:<departmentID>,<isHightlight>,<q>" Cycle through collections in the Metropolitan Museum of Art. departmentID is a number specifying collection type, e.g., Asian art, paintings etc. <isHightlight> is a boolean to show only highlighted artwork if set to true. <q> is keyword, e.g. artist name, culture, etc. All fields can be set to the wildcard *. For example, "metmuseum:11,true,*" would display highlighted European paintings.
"nasa:<search term>" Cycles through images specified in search term of NASA's Image and Video Library (https://api.nasa.gov/).

Source-specific configuration items:

apod / apodhd:

Option Default Description
"nasaApiKey" none Sign up for an api key and enter it here. (Required)

flickr-api:

Option Default Description
"flickrApiKey" none Sign up for an api key and enter it here. (Required)
"flickrDataCacheTime" 24*60*60*3600 (1 day) How long to cache image metadata retrieved from Flickr.
"flickrResultsPerPage" 500 How many photo results per page to request from the Flickr API.

Notes:

  • You can specify multiple Flickr sources separated by ;. For example: flickr-api:publicPhotos;photos/<user1>/favorites;photos/<user2>/favorites
    • If shuffle is true, up to maximumEntries will be listed from each source, then shuffled and no more than maximumEntries presented.
    • If shuffle is false, up to maximumEntries photos will be presented from the sources in order.
  • Flickr limits usage by a single API key to 3600 queries per hour. If you set a very high maximumEntries you may run into this limit. This module makes the following Flickr API calls every updateInterval:
    • At least 1 call to getPublicPhotos per configured source (each call returns up to 500 photos; if there are more, and you've set maximumEntries higher, there will be further calls)
    • 1 call to getSizes per photo selected for display (at most maximumEntries); the results are cached for flickrDataCacheTime.
  • Very large images can consume excessive memory on the client. To prevent this, tune maxWidth and maxHeight to suit your display setup.
    • It is important to not set the limits too low! Photos with unusual aspect ratios can lead to a poor experience. We suggest about 1.5x your display resolution as a good starting point.
Source Description
publicPhotos Loads unfiltered public content.
tags/<tags>/<tagmode> Load public content matching the specified comma-separated tags. tagmode can be all or any (default all).
photos/<username> Load public images from the user's photostream.
photos/<username>/galleries/<gallery id> Load public images from the user's specified gallery.
photos/<username>/favorites Load public images from the user's favorites.
photos/<username>/albums/<album id> Load public images from the user's specified album.
groups/<groupname> Load public images from the group's pool.

http:// or https:// url:

Option Default Description
"addCacheBuster" true Whether to add a cache-busting argument to the query string (mmm-wallpaper-ts).

local:

Option Default Description
"recurseLocalDirectories" false Whether to recurse into subdirectories when looking for images.

Notifications

MMM-Wallpaper can react to the following notifications sent by other modules:

Notification Payload Description
LOAD_NEXT_WALLPAPER none Will load the next wallpaper from the configured source.
UPDATE_WALLPAPER_CONFIG string or object If the payload is a string, the module will use it as the new source to begin loading wallpapers. If the payload is an object, the module will update its configuration with the object's properties. In either case, a new wallpaper will immediately be loaded and the update timer will be reset.
USER_PRESENCE bool Will take the appropriate action to hide or show itself based on the value of the payload and the configured userPresnseAction.

mmm-wallpaper's People

Contributors

alantreadway avatar crazyscot avatar dependabot[bot] avatar jdeesy avatar kolbyjack avatar rklueber avatar sisimomo avatar tderflinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmm-wallpaper's Issues

Flickr Groups not showing up

I am unable to get flickr groups to show up on magic mirror using the MMM-Wallpaper module.
Please check my code snippet.. not sure why it would not work.

{ module: "MMM-Wallpaper", position: "fullscreen_below", config: { // See "Configuration options" for more information. source: "flickr-group:113291043@N05", maximumEntries: 50, slideInterval: 60 * 1000 // Change slides every minute } },

orientation label ignored on Reddit

Using the MM in portrait mode. When setting orientation to either "vertical" or "auto", the module still pulls and displays landscape images from the subreddit. Tested with multiple channels, e.g. r/EarthPorn, r/MostBeautiful. Please advise.

2.1.6 update start with error "Cannot find module 'request'"

[02.07.2021 17:05.54.533] [LOG]   Starting MagicMirror: v2.16.0
[02.07.2021 17:05.54.552] [LOG]   Loading config ...
[02.07.2021 17:05.54.582] [LOG]   Loading module helpers ...
[02.07.2021 17:05.54.592] [LOG]   No helper found for module: alert.
[02.07.2021 17:05.55.276] [LOG]   Initializing new module helper ...
[02.07.2021 17:05.55.283] [LOG]   Module helper loaded: updatenotification
[02.07.2021 17:05.55.287] [LOG]   No helper found for module: clock.
[02.07.2021 17:05.55.825] [LOG]   Initializing new module helper ...
[02.07.2021 17:05.55.828] [LOG]   Module helper loaded: calendar
[02.07.2021 17:05.55.831] [LOG]   No helper found for module: weather.
[02.07.2021 17:05.55.912] [LOG]   Initializing new module helper ...
[02.07.2021 17:05.55.915] [LOG]   Module helper loaded: newsfeed
[02.07.2021 17:05.55.918] [LOG]   No helper found for module: mmm-worldclock.
[02.07.2021 17:05.55.931] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'request'
Require stack:
- /opt/magic_mirror/modules/MMM-Wallpaper/node_helper.js
- /opt/magic_mirror/js/app.js
- /opt/magic_mirror/js/electron.js
- /opt/magic_mirror/node_modules/electron/dist/resources/default_app.asar/main.js
-
[02.07.2021 17:05.55.934] [LOG]   Loading module helpers ...
[02.07.2021 17:05.55.936] [LOG]   No helper found for module: alert.
[02.07.2021 17:05.55.938] [LOG]   Initializing new module helper ...
[02.07.2021 17:05.55.941] [LOG]   Module helper loaded: updatenotification
[02.07.2021 17:05.55.943] [LOG]   No helper found for module: clock.
[02.07.2021 17:05.55.946] [LOG]   Initializing new module helper ...
[02.07.2021 17:05.55.948] [LOG]   Module helper loaded: calendar
[02.07.2021 17:05.55.951] [LOG]   No helper found for module: weather.
[02.07.2021 17:05.55.953] [LOG]   Initializing new module helper ...
[02.07.2021 17:05.55.955] [LOG]   Module helper loaded: newsfeed
[02.07.2021 17:05.55.957] [LOG]   No helper found for module: mmm-worldclock.
[02.07.2021 17:05.55.967] [ERROR] App threw an error during load
[02.07.2021 17:05.55.973] [ERROR] Error: Cannot find module 'request'
Require stack:
- /opt/magic_mirror/modules/MMM-Wallpaper/node_helper.js
- /opt/magic_mirror/js/app.js
- /opt/magic_mirror/js/electron.js
- /opt/magic_mirror/node_modules/electron/dist/resources/default_app.asar/main.js
-
    at Module._resolveFilename (internal/modules/cjs/loader.js:972:15)
    at Function.n._resolveFilename (electron/js2c/browser_init.js:249:921)
    at Function.Module._resolveFilename (/opt/magic_mirror/node_modules/module-alias/index.js:49:29)
    at Module._load (internal/modules/cjs/loader.js:848:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12633)
    at Module.require (internal/modules/cjs/loader.js:1032:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/opt/magic_mirror/modules/MMM-Wallpaper/node_helper.js:4:17)
    at Module._compile (internal/modules/cjs/loader.js:1152:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)
[02.07.2021 17:05.55.977] [ERROR] Whoops! There was an uncaught exception...
[02.07.2021 17:05.55.996] [ERROR] Error: Cannot find module 'request'
Require stack:
- /opt/magic_mirror/modules/MMM-Wallpaper/node_helper.js
- /opt/magic_mirror/js/app.js
- /opt/magic_mirror/js/electron.js
- /opt/magic_mirror/node_modules/electron/dist/resources/default_app.asar/main.js
-
    at Module._resolveFilename (internal/modules/cjs/loader.js:972:15)
    at Function.n._resolveFilename (electron/js2c/browser_init.js:249:921)
    at Function.Module._resolveFilename (/opt/magic_mirror/node_modules/module-alias/index.js:49:29)
    at Module._load (internal/modules/cjs/loader.js:848:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12633)
    at Module.require (internal/modules/cjs/loader.js:1032:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/opt/magic_mirror/modules/MMM-Wallpaper/node_helper.js:4:17)
    at Module._compile (internal/modules/cjs/loader.js:1152:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/opt/magic_mirror/modules/MMM-Wallpaper/node_helper.js',
    '/opt/magic_mirror/js/app.js',
    '/opt/magic_mirror/js/electron.js',
    '/opt/magic_mirror/node_modules/electron/dist/resources/default_app.asar/main.js',
    undefined
  ]
}
[02.07.2021 17:05.56.000] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[02.07.2021 17:05.56.002] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues

Web Locations

I am sure it is something simple. The Bing, Fire TV, and Chromecast sources all work great but I cannot figure out how to pull images from any of the other sources. I am pretty sure that I have the source section placed correctly in the config because I can switch between Bing, Fire TV, and Chromecast.

I am using the Magic Mirror OS which places the modules folder under a "mounts" folder. I can't imagine that would make a difference.

Any idea what I might be doing wrong?

iCloud low quality and no crossfade

Hello @kolbyjack , thank you for your amazing work on this module.
I have an issue with loading pictures from iCloud album - sometimes the picture loads in full resolution and sometimes horribly downscaled, what could be the issue?

Also, I get no crossfade even though I set it in the config file accordingly:

{
module: "MMM-Wallpaper",
position: "fullscreen_below",
config: {
source: "icloud:XXXXXXXX", // Hidden for privacy
slideInterval: 15 * 1000, // Change slides every 15 sec
updateInterval: 60 * 60 * 1000,
maximumEntries: 300,
crossfade: true
}
},

Thank you for your time and help.

Possible to do not fullscreen?

Hey kolbyjack. Really loving the wallpaper module. I've got it all set up using icloud and it works perfect. However, I'm thinking I actually want to have my photos be much smaller, only because I'm having issues with sometimes reading text. I'm honestly wanting to use some CSS to put them within a "polaroid" looking border thats rotated, off center using the code below (snagged from another github for a diff photo module). However, yours is the best (and only) I can find that utilizes iCloud for showing photos

I'll be the first to admit I'm not the greatest at coding, though I can generally troubleshoot or slog my way thru some stuff. I'm not sure where to start with my goal, though. I've changed position on your config to say upper_third, but then its on top of everything. If I add _below, then its just black (no error config screen tho).

Any tips on how I can push the photos using your module to something other than fullscreen?

I've tried using the code below and it doesnt do anything, not sure if it is calling some code from the original module (MMM-Instagram)

Another thing I had considered was setting up a cronjob to actually use that instagram module and download files automatically, but I was trying to avoid so as to not fill up my memory card on the rpi 4

#MMM-Wallpaper-image {
box-shadow: 10px 10px 15px #aaa;
padding: 10px 10px 30px 10px;
border: 1px solid #bfbfbf;
background-color: #fff;
transform: rotate(-6deg);
-ms-transform: rotate(-6deg);
-webkit-transform: rotate(-6deg);
}

Setting source: "/r/earthporn" causes MagicMirror crash/black screen.

source: "bing" and source: "firetv" work perfectly. However reddit /r/earthporn photos consistently causes a crash after a few photos. I have tried using a RPi3B+ and RPi3A+ running magic mirror locally as well as running magicmirror using docker in a server-client configuration.

EDIT: The log error below appears that it is not relevant to the post. After disabling MMM-SystemStats the screen still goes black without any error.

Today the screen crashes on this photo https://i.redd.it/a7p2nmcfvu221.jpg (~1.8MB)
Last week it was this photo https://i.redd.it/n2b2wf6dqe021.jpg (~8MB)
Nothing particularly unique about these photos makes them stand out to me (filesize/dimensions/orientation) which would cause the module to crash. As the post ages, the module consistently fails on that picture.

Whoops! There was an uncaught exception...
{ Error: spawn ENOMEM
at _errnoException (util.js:1024:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at exports.spawn (child_process.js:514:9)
at Object.exports.execFile (child_process.js:224:15)
at Object.module.(anonymous function) [as execFile] (ELECTRON_ASAR.js:199:20)
at exports.exec (child_process.js:154:18)
at childProcess.(anonymous function) (ELECTRON_ASAR.js:689:22)
at /home/pi/MagicMirror/modules/MMM-SystemStats/node_modules/async/dist/async.js:66:19
at /home/pi/MagicMirror/modules/MMM-SystemStats/node_modules/async/dist/async.js:3880:24
at eachOfArrayLike (/home/pi/MagicMirror/modules/MMM-SystemStats/node_modules/async/dist/async.js:1069:9) code: 'ENOMEM', errno: 'ENOMEM', syscall: 'spawn' }
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

Images are just a thin strip in the center of the display

I'm using the example config.js module code, and have tried with source being bing and several reddit wallpaper subreddits.
Each time the image is displayed squashed in from the sides to give a thin line from top to bottom with the image credit in the corner.

I've tried adding the auto orientation option but that also makes no difference.

Has anyone else had this problem?

Squished images after update

Maybe it's just me, and I've messed something up, but after updating Magic Mirror all of the images are squished down into about a 1 inch thick line running horizontally across the screen. All of my other modules are still working correctly. Maybe something not playing nice with the latest magic mirror update?

icloud photo issue

Module works as expected with default config options, as soon as I change to icloud with correct album ID nothing loads and terminal presents this error.
[30.06.2021 15:19.42.066] [ERROR] Whoops! There was an uncaught exception...
[30.06.2021 15:19.42.074] [ERROR] TypeError: photo.derivatives is not iterable
at Class.processiCloudData (/home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js:343:31)
at Class.processResponse (/home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js:224:21)
at Request._callback (/home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js:189:16)
at Request.self.callback (/home/pi/MagicMirror/node_modules/request/request.js:185:22)
at Request.emit (events.js:315:20)
at Request. (/home/pi/MagicMirror/node_modules/request/request.js:1154:10)
at Request.emit (events.js:315:20)
at IncomingMessage. (/home/pi/MagicMirror/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
[30.06.2021 15:19.42.081] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?

Thanks for the help 👍

Black screen

I only have the time, weather and compliments modules and no images load.

Local photos won't display vertically

I added my own local photos to the MMM-Wallpaper module (which are all portraits/vertically from my DSLR), but when I launch MM it displays all my photos horizontally. Some photos display the entire photo horizontally/landscape or the photo displays only the lower third of the photo still horizontally/landscape.

I've tried setting the orientation string, set it to "vertical" & tried to set the size to "contain".

Please advise if I'm not doing this properly or if you need to investigate this module. This module is perfect for what I'm looking for on my MM.

Cheers.

config.js error

Everytime I add the module to the config file magic mirror doesn't load.

URL help

Super new to this... I am trying to view a Adobe Lightroom Portfolio, do I just paste the URL to my shared album? I am getting a black screen. If paste individual photo links it works fine but It doesn't cycle images

		module: "MMM-Wallpaper",
		position: "fullscreen_below",
		config: {
                                   source:"https://ryanritchie.myportfolio.com/gallery",

Wallpapers stop updating

Hi,

Has anyone had the issue where wallpapers stop changing on there Magic Mirror?

Getting my feed from Chromecast, seems to change and work as expected for a bit and then all together stops changing - and stays on one static wallpaper.

iCloud Photo Not Displaying

Good evening! I have been trying to configure this module to work with my public iCloud Photos album for a few days now (off and on). I have not been successful in getting the source to work for it. When I use Bing or Chromecast as the source, it works great!

This is likely user error, but I would greatly appreciate any help you are able to provide!

I've tried the following for the source line:
source: "icloud:https://www.icloud.com/sharedalbum/<assigned#>" - This give me a black screen
source: "https://www.icloud.com/sharedalbum/<assigned#>" - This give me a black screen
source: "icloudphoto:https://www.icloud.com/sharedalbum/<assigned#>" - This defaults back to bing
source: "icloudphotos:https://www.icloud.com/sharedalbum/<assigned#>" - This defaults back to bing

Entire Module for reference:
modules: [
{//https://github.com/kolbyjack/MMM-Wallpaper
module: "MMM-Wallpaper",
position: "fullscreen_below",
config: {
source: "icloud:https://www.icloud.com/sharedalbum/<assigned#>",
filter: "grayscale(0.5) brightness(0.5)",
orientation: "auto",
crossfade: true,
updateInterval: 60 * 60 * 1000,
slideInterval: 5 * 60 * 1000 // Change slides every minute
}
},

Reddit Source no longer working

I am trying to display images from a reddit source, but they don't actually ever get pulled in. Here is the basic config file:

{
	module: 'MMM-Wallpaper',
	position: 'fullscreen_below',
	config: {
		source: "/r/cityporn",
		crossfade: false,
		slideInterval: 3 * 60 * 1000
	}
},

I've followed the documentation but it doesn't look like any images ever get pulled in. Any advice would be great. Thanks!

Flickr group issue / conflict with other module

I'm having two separate issues: one more with your module, the other may be out of bounds.

First, I'm unable to load Flickr group photos (https://www.flickr.com/groups/1059982@N21/pool/). My config code is:
module: "MMM-Wallpaper", psoition: "fullscreen_below", config: { source: "flickr-group:1059982@N21", slideInterval: 10*60*1000 }
All I get is a black background. If I change the source to "bing" images load just fine.

The second issue is when I also load MMM-NetworkConnection (https://github.com/slametps/MMM-NetworkConnection): it seems to override MMM-Wallpaper. I only get a black screen (no matter the source). When I comment out NetworkConnection module Wallpaper works. I'm just not smart enough to look at each of your sources to determine where the conflict is.
Thank you in advance, and thanks for developing and sharing your work!

Possible to local images?

Is it possible to indicate a local directory path so that the images are displayed randomly? or sequentially?

problem with MMM pages

Hello,

since a git pull i have always the wallpaper on all pages with MMM-pages. For example : [ "MMM-Widget41" ], [ "MMM-Wallpaper" , "MMM-EmbedYoutube" , 'MMM-GooglePhotos' , 'MMM-CoinRanking' , "MMM-Widget12" , "MMM-FranceInfo" , "clock" ], [ "MMM-Wallpaper" , "MMM-EmbedYoutube" , 'MMM-GooglePhotos' , "MMM-OnThisDay" , "MMM-FranceInfo" , "clock" , "MMM-PiTemp" ],. My magicmirror shoud'nt display wallpaper with Widget 41 like old version of your module.

iCloud configuration

Hi, following specs on the documentations I cannot display iCloud pictures. here below my config. Bing works fine but no way to link an iCloud shared photo album.

Thanks to drive me to the appropriate syntax for sourcing images from iCloud.

module: "MMM-Wallpaper",
position: "fullscreen_below",
config: {
filter: "grayscale(0.5) brightness(0.5)",
//source: "bing",
source: "icloud:https://www.icloud.com/sharedalbum/#B0hGnbeumdKqrW",
slideInterval: 60 * 5000 // Change slides every minute
}

Local wallpaper can't display

I have copied my wallpapers to NAS, the path as follows: //192.168.6.10/wallpaper. Then I edit the config:
modules: [
{
module: "MMM-Wallpaper",
position: "fullscreen_below",
config: { // See "Configuration options" for more information.
source: "local:/192.168.6.10/wallpaper",
slideInterval: 20 * 1000 // Change slides every minute

But it not works, What i am missing?

Feature Request: Images From Chromecast Background (Pull Request Created)

Hello!

I've used this repo for a long time now. And I've tweaked it a bit. It now works with Chromecast images, thanks to this raw content from a github repo I found.
I have attached the updated files inside a zip folder below. The changes have been made to node_helper.js, and I've added chromecast.json as the resource list: updatedFilesToCreateChromecastFunctionality.zip. The link to the forked repo I made for this is here. And this is a link to the pull request.

Unfortunately, I haven't had the time to create a caption for every single new image, so I just used Find & Replace to find all "}," and replace with ",'caption':''},", which worked a treat. I also surrounded it by the 'images' array.
In the helper script I added "self.chromecast = JSON.parse(fs.readFileSync(fmt("{}/chromecast.json", __dirname)));" after the firetv line. I also added this to list of if statements:

} else if (source === "chromecast") {
		self.sendSocketNotification("WALLPAPERS", {
        "source": config.source,
        "orientation": config.orientation,
        "images": shuffle(self.chromecast.images).slice(0, config.maximumEntries),
      });
      return;
	}

This all works a treat. All that's needed is for the user to change the 'source' setting in the main config file to "chromecast".

Hope you use this, please (if you want) mention me in the readme.
Thanks for this library. Bye!

Filter NSFW-tagged images

I would love to add r/ITookAPicture to my wallpaper rotation, except for one problem.... Not every picture on that subreddit is suitable for display to my wife and kindergartner. (This, for example, is lovely but not really what I want displayed in my kitchen.)

Would it be possible to have an option to filter out any posts tagged NSFW? This does appear to be in the JSON as "over_18": true, so it's a simple addition for Reddit at least; I can't speak to the other sources.

The Wallpaper is shown twice

If I set position: "fullscreen_below" at the config.js then the modul is shown twice. One at all at the bottom (at the top of the DIV list) and the second time inside the fullscreen region.

I didn't notice this in operation, I found it in the page source code of the MagicMirror. So it shows the background twice. This should lead to more memory usage.

A quick work-a-round - don't use the position line.

Image from URL does not update

I want to display an image from a URL. The image is updated every 10 minutes at the source, but the wallpaper always stays the same.

{
		    module: "MMM-Wallpaper",
		    position: "fullscreen_below",
		    config: { // See "Configuration options" for more information.
		      source: "https://www.foto-webcam.eu/webcam/helmut-list-halle/current/720.jpg",
		      updateInterval: 60 * 1000,
		      slideInterval: 60 * 1000,
		      filter: "none",
	              size: "auto"
		    }
},

Flickr group photos not displaying

Hi,

I have tried to use your module with flickr group 42097308@N00, however it does not work correctly.

The api string is built correctly and the image owner is displayed in the bottom right of the screen, however the image does not load correctly.

Are you able to check on your side?

Thanks for the great module!

Possible crashing MM?

I have a suspicion that I am seeing the same problem as reported in issue #3. I have MMM-Wallpaper installed and on occasion I am seeing that the screen goes black and I have a core dump generated. I am seeing out of memory issues on at various times.

ATTENTION: default value of option force_s3tc_enable overridden by environment.
[16831:0413/111826.964220:FATAL:memory.cc(22)] Out of memory. size=79556608
ATTENTION: default value of option force_s3tc_enable overridden by environment.
ATTENTION: default value of option force_s3tc_enable overridden by environment.
[11331:0415/142933.736368:FATAL:memory.cc(22)] Out of memory. size=120422400
ATTENTION: default value of option force_s3tc_enable overridden by environment.
ATTENTION: default value of option force_s3tc_enable overridden by environment.
getrandom indicates that the entropy pool has not been initialized. Rather than continue with poor entropy, this process will block until entropy is available.
ATTENTION: default value of option force_s3tc_enable overridden by environment.
ATTENTION: default value of option force_s3tc_enable overridden by environment.
[1700:0415/233524.137869:FATAL:memory.cc(22)] Out of memory. size=96002048
ATTENTION: default value of option force_s3tc_enable overridden by environment.
ATTENTION: default value of option force_s3tc_enable overridden by environment.
ATTENTION: default value of option force_s3tc_enable overridden by environment.
[6522:0416/101829.273887:FATAL:memory.cc(22)] Out of memory. size=155766784
ATTENTION: default value of option force_s3tc_enable overridden by environment.

I'm not concerned about the force_s3tc_enable messages but the out of memory errors are crashing my MM and causing the black screen.

I have not 100% confirmed the issue is from MMM-WallPaper but I have the exact same error. I’m running a pi3B, and I believe it’s showing through electron not via browser.

In my case I am setting my source to "/r/EarthPort+unitedstatesofamerica".

Any ideas?

Filter in config.js

thank-you for your job, it's a very good module. it gives more colors to MM.
A little question please:
I try to use filter option in config.js but i must write bad sentence.
I write in config.js
filter: "grayscale(0.5) brightness(0.5)"
but it doesnt work.
Do you have an idea please to write good sentence ?
thank you

just doesnt work

i added it, nothing happens, what am i doing wrong?
{
module: "MMM-Wallpaper",
position: "fullscreen_below",
config: {
source: "chromecast",
slideInterval: 60 * 1000 // Change slides every minute
}
},

Synology Moments issue

I am not able to use the synology moments configuration. I type in source: "synology-moments:" into config file. I replace with the url that synology moment created for the album. Any help would be greatly appreciated.

MMM-Wallpaper requires write permission

It's been a while since I discovered this and I can't test it right now. But when I tried to point at a directory with read only permissions it failed to load any wallpapers. I also tried to mount to a subdirectory and it still failed. It only worked with rw permissions, which I do not want.

local images not showing

So I put my images in the following directory
home/pi/Pictures/Joy, and use the following code:
source: "local:</home/pi/Pictures/Joy>"
but the image was not showing at all.
The images were all JPG format.
Is there anything wrong?
Thanks

Black screen - Module not found

Hello,
I downloaded the plugin according to the instructions and added the example configuration in my configuration. Magicmirror does not start anymore and only shows a black screen

`[20.10.2021 23:23.57.056] [ERROR] �[31mWARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'request'�[39m
�[31mRequire stack:�[39m
�[31m- /home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js�[39m
�[31m- /home/pi/MagicMirror/js/app.js�[39m
�[31m- /home/pi/MagicMirror/js/electron.js�[39m
�[31m- /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js�[39m
�[31m- �[39m
[20.10.2021 23:23.57.068] [ERROR] App threw an error during load
[20.10.2021 23:23.57.071] [ERROR] Error: Cannot find module 'request'
Require stack:

  • /home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js
  • /home/pi/MagicMirror/js/app.js
  • /home/pi/MagicMirror/js/electron.js
  • /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
  • at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
    at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
    at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
    at Module._load (internal/modules/cjs/loader.js:732:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object. (/home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js:4:17)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
    [20.10.2021 23:23.57.072] [ERROR] Whoops! There was an uncaught exception...
    [20.10.2021 23:23.57.078] [ERROR] Error: Cannot find module 'request'
    Require stack:
  • /home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js
  • /home/pi/MagicMirror/js/app.js
  • /home/pi/MagicMirror/js/electron.js
  • /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
  • at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
    at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
    at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
    at Module._load (internal/modules/cjs/loader.js:732:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object. (/home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js:4:17)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js',
    '/home/pi/MagicMirror/js/app.js',
    '/home/pi/MagicMirror/js/electron.js',
    '/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js',
    undefined
    ]
    }
    [20.10.2021 23:23.57.079] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
    [20.10.2021 23:23.57.079] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues`

Keep wallpaper fullscreen after applying zoom on body

Hi @kolbyjack,
thank you for your great module. I'm using it on my infoscreen powered by a firetv stick with the firetv images :-)

The firetv zooms in as it emulates an mobile android firefox browser, so my content is far to big to fit on the screen and as I also use it on my computer screens I can not simple adjust it only for my firetv, it has to be responsive.
As this fix recommends I added the css zoom option but after that the wallpaper is also only 75% big. All other regions fit the new size and overflow the background image.
I experimented a bit with adding a wrapper layer to overcome this but with no satisfying result.

May you have an idea? I would be happy to help you.

Bing Caption/Copyright Data

For Bing images, node_helper.js makes reference to caption: image.copyright. Should the image show the caption/copyright data? If not can you please add it so it can be listed on the bottom_bar? Can it be parsed, so the info between the ( ) can have seperate CSS data so the photographer's name can be subdued (without either being affected by the filter)?

For today the JSON is: "copyright":"Clearing snowstorm, Yosemite National Park, California (© Jeff Lewis/Tandem Stills + Motion)"

I'm tired, so in case I didn't explain it good...it would be:
Clearing snowstorm, Yosemite National Park, California [light color]
(© Jeff Lewis/Tandem Stills + Motion) [dark color]

I know that I should care and it's the right thing to do....but frankly, it would not bother me is the 2nd line was omitted. lol It'd be different if I were displaying this in a commercial business. I'm not using a mirror and my goal is for it to cycle through Bing images during periods of inactivity.

Hide source and resolution overlay from bottom right

Great work on this module. I am using Reddit /r/EarthPorn and love it! what file can i modify to remove the source name and resolution that appear on the bottom right of all the images on screen? Also Do i need to tell the module maximumEntries XXX number if i want it to just continuously just keep loading images with no max? i have Shuffle set to true. thank you!

http url not loading images

It could be because I am new to this but I've configured the config.js file multiple different ways and I am unable to get the source to pull for url. Right now I have it trying to pull from something I am hosting internally and it doesn't appear. If I have the source as http nothing shows up. If I leave the http(s) then some generic wallpaper appears. It could be a bug but it is likely my incompetence.

{
module: "MMM-Wallpaper",
position: "fullscreen_below",
config: { // See "Configuration options" for more information.
source: "http(s)://192.168.1.55:3000",
updateInterval: 60 * 60 * 1000,
shuffle: "true",
orientation: "auto",
slideInterval: 60 * 1000 // Change slides every minute
}

No Wallpaper after Update to Version 2.18

After updating to version 2.18, the background image of my IP cam is no longer displayed on the Raspberry.

When I access remotely via http://raspberry.pi:8080 the background image is displayed without problems and updated every 10 seconds.

	{
		"module": "MMM-Wallpaper",
		"position": "fullscreen_below",
		"config": { // See "Configuration options" for more information.
			"source": "http://192.168.1.41/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=admin&password=XXXXXX",
            "slideInterval": 1 * 10 * 1000,
			"updateInterval": 1 * 10 * 1000,
			//"filter": "none",
            "size": "auto"
				}
	},

anyone have an idea?

regards
Gelle

MODULE NOT FOUND Error

Magic Mirror throws this error after start.

[28.11.2021 16:27.43.707] [LOG] Loading module helpers ...
[28.11.2021 16:27.43.708] [LOG] No helper found for module: alert.
[28.11.2021 16:27.43.709] [LOG] Initializing new module helper ...
[28.11.2021 16:27.43.710] [LOG] Module helper loaded: updatenotification
[28.11.2021 16:27.43.710] [LOG] No helper found for module: clock.
[28.11.2021 16:27.43.711] [LOG] Initializing new module helper ...
[28.11.2021 16:27.43.711] [LOG] Module helper loaded: calendar
[28.11.2021 16:27.43.712] [LOG] No helper found for module: MMM-MonthlyCalendar.
[28.11.2021 16:27.43.715] [ERROR] App threw an error during load
[28.11.2021 16:27.43.717] [ERROR] Error: Cannot find module 'request'
Require stack:

  • /home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js
  • /home/pi/MagicMirror/js/app.js
  • /home/pi/MagicMirror/js/electron.js
  • /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
  • at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
    at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
    at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
    at Module._load (internal/modules/cjs/loader.js:732:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object. (/home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js:4:17)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
    [28.11.2021 16:27.43.718] [ERROR] Whoops! There was an uncaught exception...
    [28.11.2021 16:27.43.723] [ERROR] Error: Cannot find module 'request'
    Require stack:
  • /home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js
  • /home/pi/MagicMirror/js/app.js
  • /home/pi/MagicMirror/js/electron.js
  • /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
  • at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
    at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
    at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
    at Module._load (internal/modules/cjs/loader.js:732:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object. (/home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js:4:17)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/pi/MagicMirror/modules/MMM-Wallpaper/node_helper.js',
    '/home/pi/MagicMirror/js/app.js',
    '/home/pi/MagicMirror/js/electron.js',
    '/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js',
    undefined
    ]
    }

MMM-Wallpaper does exist in the modules folder.

Using the vanilla setup in the config.js file that is found in the Readme

iCloud

How does the module know which iCloud account to access? Do I need to share my apple id?

icloud photos stop changing/ updating

Thanks for your help yesterday getting icloud photos working.
Unfortunately I face another issue.
The photos work and load fine changing every min and then after a period of time the photos stop changing and remain stuck on a single image until I close and reopen the mirror software or force reload?
Thanks again for all help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.