Store and restore settings
-
- Posts: 20
- Joined: Fri Feb 04, 2022 3:32 pm
Store and restore settings
There's a way to store and reload all camera settings using API?
-
- Posts: 125
- Joined: Mon Mar 25, 2019 1:12 pm
Re: Store and restore settings
Currently this is not implemented. However, it would be possible to call the web-interface and upload a configuration file. The following batch script does exactly that by calling curl:
Code: Select all
#!/bin/bash
host=192.168.10.10
if [ $# -eq 2 ]; then
host=$1
shift
fi
if [ $# -ne 1 ]; then
echo "Usage: $0 [SCENESCAN-IP] CONF-FILE"
exit 1
fi
echo "Uploading..."
result=`curl -s -m5 -F "keep_network=1" -F "settings_file=@$1" http://$host/maintenance/ | egrep "(Configuration uploaded)|(Invalid configuration)" | wc -l`
if [ $result -eq 1 ]; then
echo "Success!"
exit 0
else
echo "Upload failed!"
exit 1
fi