I have a Novitek hot tub that has Balboa ControlMySpa WIFI controller and I wanted to be able add some smarts to when it’s heating with these very volatile electricity prices. Sadly the only Balboa integration I was able to find was for an older controller that was not ControlMySpa compatible. ControlMySpa does have Amazon Alexa integration but it’s quite basic so that could have been a route to explore but I just wasn’t satisfied with that.
I was able to find a NodeJs library that used the same undocumented API as their app and provided fairly nice API. There hasn’t been any commits to in few years but it does still work so I started to play around with it. Javascript is not something I typically like to write so my first attempt was a horrible hack that quite frankly was quite unstable. However this fall I took some time make it much better and totally rewrote my first attempt and so was born ControlMySpa MQTT integration to Home Assistant.
It uses Home Assistant MQTT discovery to auto create entities in Home Assistant. My Home Assistant is setup as docker container so it’s not able to use Home Assistant AddOns directly but those are basically docker containers. My integration was made as standalone docker container that uses what ever mqtt you have configured your Home Assistant to use and recently I got a contribution with to transform the repository to a HA AddOn. I don’t know if and how that works as I’m running HA in standalone docker mode.
So for the rest of this I am going to assume you are also running HA in standalone docker mode and that you have configured HA to use a MQTT server such as Mosquito. Here’s an example docker-compose.yml showing how they can be connected.
version: "3.4"
services:
mqtt:
image: eclipse-mosquitto
volumes:
- ./mosquitto/config.conf:/mosquitto/config/mosquitto.conf
controlmyspa-ha-mqtt:
image: mikakoivisto/controlmyspa-ha-mqtt:latest
links:
- mqtt
env_file:
- docker.env
I’m auto building and publishing the controlmyspa-ha-mqtt docker image to docker hub for every commit. You can refer to latest or a commit hash if you want to lock it down to specific version. Notice that latest may break but that is the version I’m running so I tend to fix it as soon as possible.
Since it’s ready made docker image it’s pretty easy to add and all the relevant configuration is in docker.env file or you can add them to environment section in docker-compose.yml. Most importantly you need to provide your MQTT and CONTROLMYSPA credentials.
MQTTHOST=mqtt
MQTTPORT=
MQTTUSER=
MQTTPASS=
CONTROLMYSPA_USER=
CONTROLMYSPA_PASS=
CONTROLMYSPA_CELSIUS=true
HASSTOPIC=homeassistant/status
DEBUG=app:info,*:error,spa:info
If you configured everything correctly you should see following kind of thermostat and sensors in your home assistant dashboard. It’s also listed under MQTT devices.
The thermostat buttons basically just toggle between Rest and Ready regardless of which one you press. You should also be aware that controlmyspa is quite slow to react so it may seem its unresponsive. You should also know that the temperature might not be up to date if you have the spa on Rest state as controlmyspa stops reporting the temperature. I’m putting a Ruuvitag Pro to my spa to get an accurate temperature reading.
I hope you find this integration useful and any improvements are greatly appreciated. Especially the HA addon part as that was contributed and I can’t test it myself. Just send a pull request on Github or create an issue.