Face detection and tts

And how to use it with vlc on a raspberry if not on the same machine as HASS is?

I did. Component is loaded but no entity_id related to vlc present in dev tools

17-01-30 16:42:31 INFO (MainThread) [homeassistant.loader] Loaded media_player.vlc from homeassistant.components.media_player.vlc
17-01-30 16:42:31 INFO (Thread-10) [homeassistant.util.package] Attempting install of python-vlc==1.1.2
17-01-30 16:42:45 INFO (MainThread) [homeassistant.loader] Loaded media_player.plex from homeassistant.components.media_player.plex
17-01-30 16:42:45 INFO (MainThread) [homeassistant.loader] Loaded media_player.yamaha from homeassistant.components.media_player.yamaha
17-01-30 16:42:45 INFO (MainThread) [homeassistant.loader] Loaded media_player.cast from homeassistant.components.media_player.cast
17-01-30 16:42:46 INFO (MainThread) [homeassistant.bootstrap] Setting up media_player
17-01-30 16:42:46 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.plex
17-01-30 16:42:46 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.yamaha
17-01-30 16:42:46 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.cast
17-01-30 16:42:46 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.vlc

I put name, now its there

media_player:
  - platform: vlc
    name: VLC

Thanks for the update and letting us know!

~Cheers

Can anyone recommend a good but cheap ip cam for face detection? I would use it in floor, does not need to work in the dark because light switch on automatically in floor.

I have fixed that bug for the next release: https://github.com/home-assistant/home-assistant/pull/5665

1 Like

well now the media_player is there, but my pi3 is not emitting sounds. I tried with a bluetooth connection (does pair but not connect) and speaker connected with 3,5mm plug (does not come out sound). But I guess this is not the right forum for it …

We might still be able to help. Can you try to use vlc without HA just play a sound file and check if that works?

~Cheers

yes tried that, and is not working. Trying now bluetooth only (wired speaker might have amplification/resistance problem), but is not working …

Now the bluetooth speaker is connected
On the top right of the pi3 I selected the bluetooth speaker (not analog nor hdmi)
In pulseaudio settings, in playback is correctly set the bluetooth device at 100% volume (strsngely there uis a -290ms offset by default (??))

Okay try to get this to work first. Use google with your problem. Maybe this helps? https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=11605

~Cheers

I had to update the firmware of the pi3. Didn’t even know about firmware updates …

Now the audio of a youtube video is working on the bluetooth speaker. That’s an advance.

But from HA vlc no audio. Not sure if its HA or vlc problem

Try turning on debug logging and check the HA log files what is sent maybe there are some additional parameters needed.

Did you do the step mentioned in the VLC component documentation:
"You need to add the homeassistant user to the audio group:
sudo usermod -a -G audio homeassistant" ?

I have no experience with VLC until now but I want to implement it myself so I am thankful for your work here :slight_smile:

~Cheers

yes did

17-01-31 14:24:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state media_player.vlc=idle; media_content_type=music, friendly_name=VLC, supported_media_commands=16909, is_volume_muted=False, media_position=0.0, media_duration=0.0, volume_level=1.0, media_position_updated_at=2017-01-31T14:23:58.954490+01:00 @ 2017-01-31T14:22:43.536738+01:00>, entity_id=media_player.vlc, new_state=<state media_player.vlc=playing; media_content_type=music, friendly_name=VLC, supported_media_commands=16909, is_volume_muted=False, media_position=0.6921079788208008, media_duration=2.304, volume_level=1.0, media_position_updated_at=2017-01-31T14:24:00.514900+01:00 @ 2017-01-31T14:24:00.536928+01:00>>

I see volume level 1.0, maybe too low (although I hear nothing)?

mmhhh now I installed in the pi3 (with user pi, the vlc player. Now I can play mp3 and are fine played on the bluetooth speaker.

But the TTS is not working …?

17-01-31 14:36:50 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=message=David has left work., entity_id=media_player.vlc, domain=tts, service=google_say, service_call_id=1978599056-27>
17-01-31 14:36:50 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=media_content_type=music, media_content_id=https://xxx.duckdns.org:8123/api/tts_proxy/2f0c83aac963a1f1d0284eb4c707ade5d038002b_it_-_google.mp3, entity_id=['media_player.vlc'], domain=media_player, service=play_media, service_call_id=1978599056-28>
17-01-31 14:36:56 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved

Can you use the dev tools to call the media_player.media_play service with the entity_id and a demo .mp3 file?

~Cheers

left home, will need to do it later. What would be the json command? And where has the file to be, in the pi3?

{
  "entity_id": "media_player.vlc"
  "media_content_id": "URL"
  "media_content_type": "MUSIC"
}

Where URL can be any mp3 url.

~Cheers

How can i list my BT Speakers and tell VLC to play on a specific one?

Then you have to set the arguments to your BT speaker:


I would suggest that you try from ipython or similar, to find the correct arguments.
1 Like

mmhh then that is my problem? Will need to change argument to direct to bluetooth instead of alsa …

media_player:
  - platform: vlc
    name: speaker_1
    arguments: '--alsa-audio-device=hw:1,0'