Set Value in Level Control

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
FranckkyDoo
Normal user
Posts: 21
Joined: 31 Oct 2016, 03:03

Set Value in Level Control

#1 Post by FranckkyDoo » 12 Feb 2017, 07:15

Is there a way to change the Value of level control via the Rules ?? I use the level control for my heater and I want to be able to change the Value with some Rules.

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: Set Value in Level Control

#2 Post by mrwee » 23 Mar 2017, 15:42

Did you find a solution for this? I'm thinking about something similar

FranckkyDoo
Normal user
Posts: 21
Joined: 31 Oct 2016, 03:03

Re: Set Value in Level Control

#3 Post by FranckkyDoo » 24 Mar 2017, 02:56

No I don't find any solution yet. What is your idea?

CoolWombat
Normal user
Posts: 30
Joined: 31 Oct 2015, 08:00

Re: Set Value in Level Control

#4 Post by CoolWombat » 25 Mar 2017, 03:38

Not sure if this might help, I've got an esp in my Hotspring spa which I've converted to be "WiFi" enabled. The esp also control the temperature of the spa. I had problem figuring out how to have a variable like set temperature and then do things like compare the water temperature and turning on the heater. What I ended up doing is to use a dummy device -

Device1
Device: Temperature - DS18b20
Name: DS18B20
Delay: 60
IDX/Var: 1
1st GPIO: GPIO-2
Send Data: Yes
Value Name 1: Temperature

Device4
Device: Dummy Device
Name: SetTemp
Delay: 60
IDX/Var: 4
Simulated Data Type: SENSOR_TYPE_QUAD
Send Data: Yes
Decimal Temperature: 1
Decimal Auto: 0
Decimal TempLow: 1
Decimal TempHigh: 1
Value Name 1: Temperature
Value Name 2: Auto
Value Name 3: TempLow
Value Name 4: TempHigh

"Temperature" is what I set the target temperature of my spa, "Auto" is to indicate if I want the esp to control the heater and "TempLow" & "TempHigh" is when to turn on and off the heater. I was going to have a couple of switches and also a display, but they haven't been implemented yet. Until then, I am sending the data across via OpenHAB.

Here's part of my rules -

on DS18B20#Temperature do
if [DS18B20#Temperature] > [SetTemp#TempHigh]
event,TurnOff
endif
endon

on DS18B20#Temperature do
if [DS18B20#Temperature] < [SetTemp#TempLow]
event,TurnOn
endif
endon

on TurnOn do
if [SetTemp#Auto] > 0
gpio,13,1
else
gpio,13,0
endif
endon

on TurnOff do
gpio,13,0
endif
endon

on SetTemperature do
TaskValueSet 4,1,%eventvalue%
TaskValueSet 4,3,%eventvalue%-0.5
TaskValueSet 4,4,%eventvalue%+0.6
endon

on SetAuto do
TaskValueSet 4,2,%eventvalue%
endon


To set the temperature you can either send via a standard http -

Example of setting the temperature to 37 degree -
http://192.168.1.xx/control?cmd=event,SetTemperature=37

Example of turning on auto -
http://192.168.1.xx/control?cmd=event,SetAuto=1

Or do it in OpenHAB rules -

sendHttpGetRequest("http://192.168.1.xx/control?cmd=event,SetTemperature=" + TargetTemperature)
where TargetTemperature is the value of the target temperature you want the spa set to

Hope that helps.

Cheers!

ufumes
Normal user
Posts: 11
Joined: 14 Aug 2018, 23:00

Re: Set Value in Level Control

#5 Post by ufumes » 17 Aug 2018, 20:32

hi is there a way to make the variable assigned to TaskValueSet 4,2,%eventvalue% persist when the espeasyy if rebooted?

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 102 guests