Hello!
I am using a Danfoss LC-13 Heatingvalve in combination with a Fibaro Door/Window-Sensor.
When window is open, the heatingvalve is falling back to 15 degrees, after closing the window
my heatingvalve go up to 22 degrees. All is working fine!
But i am also using a scheduled switching with my heatingvalves. So if it´s after 9:00am, valve
is going down to 18 degrees and raises up to 22 after 15:00pm. If the window get´s opened and
closed in this range of time, valve is going to 22 degrees, but should be at 18.
Any ideas what i can do?
Greetings
OCB
After event returning to last value
Moderator: leecollings
- jvdz
- Posts: 2269
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: After event returning to last value
I am using a similar logic for the heating with presence detection.
The way I've solved it is to save the Thermostat value in a uservariable.
When we leave the house, the uservariable is set to the current Thermostat level and the Thermostat is set to a lower temperature.
At the preset times to change the Temperature, the uservariable is always updated to the new set temperature and the Thermostat is only changed in case we are home.
In case we return home the Thermostat is always set to the value in the User variable.
Hope that makes sense, else just ask.
Jos
The way I've solved it is to save the Thermostat value in a uservariable.
When we leave the house, the uservariable is set to the current Thermostat level and the Thermostat is set to a lower temperature.
At the preset times to change the Temperature, the uservariable is always updated to the new set temperature and the Thermostat is only changed in case we are home.
In case we return home the Thermostat is always set to the value in the User variable.
Hope that makes sense, else just ask.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 26
- Joined: Sunday 17 January 2016 20:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Austria
- Contact:
Re: After event returning to last value
Many thanks for your answer!
I will try it after reading a little bit more about LUA and uservariables.
I will try it after reading a little bit more about LUA and uservariables.

-
- Posts: 26
- Joined: Sunday 17 January 2016 20:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Austria
- Contact:
Re: After event returning to last value
Hi again!
I am a little bit confused about all the scripts and what is possible with LUA.
I think i need help again or maybe i understood something wrong. If i set up a user variable,
is it possible that when thermostat changes the temp., that the user variable get´s updated
to the new value of the thermostat? Or do i have to set up more user varibles for each daytime
and query the time in a script to pick the daytime-temp. for my thermostat?
Thanks
Oliver

I am a little bit confused about all the scripts and what is possible with LUA.
I think i need help again or maybe i understood something wrong. If i set up a user variable,
is it possible that when thermostat changes the temp., that the user variable get´s updated
to the new value of the thermostat? Or do i have to set up more user varibles for each daytime
and query the time in a script to pick the daytime-temp. for my thermostat?
Thanks
Oliver
- jvdz
- Posts: 2269
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: After event returning to last value
I am not updating the uservariable until an event happens that requires to save the current temperature and change the actual temperature to something else. Let me explain a little more:
I have one TIME script running for setting the Thermostat at predefined times configurable per day of the week. This script will always set the UserVariable to the newly wanted Temperature, but will only set the actual thermostat temp in case we are home at that moment.
Also have a presence script that will perform the following actions for the thermostat:
When Leaving: Save the current Thermostat Temp to the UserVariable and set the Thermostat to 17 C.
When Returning: Set the Thermostat Temp to the value of the User variable.
Is that making it clearer for you?
Ask in case it is still foggy.
Jos
I have one TIME script running for setting the Thermostat at predefined times configurable per day of the week. This script will always set the UserVariable to the newly wanted Temperature, but will only set the actual thermostat temp in case we are home at that moment.
Also have a presence script that will perform the following actions for the thermostat:
When Leaving: Save the current Thermostat Temp to the UserVariable and set the Thermostat to 17 C.
When Returning: Set the Thermostat Temp to the value of the User variable.
Is that making it clearer for you?
Ask in case it is still foggy.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 26
- Joined: Sunday 17 January 2016 20:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Austria
- Contact:
Re: After event returning to last value
Finally i got it...THX for your help! 
Next step is to make a timescript like you instead of using
the device-timer, suits better for me i think.
After that, i like to use my Netatmo to reduce the temp. of
my heating-valves if outside temp. rises above 20 degrees
and go back to uservariable if under 20 degrees outside.
Greetings
Oliver

Next step is to make a timescript like you instead of using
the device-timer, suits better for me i think.
After that, i like to use my Netatmo to reduce the temp. of
my heating-valves if outside temp. rises above 20 degrees
and go back to uservariable if under 20 degrees outside.
Greetings
Oliver
-
- Posts: 26
- Joined: Sunday 17 January 2016 20:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Austria
- Contact:
Re: After event returning to last value
One question...
If i want to change the heating-valve-value 3 times a day,
can i use it in only 1 script or have i to make 3 scripts?
Oliver
If i want to change the heating-valve-value 3 times a day,
can i use it in only 1 script or have i to make 3 scripts?
Oliver
- jvdz
- Posts: 2269
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: After event returning to last value
One script should work fine, just a matter of having the correct logic in it. 
Jos

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Who is online
Users browsing this forum: No registered users and 1 guest