It was a bit of a ball ache to be honest, I had to install some software on my PC and to do man in the middle inspection on my phone to get the details.
I think in the lazyspa post they have come up with an easier way, I will have a look and see if I can work out how to do it for cleverspa.
You could try this, just replace the email and password with the one you use on your cleverspa app.
Put this in your configuration.yaml and then restart home assistant and you should hopefully get a new sensor called hottub_login and under the attributes hopefully your DID
I did try that curl website yesterday and got a token but I think itās the same issue that you had which it just made a new account I think as I ran the command with the user address at the endā¦ I used the same details for the account that I have on the cleverspa app.
Did you use fiddler as the man in the middle? As I didnāt have luck with seeing any commands go through that for details.
The HA login sensor just doesnāt show anything and the token I have just shows no devices when running the other curl command so I guess it thinks itās another account
@pops106 Got my DID and Token using Mitmproxy Thanks for that,
Now I am just trying to work out what all the sensors and automations that are needed as the switches dont update but the status does. I have just copied MusicMans yaml from this post and deleted the package from Bruces Github
I will have a look at your configs when I am by the computer. This is what I have using musicmans. Shame I canāt work out how to update the input_number for the target temp when I change it in the app. It updates when I change it from HA with some of the automations from the original post just canāt get it the information the other way.
At least after so many months itās finally in HA so I can set schedules as thatās what is really missing from the cleverspa app.
Ah Ok, Yeah I noticed tonight that my input slider is updating when I change the temp in the app so it is working both ways now which is nice Think the automations worked after I changed a few bits.
I started writing an integration for CleverSpa last night, uses CleverSpaās Firebase config to get the auth token so the config flow simply asks for email and password and then stores just the token (since it seemingly doesnāt expire).
I went with water_heater entity type for the tub itself but actually this sucks to be honest as thereās no good lovelace cards as standard (despite climate being awfully close)
Will probably chuck it on Github in the coming days if others wish to test.
Very interested to try and test this if you would be willing to share it ? I know someone else on the lay z spa forum used it with the water integration part. I have managed to get the generic thermostat working with mine now. Just if you change the temp from the app home assistant will over ride the temp after a few seconds and reset it as I have automations.
If you can share it Iām sure it would help others as the Token and DID part are very annoying.
Sure, setting temp works. Itās got full feature parity with the CleverLink app.
The underlying API is a little dumb, it will let you start the heater without the filter - doing this is not advised as I found out and will trigger an overheat warning.
Iāve covered this in my component, anytime you start / stop the heater it will also start / stop the filter in tandem.
Water heater entity really is unloved though. For example the step size is 0.5āc, despite setting precision to whole numbers. Climate has since gained ātarget_temperature_stepā but seemingly not made itās way to water heaterā¦
Ok, at least there is a form of setting the temp. I definitely will look forward to testing I got your python going yesterday for the did and token which was so much easier (wish we had that before)
Just put the files onto Home Assistant and went to add it on the Integrations and I am just getting āConfig flow could not be loadedā when trying to add it