Page 1 of 1

Very advanced virtual Thermostat

Posted: 15 Nov 2016 15:37
by ridewithstyle
Hi there,

I am looking for a solution to compensate a temperature gradient in the room using a default devolo/danfoss setpoint thermostat.

Imagine a room where the heating radiator is on the inner warm side of the house and setting it to a temperature of e.g. 21°C will result in significantly lower room temperatures, because the temperature on the cold side of the room is more like 17°C (I have a window sensor installed which reports temperature).

The theoretically easiest way would be to use a heater radiator valve that doesn’t rely on its local temp sensor but instead on any sensor in the network. Unfortunately this most likely won’t work with any radiator valve.
So if the radiator valve must rely on its local sensor, the only way to work around this is to jack up the target temperature beyond its really intended level. Say we have 18°C at the window and need 20°C room temperature; we set the target to 22°C. Is this example we add 2°C to intended room value which is the difference between target room temperature and the window value; assuming it’s right in the middle (this can be modified at will by 70/30 60/40, depending on the room. Using the app mathematica allows to calculate the “proper” room temperature.
To be able to input a desired room temperature, I’d go for e.g. a devolo wall panel
http://www.devolo.co.uk/article/room-th ... e-control/
which allows me to set a target temperature and reports a measured temperature.

So far, so good, but this is the problem:
How do I get the target temperature from the devolo thermostat, add my dynamic compensation to it and forward it to the radiator valve, not a binary on/off switch impulse, but as target temperature?
Both apps, virtual thermostat and advanced thermostat build on being able to switch the source of the heat on and off.
Logical rule can only set hard coded values, nothing that can be calculated or given by another app.
IF-ELSE-THEN can only control thermostats by setting hard coded values.

Basically I need a way to take a “thermostat setpoint value” add a dynamically calculated value (this I have covered) and forward it to another “thermostat setpoint”
The sleekest way could be to enhance the “advanced virtual thermostat” but does anyone have another idea?
I could image a few people have the same problem as I do, is anyone also interested in a solution for this problem?

Thanks and best regards
rws

Re: Very advanced virtual Thermostat

Posted: 21 Nov 2016 13:03
by Provo
I haven't tried this myself, but I think you should be able to use the custom javascript app. Capture the event when the setpoint on the Devolo is changed, and execute the javascript app which gets the value, does the calculation and sets the radiator thermostat value.

Re: Very advanced virtual Thermostat

Posted: 21 Nov 2016 14:40
by ridewithstyle
thanks for the idea, I'll have to read up on my javascript skills prior to doing that, but it seems doable.

I think this should be worth the effort, once I crack this problem, it'll open up further ideas. :-)

Is there any codesample you know of where I can get into the proper syntax?

thanks and best regards,
rws

Re: Very advanced virtual Thermostat

Posted: 21 Nov 2016 16:30
by Provo
Check out the API sections of this: http://razberry.z-wave.me/docs/zway.pdf

I'm not sure to what extent this is available through the custom javascript module, and I'm not able to check for myself at the moment, so I guess you'll just have to try it out. :)

Re: Very advanced virtual Thermostat

Posted: 24 Nov 2016 13:29
by fez
I have very similar problem.
I already have a clear idea how to solve it. I am planning to create a virtual thermostat where i add a temp sensor and add a cron schedule to periodically adjust the thermostat set temp with an offset.
... I just didnt have tine for it.
If you can wait a few weeks i could help you with it.

Re: Very advanced virtual Thermostat

Posted: 24 Nov 2016 14:31
by ridewithstyle
My idea is to use the updated average temperature provided by the mathematica module.

When either the average temperature or the target temperature get changed it will trigger the re-evaluation of the calculation. As i'm quite busy right now, I won't have the time to tackle this right away. Currently I'm still fighting my not-triggering-if-then logic in v2.2.5.

regards, rws

[edit] thanks pz1 for adding the link. Couldn't reply to your pm as you have disabled them. Cheers mate

Re: Very advanced virtual Thermostat

Posted: 24 Nov 2016 15:45
by fez
You have to be careful how fast you react on temperature changes, heating is a very slow system.

Re: Very advanced virtual Thermostat

Posted: 24 Nov 2016 16:10
by ridewithstyle
very true, the controlled system is very slow.

I plan to manipulate the target temperature of the thermostat using a delta-sigma principle between measured temps and room-target temps. The possibility of oscillation should be minimal if I use a hysteresis and various corrective measures :-)

Re: Very advanced virtual Thermostat

Posted: 24 Nov 2016 17:19
by pz1
fez wrote:heating is a very slow system.
And Danfoss Thermostats (I don't know about the LC13, and Devolo types) are notorious slow responders with their internal PID controllers! There are many posts here about that problem, dating back to even 2012 IIRC