Giter Site home page Giter Site logo

lekesako / mmm-vigilancemeteofrance Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grenagit/mmm-vigilancemeteofrance

0.0 0.0 0.0 302 KB

Magic Mirror Module displaying the current level of vigilance of weather phenomena in metropolitan france

License: MIT License

CSS 0.98% JavaScript 99.02%

mmm-vigilancemeteofrance's Introduction

Module: MMM-VigilanceMeteoFrance

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.

MMM-VigilanceMeteoFrance Screenshot #1 MMM-VigilanceMeteoFrance Screenshot #2 MMM-VigilanceMeteoFrance Screenshot #3

MagicMirror Project on Github | Vigilance on Météo France

Installation:

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.

Update:

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

Configuration:

Basic configuration

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
		}
	}
]

Options

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.

Integration with other modules

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).

Todo:

  • 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.

Testing:

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

License:

This module is licensed under the MIT License

mmm-vigilancemeteofrance's People

Contributors

grenagit avatar

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.