Closed Chrone86 closed 2 years ago
I'm pretty sure I already fixed this yesterday. Do you know how many speeds your blower has? Can your run the code from main, or do I need to release a new version of the gem for you to test it?
The blower has only one speed, as my pumps have. I have no idea how to run the code from main, i installed it last time with gem
Okay, I just released v2.0.0 of the gem. š¤ it works for you. Note that it is a major release, as some of the properties have been renamed.
If i try to start this release, i get the following error message:
Started with: /bwa_mqtt_bridge mqtt://mqtt-broker tcp://192.168.100.141
Traceback (most recent call last):
4: from /usr/local/bin/bwa_mqtt_bridge:23:in <main>' 3: from /usr/local/bin/bwa_mqtt_bridge:23:in
load'
2: from /usr/local/share/gems/gems/balboa_worldwide_app-2.0.0/exe/bwa_mqtt_bridge:394:in <top (required)>' 1: from /usr/local/share/gems/gems/balboa_worldwide_app-2.0.0/exe/bwa_mqtt_bridge:394:in
new'
/usr/local/share/gems/gems/balboa_worldwide_app-2.0.0/exe/bwa_mqtt_bridge:45:in initialize': private method
home_assistant_device=' called for #<MQTT::Homie::Device homie/bwa name="BWA Link", $state=:init> (NoMethodError)
Hmm. What version of Ruby are you using? You definitely got the new code running finally.
ruby 2.5.9p229 (2021-04-05 revision 67939) [x86_64-linux]
If I try with rvm ruby 3.0.3, i get this error:
/usr/local/rvm/gems/ruby-3.0.3/gems/balboa_worldwide_app-2.0.0/exe/bwa_mqtt_bridge:206:in block in publish_basic_attributes': undefined method
zero?' for false:FalseClass (NoMethodError)
from /usr/local/rvm/gems/ruby-3.0.3/gems/homie-mqtt-1.6.0/lib/mqtt/homie/device.rb:57:in block in node' from /usr/local/rvm/gems/ruby-3.0.3/gems/homie-mqtt-1.6.0/lib/mqtt/homie/device.rb:145:in
init'
from /usr/local/rvm/gems/ruby-3.0.3/gems/homie-mqtt-1.6.0/lib/mqtt/homie/device.rb:53:in node' from /usr/local/rvm/gems/ruby-3.0.3/gems/balboa_worldwide_app-2.0.0/exe/bwa_mqtt_bridge:141:in
publish_basic_attributes'
from /usr/local/rvm/gems/ruby-3.0.3/gems/balboa_worldwide_app-2.0.0/exe/bwa_mqtt_bridge:51:in initialize' from /usr/local/rvm/gems/ruby-3.0.3/gems/balboa_worldwide_app-2.0.0/exe/bwa_mqtt_bridge:394:in
new'
from /usr/local/rvm/gems/ruby-3.0.3/gems/balboa_worldwide_app-2.0.0/exe/bwa_mqtt_bridge:394:in `
š
I'll look as soon as I can. The 3.0 stack trace looks like it might be a bug occurring because I don't have a blower to actually test with, but I should be able to figure it out.
The 2.5 stack trace is probably a Ruby 2.5-specific bug that I can also track down. I assume you're running on a Raspberry Pi? They really need to update their system Ruby. That's specifically why I (try to) maintain compatibility with 2.5, but it's so ancient!!
Anyhow, expect an update from me by Monday afternoon at the latest.
Thank you very much. I also tried with 2.7.5 and got the same error as on 3.0.3 No, i'm running it on centos 8.
v2.0.1 was just published, which fixes both the Ruby 2.5 issue and reading blower status. Let me know how it goes. I haven't yet tested with Ruby 3.0, just waiting for it to compile.
Yup, looks like it's working just fine under 3.0 as well.
thank you! Something still doesn't work as expected.
If i set 0,1 or 2 nothing happens. If i set true or false on "homie/bwa/spa/blower/set" then i get the following exception:
W, Balboa MQTT Bridge running (version 2.0.1)
Traceback (most recent call last):
7: from /usr/local/rvm/gems/ruby-2.7.5/gems/homie-mqtt-1.6.0/lib/mqtt/homie/device.rb:105:in block (2 levels) in publish' 6: from /usr/local/rvm/gems/ruby-2.7.5/gems/mqtt-ccutrer-1.0.1/lib/mqtt/client.rb:444:in
get'
5: from /usr/local/rvm/gems/ruby-2.7.5/gems/mqtt-ccutrer-1.0.1/lib/mqtt/client.rb:444:in loop' 4: from /usr/local/rvm/gems/ruby-2.7.5/gems/mqtt-ccutrer-1.0.1/lib/mqtt/client.rb:458:in
block in get'
3: from /usr/local/rvm/gems/ruby-2.7.5/gems/homie-mqtt-1.6.0/lib/mqtt/homie/device.rb:116:in block (3 levels) in publish' 2: from /usr/local/rvm/gems/ruby-2.7.5/gems/homie-mqtt-1.6.0/lib/mqtt/homie/property.rb:171:in
set'
1: from /usr/local/rvm/gems/ruby-2.7.5/gems/balboa_worldwide_app-2.0.1/exe/bwa_mqtt_bridge:223:in block (2 levels) in publish_basic_attributes' /usr/local/rvm/gems/ruby-2.7.5/gems/balboa_worldwide_app-2.0.1/lib/bwa/client.rb:193:in
blower=': undefined method `-' for true:TrueClass (NoMethodError)
š¤¦ . easy fix. but yeah, your single speed blower (and pumps if you have them) no longer accept 0, 1, and 2. Just true/false/toggle.
... but that is a good idea to still allow integer speeds. 2.0.4 allows that, with more intuitive conversions.
Blower works now like a charm. Thank you for your support. At the moment i have to toggle the pumps with homie/bwa/spa/pump1/set 1 for on and off. Would it be possible to activate the pumps with true and deactivate with false? My pumps are single speed.
What's in MQTT at homie/bwa/spa/pump1/$format?
the $format doesnt exist.. Looks like this for my balboa
By the way, I made some advertise for your plugin on a german loxone site https://loxwiki.atlassian.net/wiki/spaces/LOXBERRY/pages/1636466747/Balboa+Spa
hmmm, so the $dataype is boolean, so it is properly detecting a single speed pump. and I can't see any difference in the code between blower-that-is-boolean-or-multispeed vs. pump-that-is-boolean-or-multispeed. Your screenshot is a little confusing because homie/bwa/spa/pump1 should be false already since $datatype is boolean, but I'm fairly certain that's due to you setting "convert booleans to 1 and 0", since $settable is definitely going to be true and not 1. I'd still worry about that being an issue, except that you say the blower is working for you. So... I'm at a loss of what the problem is right now. I even tried forcing my spa to pretend it has a single-speed pump, and true/false are working just fine. I just released 2.0.5 that allows true/false to multi-speed things, but that shouldn't have any affect on you with a single/speed.
i just disabled "convert booleans". The pump1 starts and stop now with true and 1.
Blower (true/false works):
Light1 (true/false works):
Pump1 (true and 1 works for start and stop) Start with true:
Send false:
Stop with true:
Hi If i try to set blower (homie/bwa/spa/blower/set), the service stopps with the following error: "W, Balboa MQTT Bridge running (version 1.3.0) W, from mqtt: "" at homie/bwa/spa/blower/set Traceback (most recent call last): 12: from /usr/local/bin/bwa_mqtt_bridge:23:in
<main>' 11: from /usr/local/bin/bwa_mqtt_bridge:23:in
load' 10: from /usr/local/share/gems/gems/balboa_worldwide_app-1.3.0/bin/bwa_mqtt_bridge:614:in<top (required)>' 9: from /usr/local/share/gems/gems/balboa_worldwide_app-1.3.0/bin/bwa_mqtt_bridge:614:in
new' 8: from /usr/local/share/gems/gems/balboa_worldwide_app-1.3.0/bin/bwa_mqtt_bridge:149:ininitialize' 7: from /usr/local/share/gems/gems/mqtt-0.5.0/lib/mqtt/client.rb:404:in
get' 6: from /usr/local/share/gems/gems/mqtt-0.5.0/lib/mqtt/client.rb:435:inget_packet' 5: from /usr/local/share/gems/gems/mqtt-0.5.0/lib/mqtt/client.rb:435:in
loop' 4: from /usr/local/share/gems/gems/mqtt-0.5.0/lib/mqtt/client.rb:437:inblock in get_packet' 3: from /usr/local/share/gems/gems/mqtt-0.5.0/lib/mqtt/client.rb:405:in
block in get' 2: from /usr/local/share/gems/gems/balboa_worldwide_app-1.3.0/bin/bwa_mqtt_bridge:184:inblock in initialize' 1: from /usr/local/share/gems/gems/balboa_worldwide_app-1.3.0/lib/bwa/client.rb:145:in
set_blower' /usr/local/share/gems/gems/balboa_worldwide_app-1.3.0/lib/bwa/client.rb:145:in `-': false can't be coerced into Integer (TypeError)"