Rules examples
Moderators: grovkillen, Stuntteam, TD-er
Rules examples
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
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
Re: Rules examples
If you upgrade to R100, you can now send events from http to ESP:
So you can use them in the rules tab like this example:
This can be done without using a task setup.
Code: Select all
http://<ESP-ip>/control?cmd=event,givemesomewater
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
Re: Rules examples
any chance to use something like this?
to compare PN532 tags?
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
Re: Rules examples
work like a charmMartinus wrote:If you upgrade to R100, you can now send events from http to ESP:So you can use them in the rules tab like this example:Code: Select all
http://<ESP-ip>/control?cmd=event,givemesomewater
This can be done without using a task setup.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
good work....again

thanks
Re: Rules examples
I added the examples to the Rules tutorial.
Re: Rules examples
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?)
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
Re: Rules examples
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: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
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
Re: Rules examples
@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..)
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..)
Re: Rules examples
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.

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.

Re: Rules examples
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
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
Re: Rules examples
it instantly checked github,yml020 wrote: ... to get hold of a R104 binary,
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...
Re: Rules examples
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.
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.
Re: Rules examples
i can do one binary like this, if you like:
give a (public) place to upload ...
give a (public) place to upload ...
- Attachments
-
- Zwischenablage06.png (32.34 KiB) Viewed 67383 times
Re: Rules examples
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 ????
Now, just a public place ????
Re: Rules examples
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.
My anti virus app (that I cannot switch off) the goes mad showing all sorts of bugs.
Re: Rules examples
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.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
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.
Re: Rules examples
no. i uploaded a binary.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.
where to put?
(google gives a lot of options, but whom will you trust ...)
i can make a md5 hash, if you want...
Re: Rules examples
That's good to know, thanks.Martinus wrote: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.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
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.
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.
Re: Rules examples
No, you have caught a bug (every event name ending with 'on ' would not process at all)andy wrote:Interestingly, Pon wouldn't work, so I had to change it to Ponn. Maybe Pon is a reserved variable name?
Will be fixed in R105...
Re: Rules examples
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.tozett wrote:no. i uploaded a binary.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.
where to put?
(google gives a lot of options, but whom will you trust ...)
i can make a md5 hash, if you want...
Many thanks.
Re: Rules examples
did you tried this, if it works? (will build something similar myself..)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
looks to me, if it is normal like other comparison...
Re: Rules examples
tried, but not working, the quotes are kind of problem I think..tozett wrote:did you tried this, if it works? (will build something similar myself..)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
looks to me, if it is normal like other comparison...

Re: Rules examples
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...
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...
Re: Rules examples
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 ?
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 ?
Re: Rules examples
Tried with Googles Chrome-browser ?
Re: Rules examples
Hello.
I installed Chrome and now it display the result of the command.
Cool.
Thank you very much for the assistance.
I installed Chrome and now it display the result of the command.
Cool.
Thank you very much for the assistance.
Rules examples ~ Variables?
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?
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, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
Re: Rules examples
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% ?
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, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
Re: Rules examples
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...
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 (35.51 KiB) Viewed 68556 times
Re: Rules examples
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
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
Re: Rules examples
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
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
Re: Rules examples
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
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
gpio in rules?
Hi,
how can i make a rule with gpios?
on gpio,2#state = 1 do // ?????
......
endon
how can i make a rule with gpios?
on gpio,2#state = 1 do // ?????
......
endon
Re: Rules examples
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
Check this thread :
http://www.esp8266.nu/forum/viewtopic.php?f=6&t=2039
-D
Re: Rules examples
ohh.... thanks!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
an other question:
timerSet,1,random(120,600) possible???
Re: Rules examples
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 ?
Re: Rules examples
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
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
Re: Rules examples
Вы можете посылать команды через UART правил? Для того, чтобы отправить SMS через модем/
Re: Rules examples
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
I need to run a fan in the bathroom depending on the humidity.
Humidity > 30 gpio,12,1 .
Theoretically simple
.
Level Control this does not work.
I'm testing different "rules".
Unfortunately I am an amateur and that is my beginnings
Please help
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

I need to run a fan in the bathroom depending on the humidity.
Humidity > 30 gpio,12,1 .
Theoretically simple

Level Control this does not work.
I'm testing different "rules".
Unfortunately I am an amateur and that is my beginnings

Please help

Re: Rules examples
Code: Select all
On sensorname#valuename do
If [sensorname#valuname] > 30
Gpio 12,1
Else
Gpio 12,0
Endif
Endon

Re: Rules examples
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
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
Who is online
Users browsing this forum: Bing [Bot] and 11 guests