mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-30 12:07:09 +00:00
Small fixes, preparing for the 5.1 release
git-svn-id: https://svn.fhem.de/fhem/trunk@930 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2b28d07ad0
commit
77db35d3d5
@ -33,8 +33,8 @@ CommandUpdatefhem($$)
|
|||||||
my ($cl, $param) = @_;
|
my ($cl, $param) = @_;
|
||||||
my $lt = "";
|
my $lt = "";
|
||||||
my $ret = "";
|
my $ret = "";
|
||||||
#my $moddir = "$attr{global}{modpath}/FHEM";
|
my $moddir = "$attr{global}{modpath}/FHEM";
|
||||||
my $moddir = "XXX";
|
#my $moddir = "XXX";
|
||||||
|
|
||||||
# Read in the OLD filetimes.txt
|
# Read in the OLD filetimes.txt
|
||||||
my %oldtime;
|
my %oldtime;
|
||||||
@ -111,8 +111,8 @@ sub
|
|||||||
CommandCULflash($$)
|
CommandCULflash($$)
|
||||||
{
|
{
|
||||||
my ($cl, $param) = @_;
|
my ($cl, $param) = @_;
|
||||||
#my $moddir = "$attr{global}{modpath}/FHEM";
|
my $moddir = "$attr{global}{modpath}/FHEM";
|
||||||
my $moddir = "XXX";
|
#my $moddir = "XXX";
|
||||||
|
|
||||||
my %ctypes = (
|
my %ctypes = (
|
||||||
CUL_V2 => "at90usb162",
|
CUL_V2 => "at90usb162",
|
||||||
|
@ -13,8 +13,8 @@ RDOCDIR=$(ROOT)$(DOCDIR)
|
|||||||
RMANDIR=$(ROOT)$(MANDIR)
|
RMANDIR=$(ROOT)$(MANDIR)
|
||||||
RETCDIR=$(ROOT)$(ETCDIR)
|
RETCDIR=$(ROOT)$(ETCDIR)
|
||||||
|
|
||||||
VERS=5.0
|
VERS=5.1
|
||||||
DATE=2010-08-15
|
DATE=2011-07-09
|
||||||
DESTDIR=fhem-$(VERS)
|
DESTDIR=fhem-$(VERS)
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@ -86,3 +86,6 @@ deb:
|
|||||||
mv .f $(DESTDIR)
|
mv .f $(DESTDIR)
|
||||||
dpkg-deb --build $(DESTDIR)
|
dpkg-deb --build $(DESTDIR)
|
||||||
rm -rf $(DESTDIR)
|
rm -rf $(DESTDIR)
|
||||||
|
|
||||||
|
fb7390:
|
||||||
|
cd contrib/FB7390 && ./makeimage $(DESTDIR)
|
||||||
|
@ -14,3 +14,8 @@ Webpgm2
|
|||||||
- integrate weblink details in the SVG
|
- integrate weblink details in the SVG
|
||||||
- autocreate: multiple plots
|
- autocreate: multiple plots
|
||||||
- fancy webkit tranformations
|
- fancy webkit tranformations
|
||||||
|
|
||||||
|
=============
|
||||||
|
5.1
|
||||||
|
- .deb
|
||||||
|
- examples
|
||||||
|
14
fhem/contrib/FB7390/fhemcmd.sh
Normal file
14
fhem/contrib/FB7390/fhemcmd.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
## FritzBox 7390
|
||||||
|
## Beispiel fuer das Senden von FHEM Kommandos ueber den Telefoncode
|
||||||
|
## #95*x* wobei x hier 1 bzw 2 entspricht.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
1) echo "set Steckdose on" | /sbin/socat - TCP:127.0.0.1:7072
|
||||||
|
;;
|
||||||
|
2) echo "set Steckdose off" | /sbin/socat - TCP:127.0.0.1:7072
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
65
fhem/contrib/FB7390/install
Executable file
65
fhem/contrib/FB7390/install
Executable file
@ -0,0 +1,65 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
root=/var/InternerSpeicher
|
||||||
|
home=$root/fhem
|
||||||
|
|
||||||
|
echo "########################### FHEM INSTALL BEGIN #######################"
|
||||||
|
killall perl > /dev/null 2>&1
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
echo "########################### Extracting fhem.tar.gz ###################"
|
||||||
|
cd $root
|
||||||
|
if test -d fhem; then
|
||||||
|
mv fhem fhem.OLD
|
||||||
|
fi
|
||||||
|
|
||||||
|
gzip -cd /var/fhem.tar.gz | tar xf -
|
||||||
|
|
||||||
|
cd $root
|
||||||
|
|
||||||
|
# Save files from the AVM Style installation
|
||||||
|
if test -f fhem.OLD/opt/etc/fhem.cfg; then
|
||||||
|
echo "########################### Converting chroot style config ###########"
|
||||||
|
export LD_LIBRARY_PATH=$home/lib
|
||||||
|
export PERL5LIB=$home/lib/perl5/site_perl/5.12.2/mips-linux:$home/lib/perl5/site_perl/5.12.2:$home/lib/perl5/5.12.2/mips-linux:$home/lib/perl5/5.12.2
|
||||||
|
cp fhem.OLD/opt/etc/fhem.cfg fhem
|
||||||
|
fhem/perl -pi -e 's,/opt,$root,g;
|
||||||
|
s,fhem/share,fhem,;
|
||||||
|
s,^#define autocreate,define autocreate,;
|
||||||
|
s,^#attr autocreate,attr autocreate,;
|
||||||
|
s,ttyACM(.)(@\d+)?,ttyACM$1\@38400,;' fhem/fhem.cfg
|
||||||
|
mv fhem.OLD/opt/fhem/log/* fhem/log
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Save files from our old version
|
||||||
|
if test -f fhem.OLD/fhem.cfg; then
|
||||||
|
echo "########################### Copying non-chroot style config ##########"
|
||||||
|
mv fhem.OLD/FHEM/*.sh fhem/FHEM
|
||||||
|
mv fhem.OLD/FHEM/99.*Util.pm fhem/FHEM
|
||||||
|
mv fhem.OLD/FHEM/*.sh fhem/FHEM
|
||||||
|
mv fhem.OLD/log/* fhem/log
|
||||||
|
mv fhem.OLD/fhem.cfg fhem
|
||||||
|
fi
|
||||||
|
chown -R boxusr80:root $home
|
||||||
|
|
||||||
|
if test -d fhem.OLD; then
|
||||||
|
echo "########################### Deleting the old directory ###############"
|
||||||
|
rm -rf fhem.OLD
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat /var/flash/debug.cfg > /var/nvi.tmp
|
||||||
|
grep -q fhem /var/nvi.tmp
|
||||||
|
r=$?
|
||||||
|
if test $r != 0; then
|
||||||
|
echo "########################### Modifying the startup script #############"
|
||||||
|
echo $home/startfhem >> /var/nvi.tmp
|
||||||
|
cat /var/nvi.tmp > /var/flash/debug.cfg
|
||||||
|
fi
|
||||||
|
rm -f /var/nvi.tmp
|
||||||
|
|
||||||
|
echo "########################### Starting fhem ############################"
|
||||||
|
sync
|
||||||
|
$home/startfhem
|
||||||
|
|
||||||
|
echo "########################### FHEM INSTALL END #########################"
|
||||||
|
exit 1 # INSTALL_SUCCESS_REBOOT
|
55
fhem/contrib/FB7390/makeimage
Executable file
55
fhem/contrib/FB7390/makeimage
Executable file
@ -0,0 +1,55 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
fw=$1
|
||||||
|
if test ! -f ../../$fw.tar.gz; then
|
||||||
|
echo "usage: makeimage <fhem-VERSION.tar.gz>"
|
||||||
|
echo "../../<fhem-VERSION>.tar.gz mus exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf var
|
||||||
|
echo Extracting the fritzbox template
|
||||||
|
tar xf ../../priv/fritzbox7390_template.tar
|
||||||
|
cd var
|
||||||
|
tar zxf fhem.tar.gz
|
||||||
|
rm -rf fhem/FHEM
|
||||||
|
mkdir fhem/FHEM
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
cp install var
|
||||||
|
cp startfhem var/fhem
|
||||||
|
cp fhemcmd.sh var/fhem/FHEM
|
||||||
|
|
||||||
|
|
||||||
|
echo Extracting $fw
|
||||||
|
rm -rf $fw
|
||||||
|
tar zxf ../../$fw.tar.gz
|
||||||
|
cd $fw
|
||||||
|
cp fhem.pl\
|
||||||
|
FHEM/*\
|
||||||
|
webfrontend/pgm2/*\
|
||||||
|
docs/*.html\
|
||||||
|
docs/fhem.png\
|
||||||
|
docs/*.jpg\
|
||||||
|
../var/fhem/FHEM
|
||||||
|
|
||||||
|
cd examples
|
||||||
|
for i in *; do
|
||||||
|
cp -r $i ../../var/fhem/FHEM/example.$i
|
||||||
|
done
|
||||||
|
cd ../..
|
||||||
|
rm -rf $fw
|
||||||
|
|
||||||
|
|
||||||
|
echo Packing again
|
||||||
|
cd var/fhem
|
||||||
|
cp FHEM/example.sample_pgm2 fhem.cfg
|
||||||
|
perl -pi -e 's,/tmp,./log,g' fhem.cfg
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
tar zcf fhem.tar.gz fhem
|
||||||
|
rm -rf fhem
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
tar cf $fw-fb7390.image var
|
||||||
|
rm -rf var
|
19
fhem/contrib/FB7390/startfhem
Executable file
19
fhem/contrib/FB7390/startfhem
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
home=/var/InternerSpeicher/fhem
|
||||||
|
|
||||||
|
cd $home
|
||||||
|
|
||||||
|
trap "" SIGHUP
|
||||||
|
modprobe cdc_acm
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
ln -sf $home/FHEM/fhemcmd.sh /var/fhemcmd
|
||||||
|
|
||||||
|
PATH=$home:$PATH
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$home/lib
|
||||||
|
export PERL5LIB=$home/lib/perl5/site_perl/5.12.2/mips-linux:$home/lib/perl5/site_perl/5.12.2:$home/lib/perl5/5.12.2/mips-linux:$home/lib/perl5/5.12.2
|
||||||
|
|
||||||
|
perl fhem.pl fhem.cfg
|
@ -45,13 +45,19 @@
|
|||||||
<a name="starting"></a>
|
<a name="starting"></a>
|
||||||
<h3>Starting fhem</h3>
|
<h3>Starting fhem</h3>
|
||||||
<ul>
|
<ul>
|
||||||
Skip this section if you installed fhem via the Debian package.<br><br>
|
Skip this section if you installed fhem via the Debian
|
||||||
|
<a href="http://fhem.de/fhem-=VERS=.deb">package</a> or via the Fritzbox7390
|
||||||
|
<a href="http://fhem.de/fhem-=VERS=-fb7390.image">image</a><br><br>
|
||||||
|
|
||||||
First install the Device::SerialPort (or Win32::SerialPort) perl module
|
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>. There are
|
||||||
|
also precompiled debian packages (libdevice-serialport-perl), and this
|
||||||
|
module is already installed on OSX. You will need it to access the USB
|
||||||
|
devices<br><br>
|
||||||
|
|
||||||
The default configuration will install fhem into /usr/bin,
|
The default configuration will install fhem into /usr/bin,
|
||||||
/usr/share/fhem and /var/log/fhem and /etc/fhem.cfg. Edit the Makefile to
|
/usr/share/fhem and /var/log/fhem and /etc/fhem.cfg, according to the
|
||||||
change this.
|
debian/ubuntu requirments. Edit the Makefile to change this.
|
||||||
|
|
||||||
To install & start fhem type:<pre>
|
To install & start fhem type:<pre>
|
||||||
make install-pgm2
|
make install-pgm2
|
||||||
@ -60,6 +66,7 @@
|
|||||||
After starting, the logfile should look like:<pre>
|
After starting, the logfile should look like:<pre>
|
||||||
2008.06.15 16:17:03 2: FHEMWEB port 8083 opened
|
2008.06.15 16:17:03 2: FHEMWEB port 8083 opened
|
||||||
2008.06.15 16:17:03 2: FHEMWEB port 8084 opened
|
2008.06.15 16:17:03 2: FHEMWEB port 8084 opened
|
||||||
|
2008.06.15 16:17:03 2: FHEMWEB port 8085 opened
|
||||||
2008.06.15 16:17:03 0: Server started (version ...)</pre>
|
2008.06.15 16:17:03 0: Server started (version ...)</pre>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -67,10 +74,12 @@
|
|||||||
<h3>Attaching the USB device for the PC (CUL / FHZ1x00PC / EM1010PC)</h3>
|
<h3>Attaching the USB device for the PC (CUL / FHZ1x00PC / EM1010PC)</h3>
|
||||||
<ul>
|
<ul>
|
||||||
Connect to fhem with an internet browser:
|
Connect to fhem with an internet browser:
|
||||||
<a href="http://localhost:8083/fhem">http://localhost:8083/fhem</a>
|
<a href="http://localhost:8083/fhem">http://fhem-host:8083/fhem</a>
|
||||||
or
|
if you are using a normal desktop,
|
||||||
<a href="http://localhost:8084/fhem">http://localhost:8084/fhem</a> if
|
<a href="http://localhost:8084/fhem">http://fhem-host:8084/fhem</a> if
|
||||||
you are using a a smartphone.<br><br>
|
you are using a smartphone, or
|
||||||
|
<a href="http://localhost:8084/fhem">http://fhem-host:8085/fhem</a> if
|
||||||
|
you are using a tablet like the iPad.<br><br>
|
||||||
|
|
||||||
Attach the USB device (CUL, FHZ1000PC/FHZ1300, EM1010PC) to your
|
Attach the USB device (CUL, FHZ1000PC/FHZ1300, EM1010PC) to your
|
||||||
computer, and look for the corresponding device in the /dev
|
computer, and look for the corresponding device in the /dev
|
||||||
@ -79,7 +88,7 @@
|
|||||||
Linux and /dev/cu.usbmodem* under OS X. Note the exact name of the device.
|
Linux and /dev/cu.usbmodem* under OS X. Note the exact name of the device.
|
||||||
Define it for fhem (by typing it in the "Fhem cmd" input field in the
|
Define it for fhem (by typing it in the "Fhem cmd" input field in the
|
||||||
browser):<pre>
|
browser):<pre>
|
||||||
define CUL1 CUL /dev/ttyACM0 1234</pre>
|
define CUL1 CUL /dev/ttyACM0@9600 1234</pre>
|
||||||
|
|
||||||
You can find details about CUL define parameters <a
|
You can find details about CUL define parameters <a
|
||||||
href="commandref.html#CUL">here</a>.<br><br>
|
href="commandref.html#CUL">here</a>.<br><br>
|
||||||
@ -93,9 +102,16 @@
|
|||||||
/dev/cu.usbserial-xxxxxxxx.
|
/dev/cu.usbserial-xxxxxxxx.
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<b>Note:</b> Don't forget to type "save" in the "Fhem cmd" input field of
|
<b>Notes:</b>
|
||||||
the browser after defining a device or setting its attribute. Otherwise
|
<ul>
|
||||||
the changes will disappear after the next start.</ul>
|
<li>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.
|
||||||
|
<li>The CUL is arriving without a firmware. You can flash it via the
|
||||||
|
<a href="commandref.html#CULflash">CULflash</a> command, if the
|
||||||
|
dfu-programmer is installed. dfu-programmer is part of the FB390 image.
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<a name="autocreate"></a>
|
<a name="autocreate"></a>
|
||||||
<h3>Configuring transmitter devices</h3>
|
<h3>Configuring transmitter devices</h3>
|
||||||
@ -117,7 +133,7 @@
|
|||||||
|
|
||||||
If you want to do the same manually:<br>
|
If you want to do the same manually:<br>
|
||||||
Wait a while, until the transmitter sent some data. In the logfile
|
Wait a while, until the transmitter sent some data. In the logfile
|
||||||
(Browser window: "All together" -> Logs:Logfile:text) a line
|
(Browser window: "Unsorted -> Logs / Fhemlog / text) a line
|
||||||
will appear:<pre>
|
will appear:<pre>
|
||||||
FS20 Unknown device <HOUSECODE>, Button <BTN> Code <CDE>, please define it</pre>
|
FS20 Unknown device <HOUSECODE>, Button <BTN> Code <CDE>, please define it</pre>
|
||||||
|
|
||||||
@ -131,12 +147,12 @@
|
|||||||
<a href="commandref.html#model">Here</a> is a complete list of FS20
|
<a href="commandref.html#model">Here</a> is a complete list of FS20
|
||||||
models.<br> For other device types similar messages should appear.<br><br>
|
models.<br> For other device types similar messages should appear.<br><br>
|
||||||
|
|
||||||
<b>Note:</b> Creating a fhem FHT device automatically or manually does
|
<b>Note:</b> Creating a fhem FHT or HomeMatic device automatically or
|
||||||
not imply that the CUL or the FHZ is paired with it. For this purpose you
|
manually does not imply that the CUL or the FHZ is paired with it. For
|
||||||
have to set the FHT to accept new devices (Prog:Cent:N/A), and send a command to
|
this purpose you have to set the FHT to accept new devices
|
||||||
it (e.g. set fht.kitchen desired-temp 20).
|
(Prog:Cent:N/A), and send a command to it (e.g. set fht.kitchen
|
||||||
If there is no signal for a while, then check <a href="faq.html#faq6">
|
desired-temp 20). If there is no signal for a while, then check <a
|
||||||
this</a> FAQ entry.
|
href="faq.html#faq6"> this</a> FAQ entry.
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a name="FS20rx"></a>
|
<a name="FS20rx"></a>
|
||||||
@ -162,7 +178,7 @@
|
|||||||
<h3>Timed commands / Notification</h3>
|
<h3>Timed commands / Notification</h3>
|
||||||
<ul>
|
<ul>
|
||||||
To execute commands at a given time / periodically, you have to define
|
To execute commands at a given time / periodically, you have to define
|
||||||
devices of the type at. See the definition <a href="commandref.html#at">
|
devices of the type <b>at</b>. See the definition <a href="commandref.html#at">
|
||||||
here</a> and the examples <a href="example.06_at">here</a>. The last link
|
here</a> and the examples <a href="example.06_at">here</a>. The last link
|
||||||
only works if you are reading this HOWTO from your fhem Web.<br><br>
|
only works if you are reading this HOWTO from your fhem Web.<br><br>
|
||||||
|
|
||||||
@ -258,24 +274,24 @@
|
|||||||
The logs can be converted to a plot either with gnuplot (which must be
|
The logs can be converted to a plot either with gnuplot (which must be
|
||||||
installed and in your PATH), or via the builtin SVG module, in this case
|
installed and in your PATH), or via the builtin SVG module, in this case
|
||||||
your browser must support SVG. Firefox, Opera, Chrome, Safari
|
your browser must support SVG. Firefox, Opera, Chrome, Safari
|
||||||
(on the iPhone/iPad too) support SVG out of the box, Internet Explorer does
|
(both on OSX and iOS) support SVG out of the box, Internet Explorer
|
||||||
it via the Adobe "SVG viewer" plugin, Android does not support it (as of
|
from version 9. IE prior to version 9 does it via the Adobe "SVG viewer"
|
||||||
2011/02).
|
plugin, and some Android versions prior to 3.0 do not support it.
|
||||||
|
|
||||||
SVG mode is the default, to change it set the <a
|
SVG mode is the default, to change it set the <a
|
||||||
href="commandref.html#plotmode">plotmode</a> attribute to gnuplot or
|
href="commandref.html#plotmode">plotmode</a> attribute to gnuplot or
|
||||||
gnuplot-scroll.<br><br>
|
gnuplot-scroll.<br><br>
|
||||||
|
|
||||||
In order to look at historic data, you can either convert at the
|
In order to look at historic data, you can either convert the
|
||||||
archive entries to weblink in "plotmode=gnuplot" mode, or use the
|
archive entries to a weblink in "plotmode=gnuplot" mode, or use the
|
||||||
"plotmode=gnuplot-scroll" or "plotmode=SVG" modes. fnuplot-scroll and SVG
|
"plotmode=gnuplot-scroll" or "plotmode=SVG" modes. gnuplot-scroll and SVG
|
||||||
offer the possibility to zoom or scroll in the plot, see the arrow and
|
offer the possibility to zoom or scroll in the plot, see the arrow and
|
||||||
magnifier icons at the top of the page.<br><br>
|
magnifier icons at the top of the page.<br><br>
|
||||||
|
|
||||||
Note: the gnuplot files must have #FileLog entries in order to be
|
Note: the gnuplot files must have #FileLog entries in order to be useable
|
||||||
useable with scrolling, as the filtering happens with the FileLog get
|
with gnuplot-scroll or SVG, as the filtering happens with the FileLog get
|
||||||
function, see the supplied gnuplot files for an example or the
|
function, see the supplied gnuplot files or the column_spec paragraph <a
|
||||||
column_spec paragraph <a href="commandref.html#FileLogget">here</a> for
|
href="commandref.html#FileLogget">here</a> for the syntax.<br><br>
|
||||||
the syntax.<br><br>
|
|
||||||
|
|
||||||
The order of the #FileLog lines must match the corresponding 'awk'
|
The order of the #FileLog lines must match the corresponding 'awk'
|
||||||
entries.<br><br>
|
entries.<br><br>
|
||||||
|
@ -561,7 +561,7 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
CULflash command.<br>
|
CULflash command.<br>
|
||||||
Example:
|
Example:
|
||||||
<ul>
|
<ul>
|
||||||
<code>fhem> CULflash CUL CUL_V3</code>
|
<code>CULflash CUL CUL_V3</code>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -8,12 +8,15 @@ attr global statefile /tmp/fhem.save # where to save the state of the devices
|
|||||||
attr global verbose 3 # "normal" verbosity (min 1, max 5)
|
attr global verbose 3 # "normal" verbosity (min 1, max 5)
|
||||||
|
|
||||||
#define CUL CUL /dev/ttyACM0 1234
|
#define CUL CUL /dev/ttyACM0 1234
|
||||||
#define FHEM FHEM /dev/USB0
|
#define FHZ FHZ /dev/USB0
|
||||||
|
|
||||||
define WEB FHEMWEB 8083 global
|
define WEB FHEMWEB 8083 global
|
||||||
|
|
||||||
define WEBS FHEMWEB 8084 global
|
define WEBphone FHEMWEB 8084 global
|
||||||
attr WEBS smallscreen
|
attr WEBphone smallscreen
|
||||||
|
|
||||||
|
define WEBtablet FHEMWEB 8085 global
|
||||||
|
attr WEBtablet touchpad
|
||||||
|
|
||||||
# Fake logfile, to access the global log
|
# Fake logfile, to access the global log
|
||||||
define Logfile FileLog /tmp/fhem-%Y-%m.log fakelog
|
define Logfile FileLog /tmp/fhem-%Y-%m.log fakelog
|
||||||
|
@ -310,13 +310,16 @@ FW_AnswerCall($)
|
|||||||
$FW_tp = AttrVal($FW_wname, "touchpad", $FW_ss);
|
$FW_tp = AttrVal($FW_wname, "touchpad", $FW_ss);
|
||||||
|
|
||||||
# Lets go:
|
# Lets go:
|
||||||
if($arg =~ m,^${FW_ME}/(.*html)$, || $arg =~ m,^${FW_ME}/(example.*)$,) {
|
Log 1, "ARG: $arg";
|
||||||
|
if($arg =~ m,^${FW_ME}/(example.*|.*html)$,) {
|
||||||
my $f = $1;
|
my $f = $1;
|
||||||
|
Log 1, "GOT: $f";
|
||||||
$f =~ s,/,,g; # little bit of security
|
$f =~ s,/,,g; # little bit of security
|
||||||
open(FH, "$FW_dir/$f") || return;
|
open(FH, "$FW_dir/$f") || return;
|
||||||
pO join("", <FH>);
|
pO join("", <FH>);
|
||||||
close(FH);
|
close(FH);
|
||||||
$FW_RETTYPE = "text/plain; charset=ISO-8859-1" if($f !~ m/\.*html$/);
|
$FW_RETTYPE = "text/plain; charset=ISO-8859-1" if($f !~ m/\.*html$/);
|
||||||
|
Log 1, "RT: $FW_RETTYPE";
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
} elsif($arg =~ m,^$FW_ME/(.*).css,) {
|
} elsif($arg =~ m,^$FW_ME/(.*).css,) {
|
||||||
@ -1442,8 +1445,9 @@ FW_style($$)
|
|||||||
my @fl;
|
my @fl;
|
||||||
push(@fl, "fhem.cfg");
|
push(@fl, "fhem.cfg");
|
||||||
push(@fl, "");
|
push(@fl, "");
|
||||||
|
push(@fl, FW_fileList("$FW_dir/.*.sh"));
|
||||||
|
push(@fl, FW_fileList("$FW_dir/.*Util.*"));
|
||||||
push(@fl, FW_fileList("$FW_dir/.*.css"));
|
push(@fl, FW_fileList("$FW_dir/.*.css"));
|
||||||
push(@fl, "");
|
|
||||||
push(@fl, FW_fileList("$FW_dir/.*.js"));
|
push(@fl, FW_fileList("$FW_dir/.*.js"));
|
||||||
push(@fl, "");
|
push(@fl, "");
|
||||||
push(@fl, FW_fileList("$FW_dir/.*.gplot"));
|
push(@fl, FW_fileList("$FW_dir/.*.gplot"));
|
||||||
@ -1479,7 +1483,7 @@ FW_style($$)
|
|||||||
my $row = 0;
|
my $row = 0;
|
||||||
foreach my $file (@fl) {
|
foreach my $file (@fl) {
|
||||||
pO "<tr class=\"" . ($row?"odd":"even") . "\">";
|
pO "<tr class=\"" . ($row?"odd":"even") . "\">";
|
||||||
pH $file, $file, 1;
|
pO "<td><a href=\"$FW_ME/$file\">$file</a></td>";
|
||||||
pO "</tr>";
|
pO "</tr>";
|
||||||
$row = ($row+1)%2;
|
$row = ($row+1)%2;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user