mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 21:54:20 +01:00
Optimize Homematic 9.x (#708)
* Optimize Homematic 9.x * Fix tab * Fix version * Add profile folder * store userprofiles * update changelog * Fix version
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## 9.1
|
||||
|
||||
- Optimize InterfaceList handling
|
||||
- Make userprofiles static
|
||||
|
||||
## 9.0
|
||||
|
||||
- Add Regahss (WebUI) support (experimentel)
|
||||
|
||||
@@ -59,11 +59,13 @@ RUN curl -SL https://github.com/jens-maus/occu/archive/${OCCU_VERSION}.tar.gz |
|
||||
&& cp -R HMserver/opt/HMServer/groups /opt/HMServer/ \
|
||||
&& cp -R HMserver/opt/HMServer/measurement /opt/HMServer/ \
|
||||
&& cp -R HMserver/opt/HMServer/pages /opt/HMServer/ \
|
||||
&& sed -i "s/WEBUI_VERSION = \".*\"/WEBUI_VERSION = \"${OCCU_VERSION}\"/" WebUI/www/rega/pages/index.htm \
|
||||
&& cp -R WebUI/* / \
|
||||
&& ln -s /www /opt/hm/www \
|
||||
\
|
||||
&& touch /opt/hm/etc/config/userAckSecurityHint \
|
||||
&& touch /opt/hm/etc/config/firewallConfigured \
|
||||
&& touch /opt/hm/etc/config/legacyAPIMigrationAccepted \
|
||||
\
|
||||
&& rm -rf /usr/src/occu-${OCCU_VERSION}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "HomeMatic CCU",
|
||||
"version": "9.0",
|
||||
"version": "9.1",
|
||||
"slug": "homematic",
|
||||
"description": "HomeMatic central based on OCCU",
|
||||
"url": "https://home-assistant.io/addons/homematic/",
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<interfaces v="1.0">
|
||||
<!--rf
|
||||
<ipc>
|
||||
<name>BidCos-RF</name>
|
||||
<url>xmlrpc_bin://127.0.0.1:2001</url>
|
||||
<info>BidCos-RF</info>
|
||||
</ipc>
|
||||
rf-->
|
||||
|
||||
<ipc>
|
||||
<name>VirtualDevices</name>
|
||||
<url>xmlrpc://127.0.0.1:9292/groups</url>
|
||||
<info>Virtual Devices</info>
|
||||
</ipc>
|
||||
|
||||
<!--ip
|
||||
<ipc>
|
||||
<name>HmIP-RF</name>
|
||||
<url>xmlrpc://127.0.0.1:2010</url>
|
||||
<info>HmIP-RF</info>
|
||||
</ipc>
|
||||
ip-->
|
||||
|
||||
<!--wired
|
||||
<ipc>
|
||||
<name>Hm-Wired</name>
|
||||
<url>xmlrpc://127.0.0.1:2000</url>
|
||||
<info>Hm-Wired</info>
|
||||
</ipc>
|
||||
wired-->
|
||||
</interfaces>
|
||||
@@ -2,10 +2,17 @@
|
||||
|
||||
|
||||
function enable_interface(){
|
||||
local name=$1
|
||||
local name="$1"
|
||||
local description="$2"
|
||||
local port="$3"
|
||||
|
||||
sed -i "/<!--$name/d" /etc/config/InterfacesList.xml
|
||||
sed -i "/$name-->/d" /etc/config/InterfacesList.xml
|
||||
(
|
||||
echo " <ipc>"
|
||||
echo " <name>${name}</name>"
|
||||
echo " <url>xmlrpc://127.0.0.1:${port}</url>"
|
||||
echo " <info>${description}</info>"
|
||||
echo " </ipc>"
|
||||
) >> /etc/config/InterfacesList.xml
|
||||
}
|
||||
|
||||
|
||||
@@ -14,15 +21,20 @@ function init_interface_list() {
|
||||
local ip=$2
|
||||
local wired=$3
|
||||
|
||||
echo -e "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<interfaces v=\"1.0\">" > /etc/config/InterfacesList.xml
|
||||
enable_interface "VirtualDevices" "Virtual Devices" "9292/groups"
|
||||
|
||||
if [ "$rf" == "true" ]; then
|
||||
enable_interface "rf"
|
||||
enable_interface "BidCos-RF" "BidCos-RF" "2001"
|
||||
fi
|
||||
|
||||
if [ "$ip" == "true" ]; then
|
||||
enable_interface "ip"
|
||||
enable_interface "HmIP-RF" "HmIP-RF" "2010"
|
||||
fi
|
||||
|
||||
if [ "$wired" == "true" ]; then
|
||||
enable_interface "wired"
|
||||
enable_interface "Hm-Wired" "Hm-Wired" "2000"
|
||||
fi
|
||||
|
||||
echo "</interfaces>" >> /etc/config/InterfacesList.xml
|
||||
}
|
||||
@@ -18,6 +18,9 @@ mkdir -p /share/hmip-firmware
|
||||
mkdir -p /data/crRFD
|
||||
mkdir -p /data/rfd
|
||||
mkdir -p /data/hs485d
|
||||
mkdir -p /data/userprofiles
|
||||
|
||||
ln -s /data/userprofiles /etc/config/userprofiles
|
||||
|
||||
# Init files
|
||||
touch /data/hmip_user.conf
|
||||
|
||||
Reference in New Issue
Block a user