Balboa Hot Tub/Spa Automation and Power Savings

Starting with HA 2023.8, the MQTT unique id’s I mentioned a few posts back does become a repair issue. I don’t know specifics, but there’s more info in the release notes as well as one of the first comments on the release notes blog post. I filed an issue on github for the balboa worldwide app.

Hi Team - Apologies Jim - I have posted on Github - I’ll go back and close it or delete it or whatever I can do. I have installed the EW10 device and its working well - Its on my Wifi network and if I telnet to it I seem to be getting RS485 packets. The issue is when I start BWALink I get the following - Not sure if I’m interpreting it correctly but it looks like its not getting what is expects from the Balboa unit?? I’ve included the log in debug mode below. Its a Balboa SIBp2p - PN 56202 dated 09/08/11 if that helps any?

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[19:15:14] INFO: Starting BWALink addon…
[19:15:14] INFO: Setting addon timezone to Pacific/Auckland based on the system timezone.
[19:15:14] INFO: Starting mqtt bridge connecting tcp://192.168.69.42:8899/ to mqtt://core-mosquitto:1883
I, to spa: #BWA::Messages::ConfigurationRequest
D, wrote: 7e 05 0a bf 04 77 7e
D, discarding invalid data prior to message bf 06 5c 7e 7e 01 00 bf 07 5b 7e
D, discarding invalid data prior to message 7c 05 10 bf 07 5b 7e
D, discarding invalid data prior to message 7e 05 10 3f 07 5b 7e
D, discarding invalid data prior to message 7c 05 10 bf 07 53 7c
D, discarding invalid data prior to message 7e 01 00 bf 07 5b 7e
D, read: 7e 1c ff af 13 00 00 4c 15 1d 00 00 01 03 05 0c 00 00 02 00 00 00 00 00 00 4c 00 00 85 7e
/usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.4/lib/bwa/message.rb:78:in `parse’: Unrecognized data length (28) for message BWA::Messages::Status (BWA::InvalidMessage)

  • from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.4/lib/bwa/client.rb:65:in `block in poll’*
  • from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.4/lib/bwa/client.rb:64:in `loop’*
  • from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.4/lib/bwa/client.rb:64:in `poll’*
  • from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.4/exe/bwa_mqtt_bridge:33:in `block in initialize’*
  • from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.4/exe/bwa_mqtt_bridge:32:in `loop’*
  • from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.4/exe/bwa_mqtt_bridge:32:in `initialize’*
  • from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.4/exe/bwa_mqtt_bridge:421:in `new’*
  • from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.4/exe/bwa_mqtt_bridge:421:in `<top (required)>’*
  • from /usr/bin/bwa_mqtt_bridge:25:in `load’*
  • from /usr/bin/bwa_mqtt_bridge:25:in `’*
    s6-rc: info: service legacy-services: stopping
    s6-rc: info: service legacy-services successfully stopped
    s6-rc: info: service legacy-cont-init: stopping
    s6-rc: info: service legacy-cont-init successfully stopped
    s6-rc: info: service fix-attrs: stopping
    s6-rc: info: service fix-attrs successfully stopped
    s6-rc: info: service s6rc-oneshot-runner: stopping
    s6-rc: info: service s6rc-oneshot-runner successfully stopped

I noticed that hot tub stuck after power on. Display says connecting to spa… Anyone had this problem?

Apologies all - I’m obviously overtired assuming this was a programming or version of Balboa hardware issue and trying to start understanding Ruby and trying to work out why I was getting interpretable data from the link but it wasn’t talking.

Turns out it was staring me in the face - Note the comment on EW10!!! EW10 is the RS232 version where we need the EW11 RS485 - I have one on the way and fingers crossed at that point all will behave as it should based on me checking everything else is working as expected!!!

I’ve been in IT hardware and software support for 30 years now so this is an embarrassing mistake but I feel relief knowing the solution is going to be as fast as the freight to get here.

It has forced me to delve deeper into Home Assistant and do a little more than just follow an instruction guide so I’m more prepared to play more.

Hey Guys, nice Project.

i have a Balboa-GS510SZ and flashed my wemos with them project GitHub - MagnusPer/Balboa-GS510SZ: An Arduino/esp8266 library to direct interface Balboa Series GS (GS510SZ) hot tube control system.. Exist’s a better way in the meanwhile?

i have a connect to the wemos Spa Welcome Frontend, but the next steps are unclear for me, someone can asssit me with the next steps? maybe @netmindz :slight_smile: ?
the default Mqtt integrations is running but the wemos is there not available.

Hi, we have two control units (JZ6013X2 and JZ6013X1). Do I need two RPI’s or can I feed the data with two RS485 converter to the same RPI? Just wondering. Thanx for a quick answer.

1 Like

Hi I have a hot tub 2 year old with a Balboa TP600 Control Module. I have made up the cable and configured Elfin EW11. I currently have the Balboa (hopeless) wifi module. I have checked all my connection and am ready to unplug the Wifi module and plug in the new Elfin.
I just wanted to know if there was anything new or maybe something missed. I am using HA but not Docker so plan to run as an Add-on. I assume there is no HACS version (Cant find)? So appreciate anything else I may need to know?
Thanks

Really basic question I am running non-docker HA so am trying to download the relevant folder as per instruction using Samba. I have access and have created the relevant “bwalink” folder in add-ons. I have Followed instructions: *** Copy the full content of ha-addon into the new directory**
But see no download option - I am obviously missing something basic or there are changes in latest version.
Really appreciate advice as the thread has become a little confusing.

Anyone following my comments I fumbled through and seem to have got it working - I already had MQTT setup. The EW11 and cable was very easy and the MQTT picked up immediately.
My lack of knowledge was around the files required to be added to my “Add on” directory. Thats not detailed very clearly in above instruction (Sure if your familiar with the process it would be easy) and not even sure I did it correctly but it does work…
My Temperature does not appear as a Generic thermostat - maybe theres a newer version or that doesnt exist yet.
Anyone thanks to all for your efforts.

I have a Spa with a Balboa VS500Z main board. It has two connector ports (J1 and J2) that look like a phone or ethernet connector. I do not see a connector like mentioned. Is there a way to connect this board to Home Assistant?

Regarding your second topic with the connection reset:
I have the same issue with my BP balboa spa control + EW11 RS485 WLAN stick. After starting the add-on everything works fine. Coming back some time later and pressing a button leads to bwalink crash and unavailable device. In the error log I see the same error with connection reset by peer. Another problem is, after some time I don’t receive data anymore and HA doesn’t show any update in the devices/status.

I googled about this problem and found another post here. Someone said that there is an issue (bad implementation) with the Balboa system and they close/timeout the connection after 1 hour. It has nothing to do with our add-on or the EW11 stick. He said that this even happens with the original balboa WiFi adapter, but they implementet a function to restart the WiFi connection every our. I don’t know if this is true or not.

But I added the same function to my HA automation. HA is restarting the bwalink add-on every hour. For now it seems to work and didn’t crash anymore.

@jshank I have come across what you have created here and I am very keen to try get the same thing working myself. I am new to coding and took on HA and other side projects like this to learn. So if I ask an obvious/stupid questions, please bare with me. haha.

I have got to the point where I need to get the Pi3 running with the Hommie bridge up and running.

I edited my bwa_mqtt_bridge.service to look like this:

[Unit]
Description=Balboa Spa MQTT Bridge

[Service]
User=cody
ExecStart=/usr/local/bin/bwa_mqtt_bridge mqtt://*username*:*pword*@*ipaddress*:1883 /dev/ttyUSB0
Environment="LOG_LEVEL=WARN" "LOG_VERBOSITY=0"
Restart=always
RestartSec=3s
Type=notify
NotifyAccess=main
WatchdogSec=60

[Install]
WantedBy=multi-user.target

I have then in my RPI Terminal I run the following:

sudo systemctl daemon-reload
sudo systemctl enable bwa_mqtt_bridge
sudo systemctl start bwa_mqtt_bridge

I then however get the following error:

Job for bwa_mqtt_bridge.service failed because the control process exited with error code.
See "systemctl status bwa_mqtt_bridge.service" and "journalctl -xeu bwa_mqtt_bridge.service" for details.
root@raspberrypi:/etc/systemd/system# sudo systemctl status bwa_mqtt_bridge
* bwa_mqtt_bridge.service - Balboa Spa MQTT Bridge
     Loaded: loaded (/etc/systemd/system/bwa_mqtt_bridge.service; enabled; preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Sun 2023-10-22 17:51:58 BST; 30ms ago
    Process: 8928 ExecStart=/usr/local/bin/bwa_mqtt_bridge mqtt://*username*:*pword*@*ipaddress*:1883 /dev/ttyUSB0 (code=exited, status=217/USER)
   Main PID: 8928 (code=exited, status=217/USER)
        CPU: 0

Oct 22 17:51:58 raspberrypi systemd[1]: bwa_mqtt_bridge.service: Main process exited, code=exited, status=217/USER
Oct 22 17:51:58 raspberrypi systemd[1]: bwa_mqtt_bridge.service: Failed with result 'exit-code'.
Oct 22 17:51:58 raspberrypi systemd[1]: Failed to start bwa_mqtt_bridge.service - Balboa Spa MQTT Bridge.
root@raspberrypi:/etc/systemd/system# sudo journalctl -xeu bwa_mqtt_bridge
-- The job identifier is 278955.
Oct 22 17:52:37 raspberrypi systemd[1]: bwa_mqtt_bridge.service: Main process exited, code=exited, status=217/USER
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- An ExecStart= process belonging to unit bwa_mqtt_bridge.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 217.
Oct 22 17:52:37 raspberrypi systemd[1]: bwa_mqtt_bridge.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit bwa_mqtt_bridge.service has entered the 'failed' state with result 'exit-code'.
Oct 22 17:52:37 raspberrypi systemd[1]: Failed to start bwa_mqtt_bridge.service - Balboa Spa MQTT Bridge.
-- Subject: A start job for unit bwa_mqtt_bridge.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit bwa_mqtt_bridge.service has finished with a failure.
-- 
-- The job identifier is 278955 and the job result is failed.
lines 7478-7500/7500 (END)
-- The job identifier is 278955.
Oct 22 17:52:37 raspberrypi systemd[1]: bwa_mqtt_bridge.service: Main process exited, code=exited, status=217/USER
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- An ExecStart= process belonging to unit bwa_mqtt_bridge.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 217.
Oct 22 17:52:37 raspberrypi systemd[1]: bwa_mqtt_bridge.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit bwa_mqtt_bridge.service has entered the 'failed' state with result 'exit-code'.
Oct 22 17:52:37 raspberrypi systemd[1]: Failed to start bwa_mqtt_bridge.service - Balboa Spa MQTT Bridge.
-- Subject: A start job for unit bwa_mqtt_bridge.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit bwa_mqtt_bridge.service has finished with a failure.
-- 
-- The job identifier is 278955 and the job result is failed.

Are you able to give me some idea of what I am doing wrong?

Also in HA, how do I subscribe to a topic?

Thanks for any help you can give me. I really want to get this working as it looks so cool!

Hey there,
My approach uses an all-in-one docker container. There have been several forks that take different approaches. Take a look at Cody’s original repository for tips on how to run bwa_mqtt_bridge as a service.

@jshank have you released a new docker image that includes the BWA version 2.1.5? Your docker image seems to have 2.1.4 in it and 2.1.5 was released to fix the repair notice about MQTT entity names. I tried doing a gem update inside the container and it appears to update to 2.1.5, but whenever I reboot the container, HA still gives me a log warning about MQTT entities without unique IDs.

Guys, I need some help please :frowning:
I tried to connect my balboa to a RS485 usb module, the same as shown here : https://raw.githubusercontent.com/ccutrer/balboa_worldwide_app/main/doc/rs485dongle.jpg

I can’t manage to get correct information from it… I’m trying for a while to read the information with Screen on my raspberry, but I keep on having unreadable information, like :

�
                 ���o����������������o���������߁�G��߁������߁�G��߁������߁�G��߁������}dG�|������߁�G��߁������}dG��߁������}dG�|������߁�G��߁������߁�G�|������}dG��߁������߁�G��߁������߁�G��߁������߁�G��߁������}dG��߁������
                                                                        ���o����������������o��������}dG��߁������߁�G��߁������߁�G��߁������߁�G�|������}dG��߁������߁�G��߁������߁�G��߁������}dG��߁������}dG��߁������߁�G��߁������߁�G�|������߁�G��߁������߁�G��߁������߁�G��߁������
                                                                                                                               ���o����������������o���������߁�G��߁������߁�G�|������߁�G��߁������}dG��߁������}� ��}dG��߁������}dG��߁������߁�G�|������߁�G��߁������߁�G��߁������߁�G��߁������}dG��߁������}dG�|������}dG��߁������
                                   ���o����������������o���������߁�G��߁������߁�G�|������߁�G�|������߁�G��߁������߁�G��߁������߁�G��߁������}dG��߁������}dG��߁������߁�G��߁������߁�G��߁������}dG��߁������߁�G�|������߁�G��߁������߁�G��߁������B���o����������������o���������}dG��߁������߁�G��߁������}dG��߁������߁�G��߁������}dG��߁������߁�G��߁������߁�G��߁������߁�G�|������߁�G��߁������߁�G��߁������}dG�|������}dG�|������߁�G��߁������߁�G��߁������
      ���o����������������o���������߁�G��߁������}dG�|������߁�G��߁������߁�G��߁������߁�G��߁������߁�G��߁������}dG��߁������}dG�|������}dG��߁������}� ���߁�G��߁������߁�G�|������߁�G�|������}dG��߁������B���o����������������o���������}dG�|������߁�G��߁������}dG��߁������߁�G��߁������߁�G�߁������߁�G�|������߁�G�|������߁�G��߁������}dG��߁������߁�G��߁������}dG��߁������߁�G��߁������߁�G

I already tried to switch the wires, to connect the ground, and to change the parity and config on TTY with stty

any idea ?

did you got an answer to your question ? Balboa Hot Tub/Spa Automation and Power Savings - #92 by heubi76

@jshank sorry to bother you again mate, that link doesn’t seem to work for me.

Thanks for the help.

Whoops, I swear, 1 little extra character and URLs just don’t work anymore :wink:

2 Likes

@jshank : I have a so-called “SwimSpa” with two different zones and therefore two touch panels. I followed your instruction and works without any problems for the first touch panel / control. Now I want to integration the second touch panel / control but don’t know how.

I made a second folder for home assistant integration and renamed it to “bwalink2”. I can install the second addon in HA and connect to the EW11 device. But the second device doesn’t show up in MQTT.

I think this is because the name of the device and also the MQTT messages are the same as for the first device. Is this possible?

So I think the only way to do this, is to change the balboa-worldwide-app with a custom device name and also changing the message structure (from bwa to bwa2 or something else).

Or do you have any idea how to integrate a second spa panel?

Thanks for any help.

Take a look at the core project, balboa_worldwide_app. If I remember correctly, you can override the MQTT base name there.

1 Like