Balboa Spa Controller App

Hello, I have a Balboa spa controller, (bwa Worldwide App Wi-Fi Module). http://www.balboawatergroup.com/bwa There is a Smartthings integration, via this user driver and app. GitHub - KurtSanders/STBalboaSpaControl: Balboa Spa Control Manager

I was able to import both the app and driver, and it successfully saves. When I go to add the app, it asks for "Select the FQDN or PUBLIC IP Address of your network" When I try to add/save the IP address, it bombs out with an error in the app:

An unexpected error has occurred trying to load the app. Check [Logs](http://hub_IP_address/logs) for more information.

Error: No signature of method: user_app_kurtsanders_Balboa_Spa_Controller_418.getTwcLocation() is applicable for argument types: () values: []

Logs show this:

[app:705](http://hub_IP_address/logs#app705)2019-07-01 11:12:17.967 pm [error](http://hub_IP_address/installedapp/configure/705)groovy.lang.MissingMethodException: No signature of method: user_app_kurtsanders_Balboa_Spa_Controller_418.getTwcLocation() is applicable for argument types: () values: [] on line 536 (mainMenu)


[app:705](http://hub_IP_address/logs#app705)2019-07-01 11:12:17.237 pm [debug](http://hub_IP_address/installedapp/configure/705)Start httpGet =============

[app:705](http://hub_IP_address/logs#app705)2019-07-01 11:12:17.216 pm [info](http://hub_IP_address/installedapp/configure/705)Calling subroutine: getHotTubDeviceID()

I am not sure where to go from here. I am not good with code. I can copy/paste and do minor edits, but much more than that is beyond my knowledge. :disappointed:

I did mess around a bit with the line numbers from the errors, and I apparently am not making the right corrections. It only made things worse. I can't even tell you what I tried as I did so many different things.

Is there anyone that can take a look and see if this app/driver will work with some minor changes, or if it would require a total rework? If it totally is incompatible, I don't want to spend a lot of time with it, but if there is something simple that needs changing can someone point the way?

Thanks in advance.

There's two problems with this unfortunately.

  1. The application code causing the error is due to a Location API that's only in SmartThings.
  2. Even if you get it working, the manufacturer is moving away from iDigi because it's insecure. I did some research of my own and found they setup a new SSL encrypted API at https://bwgapi.balboawater.com (It Works!). So far I haven't found an APK file with actual endpoints it uses. The APKs I've disassembled so far only use idigi.com and controlmyspa.com (some other 3rd Party they moved away from). They stopped using idigi.com in new direct releases to the app store because idigi was insecure and kept the account credentials in the client code.

I think the best bet is to just start over and write a new driver from scratch that talks to the device directly. It's possible to do this but it's more work or might require a proxy service to allow grovy based drivers to actually talk to the internal API of the hot tub module. I highly suggest this approach however due to the security concerns outlined above. Also see the article below for how truly insecure the cloud aspect of the module is. After you read up I'm guessing everyone will insist on using only the local access.

As far as that goes. The app code shows us that it attempts to do some fancy byte sequences and basic encrypt/decrypt of data commands over TCP port 4257. Nothing too crazy but annoying because it's essentially it's own binary protocol. This was being handled with a special cloud API call to iDigi in the smart things app (not sure why it wasn't the driver).

So good luck, I might pursue this if I get the time since i was hoping to integrate it myself and figure out if it can be treated like a thermostat and program the temperature remotely via Alexa for example.

Edit: Forgot the link

https://www.pentestpartners.com/security-blog/hackers-in-hot-water-pwning-smart-hot-tubs-yes-really/

Hi all,

I just wanted to let everyone know that I have ported (mostly) Nathan Spencer's "BWA Spa Manager" Smartthings App and Driver to Hubitat and it appears to be working great. At least with my SPA.

Note that this app requires you to have updated your WiFi controller's firmware so that it connects to Balboa's new "more secure" cloud that requires a username and password login. It doesn't work by allowing you to just specify the IP address of your hot tub. Personally I like this a lot more because this allows me to keep my hot tub on an isolated WiFi network where it can only see the internet and none of my other devices at home and has very limited access to bandwidth.

Here's the source: GitHub - richardpowellus/HBBWASpaManager: BWA Spa Manager for Hubitat

Looking forward to feedback. Thanks!

3 Likes

It works! Here comes the "but"... (Keeping in mind you only ported it and didn't author this)

There is LOTS of logging, and there is no apparent way to turn that off. I tried to comment out the log.info lines in the app, and that helped, but it still sends many log entries.

There are no dashboard buttons other than on, which seems to only bump the temperature to the one preset. I am not certain, but I am guessing that there is something that didn't port over correctly as far as buttons go. Hubitat and Smartthings vary in the button commands, so maybe that is why I can't add a dashboard button for Pump1, for example.

My workaround for buttons was to add a virtual button, and a Rule Machine rule to "run custom action" when that button was pressed. It is time consuming to do this for every single command, so it would be nice if the app could directly be controlled from the dashboard.

Overall, this is a great start! Thanks for porting this.

How can you tell what version of firmware you are on and what does it need to be at. In addition, where can you get the firmware upgrade from?

AFAIK if you use the latest version of the SpaControl app it will walk you through the process of resetting your Hot Tub, creating an account and then, during that process, it will update your Hot Tub's firmware to point to Balboa's new secure endpoint. Note, however, that once you perform this firmware update you cannot go back.

Also, @neonturbo, I have made a few tweaks in the latest version on my Github:

  • On the top of both the Driver and App you will now find a global LOG_LEVEL variable that defaults to 5 which means it will only log exceptions. This should dramatically decrease the amount of logging. To return to the previous amount of logging just set this value back to 3 in both the driver and the app.
  • I've started adding support for Hubitat's Thermostat capability. I tested this by adding my device to the Hubitat Dashboard and I can now control my Hot Tub using the Hubitat dashboard and it actually works pretty well. It's not perfect, but, considering I only started working on this today I'd call it pretty good for a day's work.
  • I also added preliminary support for hacs-hubitat. This is very preliminary but it does somewhat work. The Hot Tub does show up in Homeassistant and can be controlled there but things are a bit flaky. This needs work.
1 Like

PM sent.

Thermostat seems a bit weird, the temperature control buttons (:arrow_down::arrow_up:) are missing from the tile. The temp control works from the Device page though.

Logging is MUCH improved, thanks for that fix.

I didn't know that they had finally updated their app to get rid of the ridiculously insecure cloud control. I was not prompted for a firmware update, however. I put in my wifi module as a retrofit last year and received the one with the rubber duck antenna, which I guess already had the latest firmware. I'll check out your driver/app. Thanks!

Actually, that seems to be the standard behavior of the Thermostat control on Hubitat. When the Thermostat is "off" it doesn't display the up and down arrows to let you select the temperature. I don't know if there's a way to change that behavior but, the easy workaround is to simply first change the Thermostat to "heat" at which point the up and down arrows will appear. Then you will be able to set your spa's temperature.

1 Like

Hi all,

Just wanted to let everyone know that I have uploaded a completely revamped version of my app and driver (now drivers) for the Balboa hottub to my Github (GitHub - richardpowellus/HBBWASpaManager: BWA Spa Manager for Hubitat).

The new version:

  • Now automatically determines what features your hot tub supports (i.e. how many pumps and lights)
  • Supports Hubitat's child device feature. Now when you add your hot tub to Hubitat it will add your hot tub as a parent device that has a single child Thermostat device, 1 pump child device per pump and 1 child device per light. I will add support for child devices for blowers, etc. soon.
  • Has many other performance optimizations and cosmetic fixes

Let me know how it goes and feel free to report issues / feature requests in Github. I'm especially looking for feedback as to whether the automatic device detection feature is working as expected.

PS. Note that when you install the new version you will need to install all 3 drivers now (the parent driver plus both the thermostat and switch drivers). Make sure you install all three drivers before you run through the app installation process.

4 Likes

The auto detect worked fine.

Unfortunately, there is something severely wrong with the app. It spams my hub multiple times per second with an error. I cannot control the spa with the dashboard either.

The virtual buttons look weird to me too. There is no status or control over the virtual temperature, for example. I would expect to see something other than one button here, maybe a current status of temperature or a thermostat or something.

It also broke all my rules where this app was involved.

I rolled back for now.

So the first issue I usually see whenever the App and drivers have become out of sync. That's almost guaranteed if you try and "upgrade" from the old app/driver to the new one. You will need to completely uninstall the old app and delete the old devices/driver before installing the new app and drivers. Trying to support upgrading from the old app/driver to the new one, while possible, will be quite a tedious process and I'm not sure it's worthwhile for the small number of us that will be using this app.

Can you try doing a clean install and then let me know if the issue is resolved?

As for the second issue, this is expected with the new parent/child model. You will now find all the controls for the current status, temperature, etc. with the new thermostat child device. Once you have installed the new app then go to the device list and you will see you have a new child device listed under your parent device that is a dedicated thermostat device. If you click on that thermostat device it will give you all the controls you're looking for.

Here are some screenshots to show you what I mean:

It's a new mindset to wrap your head around but once you get the idea it makes a lot of sense. A lot of concepts outside of Hubitat and a lot of other Hubitat apps don't know what a Hot Tub device is but they all know what a Switch is and most of them know what a Thermostat is. Having child devices opens up the possibility if being able to connect up with many other apps and automations far more seamlessly. For example, I've now hooked up my Hot Tub to Homeassistant and it's working extremely well.

I know what the child and parent thing looks like, many of my devices use that structure. That screenshot is what mine showed on ~all~ the child devices... Pretty much a blank virtual device with that one button.

I did upgrade in place, which could be why I am getting that error, but I did add the drivers first, and then do the app code upgrade before I went into the app itself and logged in.

I guess I will try a reinstall when I get a few, but that is really going to mess up all my rules and dashboards and I was hoping to avoid having to fix all these.

When I'm done repairing a broken air valve and get our tub up and going again I'll definitely be looking into this. I've tried several times to use the Balboa app over the last few years and the tub never stayed connected to the WiFi. Maybe a firmware update will help with that..

Ok, finally had a chance to remove and reinstall everything. So it works, mostly. The autodetect worked fine again. There were a few errors in the logs, but they seemed to have gone away after logging in.

The one weird quirk is with pump 1. This is a two speed pump.

When I try to build a dashboard, I cannot get a button or switch to turn the pump on. The dashboard says "unknown".

The reason appears to be because when I go to the Child device Pump 1, the following happens.

  • Press the ON button, and pump 1 comes on low.
  • Press the OFF button and pump 1 turns on high.
  • Press the ON button again to get off.

If you don't cycle in this order, nothing works for pump 1. For example, pressing OFF does nothing until ON has been pressed exactly 1 time. ON does nothing again until you press OFF and go through high speed.

This makes having any button or switch not work properly in dashboard, along with being very non-intuitive to use via the Settings page.

Pump 2 is a single speed pump, and it works as expected. ON is on, and OFF is off.

The only other thing on my list is that it writes the following into the logs every time it polls. It would be nice to be able to turn this off.

  • "POST"-ing xml to "/devices/sci"
  • Getting panel update for 00000000-00000000-00xxxx-xxxxxx
  • polling...

OK, my pump #1 isn't so fancy. So I wouldn't have noticed that bug :slight_smile: My pump #1 is also just on/off. I will look into it and let you know. And also the logging issue.

Thanks.

That pump stuff worked different and (in my opinion) fine in the older code. The first ON would get low, the second ON would get high, and OFF was off. So maybe you could reuse that part of the code?

And one more request if possible. In the older code, you could set "temperature range" from high to low (and view the current range). That made it nice to be able to quickly toggle between low temp and high temp. Could we get that back, or at least the status as when it is in low range. When mine is in low range, you can only set it to 99 degrees.

Hello, any updates on this app? Anything you would like me to try, or any logs that would help?

Thanks!

Unfortunately I haven't had a chance to work on this. Hopefully once all the vacations are over in the new year I'll get a chance.

1 Like

Thanks, looking forward to updates.

Download the Hubitat app