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

Error connecting to spectrum server: dial tcp 127.0.0.1:1234: #231

Open
Elderwolf1700 opened this issue Apr 22, 2024 · 1 comment
Open

Comments

@Elderwolf1700
Copy link

I run this command to find my meter ~ docker run --rm -ti -e LISTEN_ONLY=yes -e RTL_MSGTYPE="all" -e RTL_TCP_ARGS="-d 777" --device=/dev/bus/usb:/dev/bus/usb allangood/rtlamr2mqtt
but get an error code of:

[2024-04-22 09:05:38] Starting in LISTEN ONLY Mode... [2024-04-22 09:05:38] No Supervisor detected. [2024-04-22 09:05:38] Starting rtl_tcp with /usr/bin/rtl_tcp -d 777 [2024-04-22 09:05:40] Starting rtlamr with ['/usr/bin/rtlamr', '-msgtype=all', '-format=json'] [2024-04-22 09:05:40] You should see all utility meters after this line: [2024-04-22 09:05:40] 09:05:40.143308 main.go:90: Error connecting to spectrum server: dial tcp 127.0.0.1:1234: connect: connection refused [2024-04-22 09:05:40] rcvr.Connect
[2024-04-22 09:05:40] main.(*Receiver).NewReceiver [2024-04-22 09:05:40] /go/pkg/mod/github.com/bemasher/[email protected]/main.go:90 [2024-04-22 09:05:40] main.main [2024-04-22 09:05:40] /go/pkg/mod/github.com/bemasher/[email protected]/main.go:313 [2024-04-22 09:05:40] runtime.main [2024-04-22 09:05:40] /usr/local/go/src/runtime/proc.go:267 [2024-04-22 09:05:40] runtime.goexit [2024-04-22 09:05:40] /usr/local/go/src/runtime/asm_arm64.s:1197

2024-04-22 09:11:30] Shutdown detected, killing process. Traceback (most recent call last): File "/usr/bin/rtlamr2mqtt.py", line 415, in <module> listen_mode() File "/usr/bin/rtlamr2mqtt.py", line 392, in listen_mode for amrline in rtlamr.stdout: File "/usr/local/lib/python3.10/codecs.py", line 319, in decode def decode(self, input, final=False): File "/usr/bin/rtlamr2mqtt.py", line 152, in shutdown if not external_rtl_tcp and rtltcp.returncode is None: NameError: name 'external_rtl_tcp' is not defined

Got it to show once before in testing but now it just keeps giving me this error. Am I doing something wrong or is this just not working?
Btw, yes its connected to a powered hub.

@Nurgak
Copy link

Nurgak commented Jul 30, 2024

I just had the same issue, turned out I was already using the device from another container (rtl_433).

It was just a matter for shutting down the other container and freeing the device for rtlamr. So make sure your device is not used by another process.

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

2 participants