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

In the code when you instal the device type change the all the uri references to uri.replace(‘https:’, ‘http:’)

Still a big ?
I think we have a communication problem. All references?? I doubt that you mean “Replace return playTrackAndRestore(uri, duration, volume)” with “return playTrackAndRestore(urii.replace(‘https:’, ‘http:’), duration, volume)”

In any case. A simpler solution is to trash VLC 64 bit from my PC and install the 32 bit version. No more problems. Thanks for your help though

I had the same problem on Server 2008R2. I installed 64Bit VLC and it failed accessing the https every time. Once i uninstalled the 64Bit VLC and installed the 32Bit version the problems were gone.

Installed and runs great. I saw a couple of people reported audio clipping issues and I initially had that too. My issue turned out to be some form of initial mute where I was running the VLC server (PC) to my Amp over HDMI. Nothing to do with SmartThings and easily fixed.

I do have one small but funky issue and wondering if anyone else has seen this. Running any form of message - custom or pre-recorded with any of the Sonos Apps (Notify with Sound, Big Talker etc) sometimes causes the speech output from VLC to contain the required message followed by some residual parts of previous messages. Very occasionally this could be the entire weather forecast for example, but it’s usually just a couple of words (or woofs). Any ideas?

Hello Amauri, I hope everything is okay. I have read some of your articles, it seems to me that they are well interesting.,

Note: VLC Thing project moved to another Github repository.

First off, thanks to @geko for this device driver! I have tried this one and the other Sonos-like device driver, and this one seems to work a little better for my needs and seems more reliable. I had a couple of questions that hopefully someone can answer or help out on:

1.) The notifications using Sonos Alert and Sonos Weather work well. They are fairly consistent and pretty instant. I am still having trouble with the music playlist part. This is what I had troubles on with the other DLNA device type. I can start a playlist on the computer that has VLC, then control it via the ST app, like skipping songs, going back, etc. I’ve tried messing with the Sonos app part where I can resume playing music or pick a song. I’ve messed with all the settings, and after a notification happens, I can no longer manually start a song from ST, but when I start it again from the computer, it will be fine. Any ideas on this? Sometimes pressing play will start the last song over again, but then skipping the song still is an issue.
2.) Is there any way to remotely control VLC on the computer from Android so that I can restart the playlist to prevent the problem described above? And by remotely, I mean if I’m miles away and not connected to my home network. I’ve noticed the apps where I can be connected to the home wi-fi and control VLC that way.
3.) When using the other DLNA device driver, I was using an old Samsung GS3 with Kodi to play the songs on the SD card, hooked up via 3.5mm to a way old boombox system. Can we do VLC Thing on an old android device or something more mobile than a PC? When I downloaded the VLC app for android, there were no settings page similar to that of the PC.

Basically, my main goal is to be able to start playing music or some sort of playlist while I’m away at my office or on vacation (the dog likes a little noise while we’re away, and having some noise at night might prevent burglars), using my cell connection and not home wi-fi, and still having voice notifications for actions. I would like to be able to see all the songs from ST, too. I think it will show the songs as they play on ST, but after a notification happens, I think someone on here said that the URL for that mp3 goes away, or something like that.

Am I reaching a little too much to have something like this? I’d like to do this without having to get a Sonos speaker.

Sorry for writing a novel. Thank you!

VLC for Android does not have HTTP API required for VLC Thing to work. You can run it on a Raspberry Pi or an old laptop though.

Oh yeah, good call on the laptop or Raspberry Pi. I have always wanted to tinker with one of those, so maybe that would be a good first project. Thanks @geko!

I bought a Raspberry Pi to specifically run it as a VLC Thing for my SmartThings BigTalker App. It’s working great except occasionally I have to either reboot it or pull the wifi adapter out and plug it back in to reset it’s connectivity. I wish I documented the steps I did to make it work as needed, but it works beautifully and someday maybe I’ll get around to documenting/publishing my setup. I ended up using a cronjob with @reboot to fire off VLC with enough permissions to run the web service. Coupled with BigTalker, it tells my kids when it’s time to leave for school and when it’s time to get ready for bed. It also announces when specific doors are used (open only events), if a kids window opens during certain hours, among other notifications. I Love VLC Thing!, Thanks @geko for an awesome device type. I can buy a raspberry pi for a lot cheaper than a Sonos/Ubi and this devicetype does what I need, so it is perfect for me. I’ve previously sent a donation to support development efforts and I hope that others will as well.

1 Like

Thanks again @rayzurbock and @geko. I am going to give that Raspberry Pi idea a try. I’m also going to try BigTalker and get that going. I found a workaround for one of my issues of music not resuming. When a notification plays through VLC on my PC, it adds it to the bottom of the playlist, which then ends any other music playback that might have been going on. The easiest thing to do was to play a music stream (URL) and have it as the only thing on my playlist and I put it on repeat/loop. So when a notification happens, it will be added to the bottom of the playlist, play the notification, then go back to the “top” and continue playing the stream. I was looking for a good music stream anyway, so this works perfectly!

Can this work for a tablet setup to run ActiOn Dashboard with Smart Alarm installed and a VLC for Android installed?

See the answer four posts above :smile:

Thanks for your noble effort to provide less expensive media interaction with smartthings.

I am using an old Windows XP laptop to play VLC with your excellent ‘thing’. Notify with sound works well, but my attempts to play a song fails. The sensor triggers correctly the service, and then a stop command is sent, followed by a setlevel command, and finally by a playTrack command. The stop command is effective, but there is definitely no track played, no obvious attempt to load the file, nor any error message showing why nothing happens.

Any suggestions for troubleshooting?

If I remember correctly, it could only play tracks in the current playlist, i.e. the ones that have already been played. Sorry, I stopped working on this project due to lack of spare time.

Thanks. Ill see if that works. I hope you can find the time to get back to
the project. It is a great addition to the ST mix. If not perhaps others wiser
than me will pick it up.

What voice does VLCThing use? Is it downloading an MP3 from the web in order to play the audio or is VLC actually performing the text to speech?

I ask, as I own the Ivona Salli voice, and would prefer to use her voice for the home if possible.

Text-to-speech conversion is done in the cloud.

Alas it did not work. Although Notify with Sound will play either synthesized speech or the barking dog mp3, for example, the Play Music option will not play the desired track, though the activity log shows that it correctly stops the music that is currently playing (stop DOES occur), sets the volume, then issues the PlayTrack command,. No visible loading of the track to the playlist occurs, or movement of the ‘next’ highlight to the desired track if it is already there. No error, but no music, whether the track attempted to be played is in the current playlist or not.

In short, I CAN use the Phone interface to Stop, Pause, Play, move from Track to Track, etc. as well as trigger the notify with sound. While I can trigger the Play Music option, its occurrence does not play music.

Sad to be on the verge of such happiness…

I finally unpacked my rasberry pi stuff and some speakers I had laying around. Got VLCthing up and running over the weekend.

I have a small Windows server hosting VLC and airfoil. Airfoil is set to use the system sounds, so I can have spotify playing on the Windows machine and VLC running in the background. On the back of the speaker is a rasberry pi b+ running volumio. Volumio works as an airplay or dlna speaker, in addition to being an audio streamer in its own right. It plays alerts right over the music that is playing without interruption. I am going to try and automate some play/pause or volume lowering with event ghost, but for now this works really well. Using spotify remote I can control the audio with a tablet. Great work @geko

3 Likes