ccutrer / waterfurnace_aurora

Library for communication with WaterFurnace Aurora control systems
32 stars 7 forks source link

Error trying to start the aurora_mqtt_bridge service #70

Open ericmagaha opened 9 hours ago

ericmagaha commented 9 hours ago

Got everything set up on a RPI 3 and using the recommended USB 485 adapter. I followed the "easy path" here -> https://github.com/ccutrer/waterfurnace_aurora?tab=readme-ov-file#getting-started-on-a-raspberry-pi

eric@geothermal:/dev $ sudo systemctl status aurora_mqtt_bridge ● aurora_mqtt_bridge.service - Aurora MQTT Bridge Loaded: loaded (/etc/systemd/system/aurora_mqtt_bridge.service; enabled; preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Sun 2024-10-06 17:02:11 EDT; 1s ago Process: 913 ExecStart=/usr/local/bin/aurora_mqtt_bridge /dev/ttyUSB0 mqtt://localhost/ (code=exited, stat> Main PID: 913 (code=exited, status=217/USER) CPU: 0

If I try to run the command manually I get the following. eric@geothermal:~ $ /usr/local/bin/aurora_mqtt_bridge /dev/ttyUSB0 mqtt://localhost/ /var/lib/gems/3.1.0/gems/waterfurnace_aurora-1.4.8/lib/aurora/modbus/server.rb:79:in<top (required)>': uninitialized constant ModBus::Server::Funcs (NameError)

ModBus::Server::Funcs.push(65, 66, 67, 68) ^^^^^^^ Did you mean? ModBus::Server::FUNCS from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:inrequire' from /var/lib/gems/3.1.0/gems/waterfurnace_aurora-1.4.8/lib/aurora.rb:7:in <top (required)>' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:inrequire' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require' from /var/lib/gems/3.1.0/gems/waterfurnace_aurora-1.4.8/exe/aurora_mqtt_bridge:4:in<top (required)>' from /usr/local/bin/aurora_mqtt_bridge:25:in load' from /usr/local/bin/aurora_mqtt_bridge:25:in

'`

If I modify the server.rb to make the method uppercase I get the following. eric@geothermal:~ $ /usr/local/bin/aurora_mqtt_bridge /dev/ttyUSB0 mqtt://localhost/ /var/lib/gems/3.1.0/gems/waterfurnace_aurora-1.4.8/lib/aurora/modbus/server.rb:79:inpush': can't modify frozen Array: [1, 2, 3, 4, 5, 6, 15, 16, 22, 23] (FrozenError) from /var/lib/gems/3.1.0/gems/waterfurnace_aurora-1.4.8/lib/aurora/modbus/server.rb:79:in <top (required)>' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:inrequire' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require' from /var/lib/gems/3.1.0/gems/waterfurnace_aurora-1.4.8/lib/aurora.rb:7:in<top (required)>' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:inrequire' from /var/lib/gems/3.1.0/gems/waterfurnace_aurora-1.4.8/exe/aurora_mqtt_bridge:4:in <top (required)>' from /usr/local/bin/aurora_mqtt_bridge:25:inload' from /usr/local/bin/aurora_mqtt_bridge:25:in <main>'

Help? TIA.

ericmagaha commented 4 hours ago

Just noticed the documentation said install Ruby 2.5, 2.6 or 2.7. Ruby 3.0 has not been tested. I installed Ruby 3.1.2. Guessing that is the issue. Will fix that tomorrow and try again.