RELEASE Generic Media Renderer (DLNA Speakers). Cheap Sonos Alternative (Update V2)

hi, further note i can see that onall my sonos’ i can see the value of rccurl is

/MediaRenderer/GroupRenderingControl/Control

and when this is used the level field returned is actually blank, currently my sonos’s aren’t in a group, and i’m pretty sure they weren’t when they were created (i’m just gonna test that now as i can see that rccurl is defined at the point of creation from the parent smartapp)

{
    "station": "SmartThings Message",
    "name": "SmartThings Message",
    "artist": "",
    "album": "SmartThings Catalog",
    "trackNumber": "1",
    "status": "stopped",
    "level": "",
    "uri": "http://tts.urbansa.com/tts.php?1458762652769=Stuart%2520Is%2520Home%253F%26Input.Type%3Dtext%252Fplain%26OutputFormat.Codec%3DMP3%26OutputFormat.SampleRate%3D22050%26Parameters.Rate%3Dmedium%26Voice.Language%3Den-GB%26Voice.Name%3DBrian%26X-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Credential%3DGDNAJOWNTAKWOZ5S7S7Q%252F20160323%252Fus-east-1%252Ftts%252Faws4_request%26X-Amz-Date%3D20160323T195052Z%26X-Amz-SignedHeaders%3Dhost%26X-Amz-Signature%3D2f6ab1f8777d930c98bc10a24bb8f52d0173510ee6d5b829ad6c8b7db27c636c&ts=1458762653070",
    "trackUri": "http://tts.urbansa.com/tts.php?1458762652769=Stuart%2520Is%2520Home%253F%26Input.Type%3Dtext%252Fplain%26OutputFormat.Codec%3DMP3%26OutputFormat.SampleRate%3D22050%26Parameters.Rate%3Dmedium%26Voice.Language%3Den-GB%26Voice.Name%3DBrian%26X-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Credential%3DGDNAJOWNTAKWOZ5S7S7Q%252F20160323%252Fus-east-1%252Ftts%252Faws4_request%26X-Amz-Date%3D20160323T195052Z%26X-Amz-SignedHeaders%3Dhost%26X-Amz-Signature%3D2f6ab1f8777d930c98bc10a24bb8f52d0173510ee6d5b829ad6c8b7db27c636c&ts=1458762653070",
    "transportUri": "http://tts.urbansa.com/tts.php?1458762652769=Stuart%2520Is%2520Home%253F%26Input.Type%3Dtext%252Fplain%26OutputFormat.Codec%3DMP3%26OutputFormat.SampleRate%3D22050%26Parameters.Rate%3Dmedium%26Voice.Language%3Den-GB%26Voice.Name%3DBrian%26X-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Credential%3DGDNAJOWNTAKWOZ5S7S7Q%252F20160323%252Fus-east-1%252Ftts%252Faws4_request%26X-Amz-Date%3D20160323T195052Z%26X-Amz-SignedHeaders%3Dhost%26X-Amz-Signature%3D2f6ab1f8777d930c98bc10a24bb8f52d0173510ee6d5b829ad6c8b7db27c636c&ts=1458762653070",
    "enqueuedUri": "",
    "metaData": "<DIDL-Lite xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" xmlns:dlna=\"urn:schemas-dlna-org:metadata-1-0/\"><item id=\"1\" parentID=\"1\" restricted=\"1\"><upnp:class>object.item.audioItem.audioBroadcast</upnp:class><upnp:album>SmartThings Catalog</upnp:album><upnp:artist>SmartThings</upnp:artist><upnp:albumArtURI>http://graph.api.smartthings.com/api/devices/icons/st.Entertainment.entertainment2-icn?displaySize=2x</upnp:albumArtURI><dc:title>SmartThings Message</dc:title><res protocolInfo=\"http-get:*:audio/mpeg:*\" >http://tts.urbansa.com/tts.php?1458762652769=Stuart%2520Is%2520Home%253F%26Input.Type%3Dtext%252Fplain%26OutputFormat.Codec%3DMP3%26OutputFormat.SampleRate%3D22050%26Parameters.Rate%3Dmedium%26Voice.Language%3Den-GB%26Voice.Name%3DBrian%26X-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Credential%3DGDNAJOWNTAKWOZ5S7S7Q%252F20160323%252Fus-east-1%252Ftts%252Faws4_request%26X-Amz-Date%3D20160323T195052Z%26X-Amz-SignedHeaders%3Dhost%26X-Amz-Signature%3D2f6ab1f8777d930c98bc10a24bb8f52d0173510ee6d5b829ad6c8b7db27c636c&amp;ts=1458762653070 </res></item> </DIDL-Lite>"
}

Hi @Fuzzyligic, could you post the logs when you change the value in the slider. Thanks

@ule so i have just confirmed, when a Sonos is not in a group and added via the smartapp the rccurl is populated with /MediaRenderer/GroupRenderingControl/Control which when used does not return a level value

but /MediaRenderer/RenderingControl/Control returns a value.

the section of the logs when trying to use the volume slider is as follows, i also tried muting & unmuting

aae0819e-c5d4-4a26-ae1a-0c01a5414f45  8:49:52 PM: trace Refresh()

as you can see there is nothing to show there

Hi @fuzzyligic, Good news, could you confirm the other variables are populating in the correct manner when the speaker is in group?

I can Hardcode the control url when a sonos device is grouped, sonos does not change the control url like many other mediarenderers.

Thanks

ok so ive just re-added the sonos when in a group and it returns identical fields to when the device is not in a group

avtcurl: /MediaRenderer/AVTransport/Control
avteurl: /MediaRenderer/AVTransport/Event
currentStatus: paused
dni: C0A80A4D:0578
model: Sonos PLAY:5
rccurl: /MediaRenderer/GroupRenderingControl/Control
rceurl: /MediaRenderer/GroupRenderingControl/Event
sidNumber: 0
subscriptionId: RINCON_000E58868EAA01400_sub0000000932
subscriptionId1: RINCON_000E58868EAA01400_sub0000000933
udn: uuid:RINCON_000E58868EAA01400_MR

Thanks @Fuzzyligic, I will add a fix in the next release.

1 Like

let me know when, or PM me the code if you want me to test prior to you releasing

I don’t understand…

If populating rccurl as “/MediaRenderer/RenderingControl/Control” will solve the issue, why do we need another solution ?
You said it breaks all other standard DLNA mediarenderer device.
You mean , if this is hardcoded, Sonos speaker works but other DLNA mediarenderer devices fail. Is that correct ?

If so, as a workaround we can create a copy of the mediarenderer device and use it specifically for Sonos devices.

???

I’ve tried this now and I can confirm that “/MediaRenderer/RenderingControl/Control” solves the issue if I replace all rccurl occurance with it.

if you want to use that until a new version is released that is upto you. There is a more eloquent way of doing this via the discovery section of the smartapp of hardcoding this when a sonos is is discovered but not when a sonos is device is discovered.

Hi , I have release a method to speech to alexa , I use an android phone, try it

I could use some assistance. I have enabled upnp on my router Cisco E3000. I am using a Jongo S3 speaker. I have followed the instructions and created the App and the Device type Handler. I am also using the Smart Alarm app and have enabled custom notifications on the Jongo S3 but the text to speach is not coming through, I can see in the recent events of the Jongo that somethings is trying to fire but nothing comes through. Any Ideas, did I do something wrong?

I am having some issues with my Kodi on a tablet setup (using Network Audio Remote for Android as CP). It was working fine over the last couple of days. As of this morning, any time I open up the Things portion on my ST app and try to open the speaker/renderer, ST app crashes every time. I know ST is having issues galore over the past several weeks and they are in the process of resolving them now. None of my other 30+ things do this when I open up the thing in detail in the app (lights, switches, sensors, etc.). I have uninstalled and reinstalled several times this morning. I have tried using BubbleUPnP and others on my tablet to no avail and they’re not even discovered. Kodi is discovered quickly, as it always has been, and try to re-setup the speaker, but just keeps crashing. The funny this is that I can manually play a song on my tablet and view the list of things on the ST app and it will show my Kodi speaker thing as “playing”. But as soon as I touch it to open up the player it shows a white screen and crashes. Any ideas or should we chalk it up to the ST issues?

On another note, anyone else have a good DLNA software-on-a-tablet setup for music and notifications? Kodi and NAR seem to be okay, but just curious if there was something better. Thanks in advance!

Hi @CodyWillner,

  1. Have you te last release of generic MR?
  2. Could you send me the logs when the app crash
  3. is there a list with the soft players in
    Working Speakers (44 Devices Confirmed , 29 waiting Confirmation) last addition: Klipsch Stadium, Help Us to increase the list

Could you possibly help me out with my issue above.

Hi @GunGeek

  1. Could you test with the smartapp media renderer events

  2. the speaker can play some sound (from mediarenderer events apps)?

  3. the text to speech is working ?

@ule

Text to speech functions which are using Ivona TTS stopped working.
Did you make any change that could affect this ?

the URL formed from the app is as below:

x-rincon-mp3radio://tts.urbansa.com/tts2.php?1459151397843=merhaba%253F%26Input.Type%3Dtext%252Fplain%26OutputFormat.Codec%3DMP3%26OutputFormat.SampleRate%3D22050%26Parameters.Rate%3Dmedium%26Voice.Language%3Dtr-TR%26Voice.Name%3DFiliz%26X-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Credential%3DGDNAIOXILIXY4ZVMTX4A%252F20160328%252Fus-east-1%252Ftts%252Faws4_request%26X-Amz-Date%3D20160328T084957Z%26X-Amz-SignedHeaders%3Dhost%26X-Amz-Signature%3D54888341caa6833b2a27d2c17040a01fa0b1edfd7a818acba031315dbf3b8c5e

note that I’ve changed the key in it because this is public.

Thanks.

@ule

I think I have a clue on what happened.
According to my Ivona usage statistics, I could not use Ivona after 27th (sunday) midnight.
That’s when DST starts in my country (Turkey)
So it might be an issue of signing POST and GET requests with correct date.
What do you think ?

What is the tts.php doing in this transaction ? Does it use an hardcoded timezone / DST setting ?

Thanks.

Hi @mrmrmrmr, update to last release. it’s working fine

Have you included Ivona TTS in your device handler ?
Because that’s how I’m using it. I don’t use the DLNA events.
Can you tell me what you’ve changed in the Ivona part ?