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

I only changed the value from 500 to 10000 where it was stopping the clip.

Can you give me some sense of exactly which line(s) were changed? I’m reaching the end of my rope with this, with zero configuration changes on my end something different is happening every couple days.

As it goes, today the clipping started again. But its intermittent. Does not seem like changing the time is definitely helping. :frowning:

I am thinking that maybe a provision needs to be made for latency of the internet. The hub sends the control command for example a ten seconds clip from the same network and then vlc downloads it from Amazon before playing it. If the download takes to long clipping will occur. This is a huge delay in my setup. I have ping times of 500 ms because I have satellite internet. That’s a full second round trip in good weather and sometimes it goes into multiple seconds if it’s cloudy. I’m sure others could be having similar issues for current reasons. This app is heavily dependent I the internet. Network saturation could interfere. I think the issue would be solved by removing all timing altogether and triggering off of the current state of vlc

If the download takes to long clipping will occur.

In my case I modified the “Sonos Notify with Sound” SmartApp to utilize an mp3 pulled from a local webserver, so response time is in the sub-millisecond range to the server. I’m still seeing random clipping at the beginning, at the end, sometimes it works, sometimes it doesn’t. Different versions of VLC (1.x and 2.x) don’t seem to help either. What’s doubly frustrating is that I’ll make a change, the result will work for a day or two, and then I’ll start having problems days later. It makes this extremely difficult to troubleshoot.

At this point I’m giving up on this solution altogether. I have dozens of hours into troubleshooting this with no hope of a resolution in sight. I have been utilizing EventGhost for other applications in my house, and I will be doing the same here as I just can’t get this thing to work reliably.

edit: EG is playing my alerts on the same system I have been running VLC on and everything works as expected. The process took me 5 minutes (EG was already deployed) and there are no problems with sounds playing.

How are you using event ghost to play alerts from SmartThings?

I send events to the EG web server with this SmartApp (written for HAM bridge, an EG-like tool for OSX). In my case, I want an audio alert when the gate to our front yard opens. I setup an instance of the HAMBridgeCommandWhen to monitor the contact sensor on that gate which sends an HTTP request to the EG WebServer. EG picks that up, fires an event, I capture that event, and have EG play an audio file.

In my case I’m just using the original MP3 file I grabbed from the “Sonos Notify with Sound” custom message using their TTS engine as it’s what my family is familiar with. EG also has a TTS plugin so you can use their own voices if you want and skip the MP3 all together.

Let me know if you want any step by step or sample config. I’ve been using EG for ages, it’s free, super easy to use, and reliable. These are labels I don’t generally apply to ST.

Could you post something on getting started with event ghost? I want to eventually use it to control smart things with an older harmony ir remote.

For that you’re going to need an IR receiver connected to a PC that is in line of sight of your remote. Take a run through the Getting Started exercise for EventGhost. Just going through the motions will get you some understanding of how EG works. In short, events are collected by EG and then you can setup macros that are triggered by the events. Events can come from some built-in sources but most everything you’ll be concerned about will come from plugins. You’ll install a plugin for your remote, and for anything else that you might want to capture events from or send actions to.

In your case, when you get the remote plugin loaded you should see an event fire in EventGhost for every button received from a Windows Media Center IR remote (so configure Harmony for that). What you want is to capture that event, and create an action that is fired when that event happens. In my case I’ve made the action a call to run “curl.exe” to call a SmartThings REST endpoint. So, Harmony sends a Media Center IR command, the IR receiver picks it up, the IR receiver’s plugin in EG triggers an event for the specific button press, you have a macro that is waiting for that event which calls curl to open up a web url. The web url in this case is a call to ST which will trigger a light on or off or whatever.

Look up the thread “Harmony / Eventghost”. It has easy step-by-step instructions.

Mine is connected , first few message play fine but after that it gets cut off for most things. Even small phrases won’t finish playing.

i’m going to dig deeper into this. I use a keyspan remote instead of a mce one, and eventghost doesn’t work with it.

From what I can see none of the Keyspan remotes use IR, so I’m not sure how Harmony is going to control it. Having said that, they do all appear to use standard HID inputs so you could still capture events from the Keyspan remote sent to the dongle.

Mine is ir. It’s old though. The driver is built into the control program. That program can send macros or keystrokes on a per app basis. The problem is event ghost hooks into the global driver program that raises events. It doesn’t see keys sent straight to it I may write a middle man program to fix this.

Seems like it’d be far easier to pick up a cheap MCE IR receiver on fleabay. Here’s one for $6 shipped.

GPL v3.0 is irrevocable, as far as I know.

1 Like

If you have a copy of this devicetype and would like to see it reborn PM the code to me and i’ll see what i can do. I make no promises other than i will try to get it working and stable again. :slight_smile:

That is correct. You cannot prohibit distribution of the code, as you have already licensed it for distribution with an irrevocable license. The GNU General Public License v3.0 - GNU Project - Free Software Foundation

/**
 *  VLC Thing is a SmartThings device driver (a "thing") for the VLC media
 *  player.
 ...
 *  Copyright (c) 2014 Statusbits.com
 *
 *  This program is free software: you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License as published by the Free
 *  Software Foundation, either version 3 of the License, or (at your option)
 *  any later version.

Looking forward to future forks of this project, as using VLC is an excellent inexpensive way to have audio notifications from a home automation system.

Nobody should associate your name with any “failures”; there’s nothing wrong with not wanting to/having time to maintain free code any more, it’s understood that it relies on an API and was functional during the time that it was maintained. Now it’s up to someone else to maintain it if they want to; that’s what makes open source a great concept.

1 Like

I think the point here is that we’re losing developers.

SmartThings lost geko a few months ago… He decided that ST wasn’t for him and replaced it with Staples Connect and Wink. Personally I wish him luck with his 2-3 hub solution. I know several really good developers now work for SmartThings, so yeah we may have lost some that way but I feel we have MUCH more to gain. Finally every user of SmartThings is potentially a developer and some will fall in love and write amazing devices, but nothing is forever and eventually everyone will move on to something else and someone else will be there to fill the void left behind.

1 Like

Thx all for the replies, I’ll go through the code and see what I can’t get fixed and have it reposted ASAP. VLC Thing will be reborn!

2 Likes