mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 13:44:20 +01:00
deconz: Change API port to 40850, hotfix discovery (#923)
This commit is contained in:
committed by
Pascal Vizeli
parent
2f572e5d2c
commit
afeab667dd
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## 4.1
|
||||
|
||||
- Change internal API port back to 40850, to prevent issue with discovery
|
||||
|
||||
## 4.0
|
||||
|
||||
- Bump deCONZ to 2.05.72
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "deCONZ",
|
||||
"version": "4.0",
|
||||
"version": "4.1",
|
||||
"slug": "deconz",
|
||||
"description": "Control a ZigBee network with ConBee or RaspBee by Dresden Elektronik",
|
||||
"arch": ["amd64", "armhf", "aarch64"],
|
||||
|
||||
@@ -9,7 +9,7 @@ function _deconz_api() {
|
||||
local serial
|
||||
|
||||
# Register an API key for Home Assistant
|
||||
if ! result="$(curl --silent --show-error --request POST -d '{"devicetype": "Home Assistant"}' "http://127.0.0.1:8080/api")"; then
|
||||
if ! result="$(curl --silent --show-error --request POST -d '{"devicetype": "Home Assistant"}' "http://127.0.0.1:40850/api")"; then
|
||||
bashio::log.debug "${result}"
|
||||
bashio::exit.nok "Can't get API key from deCONZ gateway"
|
||||
fi
|
||||
@@ -28,7 +28,7 @@ function _deconz_api() {
|
||||
fi
|
||||
|
||||
# Get bridge ID from API
|
||||
if ! result="$(curl --silent --show-error --request GET "http://127.0.0.1:8080/api/${api_key}/config")";
|
||||
if ! result="$(curl --silent --show-error --request GET "http://127.0.0.1:40850/api/${api_key}/config")";
|
||||
then
|
||||
bashio::log.debug "${result}"
|
||||
bashio::exit.nok "Can't get data from deCONZ gateway"
|
||||
@@ -53,7 +53,7 @@ function _send_discovery() {
|
||||
|
||||
config=$(bashio::var.json \
|
||||
host "$(hostname)" \
|
||||
port "^8080" \
|
||||
port "^40850" \
|
||||
api_key "${api_key}" \
|
||||
serial "${serial}" \
|
||||
)
|
||||
|
||||
@@ -46,7 +46,7 @@ http {
|
||||
|
||||
location / {
|
||||
proxy_redirect off;
|
||||
proxy_pass http://localhost:8080;
|
||||
proxy_pass http://localhost:40850;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
|
||||
@@ -86,13 +86,13 @@ deCONZ \
|
||||
--dbg-zcl="${DBG_ZCL}" \
|
||||
--dbg-zdp="${DBG_ZDP}" \
|
||||
--upnp=0 \
|
||||
--http-port=8080 \
|
||||
--http-port=40850 \
|
||||
--ws-port=8081 \
|
||||
--dev="${DECONZ_DEVICE}" &
|
||||
WAIT_PIDS+=($!)
|
||||
|
||||
# Wait for deCONZ to start before continuing
|
||||
bashio::net.wait_for 8080
|
||||
bashio::net.wait_for 40850
|
||||
|
||||
# Start Nginx proxy
|
||||
bashio::log.info "Starting Nginx..."
|
||||
|
||||
Reference in New Issue
Block a user