Chacon ring in 46_TRX_LIGHT.pm

Begonnen von oliv06, 23 September 2013, 14:00:42

Vorheriges Thema - Nächstes Thema

oliv06

Hello Willi,
I have a Chacon ring which works fine with your module, but I had to change a bit the code :
Zitat# $Id: 46_TRX_LIGHT.pm 3918 2013-09-16 20:14:27Z wherzig $

diff 46_TRX_LIGHT.pm 46_TRX_LIGHT.pm.bak
219d218
<        lc($hash->{TRX_LIGHT_devicelog}) eq "ring" ||
618,619d616
<   } elsif (lc($def->{TRX_LIGHT_devicelog}) eq "ring") {
<         $command = ($command eq "on") ? "normal" : "alert" ;
so there is an event "alert" when someone rings.
There is no "normal" event
Could you add this in the code or do you need more information ?
Olivier

Willi

Sound good. To be 100% sure. Could you do a

  diff --up oldfile newfile

so I can use patch to generate the new file?

-- Willi
FHEM@Q600(debian) mit DS9490R (1Wire) | FHEM@Sheevaplug(debian) mit RFXCOM-Receiver(80002), CULv3 & USB-WDE1 | FHEM@odroid mit CULv2 & RFXtrx433

oliv06

Zitat von: Willi schrieb am Do, 26 September 2013 14:08Sound good. To be 100% sure. Could you do a

  diff --up oldfile newfile

so I can use patch to generate the new file?

-- Willi
Here it is :

Zitat--- 46_TRX_LIGHT.pm   2013-09-26 19:47:31.000000000 +0200
+++ 46_TRX_LIGHT.pm.patched   2013-09-26 19:45:39.000000000 +0200
@@ -216,6 +216,7 @@ TRX_LIGHT_Set($@)
 
   if (   lc($hash->{TRX_LIGHT_devicelog}) eq "window" || lc($hash->{TRX_LIGHT_devicelog}) eq "door" ||
       lc($hash->{TRX_LIGHT_devicelog}) eq "motion" ||
+      lc($hash->{TRX_LIGHT_devicelog}) eq "ring" ||
    lc($hash->{TRX_LIGHT_devicelog}) eq "lightsensor" || lc($hash->{TRX_LIGHT_devicelog}) eq "photosensor" ||
    lc($hash->{TRX_LIGHT_devicelog}) eq "lock"
       ) {
@@ -614,6 +615,8 @@ sub TRX_LIGHT_parse_X10 ($$)
       $command = ($command eq "on") ? "Open" : "Closed" ;
   } elsif (lc($def->{TRX_LIGHT_devicelog}) eq "motion") {
       $command = ($command eq "on") ? "alert" : "normal" ;
+  } elsif (lc($def->{TRX_LIGHT_devicelog}) eq "ring") {
+      $command = ($command eq "on") ? "normal" : "alert" ;
   } elsif (lc($def->{TRX_LIGHT_devicelog}) eq "lightsensor" || lc($def->{TRX_LIGHT_devicelog}) eq "photosensor") {
       $command = ($command eq "on") ? "dark" : "bright" ;
   } elsif (lc($def->{TRX_LIGHT_devicelog}) eq "lock") {

Willi

Added to SVN. Should be there via update tomorrow.

-- Willi
FHEM@Q600(debian) mit DS9490R (1Wire) | FHEM@Sheevaplug(debian) mit RFXCOM-Receiver(80002), CULv3 & USB-WDE1 | FHEM@odroid mit CULv2 & RFXtrx433

oliv06

Zitat von: Willi schrieb am Do, 03 Oktober 2013 18:25Added to SVN. Should be there via update tomorrow.

-- Willi
Thanks