v2.6.0 Scenes with delays
- scenes with time delays
- simplified Docker installation
- account password recovery with secret value from SUPLA Cloud
- small fixes
Manual update steps required!
Docker
Adjust and execute the two variables below:
SS_PATH=/path/to/supla-scripts
SS_MODE=standalone
SS_PATH should be the absolute path to your current 2.5.x supla scripts instance without the trailing slash. The SS_MODE should be either standalone or proxy to indicate in which mode the SUPLA Scripts currently work.
Having them defined, carefully execute the following commands without any changes:
cd $SS_PATH
source docker/.env && docker exec -i $COMPOSE_PROJECT_NAME-db mysqldump -u root --password=$DATABASE_PASSWORD suplascripts > var/backups/suplascripts-before-2.6.bak.sql
docker/suplascripts.sh stop
cd ..
mv $SS_PATH $SS_PATH-bak
git clone https://github.com/fracz/supla-scripts.git $SS_PATH
rm -fr $SS_PATH/var
mv $SS_PATH-bak/var $SS_PATH/var
cd $SS_PATH
git checkout .
cd docker
./suplascripts.sh start
echo "COMPOSE_PATH_SEPARATOR=:" >> .env
echo "COMPOSE_FILE=docker-compose.base.yml:docker-compose.$SS_MODE.yml" >> .env
./suplascripts.sh start
docker system prune -af
docker exec -i $COMPOSE_PROJECT_NAME chown -R www-data:www-data var/backups var/cache var/config var/logs var/ssl var/system
docker exec -i $COMPOSE_PROJECT_NAME chmod g+s var/backups var/cache var/logs
Finally, remove the OS crontab as its execution has been moved into the container. Enter crontab -e and delete a line with supla scripts execution.
I you want to know how to update to the new future versions, see new simplified Docker docs.
Classic installations
Update as usual.
Add "phpPath": "/usr/bin/php" setting to your var/config/config.json path that will point to where your php executable can be found. Check it with which php.
Add a new crontab with crontab -e, after adjusting the path to the script:
* * * * * /usr/bin/php /var/www/supla-scripts/supla-scripts dispatch:time-scenes