WikiWatershed is an initiative of Stroud™ Water Research Center. The Stroud Center seeks to advance knowledge and stewardship of freshwater systems through global research, education, and watershed restoration.

7. Sending/Uploading Sensor Data

After registering your site, you’re ready to add sensor data to it.

Sending Data From a Data Logger

You can send sensor data from an Arduino data logger by following the detailed instructions in the EnviroDIY GitHub repository, Modular Sensors wiki.

REST POST Request Syntax

REST POST request syntax examples can be found in documentation on the Monitor My Watershed GitHub repository.

Uploading CSV Sensor Data

  1. You must be logged in to MonitorMyWatershed.org and be the owner of the site in order to upload data. (Detailed instructions for registering a site on Monitor My Watershed are available in Section 4.1.)
  2. Make sure that you’ve registered all the variables for your site.
    1. Add sensors/variables as needed by selecting “Manage Sensors” in the Sensor Observations section of your site page and adding them with the “+” button.
    2. Note: many sensors can record multiple types of data or “variables” – e.g., conductivity and temperature. For those sensors, you must add every variable you’re measuring independently.
  3. Create a comma delimited data file (csv) with your sensor values and time stamps
    1. Only include data from a single site; do not mix data from multiple sites!
    2. The timestamp must be in the first column with data values in subsequent columns.
    3. The timestamp must be formatted as yyyy-mm-dd HH:MM:SS (e.g., 2019-07-31 11:15:00). If you are editing your file in Excel, you must manually select this date format. By default, Excel will format the timestamp incorrectly! To manually select the correct date format:
      1. Select the cells containing timestamp data.
      2. Right-click and select “Format Cells.”
      3. Make sure you are on the “Number” tab and that “Custom” is selected in the Category list.
      4. The “Type” field will show m/d/yyyy h:mm. DELETE that format completely and type in yyyy-mm-dd HH:MM:SS (Figure 20). Figure 20. Forcing the correct date time format in Excel.
      5. Click OK to save the changes. Please note: the “Custom” time format is not persistent. If you open the file again with Excel it will revert back to Excel default timestamp format and you will have to change it to yyyy-mm-dd HH:MM:SS again. You may consider using a text editor like Notepad or Notepad++ for any subsequent file editing.
    4. All of your timestamps must be in the same time zone – that is, not corrected for daylight savings time. If your timestamps are in local time (with a daylight savings time adjustment) you must recalculate the times to be in a single time zone.
  4.  Add the following header rows to the top of your CSV:
    Sampling Feature UUID:  [sampling feature UUID]Date and Time in UTC[timezone]Result UUID:[variable 1 UUID][variable 2 UUID][variable 3 UUID]…[yyyy-mm-dd HH:MM:SS]              [data][data][data]……………
    1. Replace [sampling feature UUID] with the sampling feature UUID shown at the bottom of the site information on your site page.
    2. A UUID is a Universally Unique Identifier (also called a GUID or Globally Unique Identifier). They are 36 characters long and are made of numbers 0-9 and the letters a-f, e.g.,12345678-abcd-1234-efgh-1234567890ab.
    3. Hint: Clicking on the text of the Sampling Feature UUID on the page will cause it to be copied to your clipboard.
    4. Replace [timezone] with the correct UTC offset of your data. Eastern Standard Time would be UTC-5.
    5. Replace [variables 1 UUID] (and subsequent variables) with the UUID of those variables.
    6. The UUID for each variable is shown below the plot of recent data for that variable on the site page. You can also see the UUID of a variable at the top of the window when editing an already existing variable (but not when creating a new one).
    7. Hint: the UUIDs necessary to upload data to Monitor My Watershed will be visible under the plot for each variable or all together via the white button at the top of the page (Figure 21). You have to be logged in and the owner of the site in order to get these UUIDs. If you are not logged in or do not own the site, you will not be able to see any UUIDs or upload any data files. Each individual UUID can be quickly copied by hovering your mouse over the value and clicking on it. Note that the registration token is not needed to upload csv files. That value is only needed to post live data. Button to view the token UUID list Figure 21. View Token UUID List button.
    8. Add your data below the header.
  5. Here is an example of a file ready for upload. Remember, if you view this CSV file in Excel, the timestamp will be automatically converted and will no longer be in the correct format!
  6. Upload the file to your site by selecting “Manage Sensors” in the Sensor Observations section of your site page and clicking on the paper clip button below the list of variables. Navigate to and select your file and then click “upload.”
    1. The maximum size for a single file at this time is only 1MB. If your file is bigger than that, you will need to break it into multiple files.
    2. After you click the upload button, it may take some time for the file to be processed. A pop-up will appear at the bottom of the page and you will receive an email with the processing finishes.
    3. You should be able to see the uploaded data immediately after the processing finishes on both your site page and in Time Series Analyst.

Was this article helpful?

Send Us Feedback

Scroll to the bottom of the article to tell us if it was helpful. A “Yes” will make our day, but if you answer “No” you can then send us a brief message to help us improve.

Can’t Find the Answer?

If you’ve searched the knowledge base and still need help, please reach out to our team.
Contact Us
Model My Watershed Maintenance

Model My Watershed will be undergoing scheduled maintenance on Monday, January 17 from 11 a.m. to 3 p.m. EST. The model will be unavailable during that time.

Upgrade announcement coming soon!