ryck / MMM-DHT-Sensor

Magic Mirror 2 module to get data form DHT11, DHT22 and AM2302 sensors
MIT License
17 stars 8 forks source link

Not displaying values #31

Closed mmonstudies closed 1 year ago

mmonstudies commented 1 year ago

HI sorry for newbie question, I was looking for similar issues posted here but apparently could not find solution for my problem. I downloaded the latest library cm2835-1.71 which should support RPI 4B. The node dht sensor is installed as well. I thought that the sensor could be broken but works fine with python code found on web. room tempearture and humidty What I have change is below: ` { module: "MMM-DHT-Sensor", position: "top_right", classes: "pageL1", header: "Room Temperature & Humidity", config: { sensorPin: 3, sensorType: 11, updateInterval: 60 60 1000, initialLoadDelay: 0, animationSpeed: 1000, units: "metric", relativeScale: 35, debug: false } },

` Thank you for your work and answer in advance!

ryck commented 1 year ago
  1. Can you get data back from the python code?
  2. is the pin the right one?
  3. is the sensor type correct?

The module is just a fancy wrapper, so if it works in python it should work in the module...

mmonstudies commented 1 year ago

HI

  1. Yes the pyhon code shows the temperature in console, if you are asking if I can get data from python code itno module I do not know how to implement it.
  2. Accordingly to the wiringPI it is pin number 3 which is 8th pin on left side holding the PI with ports towards a user.
  3. The senosor I am using is the blue one, DHT11.

Apparently after posting here I found a message in terminal while starting magic mirror(see below) image Seems that driver cannot be used, could you recommend solution?

ryck commented 1 year ago

Can you try to see if you are getting the temperature using this? https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/python-setup

mmonstudies commented 1 year ago

Hi these are the libraries which I have used previously to check the sensor. Apparently something is going on since while executing the code from the link in terminal I get a message as below: image Furthermore if I execute the code from Geany it seems to be working: DHT test outside terminal For comparison the code I used earliler: imageand executed in terminal: image Frankly speaking I do not know what is wrong..

ryck commented 1 year ago

I don't know either, tbh... The sensor clearly works, but for some reason node is not getting the data... Maybe you can go one level down and try to use the node-dht-sensor lib directly: https://github.com/momenso/node-dht-sensor/tree/master/examples

mmonstudies commented 1 year ago

Okey problem solved, went there and worked right away...