Lay-Z-Spa Hot Tub wi-fi pump automation

Hi. I was copy config and add my login and password to secret file.
So State is token and did is did ?

image

That missing sensor was the problem! Thanks.

Maciej,

Not sure but sounds right!

If I go Configuration - Entities - hottub_login and then the three sliders icon top right. I get offered a number with no description, that is my token and the api DID is under attributes.

Hope that helps

1 Like

Yup that is the token. The DID is under attributes.

2 Likes

My account was also created for Finland. When i changed uri to use usapi, it started to work.

Hi,
I just both a pool and I’m using Bestway app. I don’t like it. :slight_smile: But I’m beginner at HA, so I need some help.

I would like to have all the files BruceH5200 made in one map “packages/pool” (I already have a map package/carheater).

What code do I need to add in configuration?
I have:

Homeassistant:
  Packages: !include_dir_named_packes

I use “secrets” also. What do I need to start adding there?

Thanks a lot!

You have a mix of folder names. packages, package and packes? Not sure if those are correct or typos.

If you have package/carheater set up and working then I think you can put your spa files in package/pool

And you should already have this in your configuration.yaml

homeassistant:
 packages: !include_dir_named package

In secrets you should put your api did and token and email address / password you use with the official app. The details are a few posts up the thread.

Thanks Patrocks, I was typing on the phone so I did not se that it was spelled wrong. All are like you wright.
I will add the other.
Thanks agin, Maria

I have been reading all the text a lot of time, but I dont understand the start. I guess that DID and API token is my own and not the same for everyone?
I downloaded Fiddler Everywhere on my computer, but after that, what to do? Im using Bestway app on iphone, in Sweden.

Hey,

I’ve been trying all day to get my uid and did, with no luck. No matter what I do i get form_invalid as response from the server.

I tried the initial_login sensor from Bruce’s github, where the entity card just shows up empty. I tried using both euapi and usapi in here, but nothing shows up.
I also tried in both curl and postman, both with eu and us api, with “@” and “%40” in emain, but nothing works.
My original account was for Norway, so I tried to make another one for UK, as i saw someone had problems with Finland account, but this did not change anything either, still I get form_invalid response.
I also tried packet sniffing on my iPhone, where it would not log in while i was sniffing, but I could read packets when I tried to turn on or off heating for example. In the request payload I did find uid and did, tried to set these values in secrets.yaml, but they did not seem to work either.
I also tried using both Android and iOS app secret in the headers, with no luck.

By the way I am using Bestway app.

Does someone have any idea what I might be doing wrong?

Thanks

It’s probably worth noting that the token will expire every six months and you’ll need to re-run the process to get one and update your secrets file/scripts.

This is a silent failure, HA will continue to update anything you are monitoring on the tub (temp, power, filter etc) but you will not be able to control any of them. This will show up in HA logs as a 400 error when calling the gizwits URL, so you might want to put some alerting in (or at least a date in your Calendar) to note that this is what is happening.

4 Likes

Hello, why HotTub Heating This Week is always 0 ?
and why HotTube Water temp is 0 ?
what did I do wrong ?
Overview-Home-Assistant (1)

Thank you for posting, I realised this happened to me a few days ago was just starting to mess around with config thinking it was a hassio update causing the issue.

All sorted now, cheers.

Hello,

I haven’t been able to make any changes to the hot tub for a few days.

The Bestway app works without any problems and also the status in the home assistant (temperature, status, whether the filter is on / off, …)

But if I want to switch the filter off manually via the home assistant, it jumps back on after a few seconds. Even the automations (every 30m) no longer work as a result …

Anyone have any idea how i can fix this?

Edit:
fixed: i have a New token … must renew them in the Secrets.

Hi,
I have a Lay-Z-Spa Milan about to be delivered. I’m hoping to integrate it with my HA setup. I’ve noticed that there are options for either the Lay-Z-Spa app or the Bestway app but once you are registered to one you cannot change.

My question is for the best functionality in HA which app should I register my hot tub with - Lay-Z-Spa or Bestway? (I’m in the UK if that makes a difference)

Many Thanks

I started with the La-Z-Spa app, then tried the Bestway App and couldn’t go back.
I think the BestWay app is the newer app.

You can automate either with Home Assistant, so it probably doesn’t matter that much.

2 Likes

Hi, I found hottub_online. But got the message that I don’t have any unique ID.

I have add in sensor.yaml:

##
  - platform: rest
    name: hottub_online
    resource: "https://mobileapi.lay-z-spa.co.uk/v1/gizwits/is_online"
    headers:
      Content-Type: application/x-www-form-urlencoded
    method: POST
    payload: !secret hottub_api_did
    value_template: "{{ value_json.data }}"
#####

And in secrets.yaml

hottub_api_did: did=AAaAaAAAAAAaaaaAAA9A9b&api_token=a1a1a1a1a2a2a2a2a12a1a1a1a2a2a2a2
#
hotstub_email_password: email=XXX%40gmail.com&password=XXX
# 

(XXX change to my email and password)

If I don’t have “hottub_api_did:…” I got wrong message. But it is the one I found here, not my own.

Thanks for help,
Maria

Thanks for your work, just implemented my Spa!

How can I adjust the target temperature? Its just a simple “Number” for me which I can’t change from GUI. Any hint?

Hi,
When I add the sensor part in configuration.yaml or in sensor.yaml I got " This entity does not have a unique ID". I change to my username and my password. I have not change anything els.

My acount is in Sweden, is it becuse of that?
Thanks.