Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web AID Tool ArgumentError #72

Closed
evil-dog opened this issue Nov 27, 2024 · 0 comments
Closed

Web AID Tool ArgumentError #72

evil-dog opened this issue Nov 27, 2024 · 0 comments

Comments

@evil-dog
Copy link

I have the web AID tool running as part of a docker container with the aurora_mqtt_bridge. The mqtt bridge is working and bringing the values into Home Assistant. The web AID Tool server starts up without any issues reported in the log. However, when I try to access some of the pages on the web AID tool I get an "Internal Server Error" reported in the Chrome Javascript console and an ArgumentError traceback in the server logs.

docker-compose.yaml:
services:
  waterfurnace_aurora:
    container_name: waterfurnace_aurora
    build: ./docker

    image: ccutrer/waterfurnace_aurora

    restart: always

    devices:
      - /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_B003ZFOC-if00-port0:/dev/ttyUSB0

    volumes:
      - ./html:/usr/local/bundle/bin/html:ro

    environment:
      APP_ENV: "production"

    command: "ruby aurora_mqtt_bridge /dev/ttyUSB0 mqtt://mosquitto --web-aid-tool 4567"

NOTE: See Issue #71 for why I'm building with my own Dockerfile.

The following AID Tool pages all have the same error, included is the GET Path requested:

AID Tool > ABC Overview:
Request Path: /request.cgi?cmd=getregs&id=1&set=1&addr=2&regs=0,2;4;6;25;30,4;340,3;347;406;409;411;414;710,8;

AID Tool > System Faults:
Request Path: /request.cgi?cmd=getregs&id=1&set=1&addr=2&regs=0;25;30,2;326;406;409;411;414;710,8;

AID Tool > Diagnostics > DIPSwitch Settings:
Request Path: /request.cgi?cmd=getregs&id=1&set=1&addr=2&regs=4;33;

AID Tool > Diagnostics > Sensor Inputs:
Request Path: /request.cgi?cmd=getregs&id=1&set=1&addr=2&regs=19,3;25;31;83;409;411;710,8;

AID Tool > Diagnostics > System Outputs:
Request Path: /request.cgi?cmd=getregs&id=1&set=1&addr=2&regs=30;50,5;340,3;347;

AID Tool > Diagnostics > Timers:
Request Path: /request.cgi?cmd=getregs&id=1&set=1&addr=2&regs=1;6;9,3;15;17;30,2;33;84,4;110;

AID Tool > Setup > ECM Speed Setup:
Request Path: /request.cgi?cmd=getregs&id=1&set=1&addr=2&regs=340,3;347;

AID Tool > Config Aurora System:
Request Path: /request.cgi?cmd=getregs&id=1&set=1&addr=2&regs=2;8;800,30

AID Tool > About Unit
Request Path: /request.cgi?cmd=getregs&id=1&set=1&addr=2&regs=2,2;8;36;88,22;

Error trace-back:

2024-11-27 04:00:26 - ArgumentError - wrong array length at 5 (expected 2, was 1):
 /usr/local/bundle/gems/waterfurnace_aurora-1.4.11/lib/aurora/web_aid_tool.rb:96:in `to_h'
 /usr/local/bundle/gems/waterfurnace_aurora-1.4.11/lib/aurora/web_aid_tool.rb:96:in `parse_query
_string'
 /usr/local/bundle/gems/waterfurnace_aurora-1.4.11/lib/aurora/web_aid_tool.rb:46:in `block in <c
lass:WebAIDTool>'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1807:in `call'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1807:in `block in compile!'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1074:in `block (3 levels) in route!'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1092:in `route_eval'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1074:in `block (2 levels) in route!'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1123:in `block in process_route'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1121:in `catch'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1121:in `process_route'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1072:in `block in route!'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1069:in `each'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1069:in `route!'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1193:in `block in dispatch!'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in `catch'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in `invoke'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1188:in `dispatch!'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1004:in `block in call!'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in `catch'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in `invoke'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1004:in `call!'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:993:in `call'
 /usr/local/bundle/gems/rack-protection-4.1.1/lib/rack/protection/base.rb:53:in `call'
 /usr/local/bundle/gems/rack-protection-4.1.1/lib/rack/protection/xss_header.rb:20:in `call'
 /usr/local/bundle/gems/rack-protection-4.1.1/lib/rack/protection/path_traversal.rb:18:in `call'
 /usr/local/bundle/gems/rack-protection-4.1.1/lib/rack/protection/json_csrf.rb:28:in `call'
 /usr/local/bundle/gems/rack-protection-4.1.1/lib/rack/protection/base.rb:53:in `call'
 /usr/local/bundle/gems/rack-protection-4.1.1/lib/rack/protection/base.rb:53:in `call'
 /usr/local/bundle/gems/rack-protection-4.1.1/lib/rack/protection/frame_options.rb:33:in `call'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/middleware/logger.rb:17:in `call'
 /usr/local/bundle/gems/rack-3.1.8/lib/rack/head.rb:15:in `call'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:227:in `call'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:2138:in `call'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1677:in `block in call'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1898:in `synchronize'
 /usr/local/bundle/gems/sinatra-4.1.1/lib/sinatra/base.rb:1677:in `call'
 /usr/local/bundle/gems/puma-6.5.0/lib/puma/configuration.rb:279:in `call'
 /usr/local/bundle/gems/puma-6.5.0/lib/puma/request.rb:99:in `block in handle_request'
 /usr/local/bundle/gems/puma-6.5.0/lib/puma/thread_pool.rb:389:in `with_force_shutdown'
 /usr/local/bundle/gems/puma-6.5.0/lib/puma/request.rb:98:in `handle_request'
 /usr/local/bundle/gems/puma-6.5.0/lib/puma/server.rb:468:in `process_client'
 /usr/local/bundle/gems/puma-6.5.0/lib/puma/server.rb:249:in `block in run'
 /usr/local/bundle/gems/puma-6.5.0/lib/puma/thread_pool.rb:166:in `block in spawn_thread'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant