-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
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 #24290
Vlc telnet #24290
Conversation
First functional version, remains to add more functionality.
Module renamed Fixed module rename in other
self._host = host | ||
self._port = port | ||
self._password = passwd | ||
self._vlc = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though it's probably not too easy to achieve, this could have a timing issue: What if one of the functions like play_media
is called before update
? Please add , True
to add_entities
call to update on start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the parameter! There is another case... what if the state is unavailable
because the connection to VLC can't be made, but the user calls to play_media
. The current behavior will be an exception thrown "None has no attribute...". Should I throw another exception or return False
?
Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com>
Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com>
Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com>
Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com>
+Manage error when the VLC dissapears to show status unavailable.
-Import location -Use of constants
* Vlc telnet first commit First functional version, remains to add more functionality. * New functions added and bugfixes * Compliance with dev checklist * Compliance with dev checklist * Compliance with pydocstyle * Removed unused import * Fixed wrong reference for exception * Module renamed * Fixed module rename in other * Fixed wrong reference for exception Module renamed Fixed module rename in other * Update homeassistant/components/vlc_telnet/media_player.py Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com> * Update homeassistant/components/vlc_telnet/media_player.py Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com> * Update homeassistant/components/vlc_telnet/media_player.py Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com> * Update homeassistant/components/vlc_telnet/media_player.py Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com> * Suggestions by @OttoWinter +Manage error when the VLC dissapears to show status unavailable. * Removed error log, instead set unavailable state * Changes suggested by @pvizeli -Import location -Use of constants * Implemented available method * Improved available method
* Vlc telnet first commit First functional version, remains to add more functionality. * New functions added and bugfixes * Compliance with dev checklist * Compliance with dev checklist * Compliance with pydocstyle * Removed unused import * Fixed wrong reference for exception * Module renamed * Fixed module rename in other * Fixed wrong reference for exception Module renamed Fixed module rename in other * Update homeassistant/components/vlc_telnet/media_player.py Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com> * Update homeassistant/components/vlc_telnet/media_player.py Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com> * Update homeassistant/components/vlc_telnet/media_player.py Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com> * Update homeassistant/components/vlc_telnet/media_player.py Accepted suggestion by @OttoWinter Co-Authored-By: Otto Winter <otto@otto-winter.com> * Suggestions by @OttoWinter +Manage error when the VLC dissapears to show status unavailable. * Removed error log, instead set unavailable state * Changes suggested by @pvizeli -Import location -Use of constants * Implemented available method * Improved available method
Description:
Trying to resolve this issue referenced in the vlc component doc I developed a component to control any instance of VLC running its built in telnet interface.
Alongside with this component, I've put together an add-on for the hassio platform to run a VLC instance locally.
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#9558
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest
.requirements_all.txt
by runningpython3 -m script.gen_requirements_all
..coveragerc
.If the code does not interact with devices: