barnowl-mokosmart converts the decodings of any ambient Bluetooth Low Energy devices by MOKOSmart gateways into standard developer-friendly JSON that is vendor/technology/application-agnostic.
barnowl-mokosmart is a lightweight Node.js package that can run on resource-constrained edge devices as well as on powerful cloud servers and anything in between. It is included in reelyActive's Pareto Anywhere open source middleware suite, and can just as easily be run standalone behind a barnowl instance, as detailed in the code examples below.
Learn "owl" about the raddec JSON data output:
Clone this repository, install package dependencies with npm install
, and then from the root folder run at any time:
npm start
barnowl-mokosmart will attempt to connect to a local MQTT server (mqtt://localhost) and subscribe to the mokosmart topic, outputting raddec and infrastructureMessage data to the console.
While barnowl-mokosmart may suffice standalone for simple real-time applications, its functionality can be greatly extended with the following software packages:
- advlib to decode the individual packets from hexadecimal strings into JSON
- barnowl to combine parallel streams of RF decoding data in a technology-and-vendor-agnostic way
These packages and more are bundled together as the Pareto Anywhere open source middleware suite, which includes a variety of barnowl-x listeners, APIs and interactive web apps.
Discover how to contribute to this open source project which upholds a standard code of conduct.
Consult our security policy for best practices using this open source software and to report vulnerabilities.
MIT License
Copyright (c) 2024 reelyActive
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.