From a50d16c87b197520e2ece44663c20a570d10ab41 Mon Sep 17 00:00:00 2001 From: jamesgo <> Date: Wed, 7 Oct 2015 10:53:31 +0000 Subject: [PATCH] 93_PWMR.pm : Initial Version for Puls width Modulation of Heating. Define Room git-svn-id: https://svn.fhem.de/fhem/trunk@9394 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/93_PWMR.pm | 1099 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 1099 insertions(+) create mode 100644 fhem/contrib/93_PWMR.pm diff --git a/fhem/contrib/93_PWMR.pm b/fhem/contrib/93_PWMR.pm new file mode 100644 index 000000000..c9703a7f5 --- /dev/null +++ b/fhem/contrib/93_PWMR.pm @@ -0,0 +1,1099 @@ +# +# +# 94_PWMR.pm +# written by Andreas Goebel 2012-07-25 +# e-mail: ag at goebel-it dot de +# +############################################## +# $Id: +# 29.07.15 GA change set manualTempDuration +# 21.09.15 GA update, use Log3 and readingsSingleUpdate +# 07.10.15 GA initial version published + +# module for PWM (Pulse Width Modulation) calculation +# this module defines a room for calculation +# it is used by a PWM object +# reference to the PWM object is via IODev +# PWMR object defines: +# IODev: reference to PWM +# factor (also used in PID calculation): +# temperatur difference * factor * cycletime (from PWM) defines on/off periods (pulse) +# sensor delivering the temperature (temperature is read from reading using a regexp) +# actor to switch on/off the heating devices (may be a structure if more than on actor..) +# comma separated list of window contacts followd by ":" and a regular expression +# default for the regular expression is "Open" +# if the regular expression matches on of the contacts +# then readRoom will return c_tempFrostProtect as desired-temp +# instead of the current calculated desired-temp +# this should cause the calculation routine for the room to switch off heating +# +# calculation of "desired-temp" is done in a loop (5-minutes default) +# - if c_frostProtect is "1" -> set to c_tempFrostProtect +# - if c_autoCalcTemp is "1" -> use c_tempN, c_tempD, c_tempC, c_tempE and c_tempRule[1-5] +# - c_* variables are syntax checked and derived from attr which have a readable syntax +# +# - c_tempRule[1-5] are processed in order 5..1 (5 is highes priority) +# rules define: +# ,[N|D|C] [