mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
11_OWDevice: new attribute cstrings, fix for trimvalues; 10_OWServer: fixed HTML tag in commandref
git-svn-id: https://svn.fhem.de/fhem/trunk@13114 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b9959ef60c
commit
f170b3d765
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: 11_OWDevice: new attribute cstrings, fix for trimvalues
|
||||||
- new: 98_powerMap: introducing new module to calculate power and
|
- new: 98_powerMap: introducing new module to calculate power and
|
||||||
energy for every FHEM device w/o power meter
|
energy for every FHEM device w/o power meter
|
||||||
- updated: 38_netatmo.pm: added support for Presence, Homecoach & Webhook
|
- updated: 38_netatmo.pm: added support for Presence, Homecoach & Webhook
|
||||||
|
@ -661,7 +661,7 @@ OWServer_Set($@)
|
|||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
|
|
||||||
<a name="OWDeviceattr"></a>
|
<a name="OWServerattr"></a>
|
||||||
<b>Attributes</b>
|
<b>Attributes</b>
|
||||||
<ul>
|
<ul>
|
||||||
<li>nonblocking<br>
|
<li>nonblocking<br>
|
||||||
@ -804,7 +804,7 @@ OWServer_Set($@)
|
|||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
<a name="OWDeviceattr"></a>
|
<a name="OWServerattr"></a>
|
||||||
<b>Attribute</b>
|
<b>Attribute</b>
|
||||||
<ul>
|
<ul>
|
||||||
<li>nonblocking<br>
|
<li>nonblocking<br>
|
||||||
|
@ -374,7 +374,7 @@ OWDevice_Initialize($)
|
|||||||
$hash->{UndefFn} = "OWDevice_Undef";
|
$hash->{UndefFn} = "OWDevice_Undef";
|
||||||
$hash->{AttrFn} = "OWDevice_Attr";
|
$hash->{AttrFn} = "OWDevice_Attr";
|
||||||
|
|
||||||
$hash->{AttrList} = "IODev uncached trimvalues polls interfaces model ".
|
$hash->{AttrList} = "IODev uncached trimvalues polls interfaces model cstrings ".
|
||||||
"resolution:9,10,11,12 ".
|
"resolution:9,10,11,12 ".
|
||||||
$readingFnAttributes;
|
$readingFnAttributes;
|
||||||
}
|
}
|
||||||
@ -465,7 +465,8 @@ OWDevice_ReadValue($$) {
|
|||||||
#Debug "$path => $value; $msec";
|
#Debug "$path => $value; $msec";
|
||||||
if($interface ne "id") {
|
if($interface ne "id") {
|
||||||
if(defined($value)) {
|
if(defined($value)) {
|
||||||
$value= trim($value) if(AttrVal($hash,"trimvalues",1));
|
$value=~ s/\0.*$//g if(AttrVal($hash->{NAME},"cstrings",0));
|
||||||
|
$value= trim($value) if(AttrVal($hash->{NAME},"trimvalues",1));
|
||||||
} else {
|
} else {
|
||||||
Log3 $hash, 3, $hash->{NAME} . ": reading $reading did not return a value";
|
Log3 $hash, 3, $hash->{NAME} . ": reading $reading did not return a value";
|
||||||
}
|
}
|
||||||
@ -886,6 +887,7 @@ OWDevice_InitValues($)
|
|||||||
belong to it, then continue with the next OWServer and the attached OWDevices, and so on.
|
belong to it, then continue with the next OWServer and the attached OWDevices, and so on.
|
||||||
</li>
|
</li>
|
||||||
<li>trimvalues: removes leading and trailing whitespace from readings. Default is 1 (on).</li>
|
<li>trimvalues: removes leading and trailing whitespace from readings. Default is 1 (on).</li>
|
||||||
|
<li>cstrings: interprets reading as C-style string, i.e. stops reading on the first zero byte. Default is 0 (off).</li>
|
||||||
<li>polls: a comma-separated list of readings to poll. This supersedes the list of default readings to poll.</li>
|
<li>polls: a comma-separated list of readings to poll. This supersedes the list of default readings to poll.</li>
|
||||||
<li>interfaces: supersedes the interfaces exposed by that device.</li>
|
<li>interfaces: supersedes the interfaces exposed by that device.</li>
|
||||||
<li>model: preset with device type, e.g. DS18S20.</li>
|
<li>model: preset with device type, e.g. DS18S20.</li>
|
||||||
@ -1044,6 +1046,7 @@ OWDevice_InitValues($)
|
|||||||
nächste OWServer-Instanz, gefolgt von den zugehörigen OWDevice-Geräten, usw.
|
nächste OWServer-Instanz, gefolgt von den zugehörigen OWDevice-Geräten, usw.
|
||||||
</li>
|
</li>
|
||||||
<li>trimvalues: Entfernt voran- und nachgestellte Leerzeichen aus den readings. Standartwert ist 1 (ein).</li>
|
<li>trimvalues: Entfernt voran- und nachgestellte Leerzeichen aus den readings. Standartwert ist 1 (ein).</li>
|
||||||
|
<li>cstrings: Interpretiert die readings als C-String, d.h. hört mit dem ersten 0-Byte zu lesen auf. Standardwert ist 0 (off).</li>
|
||||||
<li>polls: Eine per Komma getrennte Liste der abzurufenden readings. Mit diesem Attribut unterdrückt man alle standartmäßig abgerufenen readings und ersetzt sie durch die eigene Zusammenstellung.</li>
|
<li>polls: Eine per Komma getrennte Liste der abzurufenden readings. Mit diesem Attribut unterdrückt man alle standartmäßig abgerufenen readings und ersetzt sie durch die eigene Zusammenstellung.</li>
|
||||||
<li>interfaces: Ersetzt die durch dieses Gerät erzeugten Interfaces.</li>
|
<li>interfaces: Ersetzt die durch dieses Gerät erzeugten Interfaces.</li>
|
||||||
<li>model: Angabe des Gerätetyps, z.B.: DS18S20.</li>
|
<li>model: Angabe des Gerätetyps, z.B.: DS18S20.</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user