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

VLC_Telnet and vlc still arent working #117744

Open
deadlypantsd opened this issue May 19, 2024 · 16 comments · Fixed by #118258
Open

VLC_Telnet and vlc still arent working #117744

deadlypantsd opened this issue May 19, 2024 · 16 comments · Fixed by #118258

Comments

@deadlypantsd
Copy link

The problem

tlc_telnet integration is still expecting a float value.

What version of Home Assistant Core has the issue?

2024.5.4

What was the last working version of Home Assistant Core?

unknown

What type of installation are you running?

Home Assistant OS

Integration causing the issue

vlc_telnet

Link to integration documentation on our website

No response

Diagnostics information

modifying from int() to float() fixes the problem:

class Status(Command[StatusOutput]):
"""Represent the status command."""

prefix = "status"                      
                                                                                 
def parse_output(self, output: list[str]) -> StatusOutput:       
    """Parse command output."""                           
    input_loc: str | None = None                                     
    if len(output) == 3:                       
        input_loc_item = output.pop(0)       
        input_loc = "%20".join(input_loc_item.split(" ")[3:-1])      
    if len(output) == 2:                                         
        audio_volume = float(output[0].split(" ")[3])                      
        state = output[1].split(" ")[2]                 
    else:                                 
        raise CommandParseError("Could not get status.")    
    return StatusOutput(audio_volume=audio_volume, state=state, input_loc=input_loc)

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @rodripf, @MartinHjelmare, mind taking a look at this issue as it has been labeled with an integration (vlc_telnet) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of vlc_telnet can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign vlc_telnet Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


vlc_telnet documentation
vlc_telnet source
(message by IssueLinks)

@mib1185
Copy link
Contributor

mib1185 commented May 21, 2024

Hi @deadlypantsd
do you have any more details please? are you referring to an old issue (if yes, please link it)? Or do you see any error ins your log or encounter issues with the vlc_telnet at all? Thx 👍

@deadlypantsd
Copy link
Author

deadlypantsd commented May 22, 2024

It's not really an 'OLD' issue, just one that hasnt been addressed. I've had to "patch" the VLC_TELNET integration every time there is an update to HA for I dont even remember how long.

I run VLC on external machines, controlling them with VLC_TELNET. I am unable to connect to those endpoints at ALL unless I patch the integration to use a float value instead of an integer.

Here's how to reproduce:

Setup:
Endpoint: Archlinux w/ vlc & telnet module -- cvlc -I telnet --telnet-password=secret
HA: HassOS, with all updates
Try to add endpoint with Integration? -- shouldn't work.

Now,
Open Debug SSH session to the host, link here, find the command.py for VLC_Telnet, (I always just 'find / -name "model/command.py") and edit (vi ... blegh!) to read audio_volume = float(output[0].split(" ")[3])

Lo and behold, you can now connect to that vlc endpoint.

Hope that is at least a little more helpful
--Dan

@mib1185
Copy link
Contributor

mib1185 commented May 22, 2024

This method is located in the underlying used library aiovlc, but not the HA code.
Nevertheless, please enable debug logging, restart the integration and download and provide the log file after the issue occur again. So we could analyse the error message.

Maybe you encounter a known issue, which is described in the docs

In case the VLC is running on a host with a locale other than English, you may get some errors during the volume change. This is related to the different use of the decimal separator in other countries. Consider to set the locale to en_US before starting VLC.

thx 👍

@CJT57
Copy link

CJT57 commented May 23, 2024

@mib1185 I'm experiencing the same issue after updating HassOS to latest version this past month. Calls for media play or TTS go through about 10% of the time, and simply don't play audio the rest of the time. Quite challenging as I have a lot of security alerts built around that- thanks for your input!

@deadlypantsd
Copy link
Author

This method is located in the underlying used library aiovlc, but not the HA code. Nevertheless, please enable debug logging, restart the integration and download and provide the log file after the issue occur again. So we could analyse the error message.

Maybe you encounter a known issue, which is described in the docs

In case the VLC is running on a host with a locale other than English, you may get some errors during the volume change. This is related to the different use of the decimal separator in other countries. Consider to set the locale to en_US before starting VLC.

thx 👍

You know, this is the best reply I could have gotten, as the quoted excerpt I think has been added after I began patching my systems. I will double check my endpoint and let you know if this fixes it.

Dan

@mib1185
Copy link
Contributor

mib1185 commented May 23, 2024

@CJT57 your issue sounds different, please open a new issue report and provide it with debug logs as mentioned in #117744 (comment), thx 👍

@MichaelMraka
Copy link
Contributor

MichaelMraka commented May 27, 2024

I hit the same issue.
The easiest way to fix it is update the ancient version aiovlc-0.1.0 in the homeassistant container to the lastest 0.3.2.

@deadlypantsd
Copy link
Author

deadlypantsd commented May 28, 2024

I updated the system locale on my endpoints to en_US.UTF-8 and rebooted. Just installed 2024.5.5 and endpoints are AGAIN unavailable. re-patched, and endpoints are available again.

@mib1185
Copy link
Contributor

mib1185 commented May 28, 2024

@deadlypantsd could you please try to just update aiovlc to 0.3.2 (pip install aiovlc==0.3.2) inside your container, instead off manually patching?

@deadlypantsd
Copy link
Author

deadlypantsd commented May 30, 2024 via email

@mib1185
Copy link
Contributor

mib1185 commented May 30, 2024

the same way, you're patching the files. but 2024.6 is near (beta phase is already running) so you could also just wait for 2024.6 or try out the current beta

@deadlypantsd
Copy link
Author

I ran a docker exec command on the container ... not sure if it changed anything, but I checked out the command.py file under aiovlc, and it doesnt look the same as before

@deadlypantsd
Copy link
Author

I would say (pre-emptively,) that this might be the fix. though I put in an issue quite a while back to upgrade aiovlc and it didnt seem to make the cut

@deadlypantsd
Copy link
Author

upgrading aiovlc does not fix the issue for me

@mib1185
Copy link
Contributor

mib1185 commented May 30, 2024

@deadlypantsd than please provide debug logging as mentioned in #117744 (comment)

@mib1185 mib1185 reopened this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants