__ __ __ __ __ __ ______ _______ _____ _
| \/ | \/ | \/ | | ____|__ __| __ \ (_)
| \ / | \ / | \ / |______| |__ | | | |__) |_____ _ _ __ ___ __ _ __ _ ___
| |\/| | |\/| | |\/| |______| __| | | | ___/______| | '_ ` _ \ / _` |/ _` |/ _ \
| | | | | | | | | | | | | | | | | | | | | | | (_| | (_| | __/
|_| |_|_| |_|_| |_| |_| |_| |_| |_|_| |_| |_|\__,_|\__, |\___|
__/ |
|___/
A MagicMirror Module to display images from an FTP server on the Mirror.
Image authorized : GIF, PNG, JPG, JPEG, BMP, WEBP, ICO, DIB
- 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
Displaying images from FTP server
Open your terminal in your MagicMirror project and
- Go to your MagicMirror's module folder:
$ cd ~/MagicMirror/modules
- Clone this module
$ git clone https://github.com/jboucly/MMM-FTP-image.git
- Go to directory of this module
$ cd MMM-FTP-image
- Install dependencies
$ npm ci
- Configure the module in the
config.js
file.
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'],
},
},
];
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 |