This module displays the current level of vigilance of weather phenomena set by Météo France for each department of metropolitan france, including description and the associated risks. A notification is displayed in case of a change in the level of vigilance or new risks.
Description, Risk legend and Color Legend display may be enabled or disabled independently. The max-width of the description can be fixed. Notifications can be disabled.
MagicMirror Project on Github | Vigilance on Météo France
In your terminal, go to your MagicMirror's Module folder:
cd ~/MagicMirror/modules
Clone this repository:
git clone https://github.com/grenagit/MMM-VigilanceMeteoFrance
Go to your MMM-VigilanceMeteoFrance's Module folder:
cd ~/MagicMirror/modules/MMM-VigilanceMeteoFrance
Install dependencies:
npm install
Configure the module in your config.js file.
In your terminal, go to your MMM-VigilanceMeteoFrance's Module folder:
cd ~/MagicMirror/modules/MMM-VigilanceMeteoFrance
Incorporate changes from this repository:
git pull
Install dependencies:
npm install
To use this module, add it to the modules array in the config/config.js
file:
modules: [
{
module: "MMM-VigilanceMeteoFrance",
position: "top_left",
config: {
department: 75, // Department number
}
}
]
The following properties can be configured:
Option | Description |
---|---|
department |
The department number (metropolitan france only). This value is REQUIRED |
updateInterval |
How often does the content needs to be fetched? (Milliseconds) Possible values: 1000 - 86400000 Default value: 1 * 60 * 60 * 1000 (1 hour) |
animationSpeed |
Speed of the update animation. (Milliseconds) Possible values: 0 - 5000 Default value: 1000 (1 second) |
notificationDuration |
Time to display notification. (Milliseconds) Possible values: 1000 - 86400000 Default value: 1 * 60 * 1000 (1 minute) |
maxTextWidth |
Maximum width for desription display. If set to 0, there is no limit. (Pixels) Possible values: 0 - 5000 Default value: 0 (no limit) |
maxRisksInline |
Maximum number of risks displayed on the same line. If set to 0, there is no limit. Possible values: 0 - 9 Default value: 3 |
showDepartment |
Show the department name. Possible values: true or false Default value: false |
showDescription |
Show the description. Possible values: true or false Default value: false |
showRiskLegend |
Show the risk legend. Possible values: true or false Default value: true |
showNotification |
Show notification (level of vigilance change or new risks). Possible values: true or false Default value: true |
hideGreenLevel |
Hide module when vigilance level is green. Possible values: true or false Default value: false |
useColorLegend |
Use the colored icons. Possible values: true or false Default value: true |
initialLoadDelay |
The initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds) Possible values: 1000 - 5000 Default value: 0 |
retryDelay |
The delay before retrying after a request failure. (Milliseconds) Possible values: 1000 - 60000 Default value: 2500 |
apiBase |
The Météo France API base URL. Default value: 'http://vigilance2019.weatherfrance.com/' |
vigiEndpoint |
The Vigilance API endPoint. Default value: 'data/NXFR33_LFPW_.xml' |
frenchDepartmentsTable |
The conversion table to convert the department number to department name. |
The following notifications can be used by other modules:
Action | Notification | Payload |
---|---|---|
Change the vigilance department | VIGI_METEOFRANCE_DEPARTMENT | The department number |
For example, use this.sendNotification("VIGI_METEOFRANCE_DEPARTMENT", 75);
if you want to change department number so that it corresponds to that of Paris (75).
- Hide, if you want, the module when vigilance level is green.
- Display, if you want, the department name.
- Manage risks at different levels in the same department.
- Display an notification at the start of the MagicMirror in case of vigilance level 2 to 4.
- Display an notification in case of new risk.
To test the new features, you can use the testing branch:
- Change from master version to testing version:
git checkout testing
- Return to master version from testing version:
git checkout master
- Check the version used:
git branch -v
This module is licensed under the MIT License