Skip to content

Wiresense/wiresense.js

Repository files navigation

Wiresense.JS

wiresense.js

made with love typescript build status npm version npm downloads

Client libary for Wiresense

🛠️Features

  • Send data to the wiresense frontend
  • Works with almost every sensor
  • Automaticly saved data into csv files

📖Usage

Install the libary with npm:

  npm install @thedannicraft/wiresense

Import the libary and configure it

const { Wiresense } = require('@thedannicraft/wiresense');

Wiresense.config({
    port: 8080
});

Setup a new sensor (group)

function readSensor() {
    // Replace with you actual sensor reading logic
    return {
        Pressure: Math.random(),
        Humidity: Math.random(),
        Temperature: Math.random()
    };
}

const mySensor = new Wiresense('Fake-BME280', readSensorData, './data/sensor_data.csv');

Execute a sensor (Send to frontend and save to file)

mySensor.execute();

📜License

MIT

✍️Authors