Skip to content
Magic Mirror Module displaying the last value of water level at a station in the Vigicrues network in France
JavaScript CSS
Branch: master
Clone or download
Latest commit ebd42a7 Dec 30, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Chart.min.js Add files via upload Dec 26, 2019
LICENSE Initial commit Dec 26, 2019
MMM-VigiCrues.css Add files via upload Dec 28, 2019
MMM-VigiCrues.js Add files via upload Dec 30, 2019
MMM-VigiCrues_screenshot1.png Add files via upload Dec 28, 2019
MMM-VigiCrues_screenshot2.png
MMM-VigiCrues_screenshot3.png Add files via upload Dec 28, 2019
MMM-VigiCrues_screenshots.png Add files via upload Dec 28, 2019
README.md Add files via upload Dec 28, 2019

README.md

Module: MMM-VigiCrues

This module displays the last value of water level at a station in the Vigicrues network in France, including chart and statistical information (minimum, average, maximum).

The max-height and max-width of the chart can be fixed. The amplitude and interval of the graph data and the age of the data used to determine the level assessment can also be fixed. Color Legend and chart display may be enabled or disabled independently.

MMM-VigiCrues Screenshot #1 MMM-VigiCrues Screenshot #2 MMM-VigiCrues Screenshot #3

MagicMirror Project on Github | Vigicrues

Installation:

In your terminal, go to your MagicMirror's Module folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/grenagit/MMM-VigiCrues

Configure the module in your config.js file.

Update:

In your terminal, go to your MMM-VigiCrues's Module folder:

cd ~/MagicMirror/modules/MMM-VigiCrues

Incorporate changes from this repository:

git pull

Configuration:

Basic configuration

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

modules: [
	{
		module: "MMM-VigiCrues",
		position: "top_left",
		config: {
			stationid: "A123456789" // Station identifer (www.vigicrues.gouv.fr)
		}
	}
]

Options

The following properties can be configured:

Option Description
stationid The station identifer, which can be obtained on Vigicrues portal (tab Info Station).

This value is REQUIRED
dataPeriod How often does the content needs to be fetched? (Minutes)

Possible values: 30 - 43200
Default value: 3 * 24 * 60 (3 days)
dataInterval How often does the content needs to be fetched? (Minutes)

Possible values: 10 - 60
Default value: 60 (1 hour)
comparisonPeriod How often does the content needs to be fetched? (Minutes)

Possible values: 10 - 43200
Default value: 2 * 60 (2 hours past)
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)
maxChartWidth Maximum width for chart display. If set to 0, the chart's default width is used. (Pixels)

Possible values:0 - 5000
Default value: 0 (default width)
maxChartHeight Maximum height for chart display. If set to 0, the chart's default height is used. (Pixels)

Possible values:0 - 5000
Default value: 0 (default height)
useColorLegend Use the colored icons.

Possible values: true or false
Default value: true
showChart Show the chart.

Possible values: true or false
Default value: true
alertTable Your alerts (water level, title, colour).

Possible values: view details below
Default value: []
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 Hub'Eau API base URL.

Default value: 'https://hubeau.eaufrance.fr'
hydroEndpoint The Hydrometry API endPoint.

Default value: 'api/v1/hydrometrie/observations_tr'

Alert Table

With alertTable , you can create your own alerts based on water level. This information will be added on the chart and an alert will be displayed if the current water level exceeds the water level corresponding to the alert.

You can create one or more alerts within the following structure :

alertTable: [
	{ "value": 5430, "title": "Flood 2017", "color": "red" }, // Alert set to 5430 mm displayed in red with the title "Flood 2017"
	{ "value": 3120, "title": "Flood 2014", "color": "orange" }, // Alert set to 3120 mm displayed in orange with the title "Flood 2014"
]

Todo

License

This module is licensed under the MIT License

You can’t perform that action at this time.