Comments (6)
Thank you very much Rodrigo.
I can confirm that I was able with the new version to see and play the media correctly through the webui.
However, I cannot do that through the play_media service, which is actually my main intended use.
I set up the service as follows in HA configuration.yaml:
media_player:
- platform: vlc
name: spkr
However, I get the following error when the server restarts:
Error while setting up platform vlc
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/vlc/media_player.py", line 47, in setup_platform
[VlcDevice(config.get(CONF_NAME, DEFAULT_NAME), config.get(CONF_ARGUMENTS))]
File "/usr/src/homeassistant/homeassistant/components/vlc/media_player.py", line 56, in __init__
self._instance = vlc.Instance(arguments)
File "/usr/local/lib/python3.7/site-packages/vlc.py", line 1551, in __new__
return libvlc_new(len(args), args)
File "/usr/local/lib/python3.7/site-packages/vlc.py", line 3903, in libvlc_new
ctypes.c_void_p, ctypes.c_int, ListPOINTER(ctypes.c_char_p))
File "/usr/local/lib/python3.7/site-packages/vlc.py", line 246, in _Cfunction
raise NameError('no function %r' % (name,))
NameError: no function 'libvlc_new'
For some reason it is looking for libvlc_new, which it cannot find.
BTW, I am using the latest Hass.io 0.103.0
from hassio-local-vlc.
You are right, I never noticed since it is not the way I use it. Thank you for your report, I'll try to fix it!
In the meantime, if it's useful for you, I manage to play my files in one of the following ways:
-Using the play_media service to play for example an mp3 in the /share directory
-To play more than one file, I do create an m3u file (a simple text file with one song file per line) and then play the m3u file using the play_media service
from hassio-local-vlc.
I generated a new version with the fix. If you update the add-on in your hassio control panel you should be able to find the files on the web interface using the "Open Media" button now (the one on the left the of stop button).
Cheers
from hassio-local-vlc.
Hi @netmms! This add-on was made to communicate to home assistant over telnet, so you should be using the VLC Telnet plattform, instead of the bare VLC one.
Please refer to the correspondent documentation here:
https://www.home-assistant.io/integrations/vlc_telnet/
The VLC component you tried to use does not support Hass.io, that's why I developed this addon in the first place and the VLC Telnet component.
Please let me know if everything went OK!
Cheers
from hassio-local-vlc.
I can confirm that works! Thank you very much. This is a much better solution than Mopidy, which has problems with setting the volume control and also with the playback quality.
The only regrets are:
It is not advertised as widely as it should, IMHO.
And I took a non-linear path to finally getting it to work. If you like, perhaps you can add the following to the readme file so beginners like me would be able to get it to work more easily:
You can test the service directly by launching the webui, clicking on the “eject” button, and selecting the file you want to play. If you do not see the file there, something is wrong, or you have not placed the file in the right folder.
I order to use the service within Hassio / Home Assistant, you need to utilize VLC-Telnet. You can start by visiting these two sites:
https://www.home-assistant.io/integrations/vlc_telnet/
https://community.home-assistant.io/t/remote-vlc-remote-controller-via-telnet/129742
Or, if you are lazy :), define it in configuration.yaml as follows:
media_player:
- platform: vlc_telnet
name: vlc
host: HA_IP
password: PASSWD defined in the VLC config page
Then play any file as follows:
service: media_player.play_media
data_template:
entity_id: media_player.vlc
media_content_id: /share/file.mp3
media_content_type: music
from hassio-local-vlc.
@rodripf I have this same issue on 0.112.4 HA. Can you check this?
from hassio-local-vlc.
Related Issues (13)
- Feature request: Remote Access
- The command '/bin/ash -o pipefail -c apk update' returned a non-zero code: 2 HOT 2
- error adding repository
- TLS handshake error HOT 1
- vlc addon audio not working HOT 41
- VLC don't see /share directory HOT 1
- TTS & Audio cut after 2 second HOT 13
- VLC in HASSIO no sound HOT 1
- Service vlc_telnet not found @ data['discovery'][0]. Got 'vlc_telnet'
- You are running Home Assistant 2021.2.3, to install this add-on you need at least version 2021.3.0.dev20210216 of Home Assistant HOT 2
- Viewer Pane uses Flash which is EoL
- Where should I configure password? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hassio-local-vlc.