mirror of
https://github.com/tsightler/ring-mqtt.git
synced 2025-10-28 11:01:38 +08:00
Minor tweaks
This commit is contained in:
@@ -9,11 +9,11 @@ ENV LANG="C.UTF-8" \
|
|||||||
TERM="xterm-256color"
|
TERM="xterm-256color"
|
||||||
|
|
||||||
COPY . /app/ring-mqtt
|
COPY . /app/ring-mqtt
|
||||||
RUN apk add --no-cache tar xz git libcrypto1.1 libssl1.1 musl-utils musl bash curl jq tzdata nodejs npm mosquitto-clients && \
|
RUN S6_VERSION="v3.1.2.1" && \
|
||||||
APK_ARCH="$(apk --print-arch)" && \
|
|
||||||
S6_VERSION="v3.1.2.1" && \
|
|
||||||
RSS_VERSION="v0.20.0" && \
|
|
||||||
BASHIO_VERSION="v0.14.3" && \
|
BASHIO_VERSION="v0.14.3" && \
|
||||||
|
RSS_VERSION="v0.20.0" && \
|
||||||
|
apk add --no-cache tar xz git libcrypto1.1 libssl1.1 musl-utils musl bash curl jq tzdata nodejs npm mosquitto-clients && \
|
||||||
|
APK_ARCH="$(apk --print-arch)" && \
|
||||||
curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-noarch.tar.xz" | tar -Jxpf - -C / && \
|
curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-noarch.tar.xz" | tar -Jxpf - -C / && \
|
||||||
case "${APK_ARCH}" in \
|
case "${APK_ARCH}" in \
|
||||||
aarch64|armhf|x86_64) \
|
aarch64|armhf|x86_64) \
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class RingMqtt {
|
|||||||
} else {
|
} else {
|
||||||
debug('MQTT connection established, processing Ring locations...')
|
debug('MQTT connection established, processing Ring locations...')
|
||||||
await this.initRingData()
|
await this.initRingData()
|
||||||
this.processLocations()
|
this.publishLocations()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.mqttConnected = false
|
this.mqttConnected = false
|
||||||
@@ -103,8 +103,8 @@ class RingMqtt {
|
|||||||
return this.client
|
return this.client
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loop through each location and call publishLocation for supported/connected devices
|
// Loop through each location and publish supported devices
|
||||||
async processLocations() {
|
async publishLocations() {
|
||||||
// For each location get existing alarm & camera devices
|
// For each location get existing alarm & camera devices
|
||||||
this.locations.forEach(async location => {
|
this.locations.forEach(async location => {
|
||||||
const devices = await this.devices.filter(d => d.locationId == location.locationId)
|
const devices = await this.devices.filter(d => d.locationId == location.locationId)
|
||||||
|
|||||||
Reference in New Issue
Block a user