Skip to content

Module for MagicMirror2 for show image from FTP server

License

Notifications You must be signed in to change notification settings

jboucly/MMM-FTP-image

Repository files navigation

MagicMirror2 Module: MMM-FTP-image

  __  __ __  __ __  __        ______ _______ _____        _
 |  \/  |  \/  |  \/  |      |  ____|__   __|  __ \      (_)
 | \  / | \  / | \  / |______| |__     | |  | |__) |_____ _ _ __ ___   __ _  __ _  ___
 | |\/| | |\/| | |\/| |______|  __|    | |  |  ___/______| | '_ ` _ \ / _` |/ _` |/ _ \
 | |  | | |  | | |  | |      | |       | |  | |          | | | | | | | (_| | (_| |  __/
 |_|  |_|_|  |_|_|  |_|      |_|       |_|  |_|          |_|_| |_| |_|\__,_|\__, |\___|
                                                                             __/ |
                                                                            |___/

Description

A MagicMirror Module to display images from an FTP server on the Mirror.

Image authorized : GIF, PNG, JPG, JPEG, BMP, WEBP, ICO, DIB

Features

  • Display images from FTP server with interval
  • Possibility to set directory to retrieve images
  • Possibility to set authorized directories
  • Interaction for next or previous image from an event / notification from another MagicMirror2 module

Screenshots

Displaying images from FTP server

Module example

Installation

Open your terminal in your MagicMirror project and ⤵️

  1. Go to your MagicMirror's module folder:
$ cd ~/MagicMirror/modules
  1. Clone this module
$ git clone https://github.com/jboucly/MMM-FTP-image.git
  1. Go to directory of this module
$ cd MMM-FTP-image
  1. Install dependencies
$ npm ci
  1. Configure the module in the config.js file.

Configurations

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

modules: [
    {
        module: 'MMM-FTP-image',
        position: 'middle_center',
        config: {
            // FTP server configuration
            port: 5555,
            user: 'pi',
            host: '192.168.1.16',
            password: '1234567890',

            // Display configuration
            opacity: 1.0,
            width: '50%',
            height: '100%',
            imgChangeInterval: 5000,

            // FTP directory configuration
            defaultDirPath: null,
            dirPathsAuthorized: ['pictures'],
        },
    },
];

Configuration options

The following properties can be configured:

Options Required Default Description
FTP server configuration
host false localhost Host of your FTP server. Required if the ftp hostname is not 'localhost'
port false 21 Port of your FTP server. Required if the ftp port is not '21'
user false pi Name of user for connect to FTP server. Required if the ftp user is not 'pi'
password true null Password for connect to FTP server.
Display configuration
opacity false 1.0 Image opacity style
width false 100% Image width
height false 100% Image height
imgChangeInterval false 10s Image change interval
FTP directory configuration
defaultDirPath false null Default directory to retrieve images. By default, this module retrieve images in current directory of FTP server
dirPathsAuthorized false [] List of authorized directories