[OBSOLETE] Media Renderer Events, play messages, radio stations, tracks, sounds

Thank you very much for this code, it works perfectly. I am not a big fan of Radio Tunes and looked for a way to add my own radio station. My favourite is Radio Paradise which is just a m3u link so I customized the code to allow the input of any custom station.

Under “Action” I added “My Radio Station” and a section stating “Play Specific Station URL”. This will allow you to play your own station that is not Radio Tunes. For example, I add: http://www.radioparadise.com/m3u/mp3-192.m3u to this section and the station plays.

ULE: Perhaps this is something you may want to add beyond my simple tweak? I just wanted to share something simple to the community. Thanks again for all your hard work

MediaRenderer_Connect_Custom.groovy

3 Likes

Hi Xtropy, Great idea, I´m going to add your code in next release. thanks

Does this work thru a sonos speaker?

Hi @Derrek113116. I must to work, I have not sonos speakers, but some users have help to get compatibility. try it and feedback.

Perfect! Thank you for this. Now when somebody walks into the grotto it starts playing the Christmas music channel and stops when they leave!

1 Like

HI, An update to Media Renderer Events, now in Beta Text to Speach ivona Voices from Amazon.

Ivona Voices have the best TTS engine (my opinion) and now you can use it in smartthings messages.

You need to get your api secret and key from Ivona page https://www.ivona.com

Ivona use transcoding chunked and this is a problem with MR devices, the players do not play with this settings, its necessary to preload the audio in other service and then delivery to MR device.

This new TTS creates a signed url and send the data to a proxy web server to make it compatible with most of the MR devices, in this way your api key is always secure and its not necessary to share it.

I cant find any other way to make it compatible with the MR, if you have a android MR device this is not necessary, Android can use transcoding chunked without problem but all others MR can not play it without the proxy

I have added the proxy urbansa.com, I think no many people going to use it, but if i´m wrong it can overload, lets go to test

Try it and feedback

Hi @ule, I have put action ‘message’, mode ‘Ivona’ and put both of the API keys in but I cannot get any speech out.

edit

actually it is working but I had to make the message longer because I am still missing a couple of seconds at the start

Hi @BristolBaz, could you give me more info
1.- what speaker do you have?
2.- Are you using Media renderer or other device type?
3.- Voice RSS or SmartThings works fine without delay?

thanks

@ule - Hello mate,

I’ve signed up for the new TTS engine, however Media Renderer Events seems to not save as it wants a radio tunes details, all I want to do is put in a message?

Is there any way around this?
Thanks

Hi @deano12, Update the Smartapp. I have fix the problem

Hi @ule - Happy Christmas to you!

I’ve tried the fix you suggested and I’m getting this error in the live logging with nothing playing:

5111ec95-6cac-4651-9001-b5525b2f4d8d 8:22:30 PM: error org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 309; The reference to entity “Input.Type” must end with the ‘;’ delimiter. @ line 604
5111ec95-6cac-4651-9001-b5525b2f4d8d 8:22:30 PM: debug Parsing 'index:12, mac:90F1AA0913D2, ip:C0A80014, port:D6D9, headers:SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBGcmksIDA5IEphbiAxOTcwIDA0OjM5OjA3IEdNVA0KU2VydmVyOiBTYW1zdW5nLzEuMA0KQ29udGVudC1UeXBlOiB0ZXh0L2h0bWwNCkNvbnRlbnQtTGVuZ3RoOiA3NTQNCkNvbm5lY3Rpb246IGNsb3NlDQpMYXN0LU1vZGlmaWVkOiBGcmksIDA5IEphbiAxOTcwIDA0OjM5OjA3IEdNVA==, body:PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48VUlDPjxtZXRob2Q+VXJsUGxheWJhY2s8L21ldGhvZD48dmVyc2lvbj4xLjA8L3ZlcnNpb24+PHNwZWFrZXJpcD4xOTIuMTY4LjAuMjA8L3NwZWFrZXJpcD48dXNlcl9pZGVudGlmaWVyPjwvdXNlcl9pZGVudGlmaWVyPjxyZXNwb25zZSByZXN1bHQ9Im9rIj48dXJsPmh0dHA6Ly91cmJhbnNhLmNvbS90dHMucGhwP3VyaT1odHRwczovL3R0cy51cy1lYXN0LTEuaXZvbmFjbG91ZC5jb20vQ3JlYXRlU3BlZWNoP0lucHV0LkRhdGE9SGVsbG8lMjBMZXhpJTNGJklucHV0LlR5cGU9dGV4dCUyRnBsYWluJk91dHB1dEZvcm1hdC5Db2RlYz1NUDMmT3V0cHV0Rm9ybWF0LlNhbXBsZVJhdGU9MjIwNTAmUGFyYW1ldGVycy5SYXRlPWRlZmF1bHQmVm9pY2UuTGFuZ3VhZ2U9ZW4tR0ImVm9pY2UuTmFtZT1BbXkmWC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1HRE5BSUczTlFZWDJDUFBVWFBNUSUyRjIwMTUxMjI0JTJGdXMtZWFzdC0xJTJGdHRzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAxNTEyMjRUMjAyMjI0WiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmWC1BbXotU2lnbmF0dXJlPTRlZGIxYjU5YzAyNTkwMTM0NDI2NThhMmU3ZTBjOWVlN2I2M2UwODE3ZjBkMDhhNDI4ZjMwNWZmNWJjZmZmNWI8L3VybD48YnVmZmVyc2l6ZT4wPC9idWZmZXJzaXplPjxzZWVrdGltZT4wPC9zZWVrdGltZT48L3Jlc3BvbnNlPjwvVUlDPg=='
5111ec95-6cac-4651-9001-b5525b2f4d8d 8:22:30 PM: error org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 309; The reference to entity “Input.Type” must end with the ‘;’ delimiter. @ line 604
5111ec95-6cac-4651-9001-b5525b2f4d8d 8:22:30 PM: debug Parsing 'index:11, mac:90F1AA0913D2, ip:C0A80014, port:D6D9, headers:SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBGcmksIDA5IEphbiAxOTcwIDA0OjM5OjA3IEdNVA0KU2VydmVyOiBTYW1zdW5nLzEuMA0KQ29udGVudC1UeXBlOiB0ZXh0L2h0bWwNCkNvbnRlbnQtTGVuZ3RoOiA3NTQNCkNvbm5lY3Rpb246IGNsb3NlDQpMYXN0LU1vZGlmaWVkOiBGcmksIDA5IEphbiAxOTcwIDA0OjM5OjA3IEdNVA==, body:PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48VUlDPjxtZXRob2Q+VXJsUGxheWJhY2s8L21ldGhvZD48dmVyc2lvbj4xLjA8L3ZlcnNpb24+PHNwZWFrZXJpcD4xOTIuMTY4LjAuMjA8L3NwZWFrZXJpcD48dXNlcl9pZGVudGlmaWVyPjwvdXNlcl9pZGVudGlmaWVyPjxyZXNwb25zZSByZXN1bHQ9Im9rIj48dXJsPmh0dHA6Ly91cmJhbnNhLmNvbS90dHMucGhwP3VyaT1odHRwczovL3R0cy51cy1lYXN0LTEuaXZvbmFjbG91ZC5jb20vQ3JlYXRlU3BlZWNoP0lucHV0LkRhdGE9SGVsbG8lMjBMZXhpJTNGJklucHV0LlR5cGU9dGV4dCUyRnBsYWluJk91dHB1dEZvcm1hdC5Db2RlYz1NUDMmT3V0cHV0Rm9ybWF0LlNhbXBsZVJhdGU9MjIwNTAmUGFyYW1ldGVycy5SYXRlPWRlZmF1bHQmVm9pY2UuTGFuZ3VhZ2U9ZW4tR0ImVm9pY2UuTmFtZT1BbXkmWC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1HRE5BSUczTlFZWDJDUFBVWFBNUSUyRjIwMTUxMjI0JTJGdXMtZWFzdC0xJTJGdHRzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAxNTEyMjRUMjAyMjI0WiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmWC1BbXotU2lnbmF0dXJlPTRlZGIxYjU5YzAyNTkwMTM0NDI2NThhMmU3ZTBjOWVlN2I2M2UwODE3ZjBkMDhhNDI4ZjMwNWZmNWJjZmZmNWI8L3VybD48YnVmZmVyc2l6ZT4wPC9idWZmZXJzaXplPjxzZWVrdGltZT4wPC9zZWVrdGltZT48L3Jlc3BvbnNlPjwvVUlDPg=='
5111ec95-6cac-4651-9001-b5525b2f4d8d 8:22:29 PM: error org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 309; The reference to entity “Input.Type” must end with the ‘;’ delimiter. @ line 604
5111ec95-6cac-4651-9001-b5525b2f4d8d 8:22:29 PM: debug Parsing 'index:12, mac:90F1AA0913D2, ip:C0A80014, port:D6D9, headers:SFRUUC8xLjEgMjAwIE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PTRlZGIxYjU5YzAyNTkwMTM0NDI2NThhMmU3ZTBjOWVlN2I2M2UwODE3ZjBkMDhhNDI4ZjMwNWZmNWJjZmZmNWI8L3VybD48YnVmZmVyc2l6ZT4wPC9idWZmZXJzaXplPjxzZWVrdGltZT4wPC9zZWVrdGltZT48L3Jlc3BvbnNlPjwvVUlDPg=='
5111ec95-6cac-4651-9001-b5525b2f4d8d 8:22:29 PM: error org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 309; The reference to entity “Input.Type” must end with the ‘;’ delimiter. @ line 604
5111ec95-6cac-4651-9001-b5525b2f4d8d 8:22:29 PM: debug Parsing 'index:11, mac:90F1AA0913D2, ip:C0A80014, port:D6D9, headers:SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBGcmksIDA5IEphbiAxOTcwIDA0OjM5OjA3IEdNVA0KU2VydmVyOiBTYW1zdW5nLzEuMA0KQ29udGVudC1UeXBlOiB0ZXh0L2h0bWwNCkNvbnRlbnQtTGVuZ3RoOiA3NTQNCkNvbm5lY3Rpb246IGNsb3NlDQpMYXN0LU1vZGlmaWVkOiBGcmksIDA5IEphbiAxOTcwIDA0OjM5OjA3IEdNVA==, body:PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48VUlDPjxtZXRob2Q+VXJsUGxheWJhY2s8L21ldGhvZD48dmVyc2lvbj4xLjA8L3ZlcnNpb24+PHNwZWFrZXJpcD4xOTIuMTY4LjAuMjA8L3NwZWFrZXJpcD48dXNlcl9pZGVudGlmaWVyPjwvdXNlcl9pZGVudGlmaWVyPjxyZXNwb25zZSByZXN1bHQ9Im9rIj48dXJsPmh0dHA6Ly91cmJhbnNhLmNvbS90dHMucGhwP3VyaT1odHRwczovL3R0cy51cy1lYXN0LTEuaXZvbmFjbG91ZC5jb20vQ3JlYXRlU3BlZWNoP0lucHV0LkRhdGE9SGVsbG8lMjBMZXhpJTNGJklucHV0LlR5cGU9dGV4dCUyRnBsYWluJk91dHB1dEZvcm1hdC5Db2RlYz1NUDMmT3V0cHV0Rm9ybWF0LlNhbXBsZVJhdGU9MjIwNTAmUGFyYW1ldGVycy5SYXRlPWRlZmF1bHQmVm9pY2UuTGFuZ3VhZ2U9ZW4tR0ImVm9pY2UuTmFtZT1BbXkmWC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1HRE5BSUczTlFZWDJDUFBVWFBNUSUyRjIwMTUxMjI0JTJGdXMtZWFzdC0xJTJGdHRzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAxNTEyMjRUMjAyMjI0WiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmWC1BbXotU2lnbmF0dXJlPTRlZGIxYjU5YzAyNTkwMTM0NDI2NThhMmU3ZTBjOWVlN2I2M2UwODE3ZjBkMDhhNDI4ZjMwNWZmNWJjZmZmNWI8L3VybD48YnVmZmVyc2l6ZT4wPC9idWZmZXJzaXplPjxzZWVrdGltZT4wPC9zZWVrdGltZT48L3Jlc3BvbnNlPjwvVUlDPg=='
5111ec95-6cac-4651-9001-b5525b2f4d8d 8:22:29 PM: error org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 309; The reference to entity “Input.Type” must end with the ‘;’ delimiter. @ line 604
5111ec95-6cac-4651-9001-b5525b2f4d8d 8:22:29 PM: debug Parsing 'index:12, mac:90F1AA0913D2, ip:C0A80014, port:D6D9, headers:SFRUUC8xLjEgMjAwIE9LDQpEYXRlOiBGcmksIDA5IEphbiAxOTcwIDA0OjM5OjA3IEdNVA0KU2VydmVyOiBTYW1zdW5nLzEuMA0KQ29udGVudC1UeXBlOiB0ZXh0L2h0bWwNCkNvbnRlbnQtTGVuZ3RoOiA3NTQNCkNvbm5lY3Rpb246IGNsb3NlDQpMYXN0LU1vZGlmaWVkOiBGcmksIDA5IEphbiAxOTcwIDA0OjM5OjA3IEdNVA==, body:PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZ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Input.Type” must end with the ‘;’ delimiter. @ line 604

It also states when pressed on the app “Unable to play this track”.

Thanks

I was able to get this to work however I can not get message to work.

Action-radio tune-works
Action-sound-works
Action-message don’t work
Under “Play this message” I type “Terrance Door Open”-do I need to coffeey it differently? My trigger is open close sensor.

Hi @vicjagsingh, SmartThings text to speech function have some problems, I suggest you to use some of the alternatives, please sign up to voice rss and get your api key, once you have write the api key your message will play fine.

That’s what I did and still nothing…

I tried both Icons And Voice RSS and neither of them play. The Smarthings choice plays, but it is very delayed.

I’ve got the same issue… neither 3rd party service works

This looked like a tempting option since the alternative “Big Talker” SmartApp isn’t working as intended for me but after reading through the 31 posts so far, this option doesn’t seem any better and far more complicated for TTS what is just what I want, no radio stations or anything. :frowning:

I do want to say that I greatly appreciate the work they are all trying as alternatives to the broken ST TTS and I’m disgusted that ST still hasn’t fixed this issue that has been around across several threads for a very long time.

1 Like

Hi,

I tried your SmartApp because I just want to play a specified track stored on my local Synology NAS server when a certain SmartThings event occurs. It seems to me this should be much quicker than going out to the internet and I could easily download or prerecord tracks that I want to use. However your App only seems to cater for playing a track from a radio station.

Is there any chance you could provide an option to play a track stored on a NAS, either directly by folder/filename or by sending it through DLNA from the NAS DLNA server specified by the user to the DLNA renderer.

(PS where are the predefined sounds (barking dogs, bell etc) coming from ? are they stored on a server on the internet, or are they stored on the SmartHub, or somewhere else ?)

@Spinny - I’m looking for the same thing. Right now I’m trying the “speaker control” app. It will play the “track” which is current on your DLNA queue - so if you set it up that would be your preferred track. Also, yes the Sonos “dog bark” etc comes from Amazon, so it’s slow.

@ule - since 1/1/2016, Radiotunes no longer allows streaming from the non-webapp, so that’s too bad. I had it set up to play xmas songs when I came home, but it won’t do it now other than send an announcement about their change in streaming policy. Oh well.

Hi @Patrick_Callahan, sorry to hear about that, I have premium account and I have not that message, I have tried the test account and now I known about the problem, I´m going to decide if I remove the Radio Tunes features or I leave it to premium users, If you known about other radio station online like RT, I could try to add to this smartApp,