problem with rule triggered by humidity

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
marcin.lubojanski
Normal user
Posts: 4
Joined: 28 Dec 2020, 19:11

problem with rule triggered by humidity

#1 Post by marcin.lubojanski » 28 Dec 2020, 20:01

Hello,
Sorry for maybe a silly question but I tried everything and can't make it work...
I have a bme280 sensor and wanted to turn on/off a humidifier (connected to sonoff 4ch which is steered from my router over http using eWeLink python library)
I tried to create new rule name bme280#humidity but this gives me error.
Then I tried "clock#time" but even with this it looks like it's not getting triggered.
Current rule (with event name clock#time) looks like this:

Code: Select all

on clock#time do
 LogEntry,'rule triggered'
  if [bme280#humidity]<80
    SendToHTTP 192.168.2.1,81,/mglaon.php
  endif
  if [bme280#humidity]>90
    SendToHTTP 192.168.2.1,81,/mglaoff.php
  endif
endon
but in the logs I don't even see the "rule triggered".
What do I do wrong ?

User avatar
Ath
Normal user
Posts: 565
Joined: 10 Jun 2018, 12:06
Location: NL

Re: problem with rule triggered by humidity

#2 Post by Ath » 28 Dec 2020, 21:11

a) You could have responded in the previous thread ;)

When triggering on clock time, you must specify what day/time to trigger on, but it does support wildcards, to trigger every minute use this:

Code: Select all

on Clock#Time=All,**:** do
Look for more examples here: https://espeasy.readthedocs.io/en/lates ... Rules.html

But it would be more useful to use my previous suggestion, that will only get triggered once the humidity changes, and takes immediate action on it; now you have to wait up to 1 minute before something is happening.
That example should work just fine.
/Ton

marcin.lubojanski
Normal user
Posts: 4
Joined: 28 Dec 2020, 19:11

Re: problem with rule triggered by humidity

#3 Post by marcin.lubojanski » 29 Dec 2020, 11:07

Sorry for posting it twice.
I'm testing the trigger on humidity value change at the moment. Thx :)

Update - it works :)

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests