Dear all,
I have a problem and for some reason, I am not able to solve it.
I am trying to switch a gpio on wenn a certain temperature is exceeded and and off in case the temperature drops below a certain value, as per example below:
on DHT22#Temperature do
if [DHT22#Temperature] > 25
gpio,13,1
endif
if [DHT22#Temperature] < 24
gpio,13,0
endif
endon
I have connected a led to d7 (gpio13) but the led dosent turn on (led is not defect)
Any hints for me please?
Many thanks in advance
ESP easy rules temperature
Moderators: grovkillen, Stuntteam, TD-er
ESP easy rules temperature
- Attachments
-
- espeasy2.png (51.06 KiB) Viewed 1646 times
-
- espeasy_1.png (103.45 KiB) Viewed 1646 times
-
- easpeasy3.png (118.23 KiB) Viewed 1646 times
Re: ESP easy rules temperature
You can simplify the rules like this:
To check if the LED is working, you can give some command on the tools page in the command input field.
Or set it to 1 if the LED is off when the pin is set to 0.
You can also add some logentry command in this rules block to see via the logs whether the event is even being dealt with.
Code: Select all
on DHT22#Temperature do
if %eventvalue1% > 25
gpio,13,1
else
gpio,13,0
endif
endon
Code: Select all
gpio,13,0
You can also add some logentry command in this rules block to see via the logs whether the event is even being dealt with.
Code: Select all
on DHT22#Temperature do
if %eventvalue1% > 25
gpio,13,1
else
gpio,13,0
endif
logentry,"DHT22#Temperature: %eventvalue1%"
endon
Re: ESP easy rules temperature
Confirm that your DHT22 sensor is providing accurate temperature readings. You can cross-check with another microcontroller.
You can check this project too. ESP Room SmartMonitor V3. It is based on EspEasy.
https://www.pcbway.com/project/sharepro ... e5a39.html
You can check this project too. ESP Room SmartMonitor V3. It is based on EspEasy.
https://www.pcbway.com/project/sharepro ... e5a39.html
Re: ESP easy rules temperature
One other thing...
Do you have the checkbox "Single event with all values:" checked in the task settings of the DHT22?
If so, then your rules should be changed to act on "DHT22#All"
Do you have the checkbox "Single event with all values:" checked in the task settings of the DHT22?
If so, then your rules should be changed to act on "DHT22#All"
Re: ESP easy rules temperature
ahhh thank you so much guys , the problem was the "Single event with all values:"
many thanks for the hint!
Now it is working
many thanks for the hint!
Now it is working
Who is online
Users browsing this forum: No registered users and 2 guests