-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41d232f
commit e258f99
Showing
7 changed files
with
476 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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,128 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, religion, or sexual identity | ||
and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
* Demonstrating empathy and kindness toward other people | ||
* Being respectful of differing opinions, viewpoints, and experiences | ||
* Giving and gracefully accepting constructive feedback | ||
* Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
* Focusing on what is best not just for us as individuals, but for the | ||
overall community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
* The use of sexualized language or imagery, and sexual attention or | ||
advances of any kind | ||
* Trolling, insulting or derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or email | ||
address, without their explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of | ||
acceptable behavior and will take appropriate and fair corrective action in | ||
response to any behavior that they deem inappropriate, threatening, offensive, | ||
or harmful. | ||
|
||
Community leaders have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, and will communicate reasons for moderation | ||
decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies when | ||
an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official e-mail address, | ||
posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported to the community leaders responsible for enforcement at | ||
conduct@reelyactive.com. | ||
All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the | ||
reporter of any incident. | ||
|
||
## Enforcement Guidelines | ||
|
||
Community leaders will follow these Community Impact Guidelines in determining | ||
the consequences for any action they deem in violation of this Code of Conduct: | ||
|
||
### 1. Correction | ||
|
||
**Community Impact**: Use of inappropriate language or other behavior deemed | ||
unprofessional or unwelcome in the community. | ||
|
||
**Consequence**: A private, written warning from community leaders, providing | ||
clarity around the nature of the violation and an explanation of why the | ||
behavior was inappropriate. A public apology may be requested. | ||
|
||
### 2. Warning | ||
|
||
**Community Impact**: A violation through a single incident or series | ||
of actions. | ||
|
||
**Consequence**: A warning with consequences for continued behavior. No | ||
interaction with the people involved, including unsolicited interaction with | ||
those enforcing the Code of Conduct, for a specified period of time. This | ||
includes avoiding interactions in community spaces as well as external channels | ||
like social media. Violating these terms may lead to a temporary or | ||
permanent ban. | ||
|
||
### 3. Temporary Ban | ||
|
||
**Community Impact**: A serious violation of community standards, including | ||
sustained inappropriate behavior. | ||
|
||
**Consequence**: A temporary ban from any sort of interaction or public | ||
communication with the community for a specified period of time. No public or | ||
private interaction with the people involved, including unsolicited interaction | ||
with those enforcing the Code of Conduct, is allowed during this period. | ||
Violating these terms may lead to a permanent ban. | ||
|
||
### 4. Permanent Ban | ||
|
||
**Community Impact**: Demonstrating a pattern of violation of community | ||
standards, including sustained inappropriate behavior, harassment of an | ||
individual, or aggression toward or disparagement of classes of individuals. | ||
|
||
**Consequence**: A permanent ban from any sort of public interaction within | ||
the community. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 2.0, available at | ||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. | ||
|
||
Community Impact Guidelines were inspired by [Mozilla's code of conduct | ||
enforcement ladder](https://github.com/mozilla/diversity). | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at | ||
https://www.contributor-covenant.org/faq. Translations are available at | ||
https://www.contributor-covenant.org/translations. |
This file contains 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,56 @@ | ||
How to contribute | ||
================= | ||
|
||
First and foremost: _thank you for your interest in contributing to this open source software project!_ | ||
|
||
The many ways in which you can contribute include: | ||
- [reporting an issue](#reporting-an-issue) | ||
- [fixing an issue](#fixing-an-issue) | ||
- [adding a feature](#adding-a-feature) | ||
- [financial support](#financial-support) | ||
- [love and encouragement](#love-and-encouragement) | ||
|
||
[](CODE_OF_CONDUCT.md) | ||
Kindly observe the standard [code of conduct](CODE_OF_CONDUCT.md) however you choose to contribute. | ||
|
||
|
||
Reporting an issue | ||
------------------ | ||
|
||
We invite contributors to __create an issue on GitHub__ whenever a significant bug or impedement to the existing functionality of the project is encountered. Kindly include sufficient detail to easily replicate the issue as this will maximise the chances of a swift resolution. | ||
|
||
|
||
Fixing an issue | ||
--------------- | ||
|
||
We invite contributors who are comfortable fixing any significant and obvious issue they discover to __create a pull request__ on the appropriate project branch. | ||
|
||
:information_source: Kindly observe reelyActive's [Node.js style guide](https://github.com/reelyactive/node-style-guide) and/or [Web style guide](https://github.com/reelyactive/web-style-guide) as applicable. | ||
|
||
|
||
Adding a feature | ||
---------------- | ||
|
||
We invite _new_ contributors to __fork the project__, add new features, and then [contact us](https://www.reelyactive.com/contact/) to share their work. | ||
|
||
We invite _veteran_ contributors to __create a pull request__ on the appropriate branch for each new feature they develop. | ||
|
||
:information_source: Kindly observe reelyActive's [Node.js style guide](https://github.com/reelyactive/node-style-guide) and/or [Web style guide](https://github.com/reelyactive/web-style-guide) as applicable. | ||
|
||
|
||
Financial support | ||
----------------- | ||
|
||
Open source development of this and other reelyActive software packages is supported primarily by [annual subscriptions](https://www.reelyactive.com/pricing/) from clients, partners and members of our community. If you're in a position to contribute financially, please consider doing so. | ||
|
||
|
||
Love and encouragement | ||
---------------------- | ||
|
||
This open source project exists because of a perceived community need and the tireless efforts of its contributors. Consider encouraging them by: | ||
- :star: starring the project on GitHub | ||
- :busts_in_silhouette: sharing the project with friends and colleagues to raise awareness | ||
- :heart: surprising the community and its contributors with random acts of kindness | ||
|
||
|
||
These contribution guidelines were drafted by [the reelyActive team](https://reelyactive.com/team/) and we invite you to adapt them for your own projects under a [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/). |
This file contains 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 |
---|---|---|
@@ -1,2 +1,75 @@ | ||
# barnacles-mqtt | ||
Distribute ambient IoT sensor data from Pareto Anywhere open source middleware via MQTT. We believe in an open Internet of Things. | ||
barnacles-mqtt | ||
============== | ||
|
||
__barnacles-mqtt__ distributes ambient IoT sensor data via MQTT. | ||
|
||
 | ||
|
||
__barnacles-mqtt__ ingests a real-time stream of _raddec_ & _dynamb_ objects from [barnacles](https://github.com/reelyactive/barnacles/) and/or _spatem_ objects from [chimps](https://github.com/reelyactive/chimps/) which it publishes via MQTT. It couples seamlessly with reelyActive's [Pareto Anywhere](https://www.reelyactive.com/pareto/anywhere/) open source IoT middleware. | ||
|
||
__barnacles-mqtt__ is a lightweight [Node.js package](https://www.npmjs.com/package/barnacles-mqtt) that can run on resource-constrained edge devices as well as on powerful cloud servers and anything in between. | ||
|
||
|
||
Topics | ||
------ | ||
|
||
__barnacles-mqtt__ observes the following topic hierarchy which matches the `/devices` API of [barterer](https://github.com/reelyactive/barterer/), with an optional prefix: | ||
- "paretoanywhere" (or `topicPrefix`: see [Options](#Options)) | ||
- "devices" | ||
- [deviceId] | ||
- [deviceIdType] | ||
- raddec / dynamb / spatem | ||
|
||
For instance, a _dynamb_ associated with a Bluetooth Low Energy device having the public address `001122334455` would be published to `paretoanywhere/devices/001122334455/2/dynamb` | ||
|
||
The MQTT single-level wildcard (+) can be used to subscribe to all event types for a given device, for example: `paretoanywhere/devices/001122334455/2/+` | ||
|
||
The MQTT multi-level wildcard (#) can be used to subscribe to all events from all devices, for example: `paretoanywhere/#` | ||
|
||
|
||
Options | ||
------- | ||
|
||
__barnacles-mqtt__ supports the following options: | ||
|
||
| Property | Default | Description | | ||
|:--------------|:-------------------|:----------------------------------| | ||
| client | null | Optional instantiated MQTT client | | ||
| url | "mqtt://localhost" | Local MQTT broker | | ||
| clientOptions | {} | See [mqtt.Client(, options)](https://github.com/mqttjs/MQTT.js?tab=readme-ov-file#client) | | ||
| topicPrefix | "paretoanywhere" | Precedes /devices/... | | ||
| printErrors | false | Print MQTT errors? | | ||
|
||
__barnacles-mqtt__ will use any existing MQTT client provided via the `client` option, else it will instantiate its own, observing any `url` and `clientOptions` properties. | ||
|
||
|
||
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. | ||
|
||
|
||
License | ||
------- | ||
|
||
MIT License | ||
|
||
Copyright (c) 2024 [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. |
This file contains 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,21 @@ | ||
Using reelyActive open source software securely | ||
=============================================== | ||
|
||
If you're reading this, it is likely because you take open source software security seriously. _Thank you!_ | ||
|
||
|
||
Keep up to date | ||
--------------- | ||
|
||
Unless otherwise specified, it is recommended to regularly update to the most recent version of this software package, and to review the security test results, including any [Dependabot alerts](https://docs.github.com/code-security/dependabot/dependabot-alerts) listed under the Security tab of this GitHub repository, ideally automating this process and including an alerting feature. | ||
|
||
|
||
Disclose a vulnerability | ||
------------------------ | ||
|
||
Should you discover a novel security issue or vulnerability, kindly __report your findings privately__, either to __security@reelyactive.com__, or with the __Report a vulnerability__ feature under the Security tab of this GitHub repository. | ||
|
||
Kindly provide sufficient detail to effectively address, if not resolve, the issue, as well as a means of contact should additional detail be required, _and so that we may return our thanks!_ | ||
|
||
|
||
These security guidelines were drafted by [the reelyActive team](https://www.reelyactive.com/team/) and we invite you to adapt them for your own projects under a [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/). |
This file contains 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,9 @@ | ||
#!/usr/bin/env node | ||
|
||
const BarnaclesMqtt = require('../lib/barnaclesmqtt.js'); | ||
|
||
|
||
let barnaclesMqtt = new BarnaclesMqtt({ printErrors: true }); | ||
|
||
|
||
console.log('barnacles-mqtt instantiation test'); |
Oops, something went wrong.