cmd ref + fix
This commit is contained in:
parent
940c0d43af
commit
bf06602084
@ -89,41 +89,41 @@ sub Initialize {
|
||||
|
||||
<a name="HailoLibero"></a>
|
||||
<h3>HailoLibero</h3>
|
||||
<ul>
|
||||
<u><b>Prerequisite</b></u>
|
||||
<br><br>
|
||||
<li>coming soon</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a name="HailoLiberodefine"></a>
|
||||
<b>Define</b>
|
||||
<ul><br>
|
||||
<code>define <name> HailoLibero</code>
|
||||
<br><br>
|
||||
Beispiel:
|
||||
Example:
|
||||
<ul><br>
|
||||
<code>define Hailo_Libero HailoLibero</code><br>
|
||||
</ul>
|
||||
<br>
|
||||
foo bar smaple tett
|
||||
</ul>
|
||||
<br><br>
|
||||
<a name="HailoLiberoreadings"></a>
|
||||
<br><br>
|
||||
<b>Readings</b>
|
||||
<ul>
|
||||
<li>foo - bar</li>
|
||||
<li>led_brightness<li>
|
||||
<li>eject_delay</li>
|
||||
<li>eject_power</li>
|
||||
<li>detection_area</li>
|
||||
<li>detection_sensitivity</li>
|
||||
</ul>
|
||||
<br><br>
|
||||
<a name="HailoLiberoeset"></a>
|
||||
<b>set</b>
|
||||
<ul>
|
||||
<li>foo - bar</li>
|
||||
<ul>
|
||||
<li>led_brightness - LED brightness | 1-10 default: 6</li>
|
||||
<li>eject_delay - delay until eject | 0-5 seconds default: 0s</li>
|
||||
<li>eject_power - power value of eject | 1-10 default: 5</li>
|
||||
<li>detection_area - distance to eject | 31-100 mm default: 50mm</li>
|
||||
<li>detection_sensitivity - sensor sensitifity | 1-50 default: 1</li>
|
||||
</ul>
|
||||
<br><br>
|
||||
<a name="HailoLiberoeattributes"></a>
|
||||
<b>Attributes</b>
|
||||
<ul>
|
||||
<li>foo - barr2</li>
|
||||
<li>LiberoIP - IP e.g. 192.168.1.200</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
@ -132,11 +132,6 @@ sub Initialize {
|
||||
|
||||
<a name="HailoLibero"></a>
|
||||
<h3>HailoLibero</h3>
|
||||
<ul>
|
||||
<u><b>Voraussetzungen</b></u>
|
||||
<br><br>
|
||||
<li>muss ich noch gucken</li>
|
||||
</ul>
|
||||
<br>
|
||||
<a name="HailoLiberodefine"></a>
|
||||
<b>Define</b>
|
||||
@ -146,23 +141,34 @@ sub Initialize {
|
||||
Beispiel:
|
||||
<ul><br>
|
||||
<code>define Hailo_Libero HailoLibero</code><br>
|
||||
</ul>
|
||||
<br>
|
||||
Sample foo bar text
|
||||
</ul>
|
||||
<br><br>
|
||||
<a name="HailoLiberoreadings"></a>
|
||||
<br><br>
|
||||
<b>Readings</b>
|
||||
<ul>
|
||||
<li>foo - bar</li>
|
||||
<ul>
|
||||
<li>led_brightness<li>
|
||||
<li>eject_delay</li>
|
||||
<li>eject_power</li>
|
||||
<li>detection_area</li>
|
||||
<li>detection_sensitivity</li>
|
||||
</ul>
|
||||
<br><br>
|
||||
<a name="HailoLiberoset"></a>
|
||||
<b>set</b>
|
||||
<ul>
|
||||
<li>foo - foo bar</li>
|
||||
<li>led_brightness - LED Helligkeit | 1-10 default: 6</li>
|
||||
<li>eject_power - Auswurfstärke | 1-10 default: 5</li>
|
||||
<li>detection_area - Erkennugsbereich | 31-100 mm default: 50mm</li>
|
||||
<li>detection_sensitivity - Sensor Empfindlichkeit | 1-50 default: 1</li>
|
||||
<li>eject_delay - Auswurf-Wartezeit| 0-5 seconds default: 0s</li>
|
||||
</ul>
|
||||
<br><br>
|
||||
<a name="HailoLiberoeattributes"></a>
|
||||
<b>Attributes</b>
|
||||
<ul>
|
||||
<li>LiberoIP - IP e.g. 192.168.1.200</li>
|
||||
</ul>
|
||||
<br><br>
|
||||
|
||||
</ul>
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
UPD 2021-05-25_20:13:57 4394 FHEM/73_HailoLibero.pm
|
||||
UPD 2021-05-29_21:43:21 11674 lib/FHEM/Hailo/Libero.pm
|
||||
UPD 2021-05-29_22:04:49 5190 FHEM/73_HailoLibero.pm
|
||||
UPD 2021-05-29_22:04:50 11623 lib/FHEM/Hailo/Libero.pm
|
||||
|
@ -201,10 +201,7 @@ sub Set {
|
||||
|
||||
my $name = shift @$aArg // return;
|
||||
my $cmd = shift @$aArg // return qq{"set $name" needs at least one argument};
|
||||
|
||||
# Das Argument für das Passwort, also das Passwort an sich darf keine = enthalten!!!
|
||||
|
||||
|
||||
|
||||
if ( lc $cmd eq 'password' ) {
|
||||
|
||||
my ($passResp,$passErr);
|
||||
@ -221,18 +218,18 @@ sub Set {
|
||||
elsif ( lc $cmd =~ /open|led_brightness|eject_power|eject_delay|detection_area|detection_sensitivity/ ) {
|
||||
return "please set Attribut LiberoIP first"
|
||||
if ( AttrVal( $name, 'LiberoIP', 'none' ) eq 'none' );
|
||||
Log3 $name, 1, "Poste an die Libero";
|
||||
|
||||
getCookie($hash)
|
||||
if (ReadingsVal( $name, 'cookie', 'none' ) eq 'none');
|
||||
|
||||
# cmd = setter, $aArg->[0] = value
|
||||
if (lc $cmd ne 'open') {
|
||||
$payload = 'led=' if (lc $cmd eq 'led_brightness');
|
||||
$payload = 'pwr=' if (lc $cmd eq 'eject_power');
|
||||
$payload = 'dist=' if (lc $cmd eq 'detection_area');
|
||||
$payload = 'delay=' if (lc $cmd eq 'detection_sensitivity');
|
||||
$payload = 'pdelay=' if (lc $cmd eq 'eject_delay');
|
||||
my $payload = '';
|
||||
$payload = 'led='.$aArg->[0] if (lc $cmd eq 'led_brightness');
|
||||
$payload = 'pwr='.$aArg->[0] if (lc $cmd eq 'eject_power');
|
||||
$payload = 'dist='.$aArg->[0] if (lc $cmd eq 'detection_area');
|
||||
$payload = 'delay='.$aArg->[0] if (lc $cmd eq 'detection_sensitivity');
|
||||
$payload = 'pdelay='.$aArg->[0] if (lc $cmd eq 'eject_delay');
|
||||
|
||||
write($hash, $payload)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user