Hi,
Can someone please point out what I'm missing when it comes to understanding rules, I'm using global Sync to receive a DHT temperature reading from another ESP Easy Device and can see the value arriving on this device running the rule in the log i.e EVENT: DHT#Temperature=21.50
All units are running R120
so why when i use a rule like
on DHT#Temperature do
if [DHT#Temperature] < 22.00 gpio,0,0
endif
endon
which i hoped would set GPIO 0 to be 0 when the temperature is less than 22.00 degs ? There is an LED attached to GPIO 0 which when low should light the Led, but there's no in state.
Is it simply me not getting the Syntax correct ?
Thanks in advance
Rules and Global Sync
Moderators: grovkillen, Stuntteam, TD-er
Re: Rules and Global Sync
The gpio command should be on a separate line. It should work like this:Johnhi30 wrote:Hi,
Can someone please point out what I'm missing when it comes to understanding rules, I'm using global Sync to receive a DHT temperature reading from another ESP Easy Device and can see the value arriving on this device running the rule in the log i.e EVENT: DHT#Temperature=21.50
All units are running R120
so why when i use a rule like
on DHT#Temperature do
if [DHT#Temperature] < 22.00 gpio,0,0
endif
endon
which i hoped would set GPIO 0 to be 0 when the temperature is less than 22.00 degs ? There is an LED attached to GPIO 0 which when low should light the Led, but there's no in state.
Is it simply me not getting the Syntax correct ?
Thanks in advance
Code: Select all
on DHT#Temperature do
if [DHT#Temperature]<22.00
gpio,0,0
endif
endon
Re: Rules and Global Sync
Thanks Martinus, that was indeed the issue, i can see from some of my testing that i had structured the Syntax correctly like that but it still hadn"t worked as expected, strange but that's the way life with technolgy is sometimes. Appreciate the quick assistance.
Who is online
Users browsing this forum: No registered users and 11 guests