thermo-pi-core v0.0.1
Thermo-Pi-Core
This is a small set of core libraries used by various thermo-pi modules. Add this to your thermo-pi project using
npm install --save thermo-pi-core
Prerequsites
To use the w1-therm-manager the w1-gpio and w1_therm modules need to be enabled.
- See the guide at REUK.co.uk for further instructions.
To use the dht-manager the pigpiod daemon must be running.
Libraries
w1-therm-manager
properties - Defines the properties for w1-therm
getSensors() - Returns a list of detected sensors.
read(sensor) - Returns the temperature data for the defined sensor in degrees centigrade.
sensor - A single sensor that will be read.Properties
location - The path to the DS18B20 one-wire sensors.
prefix - The sensor constant prefix.
dht-manager
properties - Defines the properties for dht
read(pin) - Reads temperature and relative humidity data from the defined pin. pin - The GPIO pin to read.
Properties
binary - The path to the dhtxxd or compatible binary.- A ${PIN} parameter will be used to define the GPIO pin to read.
- Output is status:int temp:float(C) humidity:float(%)
Status is 0 - Ok 1 - Crc 2 - Bad data 3 - Timeout
pins - The GPIO pins where a DHT sensor is connected (optional, csv)
9 years ago