-
Notifications
You must be signed in to change notification settings - Fork 18
ndbc-csv #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TheRestOfMe
wants to merge
5
commits into
master
Choose a base branch
from
ndbc-csv
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
ndbc-csv #190
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d48bad3
Initial push of updated NDBC driver support for realtime Buoy data
7a4195f
Updated README; rolled minor version number (v0.2.0)
465d940
Fixed several issues associated with PR https://github.com/opensensor…
1c593cc
Couple more changes to addres PR #190:https://github.com/opensensorhu…
16042ba
Removed unused jsoup dependency
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| ### NDBC Buoy Data Driver- Last Updated 2026-03-25 | ||
|
|
||
| **_Company_**: Botts Innovative Research, Inc. | ||
| **_Developer_**: Tony Cook | ||
| **_Sensor Vendor_**: | ||
|
|
||
| OpenSensorhub driver for supporting data from the National Data Buoy Center network of Oceanicbuoys. It reads near-realtime data from CSV files on the NDBC Observations website located here: | ||
| https://www.ndbc.noaa.gov/data/latest_obs/latest_obs.txt | ||
|
|
||
| Documentation on Observation measurements, units, and methods of acquisition can be found here: | ||
| https://www.ndbc.noaa.gov/faq/measdes.shtml | ||
|
|
||
| The above links and method of access are subject to change. | ||
|
|
||
| ## Configuration | ||
|
|
||
| - **General:** (*Settings common to all OpenSensorHub drivers on the "General" tab.*) | ||
| - **Module ID:** *Not editable.* UUID automatically assigned by OpenSensorHub for this driver instance. | ||
| - **Module Class:** *Not editable.* The fully qualified name of the Java class implementing the drive | ||
| - **Module Name:** A name for the instance of the driver. Should be set to something short and human-readable that describes the upstream source of data, e.g. "Shout TS Trackers". This does not affect the operation of the driver, but is seen in user interfaces. | ||
| - **Description:** Any descriptive text that an administrator may want to enter for the benefit of users (or themselves). | ||
| - **SensorML URL:** URL to a SensorML description document for the driver or physical device the driver represents. Typically this is left blank, and OpenSensorHub will populate the SensorML description with sensible defaults. | ||
| - **Auto Start:** If checked, this driver will be started when OpenSensorHub starts. This should typically be checked for this driver. | ||
| - **Last Updated:** This should not be changed for this driver. (Though it could theoretically be used to indicate to clients that settings have changed, no known clients will use this value.) | ||
|
|
||
| - **BuoyConfig:** *(Settings specific to NDBC OpenSensorHub driver)* | ||
| - **realtimeUrl:** Serial Number/MAC ID for this BeastkitURL of realtime CSV data | ||
| - **pollingPeriod:** Polling Period in ms | ||
|
|
||
| --- | ||
|
|
||
| ## Outputs | ||
|
|
||
| #### BuoyOutput | ||
| * timestamp - Julian1970 timestamp of the measurement | ||
| * id - NDBC buoy ID | ||
| * latitude - latitude of buoy location (decimal degrees) | ||
| * longitude - longitude of buoy location in (decimal degrees) | ||
| * altitude? - should this be there? | ||
| * windSpeed - average wind speed (m/s) | ||
| * windDir - wind direction (degrees) | ||
| * windGust - peak wind gust (m/s) | ||
| * significantWaveHeight - (meters) | ||
| * dominantWavePeriod - (seconds) | ||
| * averageWavePeriod - (seconds) | ||
| * waveDirection - (degrees) | ||
| * seaLevelPressure - (hPa) | ||
| * pressureTendency - (hPa/?) | ||
| * airTemperature - (degrees C) | ||
| * waterTemperature - (degrees C) | ||
| * dewPoint - (degrees C) | ||
| * visibility - (miles) | ||
| * tideWaterLevel - (feet relative to Mean Lower Level Water) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| description = 'NDBC Buoy Data Archive' | ||
| ext.details = 'Connector to retrieve realtime observations from NDBC datasets' | ||
| version = '0.2.2' | ||
|
|
||
| dependencies { | ||
| implementation 'org.sensorhub:sensorhub-core:' + oshCoreVersion | ||
| } | ||
|
|
||
| // add info to OSGi manifest | ||
| osgi { | ||
| manifest { | ||
| attributes('Bundle-Vendor': 'Botts Innovative Research Inc.') | ||
| attributes('Bundle-Activator': 'org.sensorhub.impl.sensor.ndbc.Activator') | ||
| } | ||
| } | ||
|
|
||
| // add info to maven pom | ||
| ext.pom >>= { | ||
| developers { | ||
| developer { | ||
| id 'theRestOfMe' | ||
| name 'Tony Cook' | ||
| organization 'Botts Innovative Research Inc.' | ||
| organizationUrl 'https://www.opensensorhub.org' | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,145 @@ | ||
| [ | ||
| { | ||
| "objClass": "org.sensorhub.impl.service.HttpServerConfig", | ||
| "id": "5cb05c9c-9e08-4fa1-8731-ffaa5846bdc1", | ||
| "name": "HTTP Server", | ||
| "moduleClass": "org.sensorhub.impl.service.HttpServer", | ||
| "httpPort": 8181, | ||
| "servletsRootUrl": "/sensorhub", | ||
| "authMethod": "BASIC", | ||
| "staticDocRootUrl": "web" | ||
| }, | ||
|
|
||
| { | ||
| "objClass": "org.sensorhub.impl.security.BasicSecurityRealmConfig", | ||
| "users": [ | ||
| { | ||
| "objClass": "org.sensorhub.impl.security.BasicSecurityRealmConfig$UserConfig", | ||
| "id": "admin", | ||
| "name": "Administrator", | ||
| "password": "osh4ndbc2025", | ||
| "roles": [ | ||
| "admin" | ||
| ] | ||
| }, | ||
| { | ||
| "objClass": "org.sensorhub.impl.security.BasicSecurityRealmConfig$UserConfig", | ||
| "id": "anonymous", | ||
| "name": "Anonymous User", | ||
| "password": "", | ||
| "roles": [ | ||
| "anon" | ||
| ] | ||
| }, | ||
| { | ||
| "objClass": "org.sensorhub.impl.security.BasicSecurityRealmConfig$UserConfig", | ||
| "id": "sensor", | ||
| "name": "Smart Sensors", | ||
| "password": "pwd", | ||
| "roles": [ | ||
| "sost" | ||
| ] | ||
| } | ||
| ], | ||
| "roles": [ | ||
| { | ||
| "objClass": "org.sensorhub.impl.security.BasicSecurityRealmConfig$RoleConfig", | ||
| "id": "admin", | ||
| "allow": [ | ||
| "*" | ||
| ], | ||
| "deny": [] | ||
| }, | ||
| { | ||
| "objClass": "org.sensorhub.impl.security.BasicSecurityRealmConfig$RoleConfig", | ||
| "id": "anon", | ||
| "allow": [ | ||
| "sos[*]/get/*" | ||
| ], | ||
| "deny": [] | ||
| }, | ||
| { | ||
| "objClass": "org.sensorhub.impl.security.BasicSecurityRealmConfig$RoleConfig", | ||
| "id": "sost", | ||
| "allow": [ | ||
| "sos[*]/get/*", | ||
| "sos[*]/insert/*", | ||
| "sos[*]/update/*" | ||
| ], | ||
| "deny": [] | ||
| } | ||
| ], | ||
| "id": "bd112969-8838-4f62-8d10-1edf1baa6669", | ||
| "moduleClass": "org.sensorhub.impl.security.BasicSecurityRealm", | ||
| "name": "Users", | ||
| "autoStart": true | ||
| }, | ||
|
|
||
| { | ||
| "objClass": "org.sensorhub.ui.AdminUIConfig", | ||
| "widgetSet": "org.sensorhub.ui.SensorHubWidgetSet", | ||
| "customPanels": [], | ||
| "customForms": [], | ||
| "id": "5cb05c9c-9123-4fa1-8731-ffaa51489678", | ||
| "moduleClass": "org.sensorhub.ui.AdminUIModule", | ||
| "name": "Admin UI", | ||
| "autoStart": true | ||
| }, | ||
|
|
||
| { | ||
| "objClass": "org.sensorhub.impl.sensor.ndbc.BuoyConfig", | ||
| "id": "7d081b29-aae7-4b4c-82fd-9dfa00c25888", | ||
| "name": "NDBC Buoy Config", | ||
| "moduleClass": "org.sensorhub.impl.sensor.ndbc.BuoySensor", | ||
| "realtimeUrl": "https://www.ndbc.noaa.gov/data/latest_obs/latest_obs.txt", | ||
| "autoStart": true | ||
| }, | ||
|
|
||
| { | ||
| "objClass": "org.sensorhub.impl.service.sos.SOSServiceConfig", | ||
| "id": "5cb05c9c-9e08-4fa1-8731-ff41e246bdc1", | ||
| "name": "SOS Service", | ||
| "moduleClass": "org.sensorhub.impl.service.sos.SOSService", | ||
| "enabled": true, | ||
| "endPoint": "/sos", | ||
| "enableHttpGET": true, | ||
| "enableHttpPOST": true, | ||
| "enableSOAP": true, | ||
|
|
||
| "security": { | ||
| "objClass": "org.sensorhub.api.security.SecurityConfig", | ||
| "enableAccessControl": true, | ||
| "requireAuth": false | ||
| }, | ||
|
|
||
| "dataProviders" : [ | ||
| { | ||
| "objClass": "org.sensorhub.impl.service.sos.SensorDataProviderConfig", | ||
| "enabled": true, | ||
| "name": "NDBC Buoy Data", | ||
| "uri": "urn:osh:hydro:ndbc", | ||
| "sensorID": "7d081b29-aae7-4b4c-82fd-9dfa00c25888", | ||
| "storageID": "8cc876e4-3bed-4347-8012-20227ac22ec6", | ||
| "liveDataTimeout": 360000.0, | ||
| "maxFois": 10 | ||
| } | ||
| ], | ||
| "ogcCapabilitiesInfo": { | ||
| "title": "SOS Service Supporting NDBC Buoy data", | ||
| "description": "An SOS service automatically deployed by SensorHub", | ||
| "keywords": ["SensorHub", "Buoy", "NDBC", "Ocean" ], | ||
| "fees": "NONE", | ||
| "accessConstraints": "NONE", | ||
| "serviceProvider": { | ||
| "individualName": "Tony Cook", | ||
| "organizationName": "Botts Innovative Research Inc.", | ||
| "positionName": "Byte Pusher", | ||
| "voiceNumber": "512-734-5758", | ||
| "email": "tony.cook@botts-inc.com", | ||
| "website": null, | ||
| "hoursOfService": null, | ||
| "contactInstructions": null | ||
| } | ||
| } | ||
| } | ||
| ] |
27 changes: 27 additions & 0 deletions
27
...s/hydro/sensorhub-driver-ndbc/src/main/java/org/sensorhub/impl/sensor/ndbc/Activator.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /***************************** BEGIN LICENSE BLOCK *************************** | ||
|
|
||
| The contents of this file are subject to the Mozilla Public License, v. 2.0. | ||
| If a copy of the MPL was not distributed with this file, You can obtain one | ||
| at http://mozilla.org/MPL/2.0/. | ||
|
|
||
| Software distributed under the License is distributed on an "AS IS" basis, | ||
| WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | ||
| for the specific language governing rights and limitations under the License. | ||
|
|
||
| Copyright (C) 2021 Sensia Software LLC. All Rights Reserved. | ||
|
|
||
| ******************************* END LICENSE BLOCK ***************************/ | ||
|
|
||
| package org.sensorhub.impl.sensor.ndbc; | ||
|
|
||
| import org.osgi.framework.BundleActivator; | ||
| import org.sensorhub.utils.OshBundleActivator; | ||
|
|
||
|
|
||
| /* | ||
| * Needed to expose java services as OSGi services | ||
| */ | ||
| public class Activator extends OshBundleActivator implements BundleActivator | ||
| { | ||
|
|
||
| } |
28 changes: 28 additions & 0 deletions
28
.../hydro/sensorhub-driver-ndbc/src/main/java/org/sensorhub/impl/sensor/ndbc/BuoyConfig.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| /***************************** BEGIN LICENSE BLOCK *************************** | ||
|
|
||
| The contents of this file are subject to the Mozilla Public License, v. 2.0. | ||
| If a copy of the MPL was not distributed with this file, You can obtain one | ||
| at http://mozilla.org/MPL/2.0/. | ||
|
|
||
| Software distributed under the License is distributed on an "AS IS" basis, | ||
| WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | ||
| for the specific language governing rights and limitations under the License. | ||
|
|
||
| Copyright (C) 2021 Botts Innovative Research, Inc. All Rights Reserved. | ||
|
|
||
| ******************************* END LICENSE BLOCK ***************************/ | ||
|
|
||
| package org.sensorhub.impl.sensor.ndbc; | ||
|
|
||
| import org.sensorhub.api.config.DisplayInfo; | ||
| import org.sensorhub.api.sensor.SensorConfig; | ||
|
|
||
|
|
||
| public class BuoyConfig extends SensorConfig | ||
| { | ||
| @DisplayInfo(desc="URL of realtime CSV data downloads") | ||
| String realtimeUrl = "https://www.ndbc.noaa.gov/data/latest_obs/latest_obs.txt"; | ||
|
|
||
| @DisplayInfo(desc="Polling Period in ms") | ||
| long pollingPeriod = 60_000L; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.