Skip to content

Commit

Permalink
updated all files to latest 2.4.2 changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed Apr 10, 2020
1 parent aeb91cf commit 5af6059
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 34 deletions.
Binary file modified ccu1/cuxd/cuxd
Binary file not shown.
24 changes: 12 additions & 12 deletions ccu1/rc.d/cuxdaemon
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
CUXDIR=/usr/local/addons/cuxd
CONFIG_URL=/addons/cuxd/index.ccc
PIDFILE=/var/run/cuxd.pid
export LD_LIBRARY_PATH=/usr/local/addons/cuxd
export LD_LIBRARY_PATH=$CUXDIR
export CURL_CA_BUNDLE=$CUXDIR/extra/cacert.pem

case "$1" in
""|start)
if [ ! -h /usr/local/etc/config/addons/www/cuxd ]
then ln -sf /usr/local/addons/cuxd /usr/local/etc/config/addons/www/cuxd
then ln -sf $CUXDIR /usr/local/etc/config/addons/www/cuxd
fi
if [ -f /usr/local/addons/cuxd/cuxd.ini ]
if [ -f $CUXDIR/cuxd.ini ]
then
grep -v "^HM-SCRIPTHOST=\|^HM-SCRIPTPORT=\|^HM-REGAPORT=" /usr/local/addons/cuxd/cuxd.ini >/tmp/cuxd.ini
diff -q /usr/local/addons/cuxd/cuxd.ini /tmp/cuxd.ini >/dev/null
grep -v "^HM-SCRIPTHOST=\|^HM-SCRIPTPORT=\|^HM-REGAPORT=" $CUXDIR/cuxd.ini >/tmp/cuxd.ini
diff -q $CUXDIR/cuxd.ini /tmp/cuxd.ini >/dev/null
if [ $? -ne 0 ]
then mv /tmp/cuxd.ini /usr/local/addons/cuxd/cuxd.ini
then mv /tmp/cuxd.ini $CUXDIR/cuxd.ini
fi
fi
chmod 0755 $CUXDIR/cuxd
$CUXDIR/cuxd >/dev/null 2>&1
logger -t homematic -p user.info "started cux-daemon"
logger -t cuxd -p user.info "started cux-daemon"
;;

stop)
Expand All @@ -32,12 +32,12 @@ case "$1" in
sleep 10
kill -KILL `cat $PIDFILE` 2>/dev/null
fi
logger -t homematic -p user.info "stopped cux-daemon"
logger -t cuxd -p user.info "stopped cux-daemon"
;;

restart)
kill -HUP `cat $PIDFILE` 2>/dev/null
logger -t homematic -p user.info "stopped (restart) cux-daemon"
logger -t cuxd -p user.info "stopped (restart) cux-daemon"
sleep 1
kill -0 `cat $PIDFILE` 2>/dev/null
if [ $? = 0 ]
Expand All @@ -47,11 +47,11 @@ case "$1" in
fi
chmod 0755 $CUXDIR/cuxd
$CUXDIR/cuxd >/dev/null 2>&1
logger -t homematic -p user.info "started cux-daemon"
logger -t cuxd -p user.info "started cux-daemon"
;;

info)
VER=`/usr/local/addons/cuxd/cuxd -v`
VER=`$CUXDIR/cuxd -v`
echo "Info: <center><b>CUx-Daemon $VER</b><br><img src="../addons/cuxd/CUXD.PNG"></center>"
echo "Name: CUx-Daemon"
echo "Version: $VER"
Expand All @@ -61,7 +61,7 @@ case "$1" in
;;

uninstall)
logger -t homematic -p user.info "removing cux-daemon"
logger -t cuxd -p user.info "removing cux-daemon"
killall -KILL cuxd >/dev/null 2>&1 || true
$CUXDIR/update_addon cuxd
rm /usr/local/etc/config/addons/www/cuxd
Expand Down
Binary file modified ccu2/cuxd/cuxd
Binary file not shown.
47 changes: 42 additions & 5 deletions ccu2/rc.d/cuxdaemon
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,43 @@ Start () {
if [ "$PSPID" = "" ]
then
modprobe ehci_hcd 2>/dev/null

# check kernel version
KERNEL=`uname -r`
if [ -d $CUXDIR/modules/$KERNEL ]
then
if [ ! -f $CUXDIR/modules/set.$KERNEL ]
then
# copy kernel modules
rm -f $CUXDIR/*.ko
rm -f $CUXDIR/modules/set.*
cp -af $CUXDIR/modules/$KERNEL/*.ko $CUXDIR/
touch $CUXDIR/modules/set.$KERNEL
logger -t cuxd -p user.info "install kernel $KERNEL modules in $CUXDIR/"
fi
else
logger -t cuxd -p user.warn "no modules for kernel $KERNEL found in $CUXDIR/modules/"
fi

if [ -f /usr/bin/curl ]
then
if [ "`readlink $CUXDIR/extra/curl`" != "/usr/bin/curl" ]
then
# replace curl with symbolic link
rm -f $CUXDIR/extra/curl
ln -s /usr/bin/curl $CUXDIR/extra/curl
logger -t cuxd -p user.info "set symlink from $CUXDIR/extra/curl to /usr/bin/curl"
fi
else
if [ "`stat -c "%s" $CUXDIR/extra/curl 2>/dev/null`" != "457672" ]
then
# unpack old curl libraries
rm -f $CUXDIR/extra/curl
tar -xzf $CUXDIR/extra/curl.tgz -C $CUXDIR/extra/
logger -t cuxd -p user.info "install old curl binary $CUXDIR/extra/curl"
fi
fi

if [ -f $CUXDIR/cuxd.ini ]
then
grep -v "^HM-SCRIPTHOST=\|^HM-SCRIPTPORT=\|^HM-REGAPORT=" $CUXDIR/cuxd.ini >/tmp/cuxd.ini
Expand All @@ -47,7 +84,7 @@ Start () {
fi
chmod 0755 $CUXDIR/cuxd
$CUXDIR/cuxd >/dev/null 2>&1
logger -t homematic -p user.info "started cux-daemon"
logger -t cuxd -p user.info "started cux-daemon"
fi
echo "OK"
}
Expand All @@ -64,7 +101,7 @@ Stop () {
sleep 10
kill -KILL $PSPID 2>/dev/null
fi
logger -t homematic -p user.info "stopped cux-daemon"
logger -t cuxd -p user.info "stopped cux-daemon"
fi
echo "OK"
}
Expand All @@ -88,7 +125,7 @@ case "$1" in
echo -n "Starting CUxD: "
chmod 0755 $CUXDIR/cuxd
$CUXDIR/cuxd >/dev/null 2>&1
logger -t homematic -p user.info "started (restart) cux-daemon"
logger -t cuxd -p user.info "started (restart) cux-daemon"
echo "OK"
fi
;;
Expand All @@ -102,12 +139,12 @@ case "$1" in
echo "Version: $VER"
echo "Operations: uninstall restart"
echo "Config-Url: $CONFIG_URL"
echo "Update: http://cuxd.de/cuxd-ccu2.php"
echo "Update: /addons/cuxd/extra/update-check.cgi"
fi
;;

uninstall)
logger -t homematic -p user.info "removing cux-daemon"
logger -t cuxd -p user.info "removing cux-daemon"
killall -KILL cuxd >/dev/null 2>&1 || true
if [ -d $CUXDIR ]
then
Expand Down
6 changes: 6 additions & 0 deletions ccu2/update_script
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ rm -f $ADDON_DIR/cuxd.dbg
# enable debugging after installation "LOGLEVEL LOGFILE"
#echo "10 /tmp/cuxddbglog.txt" >$ADDON_DIR/cuxd.dbg

# remove libraries
rm -f $ADDON_DIR/lib*.so*

# remove modules dir
rm -rf $ADDON_DIR/modules

# remove link to website
rm -f $CONFIG_DIR/addons/www/cuxd

Expand Down
Binary file modified ccu3/cuxd/cuxd
Binary file not shown.
8 changes: 4 additions & 4 deletions ccu3/rc.d/cuxdaemon
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Start () {
fi
chmod 0755 $CUXDIR/cuxd
$CUXDIR/cuxd >/dev/null 2>&1
logger -t homematic -p user.info "started cux-daemon"
logger -t cuxd -p user.info "started cux-daemon"
fi
echo "OK"
}
Expand All @@ -63,7 +63,7 @@ Stop () {
sleep 10
kill -KILL $PSPID 2>/dev/null
fi
logger -t homematic -p user.info "stopped cux-daemon"
logger -t cuxd -p user.info "stopped cux-daemon"
fi
echo "OK"
}
Expand All @@ -87,7 +87,7 @@ case "$1" in
echo -n "Starting CUxD: "
chmod 0755 $CUXDIR/cuxd
$CUXDIR/cuxd >/dev/null 2>&1
logger -t homematic -p user.info "started (restart) cux-daemon"
logger -t cuxd -p user.info "started (restart) cux-daemon"
echo "OK"
fi
;;
Expand All @@ -106,7 +106,7 @@ case "$1" in
;;

uninstall)
logger -t homematic -p user.info "removing cux-daemon"
logger -t cuxd -p user.info "removing cux-daemon"
killall -KILL cuxd >/dev/null 2>&1 || true
if [ -d $CUXDIR ]
then
Expand Down
Binary file modified ccu_x86_32/cuxd/cuxd
Binary file not shown.
8 changes: 4 additions & 4 deletions ccu_x86_32/rc.d/cuxdaemon
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Start () {
modprobe ehci_hcd 2>/dev/null
chmod 0755 $CUXDIR/cuxd
$CUXDIR/cuxd >/dev/null 2>&1
logger -t homematic -p user.info "started cux-daemon"
logger -t cuxd -p user.info "started cux-daemon"
fi
echo "OK"
}
Expand All @@ -48,7 +48,7 @@ Stop () {
sleep 10
kill -KILL $PSPID 2>/dev/null
fi
logger -t homematic -p user.info "stopped cux-daemon"
logger -t cuxd -p user.info "stopped cux-daemon"
fi
echo "OK"
}
Expand All @@ -72,7 +72,7 @@ case "$1" in
echo -n "Starting CUxD: "
chmod 0755 $CUXDIR/cuxd
$CUXDIR/cuxd >/dev/null 2>&1
logger -t homematic -p user.info "started (restart) cux-daemon"
logger -t cuxd -p user.info "started (restart) cux-daemon"
echo "OK"
fi
;;
Expand All @@ -91,7 +91,7 @@ case "$1" in
;;

uninstall)
logger -t homematic -p user.info "removing cux-daemon"
logger -t cuxd -p user.info "removing cux-daemon"
killall -KILL cuxd >/dev/null 2>&1 || true
if [ -d $CUXDIR ]
then
Expand Down
36 changes: 27 additions & 9 deletions common/cuxd/cuxd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ CUxD-Ger&auml;te verwalten
<option value='235'>(35) [4BS] Sensoren</option>
<option value='236'>(36) Aktoren</option>
<option value='237'>(37) BiDi Aktoren</option>
<option value='200' style='background-color:#E0E0FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;----- DALI -----</option>
<option value='239'>(39) DALI Aktoren</option>
<option value='200' style='background-color:#E0E0FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;----- wireless M-Bus -----</option>
<option value='225'>(25) wM-Bus Sensoren</option>
<option value='200' style='background-color:#E0E0FF'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;----- Moehlenhoff -----</option>
Expand Down Expand Up @@ -324,7 +326,7 @@ Seriennummer:&nbsp;<input type='text' name='dserial' maxlength='5' size='5' valu
|
</td><td><img src='%s?sid=<!SID!>&m=%d' name='pictures' border='0'>
</td></tr></table><br><br style='font-size:16px'>
<input type='submit' value='Ger&auml;t auf CCU erzeugen !' style='width:180px;font-family:arial;font-size:12px;' onclick='return confirm_device(form.dtype,form.dtype2);'/>
<input type='submit' value='Ger&auml;t auf CCU erzeugen !' style='width:180px;font-family:arial;font-size:12px;' onclick='return confirm_device(form);'/>
</form>
|
##15
Expand Down Expand Up @@ -400,6 +402,16 @@ function submit_dtype2(obj) {
f.dtype2.value=obj.options[obj.selectedIndex].value;
f.submit(true);
}

function set_Device(form,id) {
if (id) {
form.dbase.disabled=true;
form.dbase.value=id;
showimage();
} else {
form.dbase.disabled=false;
}
}
//--></script>
<div style='font-family:arial;font-size:13px;' align='left'>
<form name='dtype' method='post' action='%s?sid=<!SID!>&m=3' target='dstatus'>
Expand Down Expand Up @@ -439,14 +451,18 @@ function showimage() {
document.images.pictures.src='%s?sid=<!SID!>&m='+document.dtype.dbase.options[document.dtype.dbase.selectedIndex].value;
}
}
function confirm_device(dtype,dtype2) {
if (dtype && dtype2 && dtype.value && dtype2.value) {
if ((dtype.value == 37) && (dtype2.value == 0)) {
var msg = "*** ACHTUNG ***\n\n";
msg += "Bei PEHA-Schaltaktoren mit Tastenwippe und Geraetefirmware < 2.27 ist die Wippe nach dem Anlernen dauerhaft gesperrt.\n";
msg += "Dieses Problem laesst sich danach nur durch Einsenden des Aktors zum Hersteller beheben!";
return confirm(msg);
function confirm_device(form) {
if (form) {
if (form.dtype && form.dtype2 && form.dtype.value && form.dtype2.value) {
if ((form.dtype.value == 37) && (form.dtype2.value == 0)) {
var msg = "*** ACHTUNG ***\n\n";
msg += "Bei PEHA-Schaltaktoren mit Tastenwippe und Geraetefirmware < 2.27 ist die Wippe nach dem Anlernen dauerhaft gesperrt.\n";
msg += "Dieses Problem laesst sich danach nur durch Einsenden des Aktors zum Hersteller beheben!";
return confirm(msg);
}
}
if (form.dbase) form.dbase.disabled=false;
else return false;
}
return true;
}
Expand Down Expand Up @@ -763,11 +779,12 @@ Funktion:&nbsp;<select name='dtype2' size='1' onChange='submit_dtype2(this)'>
|
##55
|
<br><br>Control:&nbsp;<select name='dcontrol' size='1'>
<br><br>Control:&nbsp;<select name='dcontrol' size='1' onChange='if (this.value==4) { set_Device(this.form,%d) } else { set_Device(this.form,0) }'>
<option value='0'>Taster</option>
<option value='1'>Schalter</option>
<option value='2'>Jalousie</option>
<option value='3'>Dimmer</option>
<option value='4'>Dimmer+RGB+WHITE</option>
</select>
|
##56
Expand Down Expand Up @@ -911,5 +928,6 @@ Refresh:<input type='text' size='2' maxlength='3' name='i' value='%d'/>s
Ger&auml;t:&nbsp;<select name='dtype2' size='1' onChange='submit_dtype2(this)'>
<option value='0'$selected$>1. Schalter</option>
<option value='1'$selected$>2. Dimmer</option>
<option value='2'$selected$>3. Szenentaster</option>
</select><br><br>
|
15 changes: 15 additions & 0 deletions common/cuxd/devicelist.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ HM-PB-4-WM PushButton-4ch-wm_thumb Wandtaster 4 Kanal
HM-PB-6-WM55 86_hm-pb-6-wm55_thumb Wandtaster 6 Kanal
HM-RC-P1 21_hm-rc-p1_thumb Handsender 1 Taste
HM-RC-4 18_hm-rc-4_thumb Handsender 4 Tasten
HM-RC-8 100_hm-rc-8_thumb Handsender 8 Tasten
HM-RC-12 19_hm-rc-12_thumb Fernbedienung 12 Tasten
HM-RC-19 20_hm-rc-19_thumb Fernbedienung 19 Tasten

Expand All @@ -43,8 +44,10 @@ HM-LC-Sw1-SM 8_hm-lc-sw1-sm_thumb Schaltaktor 1fach Aufputz
HM-LC-Sw4-SM 3_hm-lc-sw4-sm_thumb Schaltaktor 4fach Aufputz
HM-LC-Sw2-DR 69_hm-lc-sw2-dr_thumb Schaltaktor 2fach Hutschiene
HM-LC-Sw4-DR 68_hm-lc-sw4-dr_thumb Schaltaktor 4fach Hutschiene
HmIPW-DRS8 161_hmipw-drs8_thumb Schaltaktor 8fach (WR)
HM-LC-Sw1-Ba-PCB 77_hm-lc-sw1-ba-pcb_thumb Schaltaktor 1fach Platine
HM-LC-Sw4-PCB 46_hm-lc-sw4-pcb_thumb Schaltaktor 4fach Platine
HmIP-MOD-OC8 156_hmip-mod-oc8_thumb Schaltaktor 8fach Platine
HM-LC-Sw1-Pl OM55_DimmerSwitch_thumb Zwischenstecker Schalter
HM-LC-Sw1PBU-FM PushButton-2ch-wm_thumb Schaltaktor 1-fach Schalter
HM-ES-PMSw1-Pl 93_hm-es-pmsw1-pl_thumb Schaltaktor mit Leistungsmessung
Expand All @@ -53,17 +56,29 @@ HM-LC-Bl1-FM 7_hm-lc-bl1-fm_thumb Jalousieaktor 1fach Unterputz
HM-LC-Bl1-SM 6_hm-lc-bl1-sm_thumb Jalousieaktor 1fach Aufputz
HM-LC-Bl1PBU-FM PushButton-2ch-wm_thumb Jalousieaktor 1fach Schalter
HM-LC-Ja1PBU-FM PushButton-2ch-wm_thumb Jalousieaktor mit Lamellen
HmIPW-DRBL4 163_hmipw-drbl4_thumb Jalousieaktor 4fach (WR)

HM-LC-Dim1T-FM 65_hm-lc-dim1t-fm_thumb Dimmaktor 1fach Unterputz
HM-LC-Dim2L-SM 45_hm-lc-dim2l-sm_thumb Dimmaktor 2fach Aufputz
HmIPW-DRD3 166_hmipw-drd3_thumb Dimmaktor 3fach Hutschiene (WR)
HM-LC-Dim1L-CV 2_hm-lc-dim1l-cv_thumb Zwischendecken Dimmer
HM-LC-Dim1L-Pl OM55_DimmerSwitch_thumb Zwischenstecker Dimmer
HM-LC-Dim1TPBU-FM PushButton-2ch-wm_thumb Dimmaktor 1fach Schalter

#HM-LC-RGBW-WM 111_hm-lc-rgbw-wm_thumb RGBW-Controller
HM-OU-CF-Pl 60_hm-ou-cf-pl_thumb Signalgeber/Gong
HM-EM-CMM 25_hm-em-cmm_thumb Z&auml;hlersensor Management
HM-EM-CCM 44_hm-em-ccm_thumb Z&auml;hlersensor Kamera
HM-OU-LED16 78_hm-ou-led16_thumb Statusanzeige 16 Kanal
HM-Sec-SD 51_hm-sec-sd_thumb Rauchmelder
HM-Sec-SD-Team 52_hm-sec-sd-team_thumb Rauchmelder (Gruppe)
HM-Sec-Key 14_hm-sec-key_thumb KeyMatic

VIR-LG-ONOFF coupling/hm-coupling-onoff virtueller Schalter
VIR-LG-DIM coupling/hm-coupling-dim virtueller Dimmer
VIR-LG-WHITE coupling/hm-coupling-white virtuell WHITE
VIR-LG-RGB coupling/hm-coupling-rgb virtuell RGB
VIR-LG-RGBW coupling/hm-coupling-rgbw virtuell RGBW
VIR-LG-WHITE-DIM coupling/hm-coupling-white-dim virtueller Dimmer + WHITE
VIR-LG-RGB-DIM coupling/hm-coupling-rgb-dim virtueller Dimmer + RGB
VIR-LG-RGBW-DIM coupling/hm-coupling-rgbw-dim virtueller Dimmer + RGBW

0 comments on commit 5af6059

Please sign in to comment.