diff --git a/CHANGED b/CHANGED index 055aded7b..aa3ec1353 100644 --- a/CHANGED +++ b/CHANGED @@ -8,6 +8,7 @@ - bugfix: FS20 on-for-timer error reporting only in the logfile - bugfix: FHEM2FHEM should work with CUL again, after syntax change - feature: CUL directio mode (No Device::SerialPort needed) + - feature: FritzBox 7270 ZIP file - 2011-07-08 (5.1) - feature: smallscreen optimizations for iPhone diff --git a/contrib/FB7270/fhemcmd.sh b/contrib/FB7270/fhemcmd.sh new file mode 100644 index 000000000..cd45db2d3 --- /dev/null +++ b/contrib/FB7270/fhemcmd.sh @@ -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 + + diff --git a/contrib/FB7270/makeimage b/contrib/FB7270/makeimage new file mode 100755 index 000000000..7120a8118 --- /dev/null +++ b/contrib/FB7270/makeimage @@ -0,0 +1,44 @@ +#!/bin/sh + +fw=$1 +if test ! -f ../../$fw.tar.gz; then + echo "usage: makeimage " + echo "../../.tar.gz must exist" + exit 1 +fi + +rm -rf var +echo Extracting the fritzbox template +unzip -qo ../../priv/fritzbox7270_template.zip + +cp fhemcmd.sh fhem/FHEM +cp startfhem fhem + +echo Extracting $fw +rm -rf $fw +tar zxf ../../$fw.tar.gz +cd $fw +cp fhem.pl ../fhem +cp FHEM/*\ + webfrontend/pgm2/*\ + docs/*.html\ + docs/fhem.png\ + docs/*.jpg\ + ../fhem/FHEM + +cd examples +for i in *; do + cp -r $i ../../fhem/FHEM/example.$i +done +cd ../.. +rm -rf $fw + + +echo Packing again +cd fhem +cp FHEM/example.sample_pgm2 fhem.cfg +perl -pi -e 's,/tmp,./log,g' fhem.cfg + +cd .. +zip -qr $fw-fb7270.zip fhem +rm -rf fhem diff --git a/contrib/FB7270/startfhem b/contrib/FB7270/startfhem new file mode 100755 index 000000000..96e8dfe17 --- /dev/null +++ b/contrib/FB7270/startfhem @@ -0,0 +1,21 @@ +#!/bin/sh + +root=`df | sed -n -e '/ftp\//s/.*ftp\///p'` +home=/var/InternerSpeicher/$root/fhem + +cd $home + +trap "" SIGHUP +modprobe kernel/cdc_acm +modprobe ftdi_sio +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/5.10 + +perl fhem.pl fhem.cfg diff --git a/docs/fhem.html b/docs/fhem.html index 0af417d23..5b948dff6 100644 --- a/docs/fhem.html +++ b/docs/fhem.html @@ -71,8 +71,9 @@