Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ounai/ruuvitag-database
Collects data from nearby RuuviTags to an SQL database
https://github.com/ounai/ruuvitag-database
Last synced: 4 days ago
JSON representation
Collects data from nearby RuuviTags to an SQL database
- Host: GitHub
- URL: https://github.com/ounai/ruuvitag-database
- Owner: ounai
- Created: 2023-10-29T09:16:43.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-31T07:32:43.000Z (about 1 year ago)
- Last Synced: 2024-12-16T05:26:57.850Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/ruuvitag-database
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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](https://github.com/pakastin/node-ruuvitag) for interfacing with RuuviTags and [Sequelize](https://sequelize.org) for database access.
## Installation
1. ```npm install ruuvitag-database```
1. [Enable BLE access for noble](https://github.com/abandonware/noble#installation)## Usage
```js
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: ''
});
```