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

Hi Bruce, thanks for all your work on this.
Can you point me in right direction as I am not getting the did.
I have commented out

json_attribute_path: "$.devices[0]"

as it gives me the error
invalid config for

[sensor.rest]: [json_attribute_path] is an invalid option for [sensor.rest]. Check: sensor.rest->json_attribute_path. (See ?, line ?).

Should I just restart with the error or will it crash the Pi?
I know my email and password are correct as I got the api_token
also

https://mobileapi.lay-z-spa.co.uk/v1/auth/login?email=meemail%40server.com&password=mypassword

is only returning Whoops, looks like something went wrong. exception
any help or guidance is appreciated
All the best
David

I’m having an issue with using Fahrenheit instead of Celcius. I use F instead of C in the Bestway app, it shows up as F instead of C in Home Assistent, however I cannot control the temperature in HA past “40F”. If I set the temp on the pump to Celcius, it is correctly displayed in HA at the F temperature and I can change it up to 104F as expected, but then the pump displays 40C. I want to be able to correctly display and control both the pump and HA in Fahrenheit. How can I fix this?

I found it in the climate.py file and changed it to Fahrenheit limits there. After restart that resolves the control issues.

Is it possible for this integration to tell when the pump is set to C/F (and apply the 20/40 C or 68/104 limits as appropriate) or to have HA force change the pump to C/F depending on the Home Assistant settings for unit of measurement selection there (and dynamically select the limits based on HA settings?

Can this be updated dynamically based on the pump or Home Assistant settings for measurement controls? I see references to C vs F in climate.py and bestway.py but my python skills are super rusty.

I’m not sure but I think I remember that after a power outage the pump might return to the default of Celcius, which may cause issues here if the pump loses power. But it works for now. Great work all, this is still very awesome.

Good spot. It should be possible to make this dynamically update and work regardless of the unit of measure.

I’ve made a note here:

My spa is currently packed away, so I’ll have to see how easy this is to change without real data. If you could let me know what min/max farenheight values are supported via the Bestway app, that’d be useful.

How are you tracking the energy on the spa? I’ve not found a way to do it that will fit in my external socket haha

I use a Shelly in the consumer unit to monitor it.

Anybody else experiencing problems with the lay-z-spa api these days? Since December 30th, I have had mayor issues, see attached picture.

Hi, yes. I have been having exactly the same issue; mistakenly I thought there was an issue with my Tubs WIFI connection and reset it. Please don’t copy what I did as I’ve spent the last few days unsuccessfully trying to get my tub reconnected and Lazy Spa Customer Support are less than useful. I can’t even log in to the app any more.

Lazy Spa have admitted that people are struggling with connections to the app, so I assume its a server side issue that will probably sort itself in a few days.

Update 05/01/2023
I’ve managed to get my tub reconnected using my daughters iPhone (Wouldn’t work with my Galaxy S22), so for me at least its now back to normal.

@rossdargan are you still using the api wrapper you wrote for the lay z spa? I’m getting an error which looks as if maybe the api has changed? What is your take on this?

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/layz_spa/__init__.py", line 41, in async_setup_entry
    await hub.update_status()
  File "/usr/local/lib/python3.11/site-packages/layz_spa/spa.py", line 27, in update_status
    self.updated_at = datetime.fromtimestamp(data["updated_at"])
                                             ~~~~^^^^^^^^^^^^^^ 

I’ll try and get some time to look into the issue anyway. I’ll have to remind myself of the app authorisation tokens so I can check the data returned.

Hi all, has this stopped working for anyone else recently? I’ve checked and my Did etc is the same as far as I can tell, it just seems to be disconnected? I’ve checked the official app and it connects - I’m just not sure how best to diagnose what has broken?

My Home Assistant integration has also stopped working 2 days ago. The app on my phone was updated at around the same time too.

I tried to check if my DID had changed via this link http://mobileapi.lay-z-spa.co.uk/v1/auth/login with my email and password and received this " Whoops, looks like something went wrong."

Also no idea from my side how to fix this.

it stopped working for me too. But after installing this plugin it works normally

Thanks, very helpful. I switched over to Bestway this morning. Only took a few minutes and working well.

Hi. Could yo help to my automation please.
I want to automate when the temperature in the solar is 1 degree higher than the temperature in the Jacuzzi, then the pump in the solar should turn on.

How to change sensor.f0bba9a51e0f73eff2b53d25dfc82948 to SPA sensor ( condition: device
device_id: 28c1f66728851f6f4fd50e03c408e269
entity_id: binary_sensor.spa_connected
domain: binary_sensor)

alias: POMPKA SOLARY
description: ""
trigger:
  - platform: template
    value_template: >-
      {{ states('sensor.sonoff_1001032177_temperature') | float >
      states('sensor.f0bba9a51e0f73eff2b53d25dfc82948') | float + 1 }}
condition: []
action:
  - service: switch.turn_on
    entity_id: switch.sonoff_1001032177
mode: single

I found the same, my Lay Z Spa integration stopped working in the last week (6th June), it happened on the same day that they released a new version of the app. My hottub_online status still appears to be working, but the hottub_status that carries all the useful information has been reading as UNKNOWN ever since the app update was released.

Does this stop the lazy spa app its self from stop working? Ie can only have bestway or the other? The reason I’m hesitant to switch is because it took me a week last time to get my tub reconnected back to the lazy spa app.

Yes, unless something has changed, once you use the Bestway app to connect to you cannot switch back to the layzspa app.

1 Like

Has anyone got an updated URL? https://mobileapi.lay-z-spa.co.uk/v1/auth/login is just returning 404 now.

Hi all!

Quick thank you to everyone who posted tips & tricks and ofcourse to Bruce, as a new HA user this thread has been an amazing source of information.

I recently bought a new model, the lay z spa san fransico and had alot of issues getting the HA setup running, found out that alot of values except for the login are different and tried my best to adjust them. Used alot of bruce’s code to get an understanding about how it should work and finaly got most of it working. Still got some work to do since i want to do it properly before i upload but if there is anyone out there in need of the code i can always post a temporary release.

image

Hello Tom,

I also just tried to integrate my Lay Z Spa, but failed because it is also the San Francisco.
Can you already provide me with the right software, or when will you have your final version online?