supersebbo / bwa-mqtt-bridge-addon

A Home Assistant Add-on Packaging the bwa-mqtt-bridge ruby application for controller Balboa BP Spa Systems
7 stars 0 forks source link

Initial Testing and Feedback #1

Open supersebbo opened 1 year ago

supersebbo commented 1 year ago

Thread for initial testing and feedback on the HA Addon

blundell commented 1 year ago

Here are my logs after step 9.

image

Step 10 however doesn't show any devices:

image

I have auto-discovery enabled

image image

& the EW10 does say that HA is connected to it:

image

any ideas?

blundell commented 1 year ago

Found the problem, I have an EW10 installed not an EW11 (https://github.com/jshank/bwalink/issues/12#issuecomment-1688860884) 😭 😭 😭

mobiusmat commented 1 year ago

I'm trying this now with a newly arrived EW11 (After mistakenly ordering an EW10) and I think I have everything configured right. I can telnet and I'm getting valid packets from the Balboa controller. If I launch the addon I get an error about a 28 character message length for status - I change the line

MESSAGE_LENGTH = (24..32).freeze to MESSAGE_LENGTH = (22..32).freeze

In status.rb and then it runs and all I get is

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 MQTT server: mqtt://addons:wai6Aechunaayoh0chunoo0tei2iQu1cee9ech0ee5aifiRaniej5AhTi5Neicha@core-mosquitto Connection type is tcp Using TCP Bridge at tcp://192.168.69.66:8899/

Any tips on what to try next?

jdvorecky commented 9 months ago

hi there, well i tried to install this addon as per instructions, but during the installation process i got a Failed to install the addon. i tried several times but no go. couple of times i got this kind of crazy error message output:

Failed to install add-on 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 '^[.]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

any thoughts what might be going on? im installing it on a RPI w HA Version | core-2023.12.1

Installation Type | Home Assistant OS Development | false Supervisor | true Docker | true User | root Virtual Environment | false Python Version | 3.11.6 Operating System Family | Linux Operating System Version | 6.1.21-v8 CPU Architecture | aarch64

can anyone giude me or help me with this? i would really like to have access to my spa for energy management purpposes. thanks guys.

pimpalavista commented 8 months ago

Same error,

Failed to install add-on 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 '^[.]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

Running on QNAP Virtualization Station Virtual Machine ova Core 2024.2.1 Supervisor 2024.01.1 Operating System 11.5 Frontend 20240207.1

My Jet Buttons not work always. + energy management control automatizing: use a solar power on time for heating.

Regards Pimpalavista

pimpalavista commented 8 months ago

I created a new test hassio-vm from latest OVA.

Same error on install :(

tmason818 commented 8 months ago

Ouch tired this out too and ALSO unable to install the add-on with the same error as others above:

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 '^[.]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

Running a Virtual Machine on a Synology NAS Core: 2024.2.1 Supervisor: 2024.01.1 Operating System: 11.5 Frontend: 20240207.1

Using an EW11

@supersebbo Any ideas?

tmason818 commented 8 months ago

Connection type is tcp Using TCP Bridge at tcp://192.168.69.66:8899/

Any tips on what to try next?

@mobiusmat I'm new at this too. Did you set your Elfin EW11 to use port 8899? The example picture in Step 4 [here] does show it as 9999 with the text stating you can change it. I'd want to make sure its set to 8899 under Socket Settings.

mobiusmat commented 8 months ago

I got nowhere. Our spa had an older controller. Looks like the manufacturer in Australia had lots of stock of the old board so it spoke a different t language altogether. I was getting some data coming from the spa on the rs485 but never what was expected.

Regards,

Matt Beechey Mobius Network Solutions


From: tmason818 @.> Sent: Wednesday, February 21, 2024 2:04:02 PM To: supersebbo/bwa-mqtt-bridge-addon @.> Cc: Matthew Beechey - Mobius @.>; Mention @.> Subject: Re: [supersebbo/bwa-mqtt-bridge-addon] Initial Testing and Feedback (Issue #1)

Connection type is tcp Using TCP Bridge at tcp://192.168.69.66:8899/

Any tips on what to try next?

@mobiusmathttps://github.com/mobiusmat I'm new at this too. Did you set your Elfin EW11 to use port 8899? The example picture in Step 4 [herehttps://github.com/supersebbo/bwa-mqtt-bridge-addon/wiki/Step-4:-Setup-the-Elfin-TCP-Connection] does show it as 9999 with the text stating you can change it. I'd want to make sure its set to 8899 under Socket Settings.

— Reply to this email directly, view it on GitHubhttps://github.com/supersebbo/bwa-mqtt-bridge-addon/issues/1#issuecomment-1955608247, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BB35HM5NAXW6HQCL6CPGNSDYUVBYFAVCNFSM6AAAAAAZLZJG2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJVGYYDQMRUG4. You are receiving this because you were mentioned.Message ID: @.***>

pimpalavista commented 8 months ago

Additional info from HA log:

Logger: homeassistant.components.hassio Source: components/hassio/websocket_api.py:138 Integration: Home Assistant Supervisor (documentation, issues) First occurred: 1:41:44 AM (2 occurrences) Last logged: 1:52:54 AM

Failed to to call /addons/local_bwa_mqtt_bridge/install - 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 '^[.]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 Failed to to call /addons/local_bwa_mqtt_bridge/install - 'local_bwa_mqtt_bridge'

tmason818 commented 7 months ago

Not to hijack this but I was able to get Home Assistant integration working from the Add-On that the Add-On in this thread is based on. Skip the Docker steps above this section linked here:

https://github.com/jshank/bwalink?tab=readme-ov-file#run-bwalink-as-a-home-aassistant-addon

I already had a MQTT broker setup in Home Assistant. Hope this helps in the meantime.

jwelvaert commented 6 months ago

Not to hijack this but I was able to get Home Assistant integration working from the Add-On that the Add-On in this thread is based on. Skip the Docker steps above this section linked here:

https://github.com/jshank/bwalink?tab=readme-ov-file#run-bwalink-as-a-home-aassistant-addon

I already had a MQTT broker setup in Home Assistant. Hope this helps in the meantime.

I started with bwalink but got an error when I tried to start the addon so I went with bwa-mqtt-bridge but got the above mentioned error. When I compare the 2 addons my bwalink docker file is a text file which doesn't seem right so maybe that is my problem?