[Release] HB BWA SpaManager App

HB BWA SpaManager

(forked and updated from richardpowellus/HBBWASpaManager

Integrate your Balboa cloud controller connected spa to the Hubitat environment with the following features:

  1. View real-time temperature
  2. Set heatingSetPoint temperature
  3. Turn on/off lights, pumps, mister and aux devices
  4. Set & automate High/Low & Rest/Ready modes to reduce energy usage
  5. Control spa using Hubitat's Rules/WebCore


How to install BWA Spa Manager:

  1. Connect the spa to using these steps:
    • BWA Cloud Spa Controller
    • Create userid and password and verify BWA Cloud connectivity using BWA Spa Control iOS/Android App
  2. Install Hubitat Package Manager (HPM) on your Hubitat Hub:
  3. Search HPM for BWA Spa Manager, Install and Configure the App
  4. A parent device (SPA xxxxx) and separate child devices will be created according to the custom configuration/features of your spa to control temperature, pumps, lights, rest/ready states, mister, etc.
  5. You may change the label of these devices to your naming preferences.

Version Notes

v1.2.0 - Nov-11-2023

Please be advised that this latest release with all these new features may introduce some unwanted bugs that hopefully we can identify and work to correct. Each spa has a different configuration (e.g., pumps, lights, blowers, misters, etc) and therefore I can only test on my BullFrog A7L model with BWA Cloud control. If your current release of SPa Manager is working and you are completely satisfied, I would suggest you not overwrite your working release, and install this on a separate hub (if you have multiple hubs).
  • V1.2.0 code stream now maintained by Kurt Sanders . Previous versions were maintained by Richard Powell)
  • Changed namespace to 'kurtsanders' in app and drivers
  • Moved hardcoded logging values in driver to UI preferences and added logging expire timeout logic.
  • Added 'Switch Capability' in device parent for:
    • Value: On (TempRange: high, ReadyMode: Ready)
    • Value: Off (TempRange: low, ReadyMode: Rest)
  • Added capability "Actuator" and attribute "ReadyMode", "enum", ["Ready", "Rest"] with command "setReadyMode"
  • Added attribute "TempRange", "enum", ["low", "high"] and command "setTempRange"
  • Added app and drivers to HPM Public Install App for easier install and updates
  • Added custom polling periods by selecting your own Hubitat mode names (e.g. home, night, away, vacation, etc) to reduce app polling during times when it is not needed, thus reducing load on HE Hub and BWA cloud.
  • Modified spa thermostat driver to allow incremental changes (up/down) in the thermostat dashboard UI to the spa's Heat point temperature.
  • Added new attributes to Spa Parent device:
    • wifiState ["WiFi OK","WiFi Spa Not Communicating","WiFi Startup","WiFi Prime","WiFi Hold","WiFi Panel","WiFi Unknown"]
    • spaStatus 'Message String'
    • online ["Online","Offline"]
    • updated_at (last poll timestamp and any error messages from the BWA cloud)

v1.2.1 - Dec-05-2023

  • Added missing checkLogLevel() for logging timeout.
  • Added prefix 'Updated at:' to 'updated_at' timestamp attribute in Spa Parent Driver.
  • Corrected Community WebLink in Spa Parent Driver.

v1.2.2 - Dec-06-2023

  • Bug Fix for logging timeout period.
  • Added additional logging time-out periods to child devices

v1.2.3 - Dec-07-2023

  • Bug fixes for initial app install.

v1.3.0 - Feb-07-2024

(Please test on a separate hub (if you have one) to make sure this release works for your specific spa manufacturer and configuration of pumps, lights, misters, blowers, etc)

Install/Update using Hubitat Package Manager (HPM)

  • REQUIRES HPM v1.9.2 or higher for install/update.
  • This BWA Spa Manager release has extensive changes to both application & drivers to catch/handle spa offline/disconnected conditions as best as possible. *The Balboa SPA WiFi controller can be very unstable and randomly losses network connection to the BWA Cloud. Refresh SPA parent driver and then check for an 'online' state in parent SPA driver to determine if the spa is 'online' before sending any events, like pump on, lights on, etc. Re-check that the events have been changed in a refresh.
  • Added a new 'speed' attribute to the spa switch child driver(s) for selected spa devices, like pumps, blower, etc that have a low or high capabilities in addition to a switch state of 'on/off'.
  • Added detection of a blower pump (if present) and the current on/off state and speed level if on. Current BBWA release does not provide control of this blower device, just current state.
  • Added new feature 'Set Spa to Local Time' command in the spa parent device to update the SPA's internal time clock to hubs local time in HH:mm format'. The parent spa device gets & displays the spa's current time in the default 12/24 hour format so a RM can be created to update the spa's local time as one prefers when the spa's time is not as current as one likes.
  • Changed default polling location modes to ALL when installed the first time. It is recommended that one deselects those modes in which polling is not needed to reduce hub usage. One can use a RM to poll/refresh the spa state less frequently than what is offered in the BWA app preferences for auto polling.
  • Updated BWA Spa Manager code stream to use HE libraries and bundles. As a reminder, your HPM must be at v1.9.2 or higher to install/update BWA successfully.

Install using Hubitat Package Manager (HPM)

v1.3.1 - Feb-13-2024

  • REQUIRES HPM v1.9.2 or higher for HPM install or update.
  • Added code for handling inital logging type and time values during new installation.
  • Added code for handling unexpected spa offline processing and resetting currentValue of pump switches and speed values.
  • Converted all state variables to immediate atomicState.
  • Converted realtime BWA http processing to the runIN background which will speed up UI during exit.
  • Added a new data attribute, 'spaTimeLocalDeltaMins', to the spa parent device which will calculate the delta mins between spa time and hub local time. This new data value can be used in a RM/WebCore piston to evaulate the delta time between the spa and local hub time and then use parent spa device command 'setSpaToLocalTime' to sync spa time to local hub time.
  • Added 'Pause' and 'Resume' button in app UI to allow user to temporarily stop & resume cloud polling."
Filename Type Version
SanderSoft-Library.groovy Library Version 0.0.1
BWA-Library.groovy Library Version 0.0.1
HBBWASpaManager_App.groovy Application Version 1.3.1
HBBWASpaManager_Parent_Device.groovy Device Driver Version 1.3.1
HBBWASpaManager_Switch_Device.groovy Device Driver Version 1.3.1
HBBWASpaManager_Thermostat_Device.groovy Device Driver Version 1.3.0


Rule Machine Examples

Many users have asked me about sharing some working examples of using Rule Machine (RM) with their BWA network connected spa. Here are a few I routinely use and they can be imported into RM and modified as needed from Click Here for RM Import Files.

Spa Notifier when Offline

  • Notification when Offline

Spa Notifier when Online

Spa Refresher Switch Watcher & Night Mode Refresher

  • This RM polls the SPA during a 'location mode' that is deselected in the BWA app for auto polling.
    This RM allows one to see the spa's current state but reduce the auto polling setting when we do not need it

Spa: Temp Up/Down by Time

  • At selected time values, this RM increases and decreases the spa set temperature to reduce electricity use.

Spa: Vacation Mode: Set Spa to Low/Ready

  • Lowers spa temperature and sets spa operation to 'Rest' when location mode is 'Vacation'. Returns spa to 'Ready' and temperature back to normal when not in 'Vacation' location mode.

How to Fix a 'Http Error (400): Bad Request'

If you are observing your Hubitat Spa Parent device not updating and the HE logs show a 'Http Error (400): Bad Request' repeatedly, you will need to either contact BWA Support or toy can delete your BWA Spa Control Cloud account from the mobile app and create it again.

Apparently, the BWA Cloud server can get corrupted spa data and the BWA Spa Manager app will poll endlessly and only return a Http Error (400): Bad Request.

An updated BWA Release 1.3.1 will be available in HPM as soon as HPM cache is refreshed.

I'm not seeing this speed attribute in my Pump 1 or Pump 2. I see the # of buttons option. Is this the same? On my spa, I press pump 1 (or 2) once for Low speed, a second time for high and the 3rd turns the pump off. If # of buttons is correct, would I put 2 or 3?

EDIT: I see the attribute, sorry. I think I may be misunderstanding how the On Off works. Looks like I need to do the following sequence, if I leave the # of buttons default at 1.

On - turns the pump on low.
Off - turns the pump on high
Off - turns the pumps off

My mind wanted to press On for low, On again for High, then off for Off.

1 Like

Dear @3rdStng ,

Glad the 'speed' state finally showed up, it is changed after every successful spa refresh/poll.

The BWA Spa Manager app can only send a virtual button press to the spa's cloud controller. Then it can report back what that pump's current state is from these states: ["off","low","high","unknown"]. I wish I could send a 'speed' state to the spa cloud controller, but alas only one virtual button press is allowed for the undocumented API.

A switch event does not make sense for a pump when I think about it, but perfect sense for a light device. Perhaps I can configure a pump device as a hubitat capability of ' PushableButton' rather than a 'switch'.

I included a device preference parameter (# of Spa Button Presses when Switch state is turned 'On' (1..5) *) to allow the 'on' switch to emulate 1 to 5 sequential button presses for each on/off event, but after testing it, it doesn't work for my spa since when set to '2' which send two presses, it will turn on the pump to 'high' from an 'off' state, but then when I command the pump switch from 'on' to 'off' from the BWA Spa Manager app, if the pump is in a 'high' state, it will change the pump speed to low, skipping over the off state. UGH!

I have my pump switch device preference set to '1' as you do and have my Hubitat rules just send a switch on command which only sets the pump speed to low. I did not try to send another 'on' to see if it would act like another button press.

In a next BWA Spa Manager release, I am going to explore one or more of the following:

  1. Configure pump spa devices as a Hubitat capability ' PushableButton' and remove the capability of switch since it is not working as one expects for a pump device.
  2. Add a new custom spa device command to allow a pump switch device to receive & send the number of button presses one specifies as a parameter in the command as a number. This way, one can set the pump speed to whatever number of presses they desire.
  3. Optimizing sending multiple virtual button presses in ONE http post command, since sending them separate to invoke a 'high' speed sometimes the spa cloud losses or does not honor the repetitive requests. Don't get me started on how poor the WiFi controller is or the cloud api is writen, but at least we have some api control.

If you have any other enhancements that might be nice, please let me know in this thread!

Same. Set mine to two and the On went straight to High speed.

It doesn't work. Tried it a few times.

I think a pushable button would be better than and On Off. I like the On Off status that it shows though. Allowed me to see from my dashboard that the kids left the pump AND light on when they got out. Not sure if an extra attribute could go with the button status though. And I'm probably mixing up my terms. The tile on the dashboard would be a button, but in the lower corner would show the status. On, or Low, High, etc. Then you just press it once or twice to get it back to off.

Sorry to hear that. Not to rub it in, or jinx myself, but my controller has been solid for over a week. I know we discussed this in a different thread. And if I need to use that thread instead, please let me know.

Last question. The Auto Sync time option that was just added. At least I think it was just added, or maybe I just completely missed it. Anyway, my question. How often does the auto sync sync? I have a rule to sync once a day, but if the auto sync syncs once a day, I don't need my rule.

BTW, love the "spaTimeLocalDeltaMins" option. Allows for syncing only when the time is way off. I/E when daylight savings changes and the spa time is off by an hour.

EDIT: I suppose a feature add, when the Auto Sync is enabled. When should the sync occur? Daily, Hourly, when the Delta >= to X? But X would need to be relative, as in not positive or negative. When daylight savings starts, the spa could be -60 minutes. But if X were >= 60 then -60 would never match.

AutoSync command: The AutoSync command boolean isn't currently doing anything in this release (my bad). I should have deleted it when I issued this latest release since I had the same questions as you as to when. This device command will be removed in the next release. IMHO, syncing the spa local time is better left to each user to create a HE piston/rule to determine time of day, deltaOffset or other conditions and then take action to sync. I added the "spaTimeLocalDeltaMins" attribute in this release so one could use that new data variable as an event to sync the time when/if they choose.

Pump Speed: I am leaning toward exploring Hubitat's 'FanControl' capability (instead of 'pushButton') command and setSpeed options for a controlling a spa's pump. I will configure 'FanControl' with setSpeed options of ['off', 'low', 'high'] which mimic the Balboa's spa controllers speed settings for a spa pump device. This 'Set Speed' device command would, for example, allow one to select a setSeed, like 'high' and the spa device would use the current pump speed state, for example 'off', and issue the correct number of virtual button presses, for example, 2, to get to that desired setSpeed of 'high'. If the spa pump current speed was 'high', for example, and one selected a 'Set Speed' of 'off', the spa device would only issue a single virtual button press. Of course, this intuitive command highly depends on trusting that the current pump speed is accurate. Given that your spa WiFi is near flawless, it should be accurate 99.9% and if one really wanted to make sure, they can issue a 'refresh' command to get the latest pump speed.


1 Like