Page 1 of 1

Level Control

Posted: 09 Mar 2019, 16:52
by ulfh2018
I have been through this before, and made it work, but I don't find the notes I made (my wife is NOT surprised :D ) - So here we go.

I have defined a level control, which should check the temperature on an DTH22 on the same ESP8266. That is, I have two Devices, one for my DTH22 and one for level control. I seem to remeber that I need to use rules to check what is going on, so I have tried to make a role that looks like this, just for testing:

on DHT22#Temperatur< [LevelControl#Temperatur] do
gpio,13,1
endon

I'm not sure what Check task I should choose - have tried both, but it looks like I'm doing something fundamentally wrong.

Can some one give me a hint, please?

Best regards

Ulf

Re: Level Control

Posted: 09 Mar 2019, 20:52
by ThomasB
(1) Double check the accuracy (no typos) of all your device and value names.

(2) Try this rule:

Code: Select all

on DHT22#Temperatur do
  if  [DHT22#Temperatur]<=[LevelControl#Temperatur] 
    gpio,13,1
  endif
  if  [DHT22#Temperatur]>[LevelControl#Temperatur] 
    gpio,13,0
  endif
endon
- Thomas

Re: Level Control

Posted: 10 Mar 2019, 09:09
by ulfh2018
Thanks a lot, Thomas. It's all about syntaxes :D