Giter Club home page Giter Club logo

node-airthings-waveplus's Introduction

node-airthings-waveplus

Node.js module for reading data from a Airthings Wave Plus indoor air quality monitor.

Tested on Raspberry Pi 3. Depends on noble. See instructions on how to enable BLE on RasPi and how to run without root.

Installation

npm install airthings-waveplus

Usage example

Events

Module wavePlus emits a found event, when a new Wave Plus device is discovered. Event's payload is a wavePlus object (see below)

API

wavePlus object

Is an eventEmitter .

Properties:

  • id: id of beacon
  • address: address of beacon
  • serialNumber: serial number of device
  • connectable: flag if beacon is connectable

Events:

updated: emitted when air quality data is received. Object data has following properties:

  • rssi
  • humidity
  • temperature
  • pressure
  • co2
  • voc
  • radonLtAvg
  • radonStAvg

Kudos for inspiration and example to pakastin!

node-airthings-waveplus's People

Contributors

iler avatar pakastin avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

node-airthings-waveplus's Issues

TypeError: Cannot read property 'read' of undefined

When running the sample, it discovers my Wave and it prints the proper serial number of the device (so I know it was found).

Though then immediately I get an error. Any idea what might be wrong? Looks like for some reason peripheral.discoverSomeServicesAndCharacteristics is not returning characteristics, but is also not throwing an error.

/home/pi/wave-node/node_modules/airthings-waveplus/waveplus.js:101
characteristics[0].read((error, data) => {
^

TypeError: Cannot read property 'read' of undefined
at /home/pi/wave-node/node_modules/airthings-waveplus/waveplus.js:101:26
at /home/pi/wave-node/node_modules/@abandonware/noble/lib/peripheral.js:119:13
at Service. (/home/pi/wave-node/node_modules/@abandonware/noble/lib/service.js:56:7)
at Object.onceWrapper (events.js:422:26)
at Service.emit (events.js:315:20)
at Noble.onCharacteristicsDiscover (/home/pi/wave-node/node_modules/@abandonware/noble/lib/noble.js:398:13)
at NobleBindings.emit (events.js:315:20)
at NobleBindings.onCharacteristicsDiscovered (/home/pi/wave-node/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:368:8)
at Gatt.emit (events.js:315:20)
at Object.callback (/home/pi/wave-node/node_modules/@abandonware/noble/lib/hci-socket/gatt.js:515:12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.