VLC Thing. A Poor Man's Sonos. Version 2.0 Released 12/22/2016

I really wish it would just work with my Echo … i don’t need anymore speakers around the house. What about an old iPhone? Any way that can work? Cause i can pair that with the Echo.

This seems like a great app to play media but unfortunately i keep getting the message ‘VLC thing connection is disconnected’.

Ive read all instructions carefully and did all steps twice. All seems to be pretty clear and well explained so i dont understaand where im going wrong.

I have VLC on a computer on the same network as my ST hub. Installed the Device and DTH like any other. Used the standard password, filled in port and ip address. Checked firewall, theres 2 VLC set to allow (just as on the example image). Since i pretty much know nothing about tcp ports and ip addresses i feel that here might lay the problem.

Any suggestions on what i could do to fix this are very welcome. Thanks!

EDIT: Earlier in this topic someone wrote if you type this into a browser you should be able to control VLC that way: (my ip):8080
If i type this line and press enter the browser just keeps on loading for a while untill i get a connection timed out error message

Can you describe how you’ve set this up? I get stuttering Bluetooth audio on my Pi Zero W running headless (no GUI) on the latest Raspbian image using vlc, even just playing a local file. Tried a Pi 3 B on Ethernet instead of WiFi with the same results – tho on that one I seem to get good audio from Chromium streaming YouTube vids, it’s only vlc that’s giving me headache.

1 Like

I use Jessy with GUI on my Pi Zero W. I installed the VLC on the Pi and have it auto load when the Pi is booted. It does not stutter. But place an extra letter prior to the start of the report text in order to eliminate the dropped letters or word issue that some people on the forums reported. Also, please find my project post here on ST about C.H.I.P/Pi Sonos killer with VLC. The worst I have seen is that presence reports don’t arrive when I am home. That is due in Big part to how ST handles these events.

I’ll have to see about digging up a Jessie image. My problem is that the middle of messages drops out almost all the time, the beginning is almost always ok and the end usually comes through if the message isn’t very short. Running cvlc --server http -v I see a bunch of messages about pipes and timing during playback.

Maybe an older version of VLC would solve my problem since it seems to be specific to VLC.

Hopefully have more time to play with this tomorrow.

There is another option. I don’t have a link to another users post, but he created code to run on a Pi to make announcments over Google Home. It uses Python code, but I havn’t gotten it to work yet. If you look it up, you can try that. Tell me if ad how you get it to work.

Scatch that. Here is the link to his post:
His name is @GhostBassist

The last Jessie image got me going alright on the Pi Zero W. I did an apt-get update && apt-get upgrade and installed the following packages:

blueman bluez bluez-firmware pulseaudio-module-bluetooth vlc vlc-nox

Once I got it functioning via the GUI, I disabled the GUI in raspi-config, ssh in, and use the following commands to get things going:

 echo connect _speaker_mac_address_ | sudo bluetoothctl
 pulseaudio -D
 pacmd set-card-profile 0 a2dp
 cvlc --server http -v

That got me clean audio but it was still sometimes getting clipped off at the end. I ended up commenting out one line in playTrackAndRestore:

actions << playTrack(uri)
actions << delayHubAction(delay)
//actions << apiCommand("command=pl_stop")
actions << delayHubAction(500)

I’m guessing the real problem here is that the delay duration is miscalculated a few lines above but this works for my use case.

1 Like

I updated this code to handle capability “Audio Notification”. This allows the use of the MarketPlace>Music&Sounds>Speaker Companion for making dogs bark when the doorbell rings. It was a quick hack with just the bare minimum required to do this.

Relevant changes are declartion of “Audio Notification” on Line 52, Addition of “playTrack” command on line 61, and “playTrack” method on lines 405-436.

Please don’t ask me for support. Ask the OP to update this properly.

1 Like

If I have a dozen raspberry pi’s running VLC, can I broadcast to all of them simultaneously?

I have tried 3 :slight_smile:

How do you broadcast? Care to share? I am going to make one soon.

Oops, sorry, I forgot the one important detail. I use webCoRE to speak text to the available vlc thing players.

I call this piston from other pistons with the textMessage payload.
image

1 Like

Can you use alexa to play a message to them?

I do not believe that’s possible at this time.

Is anyone else having issues with vlc thing currently? I cannot get it to speak. Seems to be sending files that are empty to my vlc player. Local files play fine.

I wish that VLC Thing can play a tone before speaking. It can be really spooky when it speaks out of the blue.

This turns out to be possible w/VLC Thing. I have it speaking the door name and then playing a track (The Star Trek doorbell of course, because that’s appropriate for a home automation geek). I’m doing this on the Hubitat adaptation, but it should be possible with SmartThings too.

Plays the track after, instead of before, like I’d prefer. Was working the other way round, but it switched and I don’t know why. Maybe it will behave better for you? Still, it works, and that’s good enough for me. I do wish there was a way the tracks would auto purge in VLC Player. As it is now, they’re just building in the playlist each time a door is opened.

Can you elaborate how to do that?

Since I’m no longer on SmartThings, it probably won’t translate. With the port to Hubitat, there is an option in Rule Machine that allows you to “Control a music player” and specify a track to play. If you’re running webCoRE, you probably can do it that way, since it allows so much control. Sorry I cannot be of more help. My SmartThings hub has been sold, so I couldn’t fire it up if I wanted to.

Here’s what it looks like on Hubitat…

1 Like

I decided to give VLC Thing a try since I do have a couple old PCs lying around. To test it out, I used my MacBook Pro and everything worked without a hitch. I then setup a second VLC Thing device to point it to my old Dell and for some reason that doesn’t work. I did the exact same thing, just used the Dell’s IP address instead. What I also notice is that there when I use the Test button on the Smarthings device, it’s like something plays in VLC, there’s just no sound. And of course, I made sure the volume is turned up, that audio works on the PC, etc. I can play other sounds and play videos with sound in VLC just fine. In case it was a networking issue, I also disabled the Firewall completely on the PC, still doesn’t work. Anybody else run into this issue? Maybe there’s some subtle difference between Mac OS and Windows that I’m failing to see?