From 388e6c3210c1b8809ac3c8c2daaead98aee809bc Mon Sep 17 00:00:00 2001 From: Adimarantis <> Date: Tue, 28 Nov 2023 13:49:01 +0000 Subject: [PATCH] 50_RPI_1Wire: extend and fix udev detection for switches git-svn-id: https://svn.fhem.de/fhem/trunk@28217 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/58_RPI_1Wire.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fhem/FHEM/58_RPI_1Wire.pm b/fhem/FHEM/58_RPI_1Wire.pm index 00daa68b7..ccb955514 100755 --- a/fhem/FHEM/58_RPI_1Wire.pm +++ b/fhem/FHEM/58_RPI_1Wire.pm @@ -144,8 +144,9 @@ sub RPI_1Wire_Init { # $hash->{helper}{write}.="resolution "; } } - if ($type eq "switch") { + if ($type =~ /switch/) { if (-e "$w1_path/$arg/output" && !-w "$w1_path/$arg/output") { + #if (-e "/opt/fhem/output" && !-w "/opt/fhem/output") { $hash->{helper}{write}.="output "; } } @@ -452,7 +453,7 @@ sub RPI_1Wire_Get { $script .= "chown -R root:gpio /sys/devices/w1*;\\\n"; $script .= "chmod g+w /sys/devices/w1_bus_master*/therm_bulk_read;\\\n"; $script .= "chmod g+w /sys/devices/w1_bus_master*/*/resolution;\\\n"; - $script .= "chmod g+w /sys/devices/w1_bus_master*/*/conv_time;\\ \'\"\n"; + $script .= "chmod g+w /sys/devices/w1_bus_master*/*/conv_time;\\\n"; $script .= "chmod g+w /sys/devices/w1_bus_master*/*/output;\\ \'\"\n"; return $ret.$script; @@ -803,17 +804,17 @@ For German documentation see Wiki<
  • set pioa on|off <duration>
    Sets the pioa of a 2 port switch to on or off.
    - The optional duration switches the pio back after a given number of seconds. The alternative options "on-for-timer" and "off-for-timer" work identically and are only provided to find this functionality more easily. + The optional duration switches the pio back after a given number of seconds when using "on-for-timer" or "off-for-timer"
  • set piob on|off <duration>
    Sets the piob of a 2 port switch to on or off.
    - The optional duration switches the pio back after a given number of seconds. The alternative options "on-for-timer" and "off-for-timer" work identically and are only provided to find this functionality more easily. + The optional duration switches the pio back after a given number of seconds when using "on-for-timer" or "off-for-timer"
  • set pio(0-7) on|off <duration>
    Sets the according pio of a 8 port switch (0-7) to on or off.
    - The optional duration switches the pio back after a given number of seconds. The alternative options "on-for-timer" and "off-for-timer" work identically and are only provided to find this functionality more easily. + The optional duration switches the pio back after a given number of seconds when using "on-for-timer" or "off-for-timer"