/ha-bestway

Home Assistant integration for Bestway / Lay-Z-Spa hot tubs

Primary LanguagePythonMIT LicenseMIT

Bestway

GitHub Release GitHub Activity License hacs

This custom component integrates with the Bestway cloud API, providing control of devices such as Lay-Z-Spa hot tubs and Flowclear pool filters.

Required Account

You must have an account with the Bestway mobile app (Android/iOS). Lay-Z-Spa app credentials will not work. Both apps appear to have identical feature sets.

Bestway uses different API endpoints for EU and US. If you get an error stating account could not be found, try using the other endpoint. If this does not help, then create a new account under a supported country.

Device Support

A Wi-Fi enabled model is required. No custom hardware is required.

See the supported devices list for more details.

Installation

This integration is delivered as a HACS custom repository.

  1. Download and install HACS.
  2. Add a custom repository in HACS. You will need to enter the URL of this repository when prompted: https://github.com/cdpuk/ha-bestway.

Configuration

Ensure you can control your device using the Bestway mobile app. At time of writing, there was also a Lay-Z-Spa branded app, but despite this being the recommended app in the installation manual, the spa could not be added. The Bestway app worked flawlessly.

  • Go to Configuration > Devices & Services > Add Integration, then find Bestway in the list.
  • Enter your Bestway username and password when prompted.

Update speed

Any changes made to the spa settings via the Bestway app or physical controls can take a short amount of time to be reflected in Home Assistant. This delay is typically under 30 seconds, but can sometimes extend to a few minutes.

Improvement ideas

Achieve faster (or even local) updates.

  • Capture more traffic from the mobile app to work out how it receives updates so quickly.
  • The integration currently has to poll, but the mobile app is able to reflect changes based on physical button presses within a fraction of a second.
  • A brief recent attempt suggested that the Android app may have certificate pinning enabled, making this slightly harder than expected. Perhaps decompilation is an easier route.
  • We know the spa talks directly to the cloud using MQTT. Traffic captures against the Android app appeared to show only HTTPS traffic.

Acknowledgements

Contributing

If you want to contribute to this please read the Contribution Guidelines.