2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2024-11-22 02:59:49 +00:00

5.3 preparation/changes

git-svn-id: https://svn.fhem.de/fhem/trunk@2027 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-10-27 16:23:09 +00:00
parent ad92a8c7e5
commit 82ba490176
17 changed files with 274 additions and 336 deletions

View File

@ -1,8 +1,19 @@
BINDIR=/usr/bin
MODDIR=/usr/share/fhem
VARDIR=/var/log/fhem
MANDIR=/usr/share/man/man1
ETCDIR=/etc
VERS=5.3
DATE=2012-10-28
RELATIVE_PATH=YES
BINDIR=/opt/fhem
MODDIR=$(BINDIR)
VARDIR=$(BINDIR)/log
MANDIR=$(BINDIR)/docs
ETCDIR=$(BINDIR)
# Old variant
#BINDIR=/usr/bin
#MODDIR=/usr/share/fhem
#VARDIR=/var/log/fhem
#MANDIR=/usr/share/man/man1
#ETCDIR=/etc
# Used for .deb package creation
RBINDIR=$(ROOT)$(BINDIR)
@ -14,8 +25,6 @@ RETCDIR=$(ROOT)$(ETCDIR)
# Destination Directories
DEST=$(RETCDIR) $(RBINDIR) $(RMODDIR) $(RMANDIR) $(RVARDIR)
VERS=5.2
DATE=2011-12-31
DESTDIR=fhem-$(VERS)
all:
@ -32,11 +41,13 @@ all:
install:
@echo "- creating directories"
@-$(foreach DIR,$(DEST), if [ ! -e $(DIR) ]; then mkdir -p $(DIR); fi; )
@echo "- fixing permissions / path in fhem.cfg"
@echo "- fixing permissions in fhem.cfg"
@find FHEM docs www contrib -type f -print | xargs chmod 644
@cp fhem.cfg fhem.cfg.install
@perl -pi -e 's,modpath \.,modpath $(MODDIR),' fhem.cfg.install
@perl -pi -e 's,([^h]) \./log,$$1 $(VARDIR),' fhem.cfg.install
@-if [ "$(RELATIVE_PATH)" != YES ]; then\
perl -pi -e 's,modpath \.,modpath $(MODDIR),' fhem.cfg.install; \
perl -pi -e 's,([^h]) \./log,$$1 $(VARDIR),' fhem.cfg.install; \
fi;
@-if [ -e $(RETCDIR)/fhem.cfg ]; then \
echo "- move existing configuration to fhem.cfg.`date "+%Y-%m-%d_%H:%M:%S"`"; \
mv $(RETCDIR)/fhem.cfg $(RETCDIR)/fhem.cfg.`date "+%Y-%m-%d_%H:%M:%S"`; fi;

View File

@ -1 +1 @@
/etc/fhem.cfg
/opt/fhem/fhem.cfg

View File

@ -6,18 +6,18 @@ if ! getent passwd fhem >/dev/null; then
useradd --system --home /var/log/fhem --gid dialout --shell /bin/false fhem
fi
chown -R fhem /var/log/fhem /etc/fhem.cfg /usr/share/fhem /usr/bin/fhem.pl
chown -R fhem /opt/fhem
#set up of autostart
if test -x /sbin/initctl; then
# upstart
mkdir -p /etc/init
cp /usr/share/fhem/contrib/init-scripts/fhem.upstart /etc/init/fhem.conf
cp /opt/fhem/contrib/init-scripts/fhem.upstart /etc/init/fhem.conf
initctl start fhem
else
# Sysvinit
mkdir -p /etc/init.d
cp /usr/share/fhem/contrib/init-scripts/fhem.3 /etc/init.d/fhem
cp /opt/fhem/contrib/init-scripts/fhem.3 /etc/init.d/fhem
chmod ugo+x /etc/init.d/fhem
update-rc.d fhem defaults
invoke-rc.d fhem start

View File

@ -24,6 +24,13 @@ rm -rf $fw
rm -rf fhem/docs/*.{odg,pdf,man,txt}
cp fhemcmd.sh fhem/FHEM
cp startfhem fhem
cat >> fhem/fhem.cfg << 'EOF'
attr WEB basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
attr WEBphone basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
attr WEBtablet basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
attr telnetPort password {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
EOF
echo Packing again
zip -qr $fw-fb7270.zip fhem

View File

@ -9,40 +9,42 @@ sleep 1
echo "########################### Extracting fhem.tar.gz ###################"
cd $root
if test -d fhem; then
odir=fhem.old.`date +%Y-%m-%d_%H:%M:%S`
mv fhem $odir
rm -rf fhem.OLD
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 $odir/etc/fhem.cfg; then
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 $odir/etc/fhem.cfg fhem
fhem/perl -pi -e 's,/usr/share/fhem,'$home',g;
s,/var/log/fhem,'$home'/log,;
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 $odir/var/log/fhem/* fhem/log
mv fhem.OLD/opt/fhem/log/* fhem/log
fi
# Save files from our old version
if test -f $odir/fhem.cfg; then
mv $odir/FHEM/*.sh fhem/FHEM
mv $odir/FHEM/99.*Util.pm fhem/FHEM
mv $odir/FHEM/*.sh fhem/FHEM
mv $odir/log/* fhem/log
mv $odir/*.cfg fhem
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/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=$?
@ -53,7 +55,9 @@ if test $r != 0; then
fi
rm -f /var/nvi.tmp
# We have to restart with exit code 1, else the frontend tells us:
# update failed: no error
echo "########################### Starting fhem ############################"
sync
$home/startfhem
echo "########################### FHEM INSTALL END #########################"
exit 1
exit 1 # INSTALL_SUCCESS_REBOOT

View File

@ -8,30 +8,45 @@ if test ! -f ../../$fw.tar.gz; then
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,www,docs}
rm -rf fhem/FHEM www docs
mkdir fhem/FHEM fhem/docs
cd ..
rm -rf $fw
tar zxf ../../$fw.tar.gz
cd $fw
cp -rp fhem.pl fhem.cfg FHEM docs www ../var/fhem
cd ..
rm -rf $fw
rm -rf var/fhem/docs/*.{odg,pdf,man,txt}
cp install var
cp startfhem var/fhem
cp fhemcmd.sh var/fhem/FHEM
cd var
echo Extracting $fw
rm -rf $fw
tar zxf ../../$fw.tar.gz
cd $fw
cp fhem.cfg fhem.pl ../var/fhem
cp -rp FHEM/* ../var/fhem/FHEM
cp docs/fhem.png docs/*.html docs/*.jpg ../var/fhem/docs
cp -rp www ../var/fhem
cd ..
rm -rf $fw
echo Packing again
cd var/fhem
cat >> fhem.cfg << 'EOF'
attr WEB basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
attr WEBphone basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
attr WEBtablet basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
attr telnetPort password {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
EOF
cd ..
tar zcf fhem.tar.gz fhem
rm -rf fhem
cd ..
cd ..
tar cf $fw-fb7390.image var
rm -rf var

View File

@ -17,20 +17,15 @@ 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
########### START fhem-user
# let FHEM run as user boxusr80 by adding user fhem with uid of boxusr80
# Using this feature the following will not work: ping,WOL,lcd4linux
#id fhem > /dev/null 2>&1
#if [ "$?" -ne "0" ]; then
# echo "user fhem does not exist. Adding it."
# echo "fhem:any:1080:0:fhem:/home-not-used:/bin/sh" >>/var/tmp/passwd
#fi
#chown root ${home}/dfu-programmer
#chmod 4755 ${home}/dfu-programmer
########### END fhem-user
# set file ownership, so that the webinterface can read it.
chown -R boxusr80 ${home}/log
chown -R boxusr80 ${home}/FHEM
# let FHEM run as user boxusr80
# add user fhem with uid of boxusr80
id fhem > /dev/null 2>&1
if [ "$?" -ne "0" ]; then
echo "user fhem does not exist. Adding it."
echo "fhem:any:1080:0:fhem:/home-not-used:/bin/sh" >>/var/tmp/passwd
# set files ownership
chown -R boxusr80 ${home}/log
chown -R boxusr80 ${home}/FHEM
fi
perl fhem.pl fhem.cfg

View File

@ -1,28 +1,28 @@
.f/usr/bin/fhem.pl
.f/usr/share/fhem/contrib/checkmsg.pl
.f/usr/share/fhem/contrib/crc.pl
.f/usr/share/fhem/contrib/dblog/fhemdb_get.pl
.f/usr/share/fhem/contrib/em1010.pl
.f/usr/share/fhem/contrib/fhem2speech/fhem-speech
.f/usr/share/fhem/contrib/fhem2speech/fhem-speech.agi
.f/usr/share/fhem/contrib/fs20_holidays.sh
.f/usr/share/fhem/contrib/garden.pl
.f/usr/share/fhem/contrib/getstate/fhem-getstate
.f/usr/share/fhem/contrib/init-scripts/fhem.1
.f/usr/share/fhem/contrib/init-scripts/fhem.2
.f/usr/share/fhem/contrib/init-scripts/fhem.3
.f/usr/share/fhem/contrib/km271.pl
.f/usr/share/fhem/contrib/ks300avg.pl
.f/usr/share/fhem/contrib/rolwzo_not_off.sh
.f/usr/share/fhem/contrib/rotateShiftWork/rotateShiftWork.sh
.f/usr/share/fhem/contrib/serial.pl
.f/usr/share/fhem/contrib/voip2fhem/voip2fhem
.f/usr/share/fhem/contrib/voip2fhem/voip2fhem_create_telefonlist
.f/usr/share/fhem/contrib/voip2fhem/voip2fhem_create_txt2gsm
.f/usr/share/fhem/contrib/ws2000_reader.pl
.f/usr/share/fhem/contrib/DEBIAN/postrm
.f/usr/share/fhem/contrib/DEBIAN/postinst
.f/usr/share/fhem/contrib/DEBIAN/prerm
.f/opt/fhem/fhem.pl
.f/opt/fhem/contrib/checkmsg.pl
.f/opt/fhem/contrib/crc.pl
.f/opt/fhem/contrib/dblog/fhemdb_get.pl
.f/opt/fhem/contrib/em1010.pl
.f/opt/fhem/contrib/fhem2speech/fhem-speech
.f/opt/fhem/contrib/fhem2speech/fhem-speech.agi
.f/opt/fhem/contrib/fs20_holidays.sh
.f/opt/fhem/contrib/garden.pl
.f/opt/fhem/contrib/getstate/fhem-getstate
.f/opt/fhem/contrib/init-scripts/fhem.1
.f/opt/fhem/contrib/init-scripts/fhem.2
.f/opt/fhem/contrib/init-scripts/fhem.3
.f/opt/fhem/contrib/km271.pl
.f/opt/fhem/contrib/ks300avg.pl
.f/opt/fhem/contrib/rolwzo_not_off.sh
.f/opt/fhem/contrib/rotateShiftWork/rotateShiftWork.sh
.f/opt/fhem/contrib/serial.pl
.f/opt/fhem/contrib/voip2fhem/voip2fhem
.f/opt/fhem/contrib/voip2fhem/voip2fhem_create_telefonlist
.f/opt/fhem/contrib/voip2fhem/voip2fhem_create_txt2gsm
.f/opt/fhem/contrib/ws2000_reader.pl
.f/opt/fhem/contrib/DEBIAN/postrm
.f/opt/fhem/contrib/DEBIAN/postinst
.f/opt/fhem/contrib/DEBIAN/prerm
.f/DEBIAN/postrm
.f/DEBIAN/postinst
.f/DEBIAN/prerm

View File

@ -10,4 +10,4 @@ MOV www/pgm2/*.gplot www/gplot
MOV www/pgm2/*.jpg www/images/default
MOV www/pgm2/*.png www/images/default
MOV www/pgm2/*.html docs
DEL FHEM/99_updatefhem.pm
MOV FHEM/99_updatefhem.pm UNUSED

View File

@ -1,10 +1,12 @@
#!/bin/sh
# by Matthias Bauer
cd /opt/fhem
case "$1" in
start)
echo "Starting $0"
fhem.pl /etc/fhem/fhem.conf
perl fhem.pl fhem.cfg
;;
stop)
echo "Stopping $0"

View File

@ -12,20 +12,18 @@
### END INIT INFO
set -e
fhz=/usr/bin/fhem.pl
conf=/etc/fhem.cfg
cd /opt/fhem
port=7072
case "$1" in
'start')
echo "Starting fhem..."
$fhz $conf
perl fhem.pl fhem.cfg
RETVAL=$?
;;
'stop')
echo "Stopping fhem..."
$fhz $port "shutdown"
perl fhem.pl $port "shutdown"
RETVAL=$?
;;
'status')

View File

@ -11,4 +11,5 @@ stop on runlevel [016]
expect fork
respawn
exec /usr/bin/fhem.pl /etc/fhem.cfg
chdir /opt/fhem
exec perl fhem.pl fhem.cfg

View File

@ -42,30 +42,45 @@
7170/7270 <a href="http://fhem.de/fhem-=VERS=-fb7270.zip">zip file</a>.
<br><br>
As most fhem installations access the "outer world" via a USB device
connected to the fhem computer (CUL, FHZ1x00, etc), we most probably need
the perl serial module. See the commandref section of your USB device, if
this module is needed.<br><br>
Many fhem installations access the "outer world" via a USB device
connected to the fhem computer (CUL, FHZ1x00, TUL, EUL, etc), these
installations most probably need the perl serial module. See the
commandref section of your USB device, if this module is needed. You can
avoid this module by using a device which connects via Ethernet, e.g. a
HMLAN or a CUNO. <br><br>
If yes, you can install it e.g. with <code>"sudo cpan
If you need this module, you can install it e.g. with <code>"sudo cpan
Device::SerialPort"</code>. There are also precompiled debian packages
(libdevice-serialport-perl), and this module is already installed on OSX
10.6. If you cannot install it, you then take a look at the @directio
option in the commandref.html as a last resort.<br><br>
The default configuration will install fhem into /usr/bin,
/usr/share/fhem and /var/log/fhem and /etc/fhem.cfg, according to the
debian/ubuntu requirments. Edit the Makefile to change this.
The default configuration will install fhem into /opt/fhem, edit the
Makefile to change this. You can also start fhem directly from where you
unpacked it, installation is optional.
To install & start fhem type:<pre>
make install-pgm2
perl /usr/bin/fhem.pl /etc/fhem.cfg</pre>
make
cd /opt/fhem
perl fhem.pl fhem.cfg</pre>
After starting, the fhem logfile in the log directory should look like:<pre>
2012.10.27 17:14:28 1: Including fhem.cfg
2012.10.27 17:14:28 3: WEB: port 8083 opened
2012.10.27 17:14:28 3: WEBphone: port 8084 opened
2012.10.27 17:14:28 3: WEBtablet: port 8085 opened
2012.10.27 17:14:28 1: Including /tmp/fhem.save
2012.10.27 17:14:28 3: telnetPort: port 7072 opened
2012.10.27 17:14:28 1: usb create starting
2012.10.27 17:14:28 1: usb create end
2012.10.27 17:14:28 2: SecurityCheck: ...
2012.10.27 17:14:28 0: Server started (version Fhem 5.3 ...</pre>
The SecurityCheck warning tells you, that some of the fhem interfaces are
opened without a passwort. You should either set a password for each
device (see below), or set a global attribute to disable this message if
you are sure passwords are not needed.
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 8084 opened
2008.06.15 16:17:03 2: FHEMWEB port 8085 opened
2008.06.15 16:17:03 0: Server started (version ...)</pre>
</ul>
<a name="attaching"></a>
@ -79,26 +94,30 @@
<a href="http://localhost:8084/fhem">http://fhem-host:8085/fhem</a> if
you are using a tablet like the iPad.<br><br>
In the default configuration, fhem will look for USB attached FHZ, CUL
and TCM devices on startup (unix/OSX only) and will create
appropriate fhem devices.<br><br>
<b>Note:</b> On the FritzBox the default configuration enables password
checking on all interfaces: The username is ignored, and the passwort is
checked against the FritzBox password.<br><br>
On linux (esp. FB7390) it will even try to
flash the unflashed CUL, if it is attached at startup. See the <a
href="commandref.html#usb">usb</a> and <a
In the default configuration, fhem will look for USB attached FHZ, CUL,
COC, ZWave and TCM devices on startup (unix/OSX only) and will create
appropriate fhem devices. Make your life easier by attaching the device
before starting fhem.<br><br>
On linux (esp. FB7390) fhem will try to flash an unflashed CUL, if it is
attached at startup. See the <a href="commandref.html#usb">usb</a> and <a
href="commandref.html#CULflash">CULflash</a> commands for details, and
check the "unsorted" room in FHEMWEB for the newly created
devices. Note that switching a CUL to HomeMatic mode is still has to be
done manually. Only one device is flashed per fhem-startup.<br><br>
check the "unsorted" room in FHEMWEB for the newly created devices. Note
that switching a CUL to HomeMatic mode is still has to be done manually.
<br><br>
For doing it manually (or if fhem failed to discover your device):
Attach the USB device (CUL, FHZ1000PC/FHZ1300, TUL, EUL, etc) to your
computer, and look for the corresponding device in the /dev
For defining USB Input devices manually (or if fhem failed to discover
your device): Attach the USB device (CUL, FHZ1000PC/FHZ1300, TUL, EUL,
etc) to your computer, and look for the corresponding device in the /dev
directory. For <a href="commandref.html#CUL">CUL</a> a file named
/dev/ttyACM* will be created under
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
browser):<pre>
/dev/ttyACM* will be created under 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 browser):<pre>
define CUL1 CUL /dev/ttyACM0@9600 1234</pre>
You can find details about CUL define parameters <a
@ -107,17 +126,13 @@
The same is to be done for the <a href="commandref.html#FHZ">FHZ</a> with
slightly different parameters:<pre>
define FHZ1 FHZ /dev/ttyUSB0</pre>
For the FHZ on OSX you need to install the ftdi driver first from <a
href="http://www.ftdichip.com/Drivers/VCP.htm">
http://www.ftdichip.com/Drivers/VCP.htm</a>, the device name will be
/dev/cu.usbserial-xxxxxxxx.
<br><br>
<b>Notes:</b>
<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>Execute commands by typing enter in the FHEMWEB input line.
Clicking on the save button won't execute your command.
<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 FB7390 image.
@ -127,11 +142,11 @@
<a name="sensors"></a>
<h3>Configuring transmitter devices (i.e. sensors)</h3>
<ul>
The sample configuration file installed via "make install-pgm2" has
configured an <a href="commandref.html#autocreate">autocreate</a>
instance. This will automatically create fhem devices upon reception
of a message from this device (typically a sensor like S300 or FHT).
Just wait for a while, watch the log and re-check your browser for newly
Many Radio devices will be created automatically in the default
configuration, due to the enabled <a href="commandref.html#autocreate">
autocreate</a> instance. This will automatically create fhem devices upon
reception of a message from this device (typically a sensor like S300 or
FHT). Just wait for a while, watch the log and re-check your browser for newly
appeared devices. You can use <a href="commandref.html#rename">
rename</a> to rename the automatically created device, e.g. type in the
input field of the web frontend:
@ -140,10 +155,9 @@
rename FHT_1234 fht.kitchen</pre>
</code></ul>
<br>
<b>Note</b>: if you rename the device itself, the attached FileLog
and weblink will be renamed automatically. The other way round (renaming
the FileLog or weblink) will not rename the associated devices
<b>Note</b>: if you rename the device itself, the attached FileLog and
weblink will be renamed automatically. The other way round (renaming the
FileLog or weblink) will not rename the associated devices
automatically.<br><br>
If you want to do the same manually:<br>
@ -172,7 +186,7 @@
HomeMatic sensors do not need to be paired with fhem, on the other side
fhem will only autocreate such a device, when it receives a pairing
request. You still need to "set CUL hmPairForSec 600" to respond
to this request.
to this request. The same is valid vor ZWave devices.
</ul>
<a name="actors"></a>
@ -191,9 +205,9 @@
to get only the commands available for this device.<br><br>
Other systems (EnOcean/HomeMatic) require a more elaborate procedure, and
the corresponding USB device is to be set into a pairing mode first. See
the commandref entry for your device.
Other systems (EnOcean/HomeMatic/ZWave) require a more elaborate
procedure, and the corresponding USB device is to be set into a pairing
mode first. See the commandref entry for your device.
<br><br>
Creating a fhem FHT / HomeMatic / EnOcean device automatically or
@ -353,37 +367,39 @@
<a name="security"></a>
<h3>Security</h3>
<ul>
<li>The telnet port cannot be secured with a password. Usually this is
not a problem, since this port is only accessible from the secure
home network. Deleting the last "global" attribute from the "attr
global port 7073 global" (changing it to "attr global port 7073")
will accept only local connections (i.e. telnet only from the fhem
server itself). <br><br></li>
<li>Both default TCP/IP interfaces in fhem (telnet and FHEMWEB) can be
secured by a password and additionally with encryption (HTTPS/SSL):
<ul>
<li>for <a href="commandref.html#FHEMWEB">FHEMWEB</a> see the
<a href="commandref.html#basicAuth">basicAuth</a> and
<a href="commandref.html#HTTPS">HTTPS</a> attributes
<li>for <a href="commandref.html#telnet">telnet</a> (which is more
or less a TCP/IP port) see the
<a href="commandref.html#password">password</a> and
<a href="commandref.html#SSL">SSL</a> attributes
</ul>
This is however not the default for most default configurations, and
this is the reason why you receive a SecurityCheck warning after
installation.
<br><br></li>
<li>One way of secure access from the outside is to use a VPN connection.
<li>Another way of secure access from the outside is to use a VPN connection.
Connecting e.g. to a FritzBox by VPN works both for iOS and Android
devices.
devices, although the latter is more complicated to set up.
<br><br></li>
<li>Securing FHEMWEB (method 1) by using the builtin features of FHEMWEB
for <a href="commandref.html#basicAuth">basic</a> html authentication
and <a href="commandref.html#HTTPS">HTTPS</a>. The perl modules
needed for HTTPS are missing from the FritzBox distribution, so this
is not an option here.
<br><br></li>
<li>Securing FHEMWEB (method 2) by using apache to implement this
features, and redirect a certain prefix to each FHEMWEB instance.
Add the following lines to your httpd.conf:<pre>
&lt;Proxy *&gt;
AuthType Basic
AuthName "Password Required"
AuthUserFile /home/httpd/etc/passwd
Require valid-user
Allow from 127.0.0.1
&lt;/Proxy&gt;
ProxyPass /fhem http://localhost:8083/fhem
ProxyPassReverse /fhem http://localhost:8083/fhem</pre>
<li>You can secure FHEMWEB also by using apache to implement basicAuth /
HTTPS by redirect a certain prefix to your FHEMWEB instance.
Add the following lines to your httpd.conf:<pre>
&lt;Proxy *&gt;
AuthType Basic
AuthName "Password Required"
AuthUserFile /home/httpd/etc/passwd
Require valid-user
Allow from 127.0.0.1
&lt;/Proxy&gt;
ProxyPass /fhem http://localhost:8083/fhem
ProxyPassReverse /fhem http://localhost:8083/fhem</pre>
and then restart httpd with apachectl graceful. To create the password
file, execute<br>
@ -407,13 +423,14 @@
<a name="fhemweb"></a>
<h3>FHEMWEB (pgm2) look and feel</h3>
<ul>
It makes sense to group your devices into rooms by setting the room
attribute. FHEMWEB puts devices without a room attribute into the
It makes sense to group your devices into rooms by setting the room or
group attribute. FHEMWEB puts devices without a room attribute into the
"Unsorted" room. Devices in the room "hidden" will not be shown.
<br><br>
You can also define a stripped down FHEMWEB instance, by defining the
Menu entries to be hidden in the
<a href="commandref.html#hiddenroom">hiddenroom</a> FHEMWEB attribute.
Menu entries to be hidden in the <a
href="commandref.html#hiddenroom">hiddenroom</a> FHEMWEB attribute.
<br><br>
Edit the colors / fonts by changing the style.css ("Edit files" ->

View File

@ -8460,7 +8460,9 @@ These receivers supports many protocols like Oregon Scientific weather sensors,
192.168.1.5:10001
</ul>
<ul>
noninit is optional and issues that the RFXCOM device should not be initialized. This is useful if you share a RFXCOM device. It is also useful for testing to simulate a RFXCOM receiver via netcat or via FHEM2FHEM.
noninit is optional and issues that the RFXCOM device should not be
initialized. This is useful if you share a RFXCOM device. It is also useful
for testing to simulate a RFXCOM receiver via netcat or via FHEM2FHEM.
<br>
<br>
Example: <br>
@ -9732,7 +9734,11 @@ KlikAanKlikUit, NEXA, CHACON, HomeEasy UK.</li>
192.168.1.5:10001
</ul>
<ul>
noninit is optional and issues that the RFXtrx433 device should not be initialized. This is useful if you share a RFXtrx433 device via LAN. It is also useful for testing to simulate a RFXtrx433 receiver via netcat or via FHEM2FHEM.
noninit is optional and issues that the RFXtrx433 device should not be
initialized. This is useful if you share a RFXtrx433 device via LAN. It is
also useful for testing to simulate a RFXtrx433 receiver via netcat or via
FHEM2FHEM.
<br>
<br>
Example: <br>
@ -10524,12 +10530,15 @@ KlikAanKlikUit, NEXA, CHACON, HomeEasy UK. <br> You need to define an RFXtrx433
fhem device <i>devicename</i>, just like if it would be attached to the
local fhem.
Drawback: only devices using the Dispatch function (CUL, FHZ, CM11,
SISPM, RFXCOM, TCM, TRX, TUL) generate raw messages.<br>
SISPM, RFXCOM, TCM, TRX, TUL) generate raw messages, and you must create a
FHEM2FHEM instance for each remote device.<br>
<i>devicename</i> must exist on the local
fhem server too with the same name and same type as the remote device, but
usually with the device-node "none", so it is only a dummy device. All
necessary attributes (e.g. <a href="#rfmode">rfmode</a> if the remote CUL
is in HomeMatic mode) must also be set for the local device.
with the device-node "none", so it is only a dummy device.
All necessary attributes (e.g. <a href="#rfmode">rfmode</a> if the remote
CUL is in HomeMatic mode) must also be set for the local device.
Do not reuse a real local device, else duplicate filtering (see dupTimeout)
won't work correctly.
</li>
</ul>
The last parameter specifies an optional portpassword, if the remote server
@ -10537,8 +10546,12 @@ KlikAanKlikUit, NEXA, CHACON, HomeEasy UK. <br> You need to define an RFXtrx433
<br>
Examples:
<ul>
<code>define ds1 FHEM2FHEM 192.168.0.1:7072 LOG:.*</code><br>
<code>define ds2 FHEM2FHEM 192.168.0.1:7072 RAW:CUL</code><br>
<code>define ds1 FHEM2FHEM 192.168.178.22:7072 LOG:.*</code><br>
<br>
<code>define RpiCUL CUL none 0000</code><br>
<code>define ds2 FHEM2FHEM 192.168.178.22:7072 RAW:RpiCUL</code><br>
and on the RPi (192.168.178.22):<br>
<code>rename CUL_0 RpiCUL</code><br>
</ul>
</ul>
<br>

View File

@ -14,6 +14,7 @@
<div id="logo"></div>
<div id="menu">
<table><tr><td> <!-- Playing with the width -->
<table id="room">
<tr><td></td></tr>
<tr><td><b>Content:</b></td></tr>
@ -37,6 +38,7 @@
<tr><td><a href="#License">License</a></td></tr>
<tr><td></td></tr>
</table>
</td></tr></table>
</div>
@ -125,7 +127,7 @@
<br><br>
Android frontends:
<a href="http://andFHEM.klass.li">AndFHEM</a> (native app)
<a href="http://andFHEM.klass.li">andFHEM</a> (native app)
</ul>
@ -280,9 +282,6 @@
<div id="dist"><a href="README.contrib">contrib/README</a> describes
some loosely coupled useful modules / scripts which can be used with
fhem.</div>
<div id="dist">Protocol descriptions and other useful stuff: <a
href="http://fhz4linux.info/">http://fhz4linux.info/</a></div>
</ul>
@ -296,25 +295,6 @@
http://fhem.svn.sourceforge.net</a><br>
<br>
Frontends:<br>
<ul>
<li>webpgm3 - A Web frontend from Martin Haas:
<a href="http://www.martin-haas.de/fhz">http://www.martin-haas.de/fhz</a><br>
<li>myHCE - A Web frontend from Martin Fischer:
<a href="http://www.fischer-net.de/hausautomation/myhce.html">
http://www.fischer-net.de/hausautomation/myhce.html</a><br>
<li>Frontend for the iPhone:
<a href="http://www.gschaden.com/wp/2009/01/18/fhem-iphone-gateway/">
http://www.gschaden.com/wp/2009/01/18/fhem-iphone-gateway/</a> or
<a href="http://www.dhs-computertechnik.de/support-iphone.html">
http://www.dhs-computertechnik.de/support-iphone.html</a>
<br>
<li>LinViex (home automation frontend):
<a href="http://sourceforge.net/projects/linviex">
http://sourceforge.net/projects/linviex</a><br>
</ul>
<br>
Device/OS Specific installation guides:<br>
<ul>
<li>Instructions for the <a href="fritzbox.html">Fritz!Box</a></li>
@ -373,13 +353,16 @@
is needed <i>additionally</i> to the OS image from AVM.<br>
<li>On the FB7270 unpack <a
href="http://fhem.de/fhem-=VERS=-fb7390.image">this</a> zip file to a USB-Disk,
attach the disk to the FritzBox, log in, and strt fhem from there.
attach the disk to the FritzBox, log in, and start fhem from there.
<li>See also the detailed documentation <a href="fritzbox.html">here</a>.
</ul>
<h4>Debian/Ubuntu</h4>
<ul>
<li>Install <a href="http://fhem.de/fhem-=VERS=.deb">this</a> package.
<b>Note:</b> For upgrading it is necessary to purge the old package (dpkg
-P fhem), as the directory structure has changed to be the same as with
.tar.gz or fritzbox.
</ul>
<h4>Unix / OSX</h4>
@ -390,12 +373,7 @@
</li>
<li>Download the <a href="http://fhem.de/fhem-=VERS=.tar.gz">
.tar.gz</a> package, unpack it, and change to the unpacked directory.
<ul>
<li>Option 1: start fhem directly from this directory (perl fhem.pl fhem.cfg).
<li>Option 2: Install it by checking the Makefile first then typing
make install.<br>
Check the installed fhem.cfg and start fhem as advised.
</ul>
<li>start fhem directly from this directory (perl fhem.pl fhem.cfg).
</ul>
<h4>Windows</h4>
@ -421,7 +399,9 @@
<ul>
Copyright:<br>
<ul>
<li>Rudolf Koenig (r dot koenig at koeniglich dot de)</li>
<li>Rudolf Koenig (r dot koenig at koeniglich dot de. Note: I <b>do
not</b> provide fhem-support via private mail, use the google
fhem-users group instead)</li>
<li>Martin Haas (webfrontends/pgm3)</li>
<li>Olaf Droegehorn (webfrontends/pgm5)</li>
<li>Numerous other people with their fhem modules</li>

Binary file not shown.

View File

@ -25,34 +25,22 @@
<ul>
After the CeBIT 2011 AVM released an image for the Fritz!Box7390 containing
fhem, see <a href="http://www.avm.de/de/Service/Service-Portale/Labor/index.php"
>this</a> link. This image is to be installed in <i>addition</i> to the
normal firmware.
Version 19798 of this fhem-image (not the Lab firmware) configures 2 CUL
devices, the first one talking FS20 ("SlowRF"), the second preconfigured for
HomeMatic. Autoconfigure is not enabled by default, so you'll either have
to enable it or to enter the devices by hand.
<br><br>
>this</a> link. This image is to be installed in <b>addition</b> to the
normal firmware. You can upgrade/replace the normal firmware any time
without hurting the fhem installation and vice versa. This fhem
installation configures 2 CUL devices, the first one talking FS20
("SlowRF"), the second preconfigured for HomeMatic. <br><br>
The bad news with this fhem-image is, that it will start fhem in a chroot
environment, i.e. you will not be able to trigger arbitrary FritzBox
functions out of fhem, e.g. sending mail, enabling WLAN, etc., it relies
only on the commands provided by a busybox copied to the chroot
environment. <br><br>
The AVM installation will start fhem in a chroot environment, in order to
minimize security concerns, but this also prevents fhem to trigger
arbitrary FritzBox functions, e.g. sending mail, enabling WLAN, etc. wont
be possible from fhem.<br><br>
<a href="fhem-=VERS=-fb7390.image">This</a> image from fhem.de contains a
stripped down version of the perl package from the AVM fhem-image, the fhem
package, a dfu-programmer for flashing the CUL, and a modified installation
script.
The main difference is starting fhem in a normal (non-chroot) environment,
and enabling autocreate. When installing it, you have to confirm with an
extra click that it does not have a valid AVM signature. It will reuse your
old logfiles and configuration, unlike the "original" AVM firmware.
Autocreate is on, and there are <b>no</b> CUL devices defined in the initial
configuration, you'll have to do this manually, e.g. by following the HOWTO
or the command reference.
</ul>
<a href="fhem-=VERS=-fb7390.image">This</a> image from fhem.de contains
perl from the AVM fhem-image and of course fhem, the main difference is,
that fhem will be started in a normal (non-chroot) environment.
When installing it, you have to confirm with an extra click that it does
not have a valid AVM signature. </ul>
<h3>Fritz!Box 7170/7270 (as of 2011-09-03)</h3>
<ul>
@ -70,104 +58,11 @@
echo "&lt;path-of-the-stick&gt;/fhem/startfhem" > /var/flash/debug.cfg
<li>Start fhem manually with "&lt;path-of-the-stick&gt;/fhem/startfhem"
</ul>
Since these devices have less memory than the FB7390, fhem may suffer from
memory-shortage, esp. inspecting large logs directly in the browser my lead
to a reboot.
</ul>
<h3>Fritz!Box 7170 in <a href="http://fhemwiki.de/index.php/AVM_Fritz!Box">fhemwiki</a></h3>
<h3>Fritz!Box 7170 (from Achim, as of 2009-10-19)</h3>
<ul>
<li>Flash the FritzBox with the Freetz firmware using the Fritz!Box
web-frontend. As we are not allowed to offer a FritzBox binary image for
download, here is a mini HOWTO:<br>
<ul>
<li>Download <a
href="http://trac.freetz.org/downloads/freetz-1.0.3.tar.bz2">
http://trac.freetz.org/downloads/freetz-1.0.3.tar.bz2</a></li>
<li>Bunzip2 and untar the package</li>
<li>Copy <a href="fb7170/dotconfig">dotconfig</a> into the untarred
directory as .config
<li>Call make
</ul><br>
<li>Copy the tgz packages <a href="fb7170/apache-1.3.41.tgz">apache</a>
(1MB), <a href="fb7170/fhem-4.6.tgz">fhem</a> (1MB) and
<a href="fb7170/perl-5.6.2.tgz">perl</a> (10MB) to the USB stick
and attach it to the box.<br><br>
<li>Restart the box and connect to the box using telnet, e.g. with<pre>
telnet 192.168.178.1</pre>
<li>Untar the packages into a new directory on the USB stick, e.g.<pre>
cd /var/media/ftp/uStor01/
mkdir fritzext
cd fritzext
tar -xvzf ../fhem-4.6.tgz
tar -xvzf ../perl-5.6.2.tgz
tar -xvzf ../apache-1.3.41.tgz</pre>
For the following ascii file modifications the editor nano can be used
which is contained in the Freetz firmware.<br><br>
<li>Adapt /var/flash/debug.cfg, and change the path to fhem:<pre>
/var/flash # more debug.cfg
export dTSB=1212687845
/bin/sleep 120
cd /var/media/ftp/uStor01/fritzext/fhem-4.5 && ./rc.fhem</pre>
<li>Adapt fhem/rc.fhem, and change the path to perl, fhem, apache:<pre>
#!/bin/sh
# "RC" script for a fhem running on the Fritz!Box from
# an attached usb-stick.
cd /var
ln -s /var/media/ftp/uStor01/fritzext/perl .
ln -s /var/media/ftp/uStor01/fritzext/apache-1.3.41 .
ln -s /var/media/ftp/uStor01/fritzext/fhem .
export LD_LIBRARY_PATH=/var/perl/lib
export PATH=/var/perl/bin:$PATH
export PERL5LIB=/var/perl/lib/:/var/perl/perl5/:/var/perl/lib/perl5/5.6.2/
mount -o remount,rw /var/media/ftp/uStor01
swapon /var/perl/swapfile
# For CUL:
insmod /lib/modules/2.6.13.1-ohio/kernel/drivers/usb/serial/usbserial.ko
vendor=0x03eb product=0x204b
# For FHZ:
insmod /lib/modules/2.6.13.1-ohio/kernel/drivers/usb/serial/ftdi_sio.ko
cd /var/media/ftp/uStor01/fritzext/fhem
perl fhem.pl fhem.cfg
cd /var/
apache-1.3.41/apache apache-1.3.41/conf/apache.conf</pre>
<li>Adapt your fhem.cfg. CUL can be used on /dev/ttyUSB0.<br><br>
<li>Restart the box
</ul>
<h3>Fritz!Box 7270 (from Volker, as of 2009-10-19)</h3>
<ul>
<li>Unpack <a href="fb7270/fhem45-on-fritzbox.tgz">fhem45-on-fritzbox.tgz</a>
to the USB-stick.<br><br>
<li>Attach the USB storage (stick) to the Fritz!Box. The Fritz!Box should
recognize it. Now we have to modify usr/fhem/rc.fhem.<br><br>
<li>Login (via telnet) to the Fritz!Box with the WEB-Password<pre>
telnet fritz.box</pre>
<li>Change to the folder /var/media/ftp/*partition*/usr/fhem <br><br>
<li>Edit rc-cp.fhem with nvi<br>
(i starts editing, ESC leaves edit mode, X deletes a character, :q! quits
nvi without change, ; :wq saves and quits nvi)<br>
and adapt the mount point. This is often MassStorageDevice-Partition-0-1.
This script will generate some links, makes a copy of .../usr/fhem to
/var/usr/ and starts "perl fhem-celica.pl fhem.volker.conf" in the
background.<br><br>
<li>Run ./rc-cp.fhem in the directory usr/fhem<br>
<b>Note:</b>After rebooting the Fritz!Box you will have run this script
again.<br><br>
</ul>
</div>
</body>