Gateway Updates
The HandyCafe Gateway keeps itself up to date. It looks for a new version on its own, downloads it in the background and installs it when the cafe is quiet. If the new version does not start properly, the gateway goes back to the version it had before.
Installing an update restarts the gateway. Every PC and Wi-Fi guest in the cafe loses internet for 1 to 2 minutes while that happens. Everything on this page is about choosing when that minute or two falls.
Where to Find It
Update status is shown in three places. All three read the same state from the gateway.
| Place | Path | What you can do there |
|---|---|---|
| HandyCafe Server | Settings > Gateway connection > Gateway updates | See the installed and waiting version, change the mode, approve, update now, check now. |
| The gateway's own page | https://127.0.0.1:8443/ on the gateway PC, Status tab, Updates card |
The same controls. Useful when HandyCafe Server cannot reach the gateway. |
| About | Settings > About > Version | A Gateway row with the installed version and whether an update is waiting. |
The Overview tab of the Internet page shows the running version too.
The Gateway updates card appears once HandyCafe Server has a saved gateway connection. Before that the page only offers the install. See Installing the Gateway.
Requirements
- Permission: a cashier needs the Gateway settings and Wi-Fi device tabs permission to open Settings > Gateway connection.
- Windows: the gateway updates itself only when it runs as the Windows service the installer sets up. Otherwise the card says it needs a manual update.
The Gateway Updates Card
The card in Settings > Gateway connection has these parts.
| Part | What it shows |
|---|---|
| Installed: {version} | The version running on the gateway now. |
| Last checked {time} | When the gateway last looked for a new version. Check now asks it to look again straight away. A warning icon next to it means the last check did not work. Hover over it to read why. |
| Status label | Up to date, Update ready, Updating, Needs approval, Required update or Manual update needed. The info button next to it explains automatic mode. |
| Install updates | The update mode. See below. |
| Version {version} is available ({size}) | A new version is downloaded or downloading. Release notes, when the release has any, appear under it. |
| Downloading {version}: {percent}% | Download progress, with a progress bar. |
| Approve | Shown in the approving mode while a version waits for approval. |
| Update now | Installs the waiting version at once, after a warning. |
| Last result | The outcome of the last update: Updated from {from} to {version}., a rollback message or a failure message. Hover over it to see when it happened. |
While an update installs, the card says Installing. The internet is back in 1 to 2 minutes. The gateway does not answer during that time. The card keeps showing it as installing for up to five minutes instead of reporting a lost connection.
If the gateway does not answer at all, the card shows Could not connect to the gateway. with a Try again button.
Update Modes
The Install updates list has two choices.
| Mode | What happens |
|---|---|
| Automatically at a quiet moment | The default. A downloaded version installs at the next quiet moment or the next time the gateway starts. |
| Only after I approve | A downloaded version waits until someone presses Approve. After approval it still waits for a quiet moment or the next start. On the gateway's own page this choice reads Only after approval. |
The mode is stored on the gateway. Changing it in HandyCafe Server or on the gateway's page changes it in both places.
What counts as a quiet moment
The gateway treats the cafe as quiet when both of these have been true for five minutes in a row:
- Nobody is signed in to the guest Wi-Fi with a voucher or a member account.
- All devices together move less than about 512 KB of traffic per minute.
A gateway that has just started does not count as quiet. It watches the network for the full five minutes first.
Required updates
A release can be marked as required. It carries a deadline, 72 hours after it appears unless the release says otherwise. The card shows Required update and the time it installs by itself.
- Before the deadline a required update behaves like any other one.
- After the deadline it installs at the next quiet moment or the next start. This happens in both modes, with or without approval.
- One hour after the deadline it installs even if the cafe is busy. The card then says Required. Installs within the hour, even if the cafe is busy.
How an Update Is Installed
- The gateway checks for a new release every few minutes. The first check runs one minute after the gateway starts.
- It downloads a newer release straight away. It keeps the file only if the file's checksum matches and the file is signed by HandyCafe. A file that fails either check is thrown away.
- It waits for the right moment, according to the mode.
- A separate program, the gateway updater, takes over. It checks the signature once more and copies the current version aside.
- The updater runs the installer silently. The installer stops the gateway service, replaces its files and starts it again.
- The updater waits up to 90 seconds for the new version to answer.
- If the new version answers, the update is done. If it does not, the updater stops the service, puts the copied version back and starts it again.
- The updater starts the gateway's notification area icon again for the signed-in Windows user.
A version that did not start properly is never tried again. The last result on the card names that version and the version the gateway went back to. The gateway installs the next newer release when one is published.
If an update is interrupted half way, for example by a reboot, the gateway notices that it never finished and tries again later. A release gets three attempts.
Procedures
Approve a waiting update
- Open Settings > Gateway connection.
- In Gateway updates, check that the status reads Needs approval.
- Press Approve.
The update installs at the next quiet moment or the next time the gateway starts.
Update the gateway now
- Choose a time when losing internet for 1 to 2 minutes is acceptable.
- Open Settings > Gateway connection.
- In Gateway updates, press Update now.
- Read the warning Update the gateway now? and confirm with Update now.
The card shows the installation and then the result. On the gateway's own page the same button asks for confirmation with Yes, update now.
Switch to approving each update
- Open Settings > Gateway connection.
- In Gateway updates, open the Install updates list.
- Choose Only after I approve.
Check the gateway version
Open Settings > About. The Version section has a Gateway row under Server and Client. It shows the installed version and Up to date, Update available or Installing. Check for updates refreshes the row from the gateway. It does not make the gateway look for a new release. Use Check now on the Gateway updates card for that.
Installing or Upgrading by Hand
Once a gateway is connected, the download card moves to the Install or upgrade manually section at the bottom of Settings > Gateway connection. It offers the same installer as the first install. Running it on the gateway PC upgrades the existing installation.
Use this when the card says This gateway cannot update itself. Use the manual install below. That happens in two cases:
- The gateway does not run as a Windows service.
- A new release needs a newer starting version than the one installed. An automatic update cannot reach it.
The Notification Area Icon
The gateway PC shows a HandyCafe Gateway icon in the Windows notification area for the signed-in user. It checks the gateway every five seconds. It holds no password and changes no setting.
| Item | What it does |
|---|---|
| Clicking the icon | Opens the gateway's own page in the browser. |
| Open the gateway page | The same, from the icon's menu. |
| Restart the gateway... | Opens the gateway's page with the restart confirmation showing. Greyed out while the gateway is not running. |
| State line | Running, Needs setting up, Needs a password or Not running. |
| Quit | Closes the icon. The gateway keeps running. |
Restarting the Gateway
The Status tab of the gateway's own page has a Restart gateway button.
- Press Restart gateway.
- Read the warning. Every PC and Wi-Fi guest may lose internet for up to a minute.
- Press Yes, restart now.
The page waits for the gateway to come back and then returns to the sign-in form with The gateway restarted. Sign in again to continue. The restart also stops and starts again any Windows service that depends on the gateway.
A restart is refused while an update installs. The page says The gateway is installing an update. Try again when it has finished.
Troubleshooting
The card says "Could not connect to the gateway." HandyCafe Server cannot reach the gateway. If an update was started in the last few minutes, wait for it to finish. Otherwise see Gateway Troubleshooting.
The update has been "Update ready" for a long time. The cafe has not been quiet for five minutes in a row. Press Update now at a convenient time. Restarting the gateway works too, because a waiting update installs when the gateway starts.
The card shows a warning icon next to "Last checked". The last check for a new version failed, usually because the gateway PC had no internet at that moment. Hover over the icon to see the reason. Press Check now to try again.
The last result says the version could not be installed. The gateway is still on its previous version and keeps working. Nothing needs to be done. A newer release is installed when it is published.
The gateway page says the gateway has not come back after a restart. Keep the page open. It keeps trying. If nothing changes in a few minutes, restart the gateway PC.