Set Value in Level Control
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 21
- Joined: 31 Oct 2016, 03:03
Set Value in Level Control
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.
Re: Set Value in Level Control
Did you find a solution for this? I'm thinking about something similar
-
- Normal user
- Posts: 21
- Joined: 31 Oct 2016, 03:03
Re: Set Value in Level Control
No I don't find any solution yet. What is your idea?
-
- Normal user
- Posts: 30
- Joined: 31 Oct 2015, 08:00
Re: Set Value in Level Control
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!
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!
Re: Set Value in Level Control
hi is there a way to make the variable assigned to TaskValueSet 4,2,%eventvalue% persist when the espeasyy if rebooted?
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 16 guests