DHT11 Help !!!

Moderator: leecollings

User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: DHT11 Help !!!

Post by kiddigital »

arhangel76 wrote:not work...
https://prnt.sc/v51yp5
What is shown in the Domoticz log? Do you see there that it has updated the sensor values?
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
arhangel76
Posts: 22
Joined: Sunday 18 October 2020 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DHT11 Help !!!

Post by arhangel76 »

arhangel76
Posts: 22
Joined: Sunday 18 October 2020 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DHT11 Help !!!

Post by arhangel76 »

User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: DHT11 Help !!!

Post by kiddigital »

Ok, the sensor gets updated as you can see the ‘last updated’ timestamp.

We now need to now how we provide the correct values to the sensor based on its type.

Try this on the command line

Code: Select all

curl -s -i -H "Accept: application/json" "http://$SERVER/json.htm?type=command&param=udevice&idx=10&nvalue=0&svalue=“11;77”
As see what it does.

Play around with the values between the quotes of svalue.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
arhangel76
Posts: 22
Joined: Sunday 18 October 2020 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DHT11 Help !!!

Post by arhangel76 »

its stay like that what can i type next?
https://prnt.sc/v532c2
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: DHT11 Help !!!

Post by kiddigital »

arhangel76 wrote:its stay like that what can i type next?
https://prnt.sc/v532c2
Press CTRL+c to abort

Remove the “ before http and try again
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
arhangel76
Posts: 22
Joined: Sunday 18 October 2020 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DHT11 Help !!!

Post by arhangel76 »

User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: DHT11 Help !!!

Post by kiddigital »

Replace $SERVER with 127.0.0.1:8080
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
arhangel76
Posts: 22
Joined: Sunday 18 October 2020 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DHT11 Help !!!

Post by arhangel76 »

User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: DHT11 Help !!!

Post by kiddigital »

Replace both the “ at the end with ‘
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
arhangel76
Posts: 22
Joined: Sunday 18 October 2020 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DHT11 Help !!!

Post by arhangel76 »

User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

DHT11 Help !!!

Post by kiddigital »

The command should be

Code: Select all

curl -s -i -H "Accept: application/json" ‘http://127.0.0.1:8080/json.htm?type=command&param=udevice&idx=10&nvalue=0&svalue=“11;77”’
If it return 401 Unauthorized, there is a permission issue to solve first.

Hopefully this works
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
arhangel76
Posts: 22
Joined: Sunday 18 October 2020 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DHT11 Help !!!

Post by arhangel76 »

User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: DHT11 Help !!!

Post by kiddigital »

Ok, we are fighting with the command line interpreter here. I will try it myself and get back to you later...

Maybe you can google in the mean time to figure out how a correct command should look like. I think there should be plenty examples on this forum.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
arhangel76
Posts: 22
Joined: Sunday 18 October 2020 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DHT11 Help !!!

Post by arhangel76 »

its hard for newbye like me,im not understand to much
arhangel76
Posts: 22
Joined: Sunday 18 October 2020 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DHT11 Help !!!

Post by arhangel76 »

i find new script:

https://prnt.sc/v583et
and contain this text:

import Adafruit_DHT
import time

DHT_SENSOR = Adafruit_DHT.DHT11
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);
arhangel76
Posts: 22
Joined: Sunday 18 October 2020 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DHT11 Help !!!

Post by arhangel76 »

So nobody know?

i use this tutorial:

https://www.thegeekpub.com/236867/using ... spberry-pi

and the result is here:

https://prnt.sc/v61hoz

I want only to show in domoticz page...
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: DHT11 Help !!!

Post by kiddigital »

@arhangel76

Please try the command below. Make sure you have the double-quotes around both parts

Code: Select all

curl -s -i -H "Accept: application/json" "http://127.0.0.1:8080/json.htm?type=command&param=udevice&idx=10&nvalue=0&svalue=10.3;66;0"
Can you show the output?

And to update the values: You see svalue=10.3;66;0 where the first (10.3) is the temperature and the second (66) the humidity. The third (0) is not used here.

So you have to modify your script to this

Code: Select all

curl -s -i -H "Accept: application/json" "http://$SERVER/json.htm?type=command&param=udevice&idx=$DHTIDX&nvalue=0&svalue=$TEMP;$HUM;0"
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
arhangel76
Posts: 22
Joined: Sunday 18 October 2020 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DHT11 Help !!!

Post by arhangel76 »

Thank you for your help but i succeed,the problem it was whit url link.

Now work just fine
User avatar
ILoveIOT
Posts: 59
Joined: Sunday 25 March 2018 17:47
Target OS: Linux
Domoticz version: 2020.2
Location: NL
Contact:

Re: DHT11 Help !!!

Post by ILoveIOT »

Should work,

viewtopic.php?f=32&t=27467

Buy a DHT22 for better results.
1x OPI PC 5.8.16 Debian 10, MiniDNLA,SMD230,EpEver,MPD,800GB,Wiegand,7 temps,DHT,32/64 I/O,2022.1
2x OPI PC 4.19.25 Debian 9, MPD,7 temps,16/32 I/O,BMP,4.10717
1x IntelNUC 5.10 Debian 10, 2TB,DalyBMS,2023.1
3x ESPEasy NodeMCU V3, 16/16 I/O
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest