• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Diego Vieria Random-Photo read image from PI ?

Scheduled Pinned Locked Moved Development
13 Posts 3 Posters 7.5k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    Ultimatum22 Module Developer
    last edited by Dec 21, 2016, 5:43 PM

    Try this module: https://github.com/Ultimatum22/MMM-RandomBackground I developed it. Should meet your requirements.

    1 Reply Last reply Reply Quote 0
    • A Offline
      alverman
      last edited by Dec 21, 2016, 6:17 PM

      But where put the folder address ?
      In RandomBackground.js ?

      // Additional folders to find photos in

      in this mode:
      photoDirectories: [images]

      Thanks, Alberto

      S 1 Reply Last reply Dec 21, 2016, 6:35 PM Reply Quote 0
      • S Offline
        strawberry 3.141 Project Sponsor Module Developer @alverman
        last edited by Dec 21, 2016, 6:35 PM

        @alverman currently a custom path is not implemented yet.

        the images should be placed in this directory MagicMirror/modules/MMM-RandomBackground/photos/

        Please create a github issue if you need help, so I can keep track

        1 Reply Last reply Reply Quote 0
        • A Offline
          alverman
          last edited by Dec 21, 2016, 6:51 PM

          Ah OK !!
          But when active this module in config.js I see all black !!
          In photos directory I have 3 png images !!
          why ?

          Thanks, Alberto

          1 Reply Last reply Reply Quote 0
          • U Offline
            Ultimatum22 Module Developer
            last edited by Dec 21, 2016, 6:53 PM

            Please post the part of the config file you have added for this module. Also did you look in the log and/or browser console? Without any info it’s near impossible to help.

            1 Reply Last reply Reply Quote 0
            • A Offline
              alverman
              last edited by Dec 21, 2016, 6:54 PM

              And in dev mode I have 1 error:
              failed to load http://localhost:8080/modules/RandomBackground//RandomBackground.js
              resource: the server responded with a status of 404 (non found)

              1 Reply Last reply Reply Quote 0
              • U Offline
                Ultimatum22 Module Developer
                last edited by Dec 21, 2016, 6:58 PM

                Please show your config, I am assuming your either did something wrong there. Also how did you add this module? The folder and js file are wrong, should be MMM- before it.

                1 Reply Last reply Reply Quote 0
                • A Offline
                  alverman
                  last edited by Dec 21, 2016, 7:13 PM

                  You were right !!
                  I had forgotten to put in the MMM- config.js
                  But now I have another error when I npm install I get:
                  Succeffully applied Snyk Patches
                  npm grunt-yamllint@0.2.0 WARN requires a peer of grunt@tilde0.4.0 but none installed

                  While in the dev box now I get:
                  http: // localhost: 8080 / modules / MMM-RandomBackground // node_modules / jquery / dist / jquery.min.js
                  Failed to load resource: the server responded with a status of 404 (not found)

                  my config.js is:

                  /* Magic Mirror Config Sample
                  *

                  • By Michael Teeuw http://michaelteeuw.nl
                  • MIT Licensed.
                    */

                  var config = {
                  port: 8080,

                  language: 'it',
                  timeFormat: 24,
                  units: 'metric',
                  
                  modules: [
                  	{
                  		module: 'alert',
                  	},
                  	{
                  		module: 'clock',		
                  		position: 'top_left',
                  		config: {
                  			//displayType: 'analog',
                  			//analogSize: '150px',
                  			clockBold: 'true',				
                  			}
                  	},
                  	{
                  		module: 'calendar',
                  		header: 'Italy Holidays',
                  		position: 'top_left',
                  		config: {
                  			calendars: [
                  			{
                  			symbol: 'calendar-check-o ',
                  			url: 'webcal://www.calendarlabs.com/templates/ical/Italy-Holidays.ics'
                  			}
                  	   		]
                  			}
                  	},
                  	{
                  		module: 'compliments',
                  		position: 'lower_third'
                  	},
                  	{
                  		module: 'currentweather',
                  		position: 'top_right',
                  		config: {
                  			location: 'Cremona,Europe',
                  			locationID: '',  //ID from http://www.openweathermap.org
                  			appid: 'bd58e4e078cdfc75d925db0884834114'
                  			}
                  	},
                  	{
                  		module: 'weatherforecast',
                  		position: 'top_right',
                  		header: 'Weather Forecast',
                  		config: {
                              	location: 'Cremona,Europe',
                  			locationID: '5128581',  //ID from http://www.openweathermap.org
                  	            	appid: 'bd58e4e078cdfc75d925db0884834114'
                  			}
                  	},
                  	{
                  		module: 'newsfeed',
                  		position: 'bottom_bar',
                  		config: {
                  			feeds: [
                  			{
                  				title: "Repubblica",
                  				url: "http://www.repubblica.it/rss/cronaca/rss2.0.xml"
                  			}
                  			],
                  			showSourceTitle: true,
                  			showPublishDate: true
                  		}
                  	},
                          {
                  	        module: 'MMM-ImageDisplay',
                  	        config: {
                  	            image: 'Amore_1.png', // Name of the image (including file extension) here, place image in '/images/' folder
                  	            maxWidth: '20%', // Optional, possible values: absolute (e.g. '20px') or relative ('50%')
                  	            maxHeight: '200%', // Optional, use absolute values (e.g. '30px', '100px')
                  	            },
                  	        position: 'bottom_right'    // This can be any of the regions.
                  	},
                  	{
                  		module: 'MMM-Instagram',
                  		position: 'top_center',
                  		config: {
                  		access_token: '3231895908.1677ed0.48b0c4acc7a74f1d86a404a4a5616457',
                  		count: 200,  
                  		min_timestamp: 0,
                  		animationSpeed: 5500,
                  		updateInterval: 12500
                  			}
                  	},
                  

                  /*
                  {
                  module: ‘MMM-RandomPhoto’,
                  position: ‘fullscreen_below’,
                  config: {
                  opacity: 0.3,
                  animationSpeed: 500,
                  updateInterval: 60,
                  url: ‘…/images/Amore_1.png’
                  }
                  },
                  {
                  module: ‘MMM-Remote-Control’
                  , posistion: ‘bottom_left’
                  },
                  */
                  {
                  module: ‘MMM-RandomBackground’,
                  position: ‘fullscreen_below’,
                  config:{
                  animationSpeed: 1000,
                  updateInterval: 500
                  }
                  },
                  ]

                  };

                  /*************** DO NOT EDIT THE LINE BELOW ***************/
                  if (typeof module !== ‘undefined’) {module.exports = config;}

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    alverman
                    last edited by Dec 22, 2016, 9:03 AM

                    All OK !!

                    Work very well … thanks

                    Alberto

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      alverman
                      last edited by Dec 22, 2016, 9:45 AM

                      But if I wanted to see the lower right images, not as a background, for example, what should I change?

                      Thanks for your patience

                      Alberto

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        6/13
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy