ruuvitag-database
v1.0.4
Published
Collects data from nearby RuuviTags to an SQL database
Downloads
6
Readme
ruuvitag-database
Collects data from nearby RuuviTags to an SQL database.
Tested & confirmed to work on Raspberry Pi and M1 MacBook Pro.
Uses node-ruuvitag for interfacing with RuuviTags and Sequelize for database access.
Installation
npm install ruuvitag-database
- Enable BLE access for noble
Usage
const initRuuviDB = require('ruuvitag-database');
// SQLite example, requires sqlite3 package to be manually installed
// `npm install sqlite3`
initRuuviDB({
logging: false,
dialect: 'sqlite',
storage: './db.sqlite'
});
// Postgres example, requires pg package to be manually installed
// `npm install pg`
initRuuviDB({
logging: false,
dialect: 'postgres',
host: 'localhost',
database: 'ruuvitag',
username: 'postgres',
password: ''
});