Skip to content

Commit

Permalink
Updated automation timeout to 30s + pings to 3
Browse files Browse the repository at this point in the history
  • Loading branch information
streetpea committed Sep 3, 2022
1 parent 33b5028 commit 7eaa001
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/setup/automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ Now that you have `chiaki4deck` configured, it's time to make it wake up your Pl
# Wake up console from sleep/rest mode (must be either on or in sleep/rest mode for this to work)
flatpak run re.chiaki.Chiaki4deck wakeup -<playstation_console> -h <console_ip> -r '<remote_play_registration_key>'
sleep 1
# wait for PlayStation to return one successful packet, exit script on error if it never happens
ping -c 1 -w 20 <console_ip> &>/dev/null
# wait for PlayStation to return 3 successful packets, exit script on error if it never happens
ping -c 3 -w 30 <console_ip> &>/dev/null
sleep 1
# Chiaki handles its own errors, so unsetting trap here.
Expand Down Expand Up @@ -296,8 +296,8 @@ Now that you have `chiaki4deck` configured, it's time to make it wake up your Pl
# Wake up console from sleep/rest mode (must be either on or in sleep/rest mode for this to work)
flatpak run re.chiaki.Chiaki4deck wakeup -5 -h 192.168.1.16 -r '2ebf539d'
sleep 1
# wait for PlayStation to return one successful packet, exit script on error if it never happens
ping -c 1 -w 20 192.168.1.16 &>/dev/null
# wait for PlayStation to return 3 successful packets, exit script on error if it never happens
ping -c 3 -w 30 192.168.1.16 &>/dev/null
sleep 1
# Chiaki handles its own errors, so unsetting trap here.
Expand Down
8 changes: 4 additions & 4 deletions scripts/gen-launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ readarray -t regist_array < <(grep regist_key < "${config_file}" | cut -d '(' -f
readarray -t nickname_array < <(grep server_nickname < "${config_file}" | cut -d '=' -f2)
consoles_registered="${#nickname_array[@]}"

# If it's still not up after 20 seconds, something has gone wrong.
wait_timeout=${wait_timeout:-20}
# If it's still not up after 30 seconds, something has gone wrong.
wait_timeout=${wait_timeout:-30}

ip_validator()
{
Expand Down Expand Up @@ -127,8 +127,8 @@ trap connect_error ERR
# Wake up console from sleep/rest mode (must be either on or in sleep/rest mode for this to work)
flatpak run re.chiaki.Chiaki4deck wakeup -${ps_console} -h ${ps_ip} -r '${regist_key}'
sleep 1
# wait for PlayStation to return one successful packet, exit script on error if it never happens
ping -c 1 -w ${wait_timeout} ${ps_ip} &>/dev/null
# wait for PlayStation to return 3 successful packets to make sure it's up, exit script on error if it never happens.
ping -c 3 -w ${wait_timeout} ${ps_ip} &>/dev/null
sleep 1
# Chiaki handles its own errors, so unsetting trap here.
Expand Down

0 comments on commit 7eaa001

Please sign in to comment.