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

Not listening on ESPHome 2023.4 #39

Closed
joshuaspence opened this issue Apr 20, 2023 · 6 comments · May be fixed by #40
Closed

Not listening on ESPHome 2023.4 #39

joshuaspence opened this issue Apr 20, 2023 · 6 comments · May be fixed by #40

Comments

@joshuaspence
Copy link
Contributor

Since ESPHome 2023.4 the stream_server component doesn't listen on the specified port. I think this was broken by esphome/esphome#4574.

@teklabania
Copy link

Same here.

joshuaspence added a commit to joshuaspence/home-assistant-config that referenced this issue Apr 20, 2023
@oxan
Copy link
Owner

oxan commented Apr 20, 2023

Yeah, that's an unfortunate change. Thanks for your PR, I've merged the fix!

@oxan oxan closed this as completed Apr 20, 2023
@bugale
Copy link

bugale commented Jun 17, 2023

@oxan @joshuaspence
I am not really sure what happened here - the PR that was "blamed for the issue" has been only merge to dev branch, while it's "fix" has been merged to master branch.
Anyway, in current master, seems like there's a missing htons call.
This configuration:

uart:
  id: uart_0
  # ...

stream_server:
  uart_id: uart_0
  port: 1234

listens on its inverse order port:

>>> s.connect(('192.168.1.15', 1234))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
>>> hex(1234)
'0x4d2'
>>> s.connect(('192.168.1.15', 0xd204))
>>>

@oxan
Copy link
Owner

oxan commented Jun 17, 2023

the PR that was "blamed for the issue" has been only merge to dev branch,

Of the ESPHome repository, which does not have a master branch; in any case this commit was included in the 2023.4 release.

while it's "fix" has been merged to master branch.

Of the esphome-stream-server repository.

Anyway, in current master, seems like there's a missing htons call.

Which ESPHome version are you observing this with?

@bugale
Copy link

bugale commented Jun 17, 2023

Of the ESPHome repository, which does not have a master branch; in any case this commit was included in the 2023.4 release.

Oh I see.

Which ESPHome version are you observing this with?

v2023.5.5

@Baael
Copy link

Baael commented May 1, 2024

@oxan @joshuaspence I am not really sure what happened here - the PR that was "blamed for the issue" has been only merge to dev branch, while it's "fix" has been merged to master branch. Anyway, in current master, seems like there's a missing htons call. This configuration:

uart:
  id: uart_0
  # ...

stream_server:
  uart_id: uart_0
  port: 1234

listens on its inverse order port:

>>> s.connect(('192.168.1.15', 1234))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
>>> hex(1234)
'0x4d2'
>>> s.connect(('192.168.1.15', 0xd204))
>>>

thank you! I was debuging what the hell is going on for whole day...

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

Successfully merging a pull request may close this issue.

5 participants