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
|
||||
|
||||
## 3.9
|
||||
|
||||
- Adds support for enabling UPnP
|
||||
- Improve waiting for udev devices mechanism
|
||||
|
||||
## 3.8
|
||||
|
||||
- Bump deCONZ to 2.05.71
|
||||
|
||||
@@ -9,6 +9,7 @@ ARG BUILD_ARCH
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
udev \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
kmod \
|
||||
@@ -25,7 +26,6 @@ RUN apt-get update \
|
||||
sqlite3 \
|
||||
tigervnc-common \
|
||||
tigervnc-standalone-server \
|
||||
udev \
|
||||
wget \
|
||||
wmii \
|
||||
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
|
||||
|
||||
Add-on configuration:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "deCONZ",
|
||||
"version": "3.9",
|
||||
"version": "3.8",
|
||||
"slug": "deconz",
|
||||
"description": "Control a ZigBee network with ConBee or RaspBee by Dresden Elektronik",
|
||||
"arch": ["amd64", "armhf", "aarch64"],
|
||||
@@ -26,11 +26,17 @@
|
||||
"udev": true,
|
||||
"gpio": true,
|
||||
"apparmor": false,
|
||||
"privileged": ["SYS_MODULE", "SYS_RAWIO"],
|
||||
"devices": ["/dev/bus/usb:/dev/bus/usb:rwm", "/dev/mem:/dev/mem:rw"],
|
||||
"privileged": [
|
||||
"SYS_MODULE",
|
||||
"SYS_RAWIO"
|
||||
],
|
||||
"devices": [
|
||||
"/dev/bus/usb:/dev/bus/usb:rwm",
|
||||
"/dev/mem:/dev/mem:rw"
|
||||
],
|
||||
"options": {
|
||||
"device": null,
|
||||
"vnc_password": ""
|
||||
"device": null,
|
||||
"vnc_password": ""
|
||||
},
|
||||
"schema": {
|
||||
"device": "str",
|
||||
@@ -39,8 +45,7 @@
|
||||
"dbg_info": "int?",
|
||||
"dbg_otau": "int?",
|
||||
"dbg_zcl": "int?",
|
||||
"dbg_zdp": "int?",
|
||||
"upnp": "bool?"
|
||||
"dbg_zdp": "int?"
|
||||
},
|
||||
"image": "homeassistant/{arch}-addon-deconz"
|
||||
}
|
||||
|
||||
@@ -24,21 +24,11 @@ VNC_PASSWORD=$(bashio::config 'vnc_password')
|
||||
WEBSOCKET_PORT=$(bashio::addon.port 8080)
|
||||
|
||||
# Lookup udev link
|
||||
if [[ -c "${DECONZ_DEVICE}" ]]; then
|
||||
bashio::log.debug "Specified device points to a character special file, continuing"
|
||||
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
|
||||
sleep 3
|
||||
if [ -L "${DECONZ_DEVICE}" ]; then
|
||||
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
|
||||
|
||||
# Load debug values
|
||||
@@ -53,10 +43,6 @@ bashio::config.has_value 'dbg_zcl' \
|
||||
bashio::config.has_value 'dbg_zdp' \
|
||||
&& DBG_ZDP="$(bashio::config 'dbg_zdp')" || DBG_ZDP=0
|
||||
|
||||
# Handle UPNP
|
||||
bashio::config.true 'upnp' \
|
||||
&& UPNP=1 || UPNP=0
|
||||
|
||||
# Check if port is available
|
||||
if bashio::var.is_empty "${API_PORT}" \
|
||||
|| bashio::var.is_empty "${WEBSOCKET_PORT}";
|
||||
@@ -110,7 +96,7 @@ deCONZ \
|
||||
--dbg-zdp="${DBG_ZDP}" \
|
||||
--http-port="${API_PORT}" \
|
||||
--ws-port="${WEBSOCKET_PORT}" \
|
||||
--upnp="${UPNP}" \
|
||||
--upnp=0 \
|
||||
--dev="${DECONZ_DEVICE}" &
|
||||
WAIT_PIDS+=($!)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user