This commit is contained in:
2024-12-01 11:56:54 -06:00
parent 9d7294e8c7
commit 3572d6fba7
2 changed files with 17 additions and 1 deletions

View File

@@ -751,6 +751,20 @@ CONFSYNC(){
fi
}
UPDATE_TINYTUYA_SERVER(){
TTS_FLDR=/opt/tinytuya-server
if [ ! -f /opt/raspiBackup.running ]; then
if [ -d ${TTS_FLDR}/devices.json ]; then
docker stop tinytuya-server
rm -Rf ${TTS_FLDR}/devices.json
fi
python3 -m tinytuya wizard -y -no-poll -credentials-file ${TTS_FLDR}/tinytuya.json -raw-response-file ${TTS_FLDR}/tuya-raw.json -device-file ${TTS_FLDR}/devices.json
sleep 1s
docker restart tinytuya-server
fi
}
DOWNLIST(){
DOWN_LIST=`find ${PW_TMPFOLDER}/ -maxdepth 1 -iname "*.down"`
IFS=$'\n'
@@ -1025,6 +1039,8 @@ fi
average) AVERAGETEMP ${2} ${3} ${4};;
cooldown) COOLDOWN_SRVRM;;
tinytuya-update) UPDATE_TINYTUYA_SERVER;;
dl|downlist) DOWNLIST;;
oldhelp)