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

I have added the missing line and will test it tonight. Will update my reply. Thank you @Nigel.

Hi guys,

I’ve read the post several times but haven’t yet stumbled on to a fix for my issue - I have VLC on my MacBook Air , sleep disabled, VLC Thing on my iPhone 7 , ports on both set to 8080, vlcremote password on both, IP address for MacBook taken off Fing app and my Netgear router web interface so I guess its right and that’s used on the iOS app …

it works great and then will intermittently disconnect and I get the red arrow of doom , it will then reconnect sporadically and then cycle continues over and over - I love the app but am frustrated by the connection issues and I am considering just buying those expensive speakers that I don’t need or can afford really.

Any suggestions on a fix would be greatly appreciated!

Many thanks

John

Don’t think anyone replied to this, but just another thanks, adding the missing capability to the device handler does seem to work!

I tried @Nigel code and it looks to be working.

I want to try VLC Thing out but I had a few questions first. I want to play some custom mp3s when certain events occur. From my understanding, I can use Big Talker in conjunction with VLC Thing. But from my understanding, Big Talker only does text to voice. I am interested in playing custom Mp3s.

1 Like

Hi @bickyb,

I have a solution for you. I have my VLC Thing running off the Pi Zero W and now have totaly switched to a new community app which can do all you want and more for voice and other announcments with custom sounds and text-2-speach it is by @SBDOBRESCU. Try it with VLC thing. If you need a helpfull walkthrough, please check out my post.

3 Likes

Yes, I had the same problem! The problem is in the GitHub readme, you link to broken code here:

Point number 5 where you have linked “source code”:

image

That’s why it isn’t working for everyone the first time around - maybe you can update the readme so it doesn’t confuse anyone else. I almost gave up trying until I read through this whole post :slight_smile:

Thanks for making this awesome code, you’re a star!

I follow the instruction to install, but do not work when I click test or play on VLC.

So on browser I entered my ip 192.168.1.168.:8080 Skip the user id and enter your password, works I can control the VLC.

EDIT: I just reboot all device so works.:grinning:

I get a “No Connection” message in my log files.

VLCThing connection is disconnected
Name Value
archivable true
data
{
“microDeviceTile”: {
“type”: “standard”,
“icon”: “st.secondary.refresh”,
“backgroundColor”: “#ea5462
}
}
date 2017-12-20 9:02:39.101 PM CST (2017-12-21T03:02:39.101Z)
description VLCThing connection is disconnected
deviceId 54ac874b-7792-45ea-9086-a776f2624575
deviceTypeId ea9a1352-116f-451c-ac11-56a06a4970e6
displayed true
eventSource DEVICE
hubId 27b598fd-da2c-4e59-a66f-bd6f574597db
id 679a0ab0-e5fb-11e7-9a13-02277982aa9e
isStateChange true
isVirtualHub false
linkText VLCThing
locationId 1c3ceee8-e540-48e7-b2bb-d415717d22e8
name connection
rawDescription
translatable false
unixTime 1513825359101
value disconnected
viewed false

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.