1wire generalized PHP script
<?php
$ow="/mnt/1wire";
print "<table border=\"1\" padding=\"4\" >\n";
print "<tr><th>Full Path</th><th>Device</th><th>File</th><th>File Contents</th></tr>\n";
if ($owhdl = opendir($ow)) {
while (false !== ($a = readdir($owhdl))) {
$aArray = explode('.',$a);
if ( (count($aArray) == 2) && (strlen($aArray[0]) == 2 )) {
if ($owahdl = opendir($ow."/".$a)) {
while (false !== ($b = readdir($owahdl))) {
$c=$ow."/".$a."/".$b;
if (file_exists($c)) {
$contents = fopen($c, "r");
$parameter=array_pop(explode("/",$c));
$fc=fgets($contents);
print "\n<tr><td>".$ow."/</td>\n<td>".$a."</td>";
print "\n<td>".$parameter."</td>\n<td>\n";
$parameter=="type" ? print "<a target=\"_blank\" href=\"http://www.owfs.org/uploads/".$fc.".html\">".$fc."</a>" : print $fc;
print "\n</td></tr>\n";
fclose($contents);
}
}
closedir($owahdl);
}
}
}
closedir($owhdl);
}
print "\n</table>\n";
print "<br />";
highlight_file($docRoot."/inc/index.txt");
?>
Full Path | Device | File | File Contents |
/mnt/1wire/ |
10.AF2551010800 |
address |
10AF255101080023
|
/mnt/1wire/ |
10.AF2551010800 |
alias |
|
/mnt/1wire/ |
10.AF2551010800 |
crc8 |
23
|
/mnt/1wire/ |
10.AF2551010800 |
errata |
|
/mnt/1wire/ |
10.AF2551010800 |
family |
10
|
/mnt/1wire/ |
10.AF2551010800 |
id |
AF2551010800
|
/mnt/1wire/ |
10.AF2551010800 |
locator |
FFFFFFFFFFFFFFFF
|
/mnt/1wire/ |
10.AF2551010800 |
power |
0
|
/mnt/1wire/ |
10.AF2551010800 |
present |
1
|
/mnt/1wire/ |
10.AF2551010800 |
r_address |
230008015125AF10
|
/mnt/1wire/ |
10.AF2551010800 |
r_id |
0008015125AF
|
/mnt/1wire/ |
10.AF2551010800 |
r_locator |
FFFFFFFFFFFFFFFF
|
/mnt/1wire/ |
10.AF2551010800 |
temperature |
39.9875
|
/mnt/1wire/ |
10.AF2551010800 |
temphigh |
167
|
/mnt/1wire/ |
10.AF2551010800 |
templow |
158
|
/mnt/1wire/ |
10.AF2551010800 |
type |
DS18S20
|
/mnt/1wire/ |
10.AF2551010800 |
. |
|
/mnt/1wire/ |
10.AF2551010800 |
.. |
|
/mnt/1wire/ |
22.20F21A000000 |
address |
2220F21A00000025
|
/mnt/1wire/ |
22.20F21A000000 |
alias |
|
/mnt/1wire/ |
22.20F21A000000 |
crc8 |
25
|
/mnt/1wire/ |
22.20F21A000000 |
errata |
|
/mnt/1wire/ |
22.20F21A000000 |
family |
22
|
/mnt/1wire/ |
22.20F21A000000 |
fasttemp |
62.6
|
/mnt/1wire/ |
22.20F21A000000 |
id |
20F21A000000
|
/mnt/1wire/ |
22.20F21A000000 |
locator |
FFFFFFFFFFFFFFFF
|
/mnt/1wire/ |
22.20F21A000000 |
power |
1
|
/mnt/1wire/ |
22.20F21A000000 |
present |
1
|
/mnt/1wire/ |
22.20F21A000000 |
r_address |
250000001AF22022
|
/mnt/1wire/ |
22.20F21A000000 |
r_id |
0000001AF220
|
/mnt/1wire/ |
22.20F21A000000 |
r_locator |
FFFFFFFFFFFFFFFF
|
/mnt/1wire/ |
22.20F21A000000 |
temperature |
63.275
|
/mnt/1wire/ |
22.20F21A000000 |
temperature10 |
63.05
|
/mnt/1wire/ |
22.20F21A000000 |
temperature11 |
63.5
|
/mnt/1wire/ |
22.20F21A000000 |
temperature12 |
63.275
|
/mnt/1wire/ |
22.20F21A000000 |
temperature9 |
62.6
|
/mnt/1wire/ |
22.20F21A000000 |
temphigh |
167
|
/mnt/1wire/ |
22.20F21A000000 |
templow |
158
|
/mnt/1wire/ |
22.20F21A000000 |
type |
DS1822
|
/mnt/1wire/ |
22.20F21A000000 |
. |
|
/mnt/1wire/ |
22.20F21A000000 |
.. |
|
/mnt/1wire/ |
22.650E1B000000 |
address |
22650E1B000000B3
|
/mnt/1wire/ |
22.650E1B000000 |
alias |
|
/mnt/1wire/ |
22.650E1B000000 |
crc8 |
B3
|
/mnt/1wire/ |
22.650E1B000000 |
errata |
|
/mnt/1wire/ |
22.650E1B000000 |
family |
22
|
/mnt/1wire/ |
22.650E1B000000 |
fasttemp |
45.5
|
/mnt/1wire/ |
22.650E1B000000 |
id |
650E1B000000
|
/mnt/1wire/ |
22.650E1B000000 |
locator |
FFFFFFFFFFFFFFFF
|
/mnt/1wire/ |
22.650E1B000000 |
power |
1
|
/mnt/1wire/ |
22.650E1B000000 |
present |
1
|
/mnt/1wire/ |
22.650E1B000000 |
r_address |
B30000001B0E6522
|
/mnt/1wire/ |
22.650E1B000000 |
r_id |
0000001B0E65
|
/mnt/1wire/ |
22.650E1B000000 |
r_locator |
FFFFFFFFFFFFFFFF
|
/mnt/1wire/ |
22.650E1B000000 |
temperature |
45.3875
|
/mnt/1wire/ |
22.650E1B000000 |
temperature10 |
45.5
|
/mnt/1wire/ |
22.650E1B000000 |
temperature11 |
45.5
|
/mnt/1wire/ |
22.650E1B000000 |
temperature12 |
45.3875
|
/mnt/1wire/ |
22.650E1B000000 |
temperature9 |
45.5
|
/mnt/1wire/ |
22.650E1B000000 |
temphigh |
167
|
/mnt/1wire/ |
22.650E1B000000 |
templow |
158
|
/mnt/1wire/ |
22.650E1B000000 |
type |
DS1822
|
/mnt/1wire/ |
22.650E1B000000 |
. |
|
/mnt/1wire/ |
22.650E1B000000 |
.. |
|
/mnt/1wire/ |
29.A29F09000000 |
LCD_H |
|
/mnt/1wire/ |
29.A29F09000000 |
LCD_M |
|
/mnt/1wire/ |
29.A29F09000000 |
PIO.BYTE |
0
|
/mnt/1wire/ |
29.A29F09000000 |
PIO.ALL |
0,0,0,0,0,0,0,0
|
/mnt/1wire/ |
29.A29F09000000 |
PIO.0 |
0
|
/mnt/1wire/ |
29.A29F09000000 |
PIO.1 |
0
|
/mnt/1wire/ |
29.A29F09000000 |
PIO.2 |
0
|
/mnt/1wire/ |
29.A29F09000000 |
PIO.3 |
0
|
/mnt/1wire/ |
29.A29F09000000 |
PIO.4 |
0
|
/mnt/1wire/ |
29.A29F09000000 |
PIO.5 |
0
|
/mnt/1wire/ |
29.A29F09000000 |
PIO.6 |
0
|
/mnt/1wire/ |
29.A29F09000000 |
PIO.7 |
0
|
/mnt/1wire/ |
29.A29F09000000 |
address |
29A29F090000005A
|
/mnt/1wire/ |
29.A29F09000000 |
alias |
|
/mnt/1wire/ |
29.A29F09000000 |
crc8 |
5A
|
/mnt/1wire/ |
29.A29F09000000 |
family |
29
|
/mnt/1wire/ |
29.A29F09000000 |
id |
A29F09000000
|
/mnt/1wire/ |
29.A29F09000000 |
latch.BYTE |
255
|
/mnt/1wire/ |
29.A29F09000000 |
latch.ALL |
1,1,1,1,1,1,1,1
|
/mnt/1wire/ |
29.A29F09000000 |
latch.0 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
latch.1 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
latch.2 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
latch.3 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
latch.4 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
latch.5 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
latch.6 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
latch.7 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
locator |
FFFFFFFFFFFFFFFF
|
/mnt/1wire/ |
29.A29F09000000 |
por |
1
|
/mnt/1wire/ |
29.A29F09000000 |
power |
1
|
/mnt/1wire/ |
29.A29F09000000 |
present |
1
|
/mnt/1wire/ |
29.A29F09000000 |
r_address |
5A000000099FA229
|
/mnt/1wire/ |
29.A29F09000000 |
r_id |
000000099FA2
|
/mnt/1wire/ |
29.A29F09000000 |
r_locator |
FFFFFFFFFFFFFFFF
|
/mnt/1wire/ |
29.A29F09000000 |
sensed.BYTE |
255
|
/mnt/1wire/ |
29.A29F09000000 |
sensed.ALL |
1,1,1,1,1,1,1,1
|
/mnt/1wire/ |
29.A29F09000000 |
sensed.0 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
sensed.1 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
sensed.2 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
sensed.3 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
sensed.4 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
sensed.5 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
sensed.6 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
sensed.7 |
1
|
/mnt/1wire/ |
29.A29F09000000 |
set_alarm |
0
|
/mnt/1wire/ |
29.A29F09000000 |
strobe |
0
|
/mnt/1wire/ |
29.A29F09000000 |
type |
DS2408
|
/mnt/1wire/ |
29.A29F09000000 |
. |
|
/mnt/1wire/ |
29.A29F09000000 |
.. |
|
No comments:
Post a Comment