Git Product home page Git Product logo

Comments (6)

eliomex55 avatar eliomex55 commented on September 6, 2024

Hello, I need to read the temperature from a DHT11 sensor. How can I do?

from homebridge-pi-thermostat.

eliomex55 avatar eliomex55 commented on September 6, 2024

@ankurp, here you can find my error: [2019-1-7 19:44:17] [Pi Thermostat] ERROR Getting temperature

from homebridge-pi-thermostat.

ankurp avatar ankurp commented on September 6, 2024

This would require a code change. I can made a change so that it is configuration driven.

from homebridge-pi-thermostat.

ankurp avatar ankurp commented on September 6, 2024

I have updated the package in this repo to version 1.2.0. You can set "dhtSensorType": 11 in your config file for this accessory and it will use 11 in dhtSensor.read(11, ...

from homebridge-pi-thermostat.

eliomex55 avatar eliomex55 commented on September 6, 2024

Hello @ankurp , I reinstalled your package and modified the config file as suggested but still having the same error:

[Pi Thermostat] ERROR Getting temperature

I tested myself the sensor and node-dht-sensor module with this code:

const sensor = require('node-dht-sensor');

setInterval(() => {
    readSensor(11,4) 
}, 3000);


function readSensor(model,pin){
    sensor.read(model, pin, function(err, temperature, humidity) {
        if (!err) {
            console.log("Temp is: ", temperature, "Hum is: ", humidity)
            
        }
        else {
            console.log(err, temperature, humidity)
            
        }
    })
}

This is working as expected.

Can you help me to troubleshoot your plugin? Am I doing something wrong?
I often use DHT11 sensor with other homebridge modules and I have no issues.

Thanks in advance.

from homebridge-pi-thermostat.

Codi878 avatar Codi878 commented on September 6, 2024

Hello @ankurp

I have dht22 and I also have some time - [Pi Thermostat] ERROR Getting temperature.

Can You help with this error ?

Thank You

from homebridge-pi-thermostat.

Related Issues (14)

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.