Hi there,
I’ve been struggling to get this to work, but maybe I’m missing something I can’t realize.
I have a DHT11 on my RasPi3 running HassOS1.9/Hassio 0.75.3 - it’s in a closet with other electronics, so I wanted a clue of the temperatures inside. It’s hooked on the GPIO24:
- platform: dht
sensor: DHT11
pin: 24
monitored_conditions:
- temperature
and I’ve added this on config.txt : dtoverlay=dht11,gpiopin=24
It should work flawlessly, but… no way.
Any ideas?
One other thing to check: How long are your connections to the DHT11?
At 3.3V (raspi) it is only supposed to work reliably up to 1m. At 5V it is supposed to work up to 30m. However…
I have a 25m run of cat5 cable to one of my sensors. It did not work at all at 3.3V. It required a Sparkfun BOB-12009 bi-directional level converter so I could power the DHT22 with 5V but it was still very hit and miss. I then put 3.3K Ohm pullup resistors on the data to 5V line at both ends and it has been working flawlessly.
I used to have a wireless alarm system in a large two story house. It was an absolute pain to get all the sensors to connect. So when I started with HA I decided I wanted as many of my sensors as possible to be hard wired for reliability. There’s now Kgs of copper cabling in my roof and walls
That was the solution! using GPIO4 (pin 7).
Looks like some GPIOs are working, others aren’t. @pvizeli, sorry to ask you here: may be something related to HassOS? 'cause I’m still working on an addon for the MySensors gateway, and I need to get it communicating with a radio chip…
According to your code from the first post, you used GIO24, pin 18, and that say’s it is a pull-down pin, where as GIO4, pin 7 is a pull-up pin. I have no idea about what either mean, something to do with a voltage, and a resistor, from my quick reading, but that seem’s to be the only difference I can spot from here, so don’t know if that is what was it.
Thanks @Cee. I’m using a DHT11 on a breakout board, the pullup resistor should be onboard - it works correctly hooked up a Sonoff or Arduino.
I’ll investigate further, but thanks for the clear map!