New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DHT11 or DHT22 sensor #32
Comments
Hmm, that would be handy, wouldn't it? It's not possible right now, but I'll have a think about it and see if I can include it next time I work on the project. |
Cool sounds good.... |
Reopening to keep the feature request around for if I ever get some time off to work on it. |
Is that possible to add support for MCP23017 - it has 16 I/O ports , I2C and each port can be loaded with 20mA , it has as well switchable active pullup resistors. I probably will use ur project to control my smart house based on PCF, but MCP is good idea as well. For now i see that will need at least two expanders on pcf... If i use two expanders with same addresses whether those two will be work same - i mean - if ill connect leds to both - the states of leds will be same or on i2c will be conflict due to same addresses ? i need one pcf to connect to control lamps ( leds )for my house. Anyway great project! Keep going like that!!! regards |
Hey @eXCepT74 The MCP23017 is certainly suitable for use with this project, but could you make a separate Issue please? You can just copy and paste your comment into a new one. Cheers |
|
Following :) |
Currently I'm working on the interrupt issue (#5), but how may a yaml config for dht11/dht22 look? You have two values on one sensor, that should appear in two different topics. My suggestion (I steel the config idea as I've implemented it for lm75 i2c temperatur sensor in pullrequest #52) sensor_modules: //list for all sensor_modules, like for gpio_modules
- name: dht11_sensor_temperature
module: dht11
gpio: 16 //pin dht11 sensor is connected to
value: temperatur
- name: dht11_sensor_humidity
module: dht11
gpio: 16 //pin dht11 sensor is connected to
value: humidity So we config the dht11/22 sensor twice on the same pin. First time with temperature value and second time with humidity value. These values will be passed to module instance and stored intern, to select which value should be returned. In the sensor_inputs we create two entries, too, first using the dht11_sensor_temperature and second using dht11_sensor_humidity. This gives us the possibility to configure the mqtt topic and for example different update times: sensor_inputs:
- name: my_temperature // mqtt topic
module: dht11_sensor_temperature
interval: 120 // 2*60sec, each 2 min
digits: 2 // digits to round the value to
- name: my_humidity
module: dht11_sensor_humidity
interval: 240 // e.g. every 4 minutes
digits: 1 This should create the following mqtt topics with values:
Any suggestions or does someone see a problem? |
It would be nice to keep the module configs 1:1 with the physical modules, so in sensor_modules:
- name: dht11_sensor
module: dht11
i2c_bus_num: 1
chip_addr: 0x20
sensor_inputs:
- name: livingroom_temp
module: dht11_sensor
interval: 120
digits: 2
sensor: temperature
- name: livingroom_humidity
module: dht11_sensor
interval: 240
digits: 1
sensor: humidity What do you reckon? |
That's of course the better solution. I already implemented this "interface" for LM75 I2C sensor on the other branch: when getting the value from the sensor in the
the I have two other points:
|
Would this work for a ds18b20 as well? |
No, as far as I know, one wire from dht11 and one wire from ds18b20 are incompatible. So you should create a new issue for ds18b20, if you want it to be supported. Maybe you could try a library, that should be supported and mention it there. (e.g. https://github.com/timofurrer/w1thermsensor) |
Maybe this one? |
Hello, I can not walk to module it shows me this error message
here is my config.yml file
I work on rasbian Buster I have installed the library Adafruit-DHT, I also try on rasbian jessie but nothing always the same mistake ... when I do ./AdafruitDHT.py 22 17 it works well and returns me as a result:
an idea of where is my problem? PROBLEM SOLVED i had to redo the installation manually the |
Hello, I'm also having the same problem with DHT11. Installed pi-mqtt-sensor and Adafruit_Python_DHT with pip (sudo privileges) My config file works without sensor lines. When I add DHT sensor lines;
here my config.yml
|
I believe this is fixed now. Please feel free to comment if it's not. |
Hi
If this is a pull request sorry..
I have a few DHT11 sensors and was hoping I could add them to this setup, is it possible?
Cheers
Rich
The text was updated successfully, but these errors were encountered: