PID20 how to use the right value

Begonnen von kroonen, 18 August 2015, 20:56:29

Vorheriges Thema - Nächstes Thema

kroonen

Hi,

I want to use my esp8266 for my pid20.

I only use one reading that looks like this

state    T: 20.5 H: 60     2015-08-18 20:46:46

Now I used it before with oregon, and there was a value of temperature with only the temperature

define thermostaat_slaapkamer PID20 Slaapkamertemp:temperature thermostaat_slaap:valve

Can i define it right to get only the temp? something like this?

define thermostaat_slaapkamer PID20 Slaapkamertemp:state.T: thermostaat_slaap:valve

regards Richard



frank

hi kroonen,

you can make a new reading temperature with the attribute userReadings
attr Slaapkamertemp userReadings temperature {my (undef,$temp,undef,undef)=split(' ',ReadingsVal($name,"state",0));return $temp}
and take this to your old definition of pid20.
FHEM: 6.0(SVN) => Pi3(buster)
IO: CUL433|CUL868|HMLAN|HMUSB2|HMUART
CUL_HM: CC-TC|CC-VD|SEC-SD|SEC-SC|SEC-RHS|Sw1PBU-FM|Sw1-FM|Dim1TPBU-FM|Dim1T-FM|ES-PMSw1-Pl
IT: ITZ500|ITT1500|ITR1500|GRR3500
WebUI [HMdeviceTools.js (hm.js)]: https://forum.fhem.de/index.php/topic,106959.0.html

kroonen

Hi,

Thanx for the reply. I only cut and paste this

attr Slaapkamertemp userReadings temperature {my (undef,$temp,undef,undef)=split(' ',ReadingsVal($name,"state",0));return $temp}

configfile: Unknown command return, try help

is there a additional perl package for required?

regards Richard


frank

Zitatconfigfile: Unknown command return, try help
i have tried the code with my fhem on my router fritzbox with a minimal perl lib.

i think you directly copy the code in your fhem.cfg. that is the wrong way. you should try the attribute-edit-section in the details window. 
FHEM: 6.0(SVN) => Pi3(buster)
IO: CUL433|CUL868|HMLAN|HMUSB2|HMUART
CUL_HM: CC-TC|CC-VD|SEC-SD|SEC-SC|SEC-RHS|Sw1PBU-FM|Sw1-FM|Dim1TPBU-FM|Dim1T-FM|ES-PMSw1-Pl
IT: ITZ500|ITT1500|ITR1500|GRR3500
WebUI [HMdeviceTools.js (hm.js)]: https://forum.fhem.de/index.php/topic,106959.0.html

kroonen

Well after putting it in the web config it went ok.

Thnx for the solution

regards Richard