Getting the current temperature!
/home/pi/Desktop/HAP-NodeJS/accessories/DHT_accessory.js:18
return sensorLib.initialize(sensor, pinNumber);
^
TypeError: Invalid arguments
at TypeError (native)
at Object.DHT_SENSOR.initialize (/home/pi/Desktop/HAP-NodeJS/accessories/DHT_accessory.js:18:22)
at Object.DHT_SENSOR.getTemperature (/home/pi/Desktop/HAP-NodeJS/accessories/DHT_accessory.js:22:20)
at null._repeat (/home/pi/Desktop/HAP-NodeJS/accessories/DHT_accessory.js:70:70)
at wrapper [as _onTimeout] (timers.js:270:19)
at Timer.listOnTimeout (timers.js:89:15)
how to fix it or config
// SETUP
var temperatureNAME = 'DHT Sensor'; //the temperature sensor's name
var uuidNAME = 'hap-nodejs:accessories:dht-sensor'; //UUID name
var pinNumber = 4 //physical pin 7, BCM pin 4
var sensor = 11 //change to 22 if you have an AM2032 or DHT 22, leave as 11 is you have DHT11
// END of SETUP
when i run Core.js it Error on this
Getting the current temperature! /home/pi/Desktop/HAP-NodeJS/accessories/DHT_accessory.js:18 return sensorLib.initialize(sensor, pinNumber); ^
TypeError: Invalid arguments at TypeError (native) at Object.DHT_SENSOR.initialize (/home/pi/Desktop/HAP-NodeJS/accessories/DHT_accessory.js:18:22) at Object.DHT_SENSOR.getTemperature (/home/pi/Desktop/HAP-NodeJS/accessories/DHT_accessory.js:22:20) at null._repeat (/home/pi/Desktop/HAP-NodeJS/accessories/DHT_accessory.js:70:70) at wrapper [as _onTimeout] (timers.js:270:19) at Timer.listOnTimeout (timers.js:89:15)
how to fix it or config
// SETUP var temperatureNAME = 'DHT Sensor'; //the temperature sensor's name var uuidNAME = 'hap-nodejs:accessories:dht-sensor'; //UUID name var pinNumber = 4 //physical pin 7, BCM pin 4 var sensor = 11 //change to 22 if you have an AM2032 or DHT 22, leave as 11 is you have DHT11 // END of SETUP