This MagicMirror² module utilizes REST API calls to the United States Geological Survey to fetch and display real-time water data for the user’s location. Users can monitor measurements such as water level and flow rate for rivers, streams, and other bodies of water across the United States.
Navigate to your MagicMirror² modules folder:
cd ~/MagicMirror/modules
Clone this repository:
git clone https://github.com/colesandlin/MMM-Streamflow.git
Navigate to the module's folder:
cd MMM-Streamflow
Install dependencies:
npm install
The default configuration displays water level data for the Ohio River at Cincinnati, OH.
Here's an example configuration:
{
module: "MMM-Streamflow",
position: "top_left",
config: {
type: "Gage height",
locationID: "03255000" //ID from https://waterdata.usgs.gov/ky/nwis/current/?type=flow
}
},
Option | Description |
---|---|
Type |
The reading returned. Possible values: "Temperature" , "Discharge" , "Gage height" , "Specific conductance" , "Dissolved oxygen" , "pH" , "Turbidity" Default value: "Gage height" |
locationID |
The USGS site number for the location you want to monitor, which can be obtained here. Default value: "03255000" |
httpMethod |
The HTTP request method. Default value: "GET" |
apiBase |
The USGS base URL. Default value: "https://waterservices.usgs.gov/nwis/iv/?format=json&sites=" |
updateInterval |
How often new data is fetched, the default value is 15 minutes because USGS streamflow data is typically recorded at 15-minute intervals. Default value: 15 * 60 * 1000 |