mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 05:04:21 +01:00
This reverts commit 5f4f18a0dd.
This commit is contained in:
@@ -1,10 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 3.9
|
|
||||||
|
|
||||||
- Adds support for enabling UPnP
|
|
||||||
- Improve waiting for udev devices mechanism
|
|
||||||
|
|
||||||
## 3.8
|
## 3.8
|
||||||
|
|
||||||
- Bump deCONZ to 2.05.71
|
- Bump deCONZ to 2.05.71
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ ARG BUILD_ARCH
|
|||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
curl \
|
curl \
|
||||||
|
udev \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
kmod \
|
kmod \
|
||||||
@@ -25,7 +26,6 @@ RUN apt-get update \
|
|||||||
sqlite3 \
|
sqlite3 \
|
||||||
tigervnc-common \
|
tigervnc-common \
|
||||||
tigervnc-standalone-server \
|
tigervnc-standalone-server \
|
||||||
udev \
|
|
||||||
wget \
|
wget \
|
||||||
wmii \
|
wmii \
|
||||||
xfonts-base \
|
xfonts-base \
|
||||||
|
|||||||
@@ -122,25 +122,6 @@ Example add-on config with `dbg_aps` enabled on log level 1:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Enabling UPnP
|
|
||||||
|
|
||||||
The add-on, by default, disables the native UPnP functionality of deCONZ.
|
|
||||||
This is because the add-on uses an alternative discovery mechanism that allows
|
|
||||||
for an improved integration experience.
|
|
||||||
|
|
||||||
Nevertheless, the add-on allows you to enable UPnP again, in case you want
|
|
||||||
deCONZ to be discovered by other applications (that are not Home Assistant).
|
|
||||||
|
|
||||||
Add the `upnp` add-on option, and set it to `true` to enable UPnP:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"device": "/dev/ttyUSB0",
|
|
||||||
"vnc_password": "",
|
|
||||||
"upnp": true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Add-on configuration:
|
Add-on configuration:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "deCONZ",
|
"name": "deCONZ",
|
||||||
"version": "3.9",
|
"version": "3.8",
|
||||||
"slug": "deconz",
|
"slug": "deconz",
|
||||||
"description": "Control a ZigBee network with ConBee or RaspBee by Dresden Elektronik",
|
"description": "Control a ZigBee network with ConBee or RaspBee by Dresden Elektronik",
|
||||||
"arch": ["amd64", "armhf", "aarch64"],
|
"arch": ["amd64", "armhf", "aarch64"],
|
||||||
@@ -26,11 +26,17 @@
|
|||||||
"udev": true,
|
"udev": true,
|
||||||
"gpio": true,
|
"gpio": true,
|
||||||
"apparmor": false,
|
"apparmor": false,
|
||||||
"privileged": ["SYS_MODULE", "SYS_RAWIO"],
|
"privileged": [
|
||||||
"devices": ["/dev/bus/usb:/dev/bus/usb:rwm", "/dev/mem:/dev/mem:rw"],
|
"SYS_MODULE",
|
||||||
|
"SYS_RAWIO"
|
||||||
|
],
|
||||||
|
"devices": [
|
||||||
|
"/dev/bus/usb:/dev/bus/usb:rwm",
|
||||||
|
"/dev/mem:/dev/mem:rw"
|
||||||
|
],
|
||||||
"options": {
|
"options": {
|
||||||
"device": null,
|
"device": null,
|
||||||
"vnc_password": ""
|
"vnc_password": ""
|
||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
"device": "str",
|
"device": "str",
|
||||||
@@ -39,8 +45,7 @@
|
|||||||
"dbg_info": "int?",
|
"dbg_info": "int?",
|
||||||
"dbg_otau": "int?",
|
"dbg_otau": "int?",
|
||||||
"dbg_zcl": "int?",
|
"dbg_zcl": "int?",
|
||||||
"dbg_zdp": "int?",
|
"dbg_zdp": "int?"
|
||||||
"upnp": "bool?"
|
|
||||||
},
|
},
|
||||||
"image": "homeassistant/{arch}-addon-deconz"
|
"image": "homeassistant/{arch}-addon-deconz"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,21 +24,11 @@ VNC_PASSWORD=$(bashio::config 'vnc_password')
|
|||||||
WEBSOCKET_PORT=$(bashio::addon.port 8080)
|
WEBSOCKET_PORT=$(bashio::addon.port 8080)
|
||||||
|
|
||||||
# Lookup udev link
|
# Lookup udev link
|
||||||
if [[ -c "${DECONZ_DEVICE}" ]]; then
|
sleep 3
|
||||||
bashio::log.debug "Specified device points to a character special file, continuing"
|
if [ -L "${DECONZ_DEVICE}" ]; then
|
||||||
else
|
|
||||||
# 60 second timeout to wait for udev to finish processing
|
|
||||||
timeout=60
|
|
||||||
while [[ ! -L "${DECONZ_DEVICE}" ]]; do
|
|
||||||
if [[ "${timeout}" -eq 0 ]]; then
|
|
||||||
bashio::exit.nok "No device ${DECONZ_DEVICE} found!"
|
|
||||||
fi
|
|
||||||
bashio::log.debug "Waiting for udev to link device..,"
|
|
||||||
sleep 1
|
|
||||||
((timeout--))
|
|
||||||
done
|
|
||||||
DECONZ_DEVICE="$(readlink -f "${DECONZ_DEVICE}")"
|
DECONZ_DEVICE="$(readlink -f "${DECONZ_DEVICE}")"
|
||||||
bashio::log.debug "Found device! Location: ${DECONZ_DEVICE}"
|
elif [ ! -e "${DECONZ_DEVICE}" ]; then
|
||||||
|
bashio::exit.nok "No device ${DECONZ_DEVICE} found!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Load debug values
|
# Load debug values
|
||||||
@@ -53,10 +43,6 @@ bashio::config.has_value 'dbg_zcl' \
|
|||||||
bashio::config.has_value 'dbg_zdp' \
|
bashio::config.has_value 'dbg_zdp' \
|
||||||
&& DBG_ZDP="$(bashio::config 'dbg_zdp')" || DBG_ZDP=0
|
&& DBG_ZDP="$(bashio::config 'dbg_zdp')" || DBG_ZDP=0
|
||||||
|
|
||||||
# Handle UPNP
|
|
||||||
bashio::config.true 'upnp' \
|
|
||||||
&& UPNP=1 || UPNP=0
|
|
||||||
|
|
||||||
# Check if port is available
|
# Check if port is available
|
||||||
if bashio::var.is_empty "${API_PORT}" \
|
if bashio::var.is_empty "${API_PORT}" \
|
||||||
|| bashio::var.is_empty "${WEBSOCKET_PORT}";
|
|| bashio::var.is_empty "${WEBSOCKET_PORT}";
|
||||||
@@ -110,7 +96,7 @@ deCONZ \
|
|||||||
--dbg-zdp="${DBG_ZDP}" \
|
--dbg-zdp="${DBG_ZDP}" \
|
||||||
--http-port="${API_PORT}" \
|
--http-port="${API_PORT}" \
|
||||||
--ws-port="${WEBSOCKET_PORT}" \
|
--ws-port="${WEBSOCKET_PORT}" \
|
||||||
--upnp="${UPNP}" \
|
--upnp=0 \
|
||||||
--dev="${DECONZ_DEVICE}" &
|
--dev="${DECONZ_DEVICE}" &
|
||||||
WAIT_PIDS+=($!)
|
WAIT_PIDS+=($!)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user