SmartThings Community

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

dth_voice
tts
dth_av
communitydevices
dth_alerts
(John Watkins) #185

I know this is from an old post, but I am having a similar issue. I get the error groovy.lang.MissingPropertyException: No such property: options for class: physicalgraph.device.HubMultiAction, when calling a my device handler.

I was hoping you could provide some insight as to what the issue was and what was done resolve it?

(Geko) #186

I think I had to flatten the command list:

actions = actions.flatten()
(John Watkins) #187

Thanks for the reply. in the smartapp or the device handler? I’m already flattening the actions map…

(Matt) #188

Hello. Thanks for your work and for continuing to update the app. Did you make progress on getting sonos mood music to control the vlc thing correctly? It lets me pick a song from the VLC queue / library, and sends the command to vlc thing, but the song never plays in vlc. Custom text notifications and other things from the sonos notify with sound app work.

(Geko) #189

Yeah. The platform is kinda shaky right now due to transition to hub V2 and mobile app 2.0. A lot of things are broken or in flux. I’m gonna hunker down for a few weeks until the dust settles. :wink:

5 Likes
SmartThings Text-To-Speech for Sonos (playText) not working?
(Brian S. Lowrance) #190

@geko
I’m using VLCThing 1.2.2. It’s mostly working for speech but often doesn’t return speech and instead throws an error at the point where it calls def sound = textToSpeech(text, true) in myTextToSpeech(). This really looks like an inconsistent platform issue with calling SmartThings textToSpeech() function. What’s odd, is some phrases work and some do not and eventually phrases that didn’t work will suddenly work but may not later again.

I added some additional logging in the Device Type to verify this is the exact point where the issue is occuring:

private def myTextToSpeech(text) {
    LOG("Executing: textToSpeech(${text},true)")
    def sound = textToSpeech(text, true)
    LOG("Executing: sound.uri")
    sound.uri = sound.uri.replace('https:', 'http:')
    LOG("returning sound")
    return sound

}

Here is my log result:

11:34:45 AM: error java.lang.reflect.UndeclaredThrowableException @ line 571
11:34:44 AM: trace Executing: textToSpeech(Warning, Warning: Laundry Outside Door is now closed,true)
11:34:44 AM: trace playTextAndResume(Warning, Warning: Laundry Outside Door is now closed, 95)

Line 571 in my code (with the extra logging) is def sound = textToSpeech(text, true) which is line 570 in your code.
So you see it bombs and halts execution when calling textToSpeech(text, true) and never progresses further to sound.uri = sound.uri.replace('https:', 'http:') or return sound.


For what it’s worth, below is a log of when this same phrase worked during a later attempt:

11:59:48 AM: trace Skipping event generation for sound file http://s3.amazonaws.com/smartapp-media/tts/5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3
11:59:48 AM: trace Track info: [filename:http://s3.amazonaws.com/smartapp-media/tts/5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3])
11:59:48 AM: trace parseHttpResponse([position:0, information:[category:[meta:[filename:http://s3.amazonaws.com/smartapp-media/tts/5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3]], chapters:[], titles:[]], stats:[averagedemuxbitrate:0, playedabuffers:0, demuxreadpackets:0, lostabuffers:0, displayedpictures:0, averageinputbitrate:0, decodedaudio:0, demuxdiscontinuity:0, lostpictures:0, sentpackets:0, inputbitrate:0, decodedvideo:0, demuxreadbytes:0, sentbytes:0, sendbitrate:0, readpackets:0, demuxbitrate:0, readbytes:0, demuxcorrupted:0], videoeffects:[brightness:1, contrast:1, gamma:1, saturation:1, hue:0], random:false, state:playing, repeat:false, subtitledelay:0, equalizer:[], apiversion:3, version:2.0.3 Twoflower, fullscreen:0, time:0, rate:1, loop:false, audiodelay:0, volume:256, length:0, audiofilters:[filter_0:]])
11:59:47 AM: trace Skipping event generation for sound file http://s3.amazonaws.com/smartapp-media/tts/5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3
11:59:47 AM: trace Track info: [filename:http://s3.amazonaws.com/smartapp-media/tts/5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3])
11:59:47 AM: trace parseHttpResponse([position:0, information:[category:[meta:[filename:http://s3.amazonaws.com/smartapp-media/tts/5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3]], chapters:[], titles:[]], stats:[averagedemuxbitrate:0, playedabuffers:0, demuxreadpackets:0, lostabuffers:0, displayedpictures:0, averageinputbitrate:0, decodedaudio:0, demuxdiscontinuity:0, lostpictures:0, sentpackets:0, inputbitrate:0, decodedvideo:0, demuxreadbytes:0, sentbytes:0, sendbitrate:0, readpackets:0, demuxbitrate:0, readbytes:0, demuxcorrupted:0], videoeffects:[brightness:1, contrast:1, gamma:1, saturation:1, hue:0], random:false, state:playing, repeat:false, subtitledelay:0, equalizer:[], apiversion:3, version:2.0.3 Twoflower, fullscreen:0, time:0, rate:1, loop:false, audiodelay:0, volume:256, length:0, audiofilters:[filter_0:]])
11:59:47 AM: trace Skipping event generation for sound file http://s3.amazonaws.com/smartapp-media/tts/5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3
11:59:47 AM: trace Track info: [filename:http://s3.amazonaws.com/smartapp-media/tts/5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3])
11:59:47 AM: trace parseHttpResponse([position:0, information:[category:[meta:[filename:http://s3.amazonaws.com/smartapp-media/tts/5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3]], chapters:[], titles:[]], stats:[averagedemuxbitrate:0, playedabuffers:0, demuxreadpackets:0, lostabuffers:0, displayedpictures:0, averageinputbitrate:0, decodedaudio:0, demuxdiscontinuity:0, lostpictures:0, sentpackets:0, inputbitrate:0, decodedvideo:0, demuxreadbytes:0, sentbytes:0, sendbitrate:0, readpackets:0, demuxbitrate:0, readbytes:0, demuxcorrupted:0], videoeffects:[brightness:1, contrast:1, gamma:1, saturation:1, hue:0], random:false, state:playing, repeat:false, subtitledelay:0, equalizer:[], apiversion:3, version:2.0.3 Twoflower, fullscreen:0, time:0, rate:1, loop:false, audiodelay:0, volume:486, length:0, audiofilters:[filter_0:]])
11:59:47 AM: trace vlcGet(/requests/status.json?command=volume&val=256)
11:59:47 AM: trace vlcCommand(command=volume&val=256)
11:59:47 AM: trace setLevel(50)
11:59:47 AM: trace vlcGet(/requests/status.json?command=volume&val=256)
11:59:47 AM: trace vlcCommand(command=volume&val=256)
11:59:47 AM: trace setLevel(50)
11:59:47 AM: trace vlcGet(/requests/status.json)
11:59:47 AM: trace delayHubAction(500)
11:59:47 AM: trace vlcGet(/requests/status.json?command=in_play&input=http%3A%2F%2Fs3.amazonaws.com%2Fsmartapp-media%2Ftts%2F5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3)
11:59:47 AM: trace vlcCommand(command=in_play&input=http%3A%2F%2Fs3.amazonaws.com%2Fsmartapp-media%2Ftts%2F5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3)
11:59:47 AM: trace playTrack(http://s3.amazonaws.com/smartapp-media/tts/5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3)
11:59:47 AM: trace returning sound
11:59:47 AM: trace Executing: sound.uri
11:59:46 AM: trace Executing: textToSpeech(Warning, Warning: Laundry Outside Door is now open,true)
11:59:46 AM: trace playText(Warning, Warning: Laundry Outside Door is now open)
11:59:47 AM: trace parseHttpResponse([position:0, videoeffects:[brightness:1, contrast:1, gamma:1, saturation:1, hue:0], random:false, state:stopped, repeat:false, subtitledelay:0, equalizer:[], apiversion:3, version:2.0.3 Twoflower, fullscreen:0, time:0, rate:1, length:0, volume:486, audiodelay:0, loop:false])
11:59:47 AM: trace vlcGet(/requests/status.json)
11:59:47 AM: trace delayHubAction(500)
11:59:47 AM: trace vlcGet(/requests/status.json?command=in_play&input=http%3A%2F%2Fs3.amazonaws.com%2Fsmartapp-media%2Ftts%2F5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3)
11:59:47 AM: trace vlcCommand(command=in_play&input=http%3A%2F%2Fs3.amazonaws.com%2Fsmartapp-media%2Ftts%2F5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3)
11:59:47 AM: trace playTrack(http://s3.amazonaws.com/smartapp-media/tts/5e25ed0c566c28a7c4de06b6e96d048a8f96b2a5.mp3)
11:59:47 AM: trace returning sound
11:59:47 AM: trace Executing: sound.uri
11:59:46 AM: trace Executing: textToSpeech(Warning, Warning: Laundry Outside Door is now open,true)
11:59:46 AM: trace playText(Warning, Warning: Laundry Outside Door is now open)
11:59:46 AM: trace vlcGet(/requests/status.json?command=volume&val=486)
11:59:46 AM: trace vlcCommand(command=volume&val=486)
11:59:46 AM: trace setLevel(95)
11:59:46 AM: trace vlcGet(/requests/status.json?command=volume&val=486)
11:59:46 AM: trace vlcCommand(command=volume&val=486)
11:59:46 AM: trace setLevel(95)
Door left open (with Photo Burst, Hello Home, & Speech), Version 1.3.5
(Geko) #191

Yeah, it used to work flawlessly, but SmartThings TTS has been broken for quite a while. Someone mentioned that if the phase is already present in the S3 cache, then it might works. Otherwise it barfs. Unfortunately, considering the perpetually sorry state of the platform, I can’t waste my time troubleshooting it.

2 Likes
(Brian S. Lowrance) #192

Understood. The state of the platform is killing my soul in my will and desire to update/troubleshoot/support my own SmartApps too.

1 Like
(Matt) #193

Interesting… I have no issues with new phrases.

(Amauri Viguera) #194

Yeah that’s a real bummer because – at least on the surface – it appears that it would be an easy fix. And considering the impact – or at least the benefits to all the people that use Sonos for custom phrases – it’s low hanging fruit. Fix that issue and at least you can give people a 100% working solution for one part of the platform.

The fact that A LOT of things just “kinda work but sometimes not really” – like random events, mobile presence, the Sonos TTS bit – just makes things look worse than they are.

1 Like
(Binh Ton) #195

@geko I now got this error using VLC Thing on Raspberry Pi:
6985fd2a-03f5-4bb9-b865-c794eb25af4b 10:35:20 AM: error groovy.json.JsonException: Lexing failed on line: 1, column: 1, while reading ‘<’, no possible valid JSON value or punctuation could be recognized. @ line 185

I use it with BigTalker smartapp. Do you know what is this error?

(Binh Ton) #196

Ignore this. I found out the issue. The wired network to Raspberry Pi had problem.

(Curt Matzenbacher) #197

Are there any current known issues for getting this running? Any extra steps not included in the original directions? I tried to follow the directions closely, but nothing happens when I hit “Test” in ST app on Android. I’m not even sure what info to give to receive help? I’m a novice, so you may need to ELI5.

(Cyrus I) #198

Did you make sure inside VLC your port is 8080, and you reflect that in the ST app as well?

(Curt Matzenbacher) #199

That may be the issue. I found a place to change the LUA Telnet port in VLC settings. Is that it?

(Cyrus I) #200

Yes, there and also in the app when you are setting it up

(veni) #201

Nothing happens for me either when I press “TEST”. What could I be doing wrong? Here are my settings:

Smartthings IDE
Device ID: C0A80108:1F90

Windows 7 PC
Computer’s IP: 192.168.1.8
VLC HTTP server port: 8080
VLC - Lua port: 4212
VLC - Lua password: test123

Smartthings Mobile App
VLC IP address: 192.168.1.8
VLC TCP port: 8080
VLC password: test123

Help please!!

(Matt) #202

They seem to have fixed the TTS recently. Can you give it another go when you have some time?

Edit: Just tried ti again today. TTS functions seem to be working better. I’m still having trouble getting VLC Thing to work with the Mood Music Smartapp. I can’t get any songs I add to the VLC playlist or library to show up in Mood Music.

2 Likes
#203

It works for my C.H.I.P integration project.

(Curt Rowe) #204

@veni, I fixed a problem by first trying to access the computer running VLC from another as mentioned earlier in this thread. In my case, I entered 10.0.0.187:8080 in my web browser. A dialog comes up asking for a user id and password. Skip the user id and enter your password: test123. If it works, you’ll get a player controls in the browser. If you can’t get access, you may have firewall issues. I haven’t done Windows in years so I can’t help you with that.