Rules and Global Sync

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Johnhi30
New user
Posts: 2
Joined: 28 Aug 2016, 14:07

Rules and Global Sync

#1 Post by Johnhi30 » 28 Aug 2016, 14:22

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

Martinus

Re: Rules and Global Sync

#2 Post by Martinus » 28 Aug 2016, 17:55

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
The gpio command should be on a separate line. It should work like this:

Code: Select all

on DHT#Temperature do
  if [DHT#Temperature]<22.00
    gpio,0,0
  endif
endon

Johnhi30
New user
Posts: 2
Joined: 28 Aug 2016, 14:07

Re: Rules and Global Sync

#3 Post by Johnhi30 » 29 Aug 2016, 00:24

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests