Rules examples

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
maluko
Normal user
Posts: 112
Joined: 02 Sep 2015, 00:49

Rules examples

#1 Post by maluko » 12 Apr 2016, 00:20

Thanks to bring us this type of rules that we can play with.

i know that this feature stil at beta but we want to understand the "how to" to start to mesh with rules.

So at this time i wonder if it is possible to put a timer on switch input like relay.

my system:

domoticz virtual switch on irrigation with 15m of timer to switch off,

domoticz send to esp01 by http command, but i am afraid that the command off dont arrived so its any change to put a security rule like this?

device= Switch input
name= relay
task= 1

if gpio0=1 do
timer 20m
gpio0=0
endif

thanks

Martinus

Re: Rules examples

#2 Post by Martinus » 13 Apr 2016, 15:20

If you upgrade to R100, you can now send events from http to ESP:

Code: Select all

 http://<ESP-ip>/control?cmd=event,givemesomewater
So you can use them in the rules tab like this example:

Code: Select all

on givemesomewater do
  gpio,2,1  // open valve
  timerSet 1,600 // 10 minute timer
endon

on Rules#Timer=1 do
  gpio,2,0 // close valve
endon
This can be done without using a task setup.

grz3
Normal user
Posts: 36
Joined: 21 Feb 2016, 21:47

Re: Rules examples

#3 Post by grz3 » 13 Apr 2016, 23:18

any chance to use something like this?
to compare PN532 tags?

Code: Select all

on pn532#tag do
if [pn532#tag]="4034998235" // correct tag
    gpio,15,1  //green led - ok
   timerSet,1,1
else
    gpio,13,1  //red led - stop
   timerSet,1,1
endif
endon
on Rules#timer=1 do
    gpio,15,0
    gpio,13,0
endon

maluko
Normal user
Posts: 112
Joined: 02 Sep 2015, 00:49

Re: Rules examples

#4 Post by maluko » 13 Apr 2016, 23:53

Martinus wrote:If you upgrade to R100, you can now send events from http to ESP:

Code: Select all

 http://<ESP-ip>/control?cmd=event,givemesomewater
So you can use them in the rules tab like this example:

Code: Select all

on givemesomewater do
  gpio,2,1  // open valve
  timerSet 1,600 // 10 minute timer
endon

on Rules#Timer=1 do
  gpio,2,0 // close valve
endon
This can be done without using a task setup.
work like a charm

good work....again :)

thanks

BertB
Normal user
Posts: 1020
Joined: 25 Apr 2015, 14:39

Re: Rules examples

#5 Post by BertB » 14 Apr 2016, 19:58

I added the examples to the Rules tutorial.

hamster
Normal user
Posts: 61
Joined: 27 Sep 2015, 21:01
Location: UK

Re: Rules examples

#6 Post by hamster » 15 Apr 2016, 01:19

I was wondering if its possible to use an 'OR' function
here is my attempt at a thermostat control based on occupancy
(the Or doesn't seem to work?)

Code: Select all

on temp1#Temperature>40 or occupied#Output=0 do
mcpgpio,23,0
gpio,0,0
endon
 
on temp1#Temperature<38 do
if [occupied#Output]=1  
mcpgpio,23,1
gpio,0,1
endon

andy
Normal user
Posts: 65
Joined: 26 Jan 2016, 23:07

Re: Rules examples

#7 Post by andy » 24 Apr 2016, 23:43

hamster wrote:I was wondering if its possible to use an 'OR' function
here is my attempt at a thermostat control based on occupancy
(the Or doesn't seem to work?)

Code: Select all

on temp1#Temperature>40 or occupied#Output=0 do
mcpgpio,23,0
gpio,0,0
endon
 
on temp1#Temperature<38 do
if [occupied#Output]=1  
mcpgpio,23,1
gpio,0,1
endon
Booleans do not work, so just set up enough rules. Also, you may want to define on and off events, then call them with rules:

On thermon do
mcpgpio,23,1
gpio,0,1
endon

On thermoff do
mcpgpio,23,0
gpio,0,0
endon

on temp1#Temperature<38 do
if [occupied#Output]=1
event,thermon
endon

on temp1#Temperature>40 do
event,thermoff
endon

on occupied#Output=0 do
event,thermoff
endon

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Rules examples

#8 Post by tozett » 25 Apr 2016, 08:15

@BertB
i think, it is most valuable to have lots of examples of rules in the wiki. can you add this?

(i had the experience with https://sourceforge.net/p/linknx/wiki/Main_Page/
which is a super lean an powerful rules-engine, but the lack of rule-explanation makes it hard to have fun with it..)

yml020
Normal user
Posts: 14
Joined: 18 Apr 2016, 13:44
Location: South Africa

Re: Rules examples

#9 Post by yml020 » 25 Apr 2016, 12:57

Hi @Martinus or anyone else.
I fall under the NOOBS category, but still in the box !! Big newbe.
I do not have an Arduino, only a RasPi 2 for the Domoticz Server and a lot of ESP8266 with ESP Easy R78, so I cannot compile the source code into binary files.
Can someone please point me in a direction to get hold of a R104 binary, and a pointer to some Rules Examples or the Rules Tutorial mentioned before.
Many thanks to all who are developing this wonderfull firmware. It sure beats LUA.
:)

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Rules examples

#10 Post by tozett » 25 Apr 2016, 13:26

for rules (and everything else), the wiki (will fill up) can be a start

http://www.esp8266.nu/index.php/Tutorial_Rules


for the binary, i could compile, but dont want this for lots of differnt modulse, so
its not that difficult to get yourself running. give it a try...
the forum has some entries for help, but again, good start is the wiki:

http://www.esp8266.nu/index.php/Tutoria ... are_Upload

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Rules examples

#11 Post by tozett » 25 Apr 2016, 13:29

yml020 wrote: ... to get hold of a R104 binary,
it instantly checked github,
https://github.com/ESP8266nu/ESPEasy/bl ... eNotes.ino
but only found r103 at the moment. may a typo?
but r103 will get you going too...

yml020
Normal user
Posts: 14
Joined: 18 Apr 2016, 13:44
Location: South Africa

Re: Rules examples

#12 Post by yml020 » 25 Apr 2016, 14:01

Thank you tozett for the tutorial.
But, with all due respect, to go through the whole process of setting up the Arduino IDE and then getting all the files and things in place, is a route that I really would not like to take.
I think Martinez would have everything ready to go, and with one or two clicks could possibly have a "standard type" binary, like R78. It is to people like him that I would plead to get hold of a copy.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Rules examples

#13 Post by tozett » 25 Apr 2016, 14:04

i can do one binary like this, if you like:
give a (public) place to upload ...
Attachments
Zwischenablage06.png
Zwischenablage06.png (32.34 KiB) Viewed 11240 times

yml020
Normal user
Posts: 14
Joined: 18 Apr 2016, 13:44
Location: South Africa

Re: Rules examples

#14 Post by yml020 » 25 Apr 2016, 14:13

I would really appreciate that. Without knowing exactly what is going on there, that dropdown seems like the standard things that need to be set to upload the file to the ESP.
Now, just a public place ????

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Rules examples

#15 Post by tozett » 25 Apr 2016, 14:25


yml020
Normal user
Posts: 14
Joined: 18 Apr 2016, 13:44
Location: South Africa

Re: Rules examples

#16 Post by yml020 » 25 Apr 2016, 14:48

Is it correct that it wants to download an .EXE file that must be run first?? Looks like to install a download manager ?!?!
My anti virus app (that I cannot switch off) the goes mad showing all sorts of bugs.

Martinus

Re: Rules examples

#17 Post by Martinus » 25 Apr 2016, 15:18

andy wrote: Booleans do not work, so just set up enough rules. Also, you may want to define on and off events, then call them with rules:

Code: Select all

On thermon do
 mcpgpio,23,1
 gpio,0,1
endon

On thermoff do
 mcpgpio,23,0
 gpio,0,0
endon

on temp1#Temperature<38 do
 if [occupied#Output]=1  
 event,thermon
endon
Creating events from within the rules section creates recursive calls to the engine. Actually not tested/supported but it could work. Current version could become unstable due to high RAM usage when the engine calls itself.

I've made some changes here and R104 should handle recursive calls better than earlier versions. It will also protect against loop conditions that would otherwise crash the system.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Rules examples

#18 Post by tozett » 25 Apr 2016, 16:05

yml020 wrote:Is it correct that it wants to download an .EXE file that must be run first?? Looks like to install a download manager ?!?!
My anti virus app (that I cannot switch off) the goes mad showing all sorts of bugs.
no. i uploaded a binary.
where to put?
(google gives a lot of options, but whom will you trust ...)

i can make a md5 hash, if you want...

andy
Normal user
Posts: 65
Joined: 26 Jan 2016, 23:07

Re: Rules examples

#19 Post by andy » 25 Apr 2016, 16:38

Martinus wrote:
andy wrote: Booleans do not work, so just set up enough rules. Also, you may want to define on and off events, then call them with rules:

Code: Select all

On thermon do
 mcpgpio,23,1
 gpio,0,1
endon

On thermoff do
 mcpgpio,23,0
 gpio,0,0
endon

on temp1#Temperature<38 do
 if [occupied#Output]=1  
 event,thermon
endon
Creating events from within the rules section creates recursive calls to the engine. Actually not tested/supported but it could work. Current version could become unstable due to high RAM usage when the engine calls itself.

I've made some changes here and R104 should handle recursive calls better than earlier versions. It will also protect against loop conditions that would otherwise crash the system.
That's good to know, thanks.

I came up with the idea because there's no good shortcut to set two GPIO's manually. I need to open or close two relays if I need the pump off or on while servicing it. I set a rule called Poff to turn both relays off, and Ponn to turn them on. Interestingly, Pon wouldn't work, so I had to change it to Ponn. Maybe Pon is a reserved variable name? Now I can just type event,Poff (or event,Ponn) from the Tools page to manually control it. I then realized I could eliminate the GPIO calls in the rules and replace them with Ponn or Poff. It also reduces the number of characters in my rules section from 450 to 375 (or so). It's been working fine for the past week, I'm running version 101.

Martinus

Re: Rules examples

#20 Post by Martinus » 25 Apr 2016, 17:43

andy wrote:Interestingly, Pon wouldn't work, so I had to change it to Ponn. Maybe Pon is a reserved variable name?
No, you have caught a bug (every event name ending with 'on ' would not process at all)
Will be fixed in R105...

yml020
Normal user
Posts: 14
Joined: 18 Apr 2016, 13:44
Location: South Africa

Re: Rules examples

#21 Post by yml020 » 26 Apr 2016, 07:55

tozett wrote:
yml020 wrote:Is it correct that it wants to download an .EXE file that must be run first?? Looks like to install a download manager ?!?!
My anti virus app (that I cannot switch off) the goes mad showing all sorts of bugs.
no. i uploaded a binary.
where to put?
(google gives a lot of options, but whom will you trust ...)

i can make a md5 hash, if you want...
Thank you very much tozett, but there is a member that contacted me on mail and uploaded a R104 for me. I have downloaded it and will test it later. I need to prepare a new device first.

Many thanks.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Rules examples

#22 Post by tozett » 26 Apr 2016, 08:05

grz3 wrote:any chance to use something like this?
to compare PN532 tags?

Code: Select all

on pn532#tag do
if [pn532#tag]="4034998235" // correct tag
    gpio,15,1  //green led - ok
   timerSet,1,1
else
    gpio,13,1  //red led - stop
   timerSet,1,1
endif
endon
on Rules#timer=1 do
    gpio,15,0
    gpio,13,0
endon
did you tried this, if it works? (will build something similar myself..)
looks to me, if it is normal like other comparison...

grz3
Normal user
Posts: 36
Joined: 21 Feb 2016, 21:47

Re: Rules examples

#23 Post by grz3 » 26 Apr 2016, 08:32

tozett wrote:
grz3 wrote:any chance to use something like this?
to compare PN532 tags?

Code: Select all

on pn532#tag do
if [pn532#tag]="4034998235" // correct tag
    gpio,15,1  //green led - ok
   timerSet,1,1
else
    gpio,13,1  //red led - stop
   timerSet,1,1
endif
endon
on Rules#timer=1 do
    gpio,15,0
    gpio,13,0
endon
did you tried this, if it works? (will build something similar myself..)
looks to me, if it is normal like other comparison...
tried, but not working, the quotes are kind of problem I think.. :-( that is why I put this question here to anybody willing to help me...

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Rules examples

#24 Post by tozett » 26 Apr 2016, 08:51

http://www.esp8266.nu/forum/viewtopic.p ... 1430#p6198

there is an working !! example of the same with IR-input.
another user stated this. may you try again without ""

if i find time this week, i will also try this...

yml020
Normal user
Posts: 14
Joined: 18 Apr 2016, 13:44
Location: South Africa

Re: Rules examples

#25 Post by yml020 » 27 Apr 2016, 09:40

I have a PC problem. Yes, I know this is the wrong forum for that !!!

With R78 if I send this:-
http://192.168.1.31/control?cmd=GPIO,2,0
I get this in the IE window:-
GPIO 2 Set to 0

With R104 if I send this:-
http://192.168.1.32/control?cmd=GPIO,2,0
I get this in a box at the bottom of the screen asking:-
Do you want to open or save CONTROL.JSON from 192.168.1.32? OPEN SAVE CANCEL.

This is in the file:-
{
"log": "GPIO 2 Set to 1",
"plugin": 1,
"pin": 2,
"mode": "output",
"state": 1
}

Is this needed for Rules to speak to each other between devices ??

This becomes a real pain after a while. I have tried all settings in IE 11 to stop asking what to do with the .JSON file but without success.

Any pointers please ?

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Rules examples

#26 Post by tozett » 27 Apr 2016, 13:46

Tried with Googles Chrome-browser ?

yml020
Normal user
Posts: 14
Joined: 18 Apr 2016, 13:44
Location: South Africa

Re: Rules examples

#27 Post by yml020 » 28 Apr 2016, 08:54

Hello.
I installed Chrome and now it display the result of the command.
Cool.
Thank you very much for the assistance.

JR01
Normal user
Posts: 241
Joined: 14 Feb 2016, 21:04
Location: South Africa
Contact:

Rules examples ~ Variables?

#28 Post by JR01 » 28 Apr 2016, 21:40

I want to switch on/off the geyser based on timer if a variable, which I want to pass into ESP with MQTT is not set, and visa versa, want to be able to override setting on/off via web page and then to override the schedule rules.

One way is to pass a variable by publishing with MQTT, like /ESP12-01/Switch/<variable name here> with say payload 1, then create nested rules that looks for this variable, and only allow the rules to switch on/off if 1 has been passed in?

Can one work with variables? will this work?
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay . Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.

JR01
Normal user
Posts: 241
Joined: 14 Feb 2016, 21:04
Location: South Africa
Contact:

Re: Rules examples

#29 Post by JR01 » 28 Apr 2016, 21:58

I am still vague on how the rules language works. On the tutorial, it does not explain how the 'event' is built up. For instance,
Example 1:
On PIR#Switch do
if [LDR#Light]<500

Is PIR the <Device Name> and Switch the <Device Value Name> ? or per notation of the pub template, the /%tskname%/%valname% ?
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay . Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Rules examples

#30 Post by tozett » 29 Apr 2016, 10:08

look here: ?
http://www.esp8266.nu/forum/viewtopic.p ... les+syntax

the wiki is something short in explanation of rules,
but it think this comes to

[devicename#valuename1]

you can control/debug this in the log of the ESPeasy...
Attachments
Zwischenablage02.png
Zwischenablage02.png (35.51 KiB) Viewed 12034 times

yml020
Normal user
Posts: 14
Joined: 18 Apr 2016, 13:44
Location: South Africa

Re: Rules examples

#31 Post by yml020 » 08 May 2016, 19:37

Hi.

Should this work ? So at 19 deg it does nothing, a sort of hysteresis. gpio-16 is the heater.

What I am asking is if the if-endif should work. Only one of them works and never the other one. Can I have 2 in one do?

on Rules#Timer=5 do
if [DHT_01#Temperature] < 19
gpio,16,1
endif
if [DHT_01#Temperature] > 19
gpio,16,0
endif
timerSet 5,10
endon


This does work but I want to use two different temperatures.

on Rules#Timer=5 do
if [DHT_01#Temperature] > 19
gpio,16,0
else
gpio,16,1
endif
timerSet 5,10
endon

maluko
Normal user
Posts: 112
Joined: 02 Sep 2015, 00:49

Re: Rules examples

#32 Post by maluko » 18 Oct 2016, 23:27

hi

i have a wemos D1 mini with 1 relay and 2 ds18b20 and my goal is to put this with rules comparation.

i have test with:

On temp2#Temperature>temp1#Temperature do
gpio,5,0
endon

On temp1#Temperature>temp2#Temperature do
gpio,5,1
endon

but like i have 10s for temp sensor delay so after this time the relay goes on and off, wait 10s then on and off.

can anyone help

thanks



edit:

i think i did it

On temp1#Temperature>[temp2#Temperature] do
gpio,5,1
endon

On temp2#Temperature>[temp1#Temperature] do
gpio,5,0
endon


if you want that start with 1ºc difference, can put on temp formula like %value%+1

maluko
Normal user
Posts: 112
Joined: 02 Sep 2015, 00:49

Re: Rules examples

#33 Post by maluko » 20 Oct 2016, 23:18

i had a problem, i think it is the rule:
this is the log of domoticz switch actived by relay on wemos.

2016-10-20 21:45:40 Off
2016-10-20 21:45:37 On
2016-10-20 21:37:54 Off
2016-10-20 21:37:51 On
2016-10-20 21:26:12 Off
2016-10-20 21:26:09 On
2016-10-20 20:14:37 Off
2016-10-20 20:14:34 On
2016-10-20 19:57:50 Off
2016-10-20 19:57:48 On
2016-10-20 19:22:13 Off here is when the temp2 > temp 1 so turn off the relay but next appear a lot of on/off between 2/3second that i dont understand, this happen too when temp1>temp2 but in that case on inverse. the temperatura was 10 or more ºC difference.
2016-10-20 18:13:48 On
2016-10-20 18:13:45 Off
2016-10-20 17:31:49 On
2016-10-20 17:31:46 Off
2016-10-20 17:25:37 On
2016-10-20 17:25:33 Off
2016-10-20 16:13:02 On
2016-10-20 16:12:56 Off
2016-10-20 15:02:58 On
2016-10-20 15:02:53 Off
2016-10-20 14:13:42 On
2016-10-20 14:13:39 Off
2016-10-20 14:12:36 On
2016-10-20 14:12:34 Off

can any help on revison of rules?

thanks

timsson
Normal user
Posts: 77
Joined: 25 Mar 2016, 22:00

gpio in rules?

#34 Post by timsson » 22 Oct 2016, 19:11

Hi,
how can i make a rule with gpios?

on gpio,2#state = 1 do // ?????
......
endon

User avatar
iron
Normal user
Posts: 86
Joined: 24 Sep 2016, 08:37
Location: Veria, Greece
Contact:

Re: Rules examples

#35 Post by iron » 23 Oct 2016, 18:54

The "not so obvious" part is that you have to declare that gpio as an input switch.
Check this thread :
http://www.esp8266.nu/forum/viewtopic.php?f=6&t=2039
-D

timsson
Normal user
Posts: 77
Joined: 25 Mar 2016, 22:00

Re: Rules examples

#36 Post by timsson » 26 Oct 2016, 22:36

iron wrote:The "not so obvious" part is that you have to declare that gpio as an input switch.
Check this thread :
http://www.esp8266.nu/forum/viewtopic.php?f=6&t=2039
ohh.... thanks!
an other question:
timerSet,1,random(120,600) possible???

reddo
Normal user
Posts: 7
Joined: 15 Nov 2016, 01:02
Location: The Netherlands

Re: Rules examples

#37 Post by reddo » 15 Nov 2016, 01:05

Hi guys. I have an ESP01 with 2 DS18B20's which I use for Domoticz, controlling a circulation pump for my underfloor heating. Now, is it possible to make a rule that calculates the difference between the 2 temps and sends that as a variable to Domoticz too ?

CherAlban
Normal user
Posts: 14
Joined: 15 Nov 2016, 16:47

Re: Rules examples

#38 Post by CherAlban » 15 Nov 2016, 17:10

Hi,

I am also struggeling with the rules. I am using Domoticz with espEasy R145 on an ESP8266-12F with a relay on GPIO-4 to control my car pre-heating. What I try to implement is:

- When triggered from Domoticz (preheat20), espEasy shall close the relay for 20 minutes, and after opening it again report the 'Off' status back to Domoticz .

The set of rules below provides this functionality, except that I can't make espEasy report the 'Off' status back to Domoticz. I can see the switch status changing form 0 > 1 > 0 in espeays, but it does not report the change of status to Domoticz.

Is there any rule that forces a status update?

CherAlban

Code: Select all

on preheatOn do
 GPIO,4,1
 inputswitchstate 0,1
endon

on preheatOff do
 GPIO,4,0
 inputswitchstate 0,0
endon

on preheat20 do
  timerSet 1,1200 //20 minutes timer
  event,preheatOn
endon

on Rules#Timer=1 do
 event,preheatOff
endon

mvn77
Normal user
Posts: 12
Joined: 25 Jan 2017, 21:18

Re: Rules examples

#39 Post by mvn77 » 17 Mar 2017, 09:58

Вы можете посылать команды через UART правил? Для того, чтобы отправить SMS через модем/

darek2
Normal user
Posts: 3
Joined: 12 Apr 2017, 20:13

Re: Rules examples

#40 Post by darek2 » 12 Apr 2017, 20:30

Hello
Sorry for my English (translate.google) ;)
I have sonoff basic 5 pin. Firmware Build: 120 easyesp
Pin gpio 14 dht11 it works.
"http://192.168.1.60/control?cmd=GPIO,12,1" work :D

I need to run a fan in the bathroom depending on the humidity.
Humidity > 30 gpio,12,1 .
Theoretically simple :D .
Level Control this does not work.
I'm testing different "rules".
Unfortunately I am an amateur and that is my beginnings :)
Please help :oops:

paxi
Normal user
Posts: 121
Joined: 02 Feb 2017, 00:48
Location: Germany

Re: Rules examples

#41 Post by paxi » 13 Apr 2017, 23:19

Code: Select all

On sensorname#valuename do
    If [sensorname#valuname] > 30
        Gpio 12,1
    Else
        Gpio 12,0 
    Endif
Endon
But if you really want to bring RH below 30% it may be easier to skip the esp and let the fan run permanently. :D

rene9900
Normal user
Posts: 28
Joined: 25 Apr 2017, 11:47

Re: Rules examples

#42 Post by rene9900 » 25 Apr 2017, 11:54

i am having a challenge with my wemos mini running ESPEasy i have a DS1820 and all is working fine, except i want to monitor my freezer, and if the temperature goes above -15 towards 0 degrees..
i currently have 2 other wemos running dht11 and dth22 and made the rule to get notification via email like the one below here, when i change to value > -18 < -15 i get no triggering
any suggestions how to get it to act and then publish on my requested temperatures?


on temp#Temperature do
if [temp#Temperature] > 28 // over skifter til HIGH
gpio,5,1
Publish /esp42/WARNING,[temp#Temperature]
endif
if [temp#Temperature] < 27 // under skifter til LOW
gpio,5,0
Publish /esp42/Normal,[temp#Temperature]
endif
endon

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests