diff --git a/FHEM/73_HailoLibero.pm b/FHEM/73_HailoLibero.pm
index 5130dd3..11d628c 100644
--- a/FHEM/73_HailoLibero.pm
+++ b/FHEM/73_HailoLibero.pm
@@ -89,41 +89,41 @@ sub Initialize {
HailoLibero
-
- Prerequisite
-
- - coming soon
-
-
Define
define <name> HailoLibero
- Beispiel:
+ Example:
define Hailo_Libero HailoLibero
-
-
- foo bar smaple tett
+
Readings
- - foo - bar
+ - led_brightness
-
+
- eject_delay
+ - eject_power
+ - detection_area
+ - detection_sensitivity
set
-
- - foo - bar
+
+ - led_brightness - LED brightness | 1-10 default: 6
+ - eject_delay - delay until eject | 0-5 seconds default: 0s
+ - eject_power - power value of eject | 1-10 default: 5
+ - detection_area - distance to eject | 31-100 mm default: 50mm
+ - detection_sensitivity - sensor sensitifity | 1-50 default: 1
Attributes
- - foo - barr2
+ - LiberoIP - IP e.g. 192.168.1.200
@@ -132,11 +132,6 @@ sub Initialize {
HailoLibero
-
- Voraussetzungen
-
- - muss ich noch gucken
-
Define
@@ -146,23 +141,34 @@ sub Initialize {
Beispiel:
define Hailo_Libero HailoLibero
-
-
- Sample foo bar text
+
Readings
-
- - foo - bar
+
+ - led_brightness
-
+
- eject_delay
+ - eject_power
+ - detection_area
+ - detection_sensitivity
set
- - foo - foo bar
+ - led_brightness - LED Helligkeit | 1-10 default: 6
+ - eject_power - Auswurfstärke | 1-10 default: 5
+ - detection_area - Erkennugsbereich | 31-100 mm default: 50mm
+ - detection_sensitivity - Sensor Empfindlichkeit | 1-50 default: 1
+ - eject_delay - Auswurf-Wartezeit| 0-5 seconds default: 0s
+
+
+
+ Attributes
+
+ - LiberoIP - IP e.g. 192.168.1.200
-
diff --git a/controls_HailoLibero.txt b/controls_HailoLibero.txt
index d01c8af..5ce975f 100644
--- a/controls_HailoLibero.txt
+++ b/controls_HailoLibero.txt
@@ -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
diff --git a/lib/FHEM/Hailo/Libero.pm b/lib/FHEM/Hailo/Libero.pm
index 075aac3..68d4b33 100644
--- a/lib/FHEM/Hailo/Libero.pm
+++ b/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)