Giter Site home page Giter Site logo

it does not work about dht22-sensor HOT 10 CLOSED

ruirigel avatar ruirigel commented on September 26, 2024
it does not work

from dht22-sensor.

Comments (10)

ruirigel avatar ruirigel commented on September 26, 2024 1

I have no error during the installation but I have a connection error when I want to access the web pages mentioned in the wiki

The directory in the setup was wrong. Fixed.
Do you can uninstall everything again including the lines added to crontab and again follow the installation guide?

from dht22-sensor.

LyonelB avatar LyonelB commented on September 26, 2024 1
pi@raspberrypi:~ $ sudo python3 -m pip install --upgrade pip setuptools wheel
pi@raspberrypi:~ $ sudo pip3 install Adafruit_DHT
pi@raspberrypi:~ $ python3 test.py
Temp=24.2C Humidity=67.5%
Temp=24.5C Humidity=67.9%
Temp=24.5C Humidity=67.9%

from dht22-sensor.

LyonelB avatar LyonelB commented on September 26, 2024 1

I reinstalled everything and everything is working now!

I still have to find an email alert solution in case the temperature is too high.

from dht22-sensor.

LyonelB avatar LyonelB commented on September 26, 2024

great! it works.
What do the values ​​displayed on /dht22values ​​correspond to? And I have the default image on /plot.png. Maybe I should wait for the values ​​to update?

from dht22-sensor.

ruirigel avatar ruirigel commented on September 26, 2024

great! it works. What do the values ​​displayed on /dht22values ​​correspond to? And I have the default image on /plot.png. Maybe I should wait for the values ​​to update?

the values on /dht22values correspond:
Date, Local Time, Temperature, Humidity, Dew Point, Heat index

what you see in plot is the data you have in https://github.com/ruirigel/dht22-sensor/blob/main/plot.txt
you need wait for values update.

from dht22-sensor.

LyonelB avatar LyonelB commented on September 26, 2024

Today (at 11 a.m. in France)
I have a blank page on /dht22values
and the png file is always the same on /plot.png
How long do you have to wait for the update?
is there a command via the terminal to consult the temperature in real time?

from dht22-sensor.

ruirigel avatar ruirigel commented on September 26, 2024

Today (at 11 a.m. in France) I have a blank page on /dht22values and the png file is always the same on /plot.png How long do you have to wait for the update? is there a command via the terminal to consult the temperature in real time?

to check the all hardware installation try run this in terminal:

import Adafruit_DHT
import time
 
DHT_SENSOR = Adafruit_DHT.DHT22
DHT_PIN = 4
 
while True:
    humidity, temperature = Adafruit_DHT.read(DHT_SENSOR, DHT_PIN)
    if humidity is not None and temperature is not None:
        print("Temp={0:0.1f}C Humidity={1:0.1f}%".format(temperature, humidity))
    else:
        print("Sensor failure. Check wiring.")
    time.sleep(3)


from dht22-sensor.

LyonelB avatar LyonelB commented on September 26, 2024

I created a test.py file with the commands you gave me. Here is the result:

pi@raspberrypi:~ $ python3 test.py
Traceback (most recent call last):
  File "/home/pi/test.py", line 1, in <module>
    import Adafruit_DHT
ModuleNotFoundError: No module named 'Adafruit_DHT'

from dht22-sensor.

ruirigel avatar ruirigel commented on September 26, 2024

I reinstalled everything and everything is working now!

I still have to find an email alert solution in case the temperature is too high.

It seems like the module was missing for everything to work properly.
I think it will not be difficult for you to find or make the solution for email alerts. Talking about alerts, In the future I will add to the project something that I already implemented in the past, is the interaction of the project in telegram via bot. That means you can ask in channel for /temp or be alerted for something.

from dht22-sensor.

ruirigel avatar ruirigel commented on September 26, 2024

Today (at 11 a.m. in France) I have a blank page on /dht22values and the png file is always the same on /plot.png How long do you have to wait for the update? is there a command via the terminal to consult the temperature in real time?

About how log you have to wait. You can see and change the times when you edit the $ crontab -e. In default installation we have this line */15 * * * * cd /home/$USER/dht22-sensor/ && python3 dht22logger.py tha means, every 15 min will fetch the date from the sensor. If you are not familiar with crontab, here is this website that helps configure the times you want. https://crontab.guru/every-15-minutes

from dht22-sensor.

Related Issues (1)

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.