Level Control

Moderators: Voyager, BertB, rtenklooster, Stuntteam, grovkillen, TD-er

Post Reply
Message
Author
ulfh2018
Normal user
Posts: 30
Joined: 19 Feb 2018, 06:11
Location: Oslo Norway

Level Control

#1 Post by ulfh2018 » 09 Mar 2019, 16:52

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

ThomasB
Normal user
Posts: 182
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Level Control

#2 Post by ThomasB » 09 Mar 2019, 20:52

(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

ulfh2018
Normal user
Posts: 30
Joined: 19 Feb 2018, 06:11
Location: Oslo Norway

Re: Level Control

#3 Post by ulfh2018 » 10 Mar 2019, 09:09

Thanks a lot, Thomas. It's all about syntaxes :D

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests