pareto-cli
Pareto command-line client. We believe in an open Internet of Things.
Installation
git clone https://github.com/reelyactive/pareto-cli.git cd pareto-cli npm install -g
You may need to run the above as super-user (prefix the npm command with sudo).
Usage
Authenticate
pareto init <your email>
Your API token will be stored in $HOME/.pareto Take good care of it.
Stream events to mongodb
pareto stream -t mongodb -o mongodb://localhost:27017/db_name
Change "localhost" and "db_name" to the file you wish. If parameter group -o filename is omitted, the default URL is used: mongodb://localhost:27017/pareto-cli. The data is stored in a collection called "stream".
Stream events to nedb
pareto stream -t nedb -o stream.db
Change stream.db to the file you wish. If parameter group -o filename is omitted, the default filename is used: $PWD/data/stream.db.
Output
You can expected an output like the following:
Streaming events to nedb at /home/developer/data/stream.db
Socket.io connected to https://pareto.reelyactive.com
keep-alive ; a47733bd69df ; 001bc5094081004b ; pinazo:4b ; https://sniffypedia.org/Product/Google_Chromecast/
keep-alive ; d05fb800d367 ; 001bc5094081004a ; pinazo:4a ; https://sniffypedia.org/Product/reelyActive_RA-R436/
disappearance ; f17effad1f24 ; 001bc5094081004a ; pinazo:4a ; https://sniffypedia.org/Organization/Estimote_Inc/
keep-alive ; 001bc50940100138 ; 001bc50940800008 ; pinazo:rfid ; https://sniffypedia.org/Product/reelyActive_RA-T411/
keep-alive ; 001bc5094010008a ; 001bc50940800008 ; pinazo:rfid ; https://sniffypedia.org/Product/reelyActive_RA-T411/
You can omit the output by adding -s to the end of the above commands.
What's next?
This is an active work in progress. Expect regular changes and updates, as well as improved documentation!
License
MIT License
Copyright (c) 2016 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_SESSION_STATE, 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.