mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 09:55:38 +00:00
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
This commit is contained in:
parent
683321ce46
commit
388e6c3210
@ -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 <a href="https://wiki.fhem.de/wiki/RPI_1Wire">Wiki<
|
||||
<li><b>set pioa on|off <duration></b><br>
|
||||
<a id="RPI_1Wire-set-pioa"></a>
|
||||
Sets the pioa of a 2 port switch to on or off.<br>
|
||||
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"
|
||||
</li>
|
||||
<li><b>set piob on|off <duration></b><br>
|
||||
<a id="RPI_1Wire-set-piob"></a>
|
||||
Sets the piob of a 2 port switch to on or off.<br>
|
||||
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"
|
||||
</li>
|
||||
<li><b>set pio(0-7) on|off <duration></b><br>
|
||||
<a id="RPI_1Wire-set-pio0"></a>
|
||||
Sets the according pio of a 8 port switch (0-7) to on or off.<br>
|
||||
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"
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user