We have moved at community.getvera.com

Author Topic: plugin (or code) for setting setpoint as function of outside temp and time?  (Read 1304 times)

Offline AndersH

  • Sr. Newbie
  • *
  • Posts: 40
  • Karma: +0/-0
Hello,

Has anybody made a plugin or some lua code to control a thermostat's setpoint as a function of the outside temp?
I live in Norway, and at any given time during winter it might be around zero, or it might be -25C ouside during night.
I'd like to reduce the temperature during night, but bring it back into the comfort zone at 7 o'clock in the morning. Of course, when to set the comfort setpoint to start heating would be very dependant on the outside temp.
I understand (and have seen examples in the forum) that I can do so with a table-driven approach, but what I'm after is an adaptive algorithm similar to the Virtual Smart Thermostat plugin. This plugin adjusts its regulator factors to keep a steady inside temp, and learns the relationship between the heating element, the outside temp and rise/fall in internal temp over time.

Any ideas?
Vera Lite, SRT321 thermostat, Fibaro door sensors, switches and dimmers

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Have you looked at the Program Logic Event Generator plugin ?
You can't implement things as sophisticated as a Kalman Filter, but you can implement equations and use computed values in actions for thermostat devices.

Offline RexBeckett

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
I do it using a Program Logic Event Generator (PLEG) plugin. I have Horstmann HRT4-ZW thermostats for my heating and adjust the setpoints according to many conditions of time, weather, home/away, vacation, etc.

PLEG allows you to calculate your required setpoint using input triggers, schedules and device properties (like temperature of an outdoor sensor or WeatherUnderground plugin). Then you can send the setpoint to the thermostat with an action.

I posted a simplified version of it some time ago: http://forum.micasaverde.com/index.php/topic,14120.msg107212.html#msg107212

Offline AndersH

  • Sr. Newbie
  • *
  • Posts: 40
  • Karma: +0/-0
Thank you. I'll look into that.

Anders
Vera Lite, SRT321 thermostat, Fibaro door sensors, switches and dimmers