fht8v and pid oregon device

Begonnen von Guest, 04 Oktober 2011, 21:53:46

Vorheriges Thema - Nächstes Thema

Guest

Originally posted by: <email address deleted>

Hi,

I defined a and fht8v and I can control it with the CUL. I set it op
linke this in fhem.cfg

define thermostaat FHT8V 4931

Now I want to use and oregon device as measuring device instead of an
s300th device.

How must I define it?
-------------
define temp_thermostaat PID Slaapkamertemp:temperature:([\d\.]*)
thermostaat
-------------

I think after the temperature is wrong but I don't know what it should
be?

the oregon sensor is defined:

define Slaapkamertemp OREGON THGR228N_d9
attr Slaapkamertemp fm_order 22
attr Slaapkamertemp room Slaapkamer

define FileLog_Slaapkamertemp FileLog /var/log/fhem/slaapkamer2-%Y.log
Slaapkamertemp
attr FileLog_Slaapkamertemp fm_order 34
attr FileLog_Slaapkamertemp logtype oregon_hms:Temp/Hum,text
attr FileLog_Slaapkamertemp room Slaapkamer

define weblink_Slaapkamertemp weblink fileplot
FileLog_Slaapkamertemp:oregon_hms:CURRENT
attr weblink_Slaapkamertemp label "Slaapkamer Min $data{min1}, Max
$data{max1}, Last $data{currval1}"
attr weblink_Slaapkamertemp room Slaapkamer


logging looks like

2011-10-04_21:49:38 Slaapkamertemp battery: 10
2011-10-04_21:49:38 Slaapkamertemp T: 21  H: 63
2011-10-04_21:50:21 Slaapkamertemp temperature: 21
2011-10-04_21:50:21 Slaapkamertemp humidity: 63
2011-10-04_21:50:21 Slaapkamertemp battery: 10
2011-10-04_21:50:21 Slaapkamertemp T: 21  H: 63
2011-10-04_21:51:04 Slaapkamertemp temperature: 21
2011-10-04_21:51:04 Slaapkamertemp humidity: 63
2011-10-04_21:51:04 Slaapkamertemp battery: 10
2011-10-04_21:51:04 Slaapkamertemp T: 21  H: 63
2011-10-04_21:51:47 Slaapkamertemp temperature: 21
2011-10-04_21:51:47 Slaapkamertemp humidity: 63
2011-10-04_21:51:47 Slaapkamertemp battery: 10
2011-10-04_21:51:47 Slaapkamertemp T: 21  H: 63

fhem> l Slaapkamertemp
Internals:
   CODE       THGR228N_d9
   DEF        THGR228N_d9
   IODev      RFXCOM
   NAME       Slaapkamertemp
   NR         31
   STATE      T: 21  H: 63
   TIME       2011-10-04 21:51:47
   TYPE       OREGON
   Readings:
     2011-10-04 21:51:47   battery         10
     2011-10-04 21:51:47   humidity        63
     2011-10-04 21:51:47   temperature     21
Attributes:
   fm_order   22
   room       Slaapkamer

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

rudolfkoenig

                                                   

> I think after the temperature is wrong but I don't know what it should
> be?

Since your sensor is generating a temperature event too, you should add it to
line 49 in 98_PID.pm (and tell me the diff). Apparently the regexp there is
defined as
        $regexp = '([\\d\\.]*)';
so this is most probably the correct way do define it on the command line.

Please tell me if it works: in surveyresults there are 6 entries, but I never
heard any explicit confirmation, and I do not use the PID module.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

Guest

Originally posted by: <email address deleted>

Hi

I edited line this in 98_PID.pm (changed HMS to OREGON)

    my $t = $defs{$sensor}{TYPE};
    if($t eq "OREGON" || $t eq "CUL_WS") {
      $reading = "temperature";
      $regexp = '([\\d\\.]*)';


in fhem.cfg

define thermostaat FHT8V 4931

define temp_thermostaat PID Slaapkamertemp:temperature:([\d\.]*)
thermostaat

define Slaapkamertemp OREGON THGR228N_d9
attr Slaapkamertemp fm_order 22
attr Slaapkamertemp room Slaapkamer

define FileLog_Slaapkamertemp FileLog /var/log/fhem/slaapkamer2-%Y.log
Slaapkamertemp
attr FileLog_Slaapkamertemp fm_order 34
attr FileLog_Slaapkamertemp logtype oregon_hms:Temp/Hum,text
attr FileLog_Slaapkamertemp room Slaapkamer

define weblink_Slaapkamertemp weblink fileplot
FileLog_Slaapkamertemp:oregon_hms:CURRENT
attr weblink_Slaapkamertemp label "Slaapkamer Min $data{min1}, Max
$data{max1}, Last $data{currval1}"
attr weblink_Slaapkamertemp room Slaapkamer

But I get in logging

2011.10.06 08:31:11 1: configfile: temp_thermostaat: Unknown sensor
device Slaapkamertemp specified

But I think its ok?????

regards Richard

On Oct 5, 10:41 am, Rudolf Koenig wrote:
> > I think after the temperature is wrong but I don't know what it should
> > be?
>
> Since your sensor is generating a temperature event too, you should add it to
> line 49 in 98_PID.pm (and tell me the diff). Apparently the regexp there is
> defined as
>         $regexp = '([\\d\\.]*)';
> so this is most probably the correct way do define it on the command line.
>
> Please tell me if it works: in surveyresults there are 6 entries, but I never
> heard any explicit confirmation, and I do not use the PID module.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

rudolfkoenig

                                                   

> define temp_thermostaat PID Slaapkamertemp:temperature:([\d\.]*)

the regexp is not necessary, if the TYPE is known in the PID.pm file


> 2011.10.06 08:31:11 1: configfile: temp_thermostaat: Unknown sensor
> device Slaapkamertemp specified

Are you sure that in the config file the PID definition comes _AFTER_ the
sensor definition?

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

Guest

Originally posted by: <email address deleted>

Rudolf,

I think that was the issue I got these values, and look ok??

fhem> l temp_thermostaat
Internals:
   DEF        Slaapkamertemp:temperature:([\d\.]*) thermostaat
   NAME       temp_thermostaat
   NR         34
   STATE      initialized
   TYPE       PID
   actor      thermostaat
   command    valve
   dFactor    5.88235294117647
   iFactor    3.05882352941176
   pFactor    25.4901960784314
   reading    temperature
   regexp     ([\d\.]*)
   satMax     100
   satMin     0
   sensor     Slaapkamertemp
   Readings:
     2011-10-06 16:38:09   actuation       0
     2011-10-06 16:38:09   delta           0
     2011-10-06 16:38:09   integrator      0
Attributes:

fhem> set temp_thermostaat desired 20

fhem> l temp_thermostaat
Internals:
   DEF        Slaapkamertemp:temperature:([\d\.]*) thermostaat
   NAME       temp_thermostaat
   NR         34
   STATE      20.4 (delta -0.399999999999999)
   TYPE       PID
   actor      thermostaat
   command    valve
   dFactor    5.88235294117647
   iFactor    3.05882352941176
   pFactor    25.4901960784314
   reading    temperature
   regexp     ([\d\.]*)
   satMax     100
   satMin     0
   sensor     Slaapkamertemp
   Readings:
     2011-10-06 16:40:32   actuation       0
     2011-10-06 16:40:32   delta           -0.399999999999999
     2011-10-06 16:40:32   desired         20
     2011-10-06 16:40:32   integrator      0
Attributes:


fhem> l thermostaat
Internals:
   DEF        4931
   IODev      CUL
   NAME       thermostaat
   NR         3
   STATE      0 %
   TYPE       FHT8V
   addr       4931
   idx        03
Attributes:

fhem>

fhem> set temp_thermostaat desired 21


fhem> l thermostaat
Internals:
   DEF        4931
   IODev      CUL
   NAME       thermostaat
   NR         3
   STATE      23 %
   TYPE       FHT8V
   addr       4931
   idx        03
Attributes:

fhem>



On Oct 6, 11:47 am, Rudolf Koenig wrote:
> > define temp_thermostaat PID Slaapkamertemp:temperature:([\d\.]*)
>
> the regexp is not necessary, if the TYPE is known in the PID.pm file
>
> > 2011.10.06 08:31:11 1: configfile: temp_thermostaat: Unknown sensor
> > device Slaapkamertemp specified
>
> Are you sure that in the config file the PID definition comes _AFTER_ the
> sensor definition?

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com