Release 4.8.0

This commit is contained in:
tsightler
2021-09-02 18:18:39 -04:00
parent b8926742e3
commit b14d3833c9
9 changed files with 329 additions and 365 deletions

View File

@@ -10,14 +10,12 @@ COPY . /app/ring-mqtt
RUN apk add --no-cache tar git libcrypto1.1 libssl1.1 musl-utils musl bash curl jq tzdata nodejs npm mosquitto-clients && \
APKARCH="$(apk --print-arch)" && \
case "${APKARCH}" in \
aarch64|armhf) \
S6ARCH="${APKARCH}";; \
x86_64) \
S6ARCH="amd64";; \
aarch64) \
S6ARCH="aarch64";; \
armv7) \
S6ARCH="arm";; \
armhf) \
S6ARCH="armhf";; \
*) \
echo >&2 "ERROR: Unsupported architecture '$APKARCH'" \
exit 1;; \
@@ -25,9 +23,8 @@ RUN apk add --no-cache tar git libcrypto1.1 libssl1.1 musl-utils musl bash curl
curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-${S6ARCH}.tar.gz" | tar zxf - -C / && \
mkdir -p /etc/fix-attrs.d && \
mkdir -p /etc/services.d && \
cp -a /app/ring-mqtt/s6-etc/* /etc/. && \
rm -Rf /app/ring-mqtt/s6-etc && \
mkdir -p /app/ring-mqtt/bin && \
cp -a /app/ring-mqtt/init/s6/* /etc/. && \
rm -Rf /app/ring-mqtt/init && \
case "${APKARCH}" in \
x86_64) \
RSSARCH="amd64";; \
@@ -51,9 +48,9 @@ RUN apk add --no-cache tar git libcrypto1.1 libssl1.1 musl-utils musl bash curl
mkdir /data && \
chmod 777 /data /app && \
cd /app/ring-mqtt && \
chmod +x ring-mqtt.js && \
npm install && \
rm -Rf /root/.npm && \
chmod +x ring-mqtt.js && \
rm -f -r /tmp/*
ENTRYPOINT [ "/init" ]

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019 tsightler
Copyright (c) 2021 tsightler
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -51,8 +51,8 @@ class Camera extends RingPolledDevice {
sipSession: null,
stillImageURL: `http://localhost:8123{{ states.camera.${this.device.name.toLowerCase().replace(" ","_")}_snapshot.attribute.entity_picture }}`,
streamSource: (this.config.livestream_user && this.config.livestream_pass)
? `rtsp://${this.config.livestream_user}:${this.config.livestream_pass}@${ip.address()}:8554/${this.deviceId}_live`
: `rtsp://${ip.address()}:8554/${this.deviceId}_live`,
? `rtsp://${this.config.livestream_user}:${this.config.livestream_pass}@${process.env.HOSTNAME}:8554/${this.deviceId}_live`
: `rtsp://${process.env.HOSTNAME}:8554/${this.deviceId}_live`,
rtspPublishURL: (this.config.livestream_user && this.config.livestream_pass)
? `rtsp://${this.config.livestream_user}:${this.config.livestream_pass}@localhost:8554/${this.deviceId}_live`
: `rtsp://localhost:8554/${this.deviceId}_live`
@@ -581,9 +581,7 @@ class Camera extends RingPolledDevice {
'copy',
'-f',
'rtsp',
(this.config.livestream_user && this.config.livestream_pass)
? `rtsp://${this.config.livestream_user}:${this.config.livestream_pass}@localhost:8554/${this.deviceId}_live`
: `rtsp://localhost:8554/${this.deviceId}_live`
this.data.stream.rtspPublishURL
]
})
this.data.stream.state = 'active'

View File

@@ -8,8 +8,6 @@
# for the detected environment.
# ==============================================================================
set +o nounset
# Delay to keep logs messages from overlapping with s6 logs
sleep .5
@@ -35,6 +33,7 @@ else
echo "-------------------------------------------------------"
fi
set +o nounset
if [ "${BRANCH}" = "latest" ] || [ "${BRANCH}" = "dev" ]; then
/app/ring-mqtt/scripts/update2branch.sh
fi

View File

@@ -8,8 +8,6 @@
# appropriate for the detected environment.
# ==============================================================================
set +o nounset
# Delay to keep logs messages from overlapping with s6 logs
sleep .5
@@ -20,6 +18,7 @@ else
export RUNMODE=docker
fi
set +o nounset
if [ "${BRANCH}" = "latest" ] || [ "${BRANCH}" = "dev" ]; then
cd "/app/ring-mqtt-${BRANCH}"
else

653
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,15 @@
#!/bin/bash
# Simple script to use RING-MQTT to activate a cameras live stream using rtsp-simple-server onDemeand feature
# Script to activate live stream on Ring cameras via ring-mqtt
# Requires mosquitto MQTT clients package to be installed
# Provides status updates and termintates stream on exit or if stream
# ends unexpectedly. Primarily inteded for use with rtsp-simple-server
# to start and end stream on-demand.
# Required command line arguments
client_id=${1}
client_name=${2}
client_id=${1} # This is the id used to connect to the MQTT broker. Can be anything but typically camera ID
client_name=${2} # Friendly name of camera (used for logging)
json_attribute_topic=${3} # JSON attribute topic for Camera entity
command_topic=${4} # Command topic for Camera entity
command_topic=${4} # Command topic for Camera entity
# Set some colors for debug output
red='\033[0;31m'