Skip to content

This repo includes nodejs scripts that scan for MiroCard beacons and push the parsed data to an influx database.

License

Notifications You must be signed in to change notification settings

ansgomez/mirocard-scanner-influx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

mirocard-scanner-influx

This repository contains simple Node.js scripts to forward MiroCard beacons to an influxDB database.

Dependencies

To install, run the following commands:

$ git clone https://github.com/ansgomez/mirocard-scanner-influx.git
$ cd mirocard-scanner-influx
$ npm install @abandonware/noble
$ npm install @ansgomez/node-beacon-scanner
$ npm install --save influx

Quick Start

Create a new file inside the mirocard-scanner folder and paste the following code. This sample code shows how to start scanning and store parsed packets in an influx database.

To adjust the connection settings, modify the following lines:

influx_host = "localhost";
influx_database = "mirocard_temp";
influx_measurement = 'temp_rh';

Once you have updated the values to your database, you can start scanning with the following command:

$ sudo node influx-bridge.js

The sample code above will output the result as follows:

MAC: 60:77:71:57:19:0a
Temperature: 23.24
Humidity: 33.80
RSSI: -87
Added to InfluxDB
...

About

This repo includes nodejs scripts that scan for MiroCard beacons and push the parsed data to an influx database.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published