Balboa Hot Tub/Spa Automation and Power Savings

Your addon doesn’t appear to work anymore. A couple people have left feedback with the same issue.
When the addon is building we get this error:

The command ‘/bin/ash -o pipefail -c set -eux; apk add --no-cache --virtual .ruby-builddeps autoconf bison bzip2 bzip2-dev ca-certificates coreutils dpkg-dev dpkg g++ gcc gdbm-dev glib-dev libc-dev libffi-dev libxml2-dev libxslt-dev linux-headers make ncurses-dev openssl openssl-dev patch procps readline-dev ruby tar xz yaml-dev zlib-dev ; rustArch=; apkArch=“$(apk --print-arch)”; case “$apkArch” in ‘x86_64’) rustArch=‘x86_64-unknown-linux-musl’; rustupUrl=‘https://static.rust-lang.org/rustup/archive/1.25.1/x86_64-unknown-linux-musl/rustup-init’; rustupSha256=‘95427cb0592e32ed39c8bd522fe2a40a746ba07afb8149f91e936cddb4d6eeac’ ;; ‘aarch64’) rustArch=‘aarch64-unknown-linux-musl’; rustupUrl=‘https://static.rust-lang.org/rustup/archive/1.25.1/aarch64-unknown-linux-musl/rustup-init’; rustupSha256=‘7855404cdc50c20040c743800c947b6f452490d47f8590a4a83bc6f75d1d8eda’ ;; esac; if [ -n “$rustArch” ]; then mkdir -p /tmp/rust; wget -O /tmp/rust/rustup-init “$rustupUrl”; echo “$rustupSha256 */tmp/rust/rustup-init” | sha256sum --check --strict; chmod +x /tmp/rust/rustup-init; export RUSTUP_HOME=’/tmp/rust/rustup’ CARGO_HOME=‘/tmp/rust/cargo’; export PATH=“$CARGO_HOME/bin:$PATH”; /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain ‘1.66.0’ --default-host “$rustArch”; rustc --version; cargo --version; fi; wget -O ruby.tar.xz “https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz”; echo “$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz” | sha256sum --check --strict; mkdir -p /usr/src/ruby; tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; rm ruby.tar.xz; cd /usr/src/ruby; wget -O ‘thread-stack-fix.patch’ ‘https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch’; echo ‘3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch’ | sha256sum --check --strict; patch -p1 -i thread-stack-fix.patch; rm thread-stack-fix.patch; export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; { echo ‘#define ENABLE_PATH_CHECK 0’; echo; cat file.c; } > file.c.new; mv file.c.new file.c; autoconf; gnuArch=“$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)”; ./configure --build=“$gnuArch” --disable-install-doc --enable-shared ${rustArch:±-enable-yjit} ; make -j “$(nproc)”; make install; rm -rf /tmp/rust; runDeps=“$( scanelf --needed --nobanner --format ‘%n#p’ --recursive /usr/local | tr ‘,’ ‘\n’ | sort -u | awk 'system(”[ -e /usr/local/lib/" $1 " ]“) == 0 { next } { print “so:” $1 }’ )”; apk add --no-network --virtual .ruby-rundeps $runDeps; apk del --no-network .ruby-builddeps; cd /; rm -r /usr/src/ruby; if apk --no-network list --installed | grep -v ‘[1]ruby-rundeps’ | grep -i ruby ; then exit 1; fi; [ “$(command -v ruby)” = ‘/usr/local/bin/ruby’ ]; ruby --version; gem --version; bundle --version’ returned a non-zero code: 2


  1. . ↩︎

Appreciate any help, this add-on worked brilliantly last year. Ive just turned the tub back on for the season and it fails. Seems host is unreachable.
Perhaps ive forgotten to do something. Any help appreciated.

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
[09:16:32] INFO: Starting BWALink addon...
[09:16:32] INFO: Setting addon timezone to Europe/London based on the system timezone.
[09:16:33] INFO: Starting mqtt bridge connecting tcp://192.168.0.16:8899/ to mqtt://core-mosquitto:1883
/usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `initialize': Host is unreachable - connect(2) for "192.168.0.16" port 8899 (Errno::EHOSTUNREACH)
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `new'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `initialize'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/exe/bwa_mqtt_bridge:416:in `new'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/exe/bwa_mqtt_bridge:416:in `<top (required)>'
	from /usr/bin/bwa_mqtt_bridge:25:in `load'
	from /usr/bin/bwa_mqtt_bridge:25:in `<main>'
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
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
[09:16:41] INFO: Starting BWALink addon...
[09:16:41] INFO: Setting addon timezone to Europe/London based on the system timezone.
[09:16:41] INFO: Starting mqtt bridge connecting tcp://192.168.0.16:8899/ to mqtt://core-mosquitto:1883
/usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `initialize': Host is unreachable - connect(2) for "192.168.0.16" port 8899 (Errno::EHOSTUNREACH)
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `new'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `initialize'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/exe/bwa_mqtt_bridge:416:in `new'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/exe/bwa_mqtt_bridge:416:in `<top (required)>'
	from /usr/bin/bwa_mqtt_bridge:25:in `load'
	from /usr/bin/bwa_mqtt_bridge:25:in `<main>'
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
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
[09:16:49] INFO: Starting BWALink addon...
[09:16:50] INFO: Setting addon timezone to Europe/London based on the system timezone.
[09:16:50] INFO: Starting mqtt bridge connecting tcp://192.168.0.16:8899/ to mqtt://core-mosquitto:1883
/usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `initialize': Host is unreachable - connect(2) for "192.168.0.16" port 8899 (Errno::EHOSTUNREACH)
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `new'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `initialize'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/exe/bwa_mqtt_bridge:416:in `new'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/exe/bwa_mqtt_bridge:416:in `<top (required)>'
	from /usr/bin/bwa_mqtt_bridge:25:in `load'
	from /usr/bin/bwa_mqtt_bridge:25:in `<main>'
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
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
[09:16:58] INFO: Starting BWALink addon...
[09:16:58] INFO: Setting addon timezone to Europe/London based on the system timezone.
[09:16:59] INFO: Starting mqtt bridge connecting tcp://192.168.0.16:8899/ to mqtt://core-mosquitto:1883
/usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `initialize': Host is unreachable - connect(2) for "192.168.0.16" port 8899 (Errno::EHOSTUNREACH)
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `new'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/lib/bwa/client.rb:42:in `initialize'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/exe/bwa_mqtt_bridge:416:in `new'
	from /usr/lib/ruby/gems/3.2.0/gems/balboa_worldwide_app-2.1.5/exe/bwa_mqtt_bridge:416:in `<top (required)>'
	from /usr/bin/bwa_mqtt_bridge:25:in `load'
	from /usr/bin/bwa_mqtt_bridge:25:in `<main>'
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

Really appreciate any update on this, be good to know if this project is dead or if perhaps theres an alternative. OR if indeed someone still has it running so that I can look to see if my problem is elsewhere.

To be clear, GitHub - jshank/bwalink: Automate your Balboa Spa! A docker container with socat and ccutrer/balboa_worldwide_app that supports a remote serial to IP device or host running ser2net, socat or ESPEasy serial server is not dead and is the project I launched this post for.

The last few posts (and concern of an abandoned project) seem to be related to GitHub - supersebbo/bwa-mqtt-bridge-addon: A Home Assistant Add-on Packaging the bwa-mqtt-bridge ruby application for controller Balboa BP Spa Systems (not mine).

I’d recommend @supersebbo start a new thread for that add-on to make support easier. I’ve been getting direct messages for assistance with that module.

Thats great to hear Jim, I was running your version last season. As you can see it failed when trying this year. Anything you can advise based on the errors I received? Many thanks for continuing maintenance and support?

I think the last time you were running into issues, I suggested a cron job to restart in Balboa Hot Tub/Spa Automation and Power Savings - #30 by jshank

No, that wasnt me, i was responding to another user that the Bolboa wifi module was very unreliable.
I switched to the remote serial device and everything for me from that point had been good. Also I dont run docker, so not sure how to run cron job, if your suggesting thats what I should be doing. Many thanks for help.

Just an update, my tub came back online, maybe needed a couple of days to settle…

Jim,
I’m glad to hear the project is still alive and hoping you can help me. I have the Elfin-EW11 all set up and configured per your specs. I’m trying to install the addon but it immediately says Failed to install add-on
Unknown error, see supervisor

The Supervisor log says
2024-05-09 04:24:05.905 ERROR (MainThread) [supervisor.docker.addon] Invalid build environment, can’t build this add-on!

I’ve double checked the contents and am pretty sure I have that correct.

Any idea what I am missing?

So I tried your Docker route instead, subscribed to homie/# and expected to see activity in MQTT Explorer but don’t see anything. My Docker Compose

version: "3"
services:
  bwalink:
    image: ghcr.io/jshank/bwalink:latest
    container_name: bwalink
    restart: unless-stopped
    environment:
      # See https://iotbyhvm.ooo/using-uris-to-connect-to-a-mqtt-server/ for MQTT_URI format
      # MQTT_URI *must* be properly URI encoded, e.g. mqtt://useename:pa##[email protected] would 
      # be mqtt://username:pa%23%[email protected]
      # BRIDGE_IP and BRIDGE_PORT are the address and port for your serial to IP device or 
      # host running ser2net, socat or ESPEasy serial server
      MQTT_URI: mqtt://mqtt_broker:[email protected]
      BRIDGE_IP: 192.168.1.163
      BRIDGE_PORT: 8899
      TZ: America/Los_Angeles
      LOG_LEVEL: WARN # Any of FATAL, ERROR, WARN, INFO or DEBUG
networks: {}

Using Mosquito in HA, user name is mqtt_broker, password has no special characters, Ha is on 192.168.1.110

Any ideas what I am missing here?

Does the docker container start correctly? Do you get anything in the docker logs docker logs bwalink ? Set the LOG_LEVEL to INFO or DEBUG and restart the container.

davidtja shared the contents of his addon folder (which appear to be different than your link - bwalink/ha-addon at 5f8c102eb9cbac258f0693d4b1b162b68e4f4ca9 · jshank/bwalink · GitHub) with me so I was able to get the addon running however it doesn’t seem to be doing anything. The logs just say

[06:09:41] INFO: Starting BWALink addon...
[06:09:41] INFO: Setting addon timezone to America/Chicago based on the system timezone.
[06:09:42] INFO: Starting mqtt bridge connecting tcp://192.168.1.163:8899/ to mqtt://core-mosquitto:1883

no matter how many times I refresh. I expected something in MQTT Explorer as I’m subscribed to homie/# but nothing there. I have the Serial Port & Communication Port settings of the Elfin-EW11 set to your spec. I tried reversing the RS485 A and B wires but after a couple minutes my hot tub had a communication error so switched it back.
Another thing to note is that in the Elfin web interface Status section there are 0 bytes being sent so maybe MQTT has no data to work with?

@jshank Thanks for all the time and effort that you’ve put into this! Just about to pull the trigger and order the require parts. My tub is very similar to yours. However, a small question: You mentioned a media box / pocket. I’m assuming that’s for if you have a tub with speakers? Mine doesn’t, and I don’t see any additional boxes or pockets where it would make sense to put the wifi device. Should I get a waterproof enclosure for it then?