tuya-ipc-terminal/run.sh aktualisiert
This commit is contained in:
parent
4d28149375
commit
1b62319289
@ -1,13 +1,8 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
# ==============================================================================
|
|
||||||
# Home Assistant Add-on: Tuya IPC Terminal
|
|
||||||
#
|
|
||||||
# This script starts the Tuya IPC Terminal application with the configured
|
|
||||||
# options.
|
|
||||||
# ==============================================================================
|
|
||||||
|
|
||||||
# Read configuration options
|
# Read configuration options
|
||||||
readonly TUYA_EMAIL=$(bashio::config 'TUYA_EMAIL')
|
readonly TUYA_EMAIL=$(bashio::config 'TUYA_EMAIL')
|
||||||
|
readonly TUYA_PASSWORD=$(bashio::config 'TUYA_PASSWORD')
|
||||||
readonly TUYA_REGION=$(bashio::config 'TUYA_REGION')
|
readonly TUYA_REGION=$(bashio::config 'TUYA_REGION')
|
||||||
|
|
||||||
# Check if required options are set
|
# Check if required options are set
|
||||||
@ -22,13 +17,9 @@ if [[ -z "${TUYA_PASSWORD}" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Authenticate with Tuya
|
# Authenticate with Tuya
|
||||||
bashio::log.info "Authenticating with Tuya..."
|
bashio::log.info "Authenticating with Tuya using email/password..."
|
||||||
printf "%s\n%s\n%s\n" "${TUYA_REGION}" "${TUYA_EMAIL}" "${TUYA_PASSWORD}" | /tuya_auth_qr.exp
|
printf "%s\n%s\n%s\n" "${TUYA_REGION}" "${TUYA_EMAIL}" "${TUYA_PASSWORD}" | /tuya_auth_login.exp
|
||||||
|
|
||||||
# Refresh camera list
|
# Rest bleibt gleich...
|
||||||
bashio::log.info "Refreshing camera list..."
|
|
||||||
tuya-ipc-terminal cameras refresh
|
tuya-ipc-terminal cameras refresh
|
||||||
|
|
||||||
# Start the RTSP server
|
|
||||||
bashio::log.info "Starting RTSP server on port 8554..."
|
|
||||||
tuya-ipc-terminal rtsp start --port 8554
|
tuya-ipc-terminal rtsp start --port 8554
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user