node-wimoto
Node.js lib for Wimoto devices utilizing noble and noble-device
Prerequisites
- See noble prerequisites for your platform
- See Wimoto developer guide
Install
npm install wimoto
Usage
Wimoto motes have two methods to communicate, broadcasting and connecting.
Broadcast Mode
var Wimoto = ;var WimotoBroadcast = WimotoBroadcast;
Start scanning
WimotoBroadcast;
Events
WimotoBroadcast;
mote
temperature
- Measured in celciuslight
- Measured in lux between 0-65535humidity
- as a percent between 0-100battery
- as a percent between 0-100
Connection Mode
var Wimoto = ;var WimotoClimate = WimotoClimate;
Discover
wimotoClimate;
Connect and SetUp (discover services and characteristics)
wimotoClimate;
Read Device Name
wimotoClimate;
Read Manufacturer Name
wimotoClimate;
Read Model Number
wimotoClimate;
Read System Id
wimotoClimate;
Read Battery Level
wimotoClimate;
Read Current Temperature
wimotoClimate;
Notify Current Temperature
wimotoClimate;
UnNotify Current Temperature
wimotoClimate;
Read Current Light
wimotoClimate;
Notify Current Light
wimotoClimate;
UnNotify Current Light
wimotoClimate;
Read Current Humidity
wimotoClimate;
Notify Current Humidity
wimotoClimate;
UnNotify Current Humidity
wimotoClimate;
Disconnect
wimotoClimate;
Events
wimotoClimate
wimotoClimate
wimotoClimate
wimotoClimate