Hi All,
Is there a simple software/scrypt Clock thermostat for Domoticz where
someone can easily set several temperatures at several times?
I want to use the DS18B20 temperature sensor on my Pi. Then just simply
turn on or off a relay on a GPIO port if the temperature is higher of lower
then the set point within a small hysteresis..
There are so many projects but I can't find my way trough them at the moment...
Thanks in advance! Roland
Clock thermostat
Moderator: leecollings
-
- Posts: 29
- Joined: Friday 24 February 2017 9:39
- Target OS: Windows
- Domoticz version: V4.9700
- Location: Netherlands
- Contact:
Re: Clock thermostat
To test my cooling cycle I've made two fixed events.
When the room temperature is over 4.5 degrees the refrigerator compressor turns on.
When the room temperature is below 3.5 degrees the refrigerator compressor turns off.
In this way I made a 1 degree hysteresis. This runs fine for a few days now.
What I would like to do is a little calculation in the Events. I want to set
one user variable Temperature and let the system calculate the on and
off temperatures by adding or subtracting 0.5 degrees.
And for the user variable temperature I would like to have a easy timer.
Something like:
At 10:00 set 15 degrees
At 12:00 set 10 degrees
At 15:00 set 5 degrees
At 17:00 set 1 degree
etc...
How can I arrange this in Domoticz? I would guess that this is a quite common setup?
Regards, Roland
When the room temperature is over 4.5 degrees the refrigerator compressor turns on.
When the room temperature is below 3.5 degrees the refrigerator compressor turns off.
In this way I made a 1 degree hysteresis. This runs fine for a few days now.
What I would like to do is a little calculation in the Events. I want to set
one user variable Temperature and let the system calculate the on and
off temperatures by adding or subtracting 0.5 degrees.
And for the user variable temperature I would like to have a easy timer.
Something like:
At 10:00 set 15 degrees
At 12:00 set 10 degrees
At 15:00 set 5 degrees
At 17:00 set 1 degree
etc...
How can I arrange this in Domoticz? I would guess that this is a quite common setup?
Regards, Roland
-
- Posts: 29
- Joined: Friday 24 February 2017 9:39
- Target OS: Windows
- Domoticz version: V4.9700
- Location: Netherlands
- Contact:
Re: Clock thermostat
Any suggestions?
I would like to have a flexible timer for lights also
Just a simple home screen to simply set values at user divined times...
I would like to have a flexible timer for lights also
Just a simple home screen to simply set values at user divined times...
Re: Clock thermostat
You can easily do this with a virtual (dummy) thermostat.
To create it you by going to Settings - Hardware, and if you not allredy have one, you have to add Dummy from the dropp down list.
Then on the same page, on under the Dummy hardware you click Create a virtual sensor and choose Thermostat.
You will find the new dummy sensor under Utility, and there you find the timersettings. You can then use this thermostat in your script.
To create it you by going to Settings - Hardware, and if you not allredy have one, you have to add Dummy from the dropp down list.
Then on the same page, on under the Dummy hardware you click Create a virtual sensor and choose Thermostat.
You will find the new dummy sensor under Utility, and there you find the timersettings. You can then use this thermostat in your script.
-
- Posts: 29
- Joined: Friday 24 February 2017 9:39
- Target OS: Windows
- Domoticz version: V4.9700
- Location: Netherlands
- Contact:
Re: Clock thermostat
Great! I have the thermostat working now.
Now I'm trying to figure out how I can make the hysteresis in the system...
because the compressor will turn off and on if I use the system like this: I need to add or subtract a value from the desired temperature like this: But this seems not to be possible within the event system.
Is there a way you can make a user variable which is made like:
"low value = Temperature setpoint - 0,5 degree"
"high value = Temperature setpoint + 0,5 degree"
In this way I could use these variables in the events to switch the
compressor with a hysteresis of 1 degree...
Thanks in advance!
Roland
Now I'm trying to figure out how I can make the hysteresis in the system...
because the compressor will turn off and on if I use the system like this: I need to add or subtract a value from the desired temperature like this: But this seems not to be possible within the event system.
Is there a way you can make a user variable which is made like:
"low value = Temperature setpoint - 0,5 degree"
"high value = Temperature setpoint + 0,5 degree"
In this way I could use these variables in the events to switch the
compressor with a hysteresis of 1 degree...
Thanks in advance!
Roland
-
- Posts: 29
- Joined: Friday 24 February 2017 9:39
- Target OS: Windows
- Domoticz version: V4.9700
- Location: Netherlands
- Contact:
Re: Clock thermostat
I made a little lua script to test: The "Desired temperature" is a fixed value at the moment.
How can I get the selected temperature from the virtual thermostat in the lua scrypt?
Where can I find this value? Or what's its name?
Thanks! Roland
How can I get the selected temperature from the virtual thermostat in the lua scrypt?
Where can I find this value? Or what's its name?
Code: Select all
commandArray = {}
commandArray['DesiredTempHighHysteresis']= tostring(uservariables['Desired temperature'] + uservariables['Hysteresis'])
commandArray['DesiredTempLowHysteresis']= tostring(uservariables['Desired temperature'] - uservariables['Hysteresis'])
print (commandArray['DesiredTempHighHysteresis']);
print (commandArray['DesiredTempLowHysteresis']);
return commandArray
-
- Posts: 29
- Joined: Friday 24 February 2017 9:39
- Target OS: Windows
- Domoticz version: V4.9700
- Location: Netherlands
- Contact:
Re: Clock thermostat
Code: Select all
commandArray = {}
commandArray["DesiredTempHighHysteresis"]= tostring(otherdevices["Temperature setpoint"] + uservariables["Hysteresis"])
commandArray["DesiredTempLowHysteresis"]= tostring(otherdevices["Temperature setpoint"] - uservariables["Hysteresis"])
print (commandArray["DesiredTempHighHysteresis"]);
print (commandArray["DesiredTempLowHysteresis"]);
return commandArray
The "DesiredTempHighHysteresis" and "DesiredTempLowHysteresis" do output the correct value in the lua scrypt
but the values are not updated in the graphic environment. The 3.5 and 7 degree are also seen by the blockly scripts.
So I seem to have a little error in my code... Any ideas?
Regards, Roland
-
- Posts: 29
- Joined: Friday 24 February 2017 9:39
- Target OS: Windows
- Domoticz version: V4.9700
- Location: Netherlands
- Contact:
Re: Clock thermostat
It seems I have forgotten the part: Variable:
Now the variables are getting synchronized...
Now the variables are getting synchronized...
Code: Select all
commandArray = {}
commandArray["Variable:DesiredTempHighHysteresis"]= tostring(otherdevices["Temperature setpoint"] + uservariables["Hysteresis"])
commandArray["Variable:DesiredTempLowHysteresis"]= tostring(otherdevices["Temperature setpoint"] - uservariables["Hysteresis"])
print (commandArray["Variable:DesiredTempHighHysteresis"]);
print (commandArray["Variable:DesiredTempLowHysteresis"]);
return commandArray
Who is online
Users browsing this forum: No registered users and 0 guests