2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-02 13:05:12 +00:00

HTML check (with Safari Web Inspactor)

git-svn-id: https://svn.fhem.de/fhem/trunk@754 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2010-11-07 11:39:49 +00:00
parent d7eb06a37f
commit c718b542b4
8 changed files with 70 additions and 61 deletions

View File

@ -8,6 +8,7 @@
- feature: decode CUL uptime
- feature: USB doc changes, FHZ initFS20_02/stopHMS parameters by Andreas.
- feature: CUL_HM (experimental) for HomeMatic devices.
- bugfix: HTML-Syntax check of the pgm2 output and documents (*.html)
- feature: added date alias for FHT80b (Boris)
- 2010-08-15 (5.0)

View File

@ -48,7 +48,7 @@
Skip this section if you installed fhem via the Debian package.<br><br>
First install the Device::SerialPort (or Win32::SerialPort) perl module
with the command <code>"sudo cpan Device::SerialPort"</code></br>
with the command <code>"sudo cpan Device::SerialPort"</code><br>
The default configuration will install fhem into /usr/bin,
/usr/share/fhem and /var/log/fhem and /etc/fhem.cfg. Edit the Makefile to
change this.
@ -94,7 +94,7 @@
<br><br>
<b>Note:</b> Don't forget to type "save" in the "Fhem cmd" input field of
the browser after defining a device or setting its attribute. Otherwise
the changes will disappear after the next start.</br><br> </ul>
the changes will disappear after the next start.<br><br> </ul>
<a name="autocreate"></a>
<h3>Automatically creating transmitters</h3>
@ -136,7 +136,6 @@
<a href="commandref.html#model">Here</a> is a complete list of FS20
models.<br> For other device-types similar messages should appear.
</ul>
</ul>
<a name="FS20rx"></a>
<h3>Configuring FS20 receivers</h3>
@ -370,5 +369,5 @@
</ul>
</div>
<body>
</body>
</html>

View File

@ -1952,17 +1952,18 @@ A line ending with \ will be concatenated with the next one, so long lines
commands.
</li><br>
<li>fhtbuf<br>
CUL has a message buffer for the FHT. If the buffer is full, then newly
issued commands will be dropped, if the attribute <a
href="#culfhtsoftbuffer">fhtsoftbuffer</a> is not set. Instead, a "EOB" message is issued.
<code>fhtbuf</code> returns the free memory in this buffer (in hex),
an empty buffer in the CUL is 40 (64 bytes).
A message occupies 3 + 2x(number of FHT commands) bytes,
this is the second reason why sending multiple FHT commands with one
<a href="#set">set</a> is a good idea. The first reason is, that
these FHT commands are sent at once to the FHT.
</li>
</li><br>
CUL has a message buffer for the FHT. If the buffer is full, then newly
issued commands will be dropped, if the attribute <a
href="#culfhtsoftbuffer">fhtsoftbuffer</a> is not set.
Instead, a "EOB" message is issued.
<code>fhtbuf</code> returns the free memory in this buffer (in hex),
an empty buffer in the CUL-V2 is 74 bytes, in CUL-V3/CUN 200 Bytes.
A message occupies 3 + 2x(number of FHT commands) bytes,
this is the second reason why sending multiple FHT commands with one
<a href="#set">set</a> is a good idea. The first reason is, that
these FHT commands are sent at once to the FHT.
</li> <br>
<li>ccconf<br>
Read some CUL radio-chip (cc1101) registers (frequency, bandwidth, etc),
and display them in human readable form.
@ -2278,7 +2279,6 @@ A line ending with \ will be concatenated with the next one, so long lines
The rest of the attributes is the same as for the <a href="#CUL">CUL</a>.</ul><br>
</ul>
<br>
</ul>
<a name="EM"></a>
@ -2651,7 +2651,6 @@ A line ending with \ will be concatenated with the next one, so long lines
</ul>
<br>
</ul>
<a name="KS300"></a>
<h3>KS300</h3>
@ -4935,7 +4934,7 @@ Terminating
site on the iPhone in Safari, try to add it to the home-screen.
</li><br>
</li></ul>
</ul>
</ul>
@ -5299,7 +5298,7 @@ Terminating
href="#trigger">trigger</a> command to execute the macro.
E.g.<br>
<code>fhem> define MyMacro notify MyMacro { Log 1, "Hello"}</code><br>
<code>fhem> trigger MyMacro</pre></code><br>
<code>fhem> trigger MyMacro</code><br>
</ul>
@ -5855,10 +5854,10 @@ isday</pre>
in an interactive mode, meaning that the FHEM-Loop will be block as long as the graphics are rendered.
If you want to use multiprocessing, set the RENDERER and multiprocessing to on and the
weblink-graphics will be rendered in the background.
</li><br></li> </ul>
</ul>
</li><br>
</ul>
</ul>
</ul>
<a name="PachLog"></a>
@ -5941,22 +5940,23 @@ isday</pre>
<br><br>
Example:
<ul><br>
<code>dumpdef TEST</code><br><br>
<ul><code>CALLER => main: /opt/fhz/FHEM/01_FHEMWEB.pm LINE: 194 SUB: main::FW_AnswerCall<br>
SUB-NAME: main::Commanddumpdef<br>
DUMP-DEVICE: TEST <br>
$VAR1 = {<ul><code>
'IODev' => {},<br>
'NAME' => 'TEST',<br>
'NR' => 64,<br>
'STATE' => '???',<br>
'TYPE' => 'dummy'<br>
};</code></ul>
<code>DUMP-DEVICE-ATTR<br>
$VAR1 = {</code><ul><code>
'room' => 'DEF_DUMMY,GRP.TEST'<br>
};</ul></code>
</code></ul><br>
<pre>dumpdef TEST
CALLER => main: /opt/fhz/FHEM/01_FHEMWEB.pm LINE: 194 SUB: main::FW_AnswerCall
SUB-NAME: main::Commanddumpdef
DUMP-DEVICE: TEST
$VAR1 = {
'IODev' => {},
'NAME' => 'TEST',
'NR' => 64,
'STATE' => '???',
'TYPE' => 'dummy'
};
DUMP-DEVICE-ATTR
$VAR1 = {
'room' => 'DEF_DUMMY,GRP.TEST'
};
</pre>
</ul>
</ul>

View File

@ -184,7 +184,7 @@
<h4>3. I switched on a FS20 device directly (without the remote), but
the fhem.pl did not noticed it.<br>Is it a bug?</h4>
<ul>
The protocol used by the FS20 family is quite simple: it is </b>not</b>
The protocol used by the FS20 family is quite simple: it is <b>not</b>
encrypted in any way, and there is no feedback to the sender. So if you
push any buttons on a pure receiver, no radio waves will be sent out, and
the FHZ1000 won't notice anything. The FHZ1000PC does not even know if
@ -274,7 +274,7 @@ that 255 should be the default?</h4>
rain-cup is 13.9 cm, the area ca 151.75 cm<sup>2</sup>, which
is ca 1/65.9 m<sup>2</sup>.
The 0.5 liter corresponds to 32.95 liter per m<sup>2</sup>. 130 ticks
correspond to 32.95 l/m<sum>2</sup> -> 1 tick is ca 253 ml. I estimate
correspond to 32.95 l/m<sup>2</sup> -> 1 tick is ca 253 ml. I estimate
the error margin to +/- 2%<br>
You are welcome to do your own experiments, I am interested in the results.

View File

@ -68,7 +68,13 @@
fhem-=VERS=.deb</a>
<br>
See the <a href="CHANGED">CHANGED</a> file for current changes.
<br>
Nightly CVS version:
<a href="http://www.dhs-computertechnik.de/downloads/fhem-cvs.tgz">
http://www.dhs-computertechnik.de/downloads/fhem-cvs.tgz</a>
<br><br>
Please fill out our <a href="http://www.koeniglich.de/tinc?key=Erq0O0LU&formname=FHEM_used_modules">survey</a>,
as we'd like to know which FHEM modules are in use. Here are the <a
href="surveyresults.html">results</a>.
@ -327,9 +333,9 @@
You don't have to install all of them, one is probably more than
enough :-).<br>
The numbering has historical reasons: not actively maintained versions
are not described here.</br>
are not described here.<br>
<b>Important:</b> Make sure you add some protection (.htaccess, etc)
else everybody will be able to set your devices.</br>
else everybody will be able to set your devices.<br>
</div>
<h3>Web frontend 2 (webfrontend/pgm2)</h3>

View File

@ -477,8 +477,10 @@ FW_makeTable($$$$$$$$)
my @al = map { s/[:;].*//;$_ } split(" ", $clist);
pO "<td>" . FW_select("arg.$ccmd$d",\@al,undef) . "</td>";
pO "<td>" . FW_textfield("val.$ccmd$d", 20) . "</td>";
pO "<td>" . FW_submit("cmd.$ccmd$d", $ccmd) . "</td>";
pO FW_hidden("dev.$ccmd$d", $d);
pO "<td>" .
FW_submit("cmd.$ccmd$d", $ccmd) .
FW_hidden("dev.$ccmd$d", $d) .
"</td>";
pO "</tr>";
}
@ -489,7 +491,8 @@ FW_makeTable($$$$$$$$)
pF " <tr class=\"%s\">", $row?"odd":"even";
$row = ($row+1)%2;
if($makelink && $__reldoc) {
pO "<td><a href=\"$__reldoc#$v\">$v</a></td>"; # no pH, want to open extra browser
# no pH, want to open extra browser
pO "<td><a href=\"$__reldoc#$v\">$v</a></td>";
} else {
pO "<td>$v</td>";
}
@ -810,12 +813,14 @@ FW_showRoom()
my @tv = map { ($_.".0", $_+0.5) } (5..30);
shift(@tv); # 5.0 is not valid
$v = int($v*20)/$v if($v =~ m/^[0-9].$/);
pO FW_hidden("arg.$d", "desired-temp");
pO FW_hidden("dev.$d", $d);
pO "<td>" .
FW_hidden("arg.$d", "desired-temp") .
FW_hidden("dev.$d", $d) .
FW_select("val.$d", \@tv, ReadingsVal($d, "desired-temp", $v)) .
FW_submit("cmd.$d", "set") . "</td>";
FW_submit("cmd.$d", "set") .
"</td>";
} elsif($type eq "FileLog") {
@ -838,7 +843,9 @@ FW_showRoom()
} elsif($type eq "weblink") {
pO "<td>";
FW_showWeblink($d, $defs{$d}{LINK}, $defs{$d}{WLTYPE});
pO "</td>";
} else {
@ -1526,7 +1533,7 @@ FW_showWeblink($$$)
} elsif($t eq "fileplot") {
my @va = split(":", $v, 3);
if(@va != 3 || !$defs{$va[0]} || !$defs{$va[0]}{currentlogfile}) {
pO "<td>Broken definition: $v</a></td>";
pO "<td>Broken definition: $v</td>";
} else {
if($va[2] eq "CURRENT") {
$defs{$va[0]}{currentlogfile} =~ m,([^/]*)$,;

View File

@ -53,11 +53,10 @@ SVG_render($$$$$$$)
my ($w, $h) = ($ow-2*$x, $oh-2*$y); # Rect size
# Html Header
pO "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
pO "<!DOCTYPE svg>";
pO "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" ".
"xmlns:xlink=\"http://www.w3.org/1999/xlink\" " .
">";
pO '<?xml version="1.0" encoding="UTF-8"?>';
pO '<!DOCTYPE svg>';
pO '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" '.
'xmlns:xlink="http://www.w3.org/1999/xlink" >';
pO "<style type=\"text/css\"><![CDATA[";
if(open(FH, "$__dir/svg_style.css")) {
@ -430,7 +429,6 @@ time_to_sec($)
if(!$str) {
return 0;
}
Log 1, $str;
my ($y,$m,$d,$h,$mi,$s) = split("[-_:]", $str);
$s = 0 if(!$s);
$mi= 0 if(!$mi);

View File

@ -9,11 +9,10 @@ function
compressPoints(pointList)
{
var i, x, y, lx = -1, ly, ret = "";
var pl_arr = pointList.split(" ");
for(i = 0; i < pl_arr.length; i++) {
var xy = pl_arr[i].split(",");
x = parseInt(xy[0]);
y = parseInt(xy[1]);
var pl_arr = pointList.split(/[, ]/);
for(i = 0; i < pl_arr.length; i +=2) {
x = parseInt(pl_arr[i]);
y = parseInt(pl_arr[i+1]);
if(pl_arr.length > 500 && lx != -1 && x-lx < 2) // Filter the data.
continue;
ret = ret+
@ -90,7 +89,6 @@ svg_paste(evt)
"translate(0,"+ (h/y_mul+y_min-h/ny_mul-ny_min)*y_mul +") "+
"scale(1, "+ (y_mul/ny_mul) +") ";
o.setAttribute("transform", tr);
d.documentElement.appendChild(o);
}