Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reelyactive/barnacles-webhook
Forward ambient IoT sensor & location data from Pareto Anywhere open source middleware to a target server via HTTP POST. We believe in an open Internet of Things.
https://github.com/reelyactive/barnacles-webhook
barnacles dynamb pareto-anywhere raddec webhook webhooks
Last synced: 10 days ago
JSON representation
Forward ambient IoT sensor & location data from Pareto Anywhere open source middleware to a target server via HTTP POST. We believe in an open Internet of Things.
- Host: GitHub
- URL: https://github.com/reelyactive/barnacles-webhook
- Owner: reelyactive
- License: mit
- Created: 2019-02-02T16:26:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-11T13:42:32.000Z (3 months ago)
- Last Synced: 2024-10-03T09:27:26.616Z (3 months ago)
- Topics: barnacles, dynamb, pareto-anywhere, raddec, webhook, webhooks
- Language: JavaScript
- Homepage: https://www.reelyactive.com/pareto/anywhere/
- Size: 99.6 KB
- Stars: 0
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
barnacles-webhook
=================Webhook interface for [barnacles](https://github.com/reelyactive/barnacles/) and/or [chimps](https://github.com/reelyactive/chimps/) open source software packages. A webhook provides event notifications via HTTP POST.
__barnacles-webhook__ POSTs the following events as JSON:
- raddec (RADio DECoding data)
- dynamb (DYNamic AMBient data)
- spatem (SPAtial-TEMporal data)Installation
------------npm install barnacles-webhook
Hello barnacles-webhook
-----------------------The following code will POST _simulated_ [raddec](https://github.com/reelyactive/raddec/) data to the /raddecs route on a local server running on port 80. The simulated data is provided by [barnowl](https://github.com/reelyactive/barnowl/) which is typically run in conjunction with [barnacles](https://github.com/reelyactive/barnacles/). Install the _barnowl_, _barnacles_ and _barnacles-webhook_ packages using npm before running the code.
```javascript
const Barnowl = require('barnowl');
const Barnacles = require('barnacles');
const BarnaclesWebhook = require('barnacles-webhook');let barnowl = new Barnowl();
barnowl.addListener(Barnowl, {}, Barnowl.TestListener, {});let barnacles = new Barnacles({ barnowl: barnowl });
barnacles.addInterface(BarnaclesWebhook, { /* See options below */ });
```Options
-------__barnacles-webhook__ supports the following options:
| Property | Default | Description |
|:--------------|:------------|:-----------------------------------------------|
| useHttps | false | POST via HTTPS (true) or HTTP (false) |
| hostname | "localhost" | Hostname of the target server |
| port | 80 | Port of the target server |
| raddecPath | "/raddecs" | Path for raddec objects on the target server |
| dynambPath | "/dynambs" | Path for dynamb objects on the target server |
| spatemPath | "/spatems" | Path for spatem objects on the target server |
| printErrors | false | Print errors to the console (for debug) |
| customHeaders | {} | Dictionary of additional key/values for the header |By default __barnacles-webhook__ will POST to http://localhost/raddecs.
Contributing
------------Discover [how to contribute](CONTRIBUTING.md) to this open source project which upholds a standard [code of conduct](CODE_OF_CONDUCT.md).
Security
--------Consult our [security policy](SECURITY.md) for best practices using this open source software and to report vulnerabilities.
[![Known Vulnerabilities](https://snyk.io/test/github/reelyactive/barnacles-webhook/badge.svg)](https://snyk.io/test/github/reelyactive/barnacles-webhook)
License
-------MIT License
Copyright (c) 2019-2022 [reelyActive](https://www.reelyactive.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.