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

dth_speakers
dth_voice
dth_alerts

(ozzy) #950

I don’t know what I’m doing wrong with “MediaRenderer” but I don’t get any sound using this smart app and device handler. But after many hours I found “speaker notify with sound” installed that and it worked at the 1st attempt. Why would one work and not the other?


(Gene Clark) #951

Has anyone done this setup with FABRIQ speakers? The device showed up in the media renderer Connect smartapp, but none of the notifications are coming through. I’ve got webCoRE, Big Talker and another smartapp all setup to speak notifications and none work. Not sure what I’m doing wrong.


(jkp) #952

the fabriq speakers work for me through webCoRE. post an image of your piston please so we can see what you are doing.


(Pedro Lemos) #953

Hey Guys

So I’ve playing around with these for a couple of hours with mixed end results.

So I’m trying to connect my Sony h.ear go (SRS-HG1).

I installed the render, it detects it and automatically adds the thing.
So far so good.

I installed, render events and big talker and tried to play a sound (dog barking) or TTS… No luck just silent.

Check all settings and thing seems as described as OK on this thread… Mystery…
Download the Technics to check if the device was working perfectly through dlna and to check if it was not an issue with the speaker. Loaded my. Mp3 and fired it up to the speaker and Voila nice sound out of the speakers. So not an issue with Dlna

Back to ST App. First thing I noticed is that now the mp3 is pre-loaded inside the thing. I hit play and Voila… Sound.
Looks promising…
Or so I thought tried again with the smartapps and the triggers and no sound. Neither beep, dogs barking or TTS.

Any clues?


(Ule) #954

Hi @somel , I can speak about MediaRenderer Events, the app have several options to use

Try to test with these settings.

Action? = Sound

Play this Sound? = Dogs Braking

On this Speaker = “your speaker”

Press save to update the smart app.

Press the play button of the Mediarenderer Event in smartapps list to test the sound.


(Pedro Lemos) #955

Hi @ule

I tried exactly that still no sound…hence why I said no dogs barking.

It might be worth mentioning that even though there is no sound, when you activate the trigger you can see the status of the thing change to playing.

So I don’t believe that the issue is on the smartapp, might be very wrong as my knowledge is near null and I’m just applying deductive logic, but in how the handler sends the files to the speaker.

To note that I have tried send the files through dlna without a server in the between what leads me to think that the speaker as some render capabilities.

But I don’t know what to think to be honest.

The fact that after the file was sent to the speaker through the dlna player that it shows in the ST thing and you can manage it through there is quite interesting. Hence I believe the missing link is in how the files are transferred…


(Ule) #956

Hi , try to insert the following line in the DLNA Player DH code in line 921

log.trace “mediaRendererAction($action, $service, $path, $body)”

Check the logs and play the sound in media renderer events. send the logs from the player to see what is the app sending.


(Pedro Lemos) #957

@ule

That does not seem the correct line…
For me line 921 is the private function for the party mode…

Can you confirm?

Or if it is not too much to ask if you send me the full groovy code I can update the full device handler


(Ule) #958

I send you the example.
warning : the forum change the double quotes by other symbol, just take care.

Old

private mediaRendererAction(String action, String service, String path, Map body = [InstanceID:0, Speed:1]) {
def urn = service.contains(“Party”)?“urn:schemas-sony-com:service:$service:1”:"urn:schemas-upnp-org:service:$service:1"
def result = new physicalgraph.device.HubSoapAction(
path: path ?: “/MediaRenderer/$service/Control”,
urn: urn,
action: action,
body: body,
headers: [Host:getHostAddress(), CONNECTION: “close”]
)
result
}

New

private mediaRendererAction(String action, String service, String path, Map body = [InstanceID:0, Speed:1]) {
log.trace "mediaRendererAction($action, $service, $path, $body)"
def urn = service.contains(“Party”)?“urn:schemas-sony-com:service:$service:1”:"urn:schemas-upnp-org:service:$service:1"
def result = new physicalgraph.device.HubSoapAction(
path: path ?: “/MediaRenderer/$service/Control”,
urn: urn,
action: action,
body: body,
headers: [Host:getHostAddress(), CONNECTION: “close”]
)
result
}


(Pedro Lemos) #959
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:57: trace Skipping event generation for sound file http://s3.amazonaws.com/smartapp-media/sonos/dogs.mp3?ts=1516076934825
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:57: trace Skipping event generation for sound file http://s3.amazonaws.com/smartapp-media/sonos/dogs.mp3?ts=1516076934825
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:56: trace Skipping event generation for sound file http://s3.amazonaws.com/smartapp-media/sonos/dogs.mp3?ts=1516076934825
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:55: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:55: trace mediaRendererAction(SetAVTransportURI, AVTransport, /upnp/control/AVTransport, [InstanceID:0, CurrentURI:http://192.168.1.72:49162/MEDIA-018-a-1, CurrentURIMetaData:<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:arib="urn:schemas-arib-or-jp:elements-1-0/" xmlns:av="urn:schemas-sony-com:av"> <item id="1-media-a" parentID="a" restricted="1"><dc:title>fifa_60</dc:title><upnp:class>object.item.audioItem</upnp:class><upnp:artist>&lt;unknown&gt;</upnp:artist><upnp:album>Download</upnp:album><res protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01100000000000000000000000000000" duration="0:01:02" size="1002323">http://192.168.1.72:49162/MEDIA-018-a-1</res><res protocolInfo="http-get:*:audio/L16;channels=2;rate=48000:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01100000000000000000000000000000" duration="0:01:02" sampleFrequency="48000" nrAudioChannels="2">http://192.168.1.72:49162/MEDIA-018-a-1-c-36-2</res></item></DIDL-Lite> ])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:55: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:55: trace mediaRendererAction(Play, AVTransport, /upnp/control/AVTransport, [InstanceID:0, Speed:1])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:55: trace mediaRendererAction(SetAVTransportURI, AVTransport, /upnp/control/AVTransport, [InstanceID:0, CurrentURI:http://s3.amazonaws.com/smartapp-media/polly-tts/salli/light_tv_is_now_on.mp3?ts=1516076935349, CurrentURIMetaData:])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:55: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:54: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:54: trace mediaRendererAction(SetAVTransportURI, AVTransport, /upnp/control/AVTransport, [InstanceID:0, CurrentURI:http://192.168.1.72:49162/MEDIA-018-a-1, CurrentURIMetaData:<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:arib="urn:schemas-arib-or-jp:elements-1-0/" xmlns:av="urn:schemas-sony-com:av"> <item id="1-media-a" parentID="a" restricted="1"><dc:title>fifa_60</dc:title><upnp:class>object.item.audioItem</upnp:class><upnp:artist>&lt;unknown&gt;</upnp:artist><upnp:album>Download</upnp:album><res protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01100000000000000000000000000000" duration="0:01:02" size="1002323">http://192.168.1.72:49162/MEDIA-018-a-1</res><res protocolInfo="http-get:*:audio/L16;channels=2;rate=48000:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01100000000000000000000000000000" duration="0:01:02" sampleFrequency="48000" nrAudioChannels="2">http://192.168.1.72:49162/MEDIA-018-a-1-c-36-2</res></item></DIDL-Lite> ])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:54: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:54: trace mediaRendererAction(Play, AVTransport, /upnp/control/AVTransport, [InstanceID:0, Speed:1])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:54: trace mediaRendererAction(SetAVTransportURI, AVTransport, /upnp/control/AVTransport, [InstanceID:0, CurrentURI:http://s3.amazonaws.com/smartapp-media/sonos/dogs.mp3?ts=1516076934825, CurrentURIMetaData:])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:54: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:53: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:53: trace mediaRendererAction(SetAVTransportURI, AVTransport, /upnp/control/AVTransport, [InstanceID:0, CurrentURI:http://192.168.1.72:49162/MEDIA-018-a-1, CurrentURIMetaData:<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" xmlns:arib="urn:schemas-arib-or-jp:elements-1-0/" xmlns:av="urn:schemas-sony-com:av"> <item id="1-media-a" parentID="a" restricted="1"><dc:title>fifa_60</dc:title><upnp:class>object.item.audioItem</upnp:class><upnp:artist>&lt;unknown&gt;</upnp:artist><upnp:album>Download</upnp:album><res protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01100000000000000000000000000000" duration="0:01:02" size="1002323">http://192.168.1.72:49162/MEDIA-018-a-1</res><res protocolInfo="http-get:*:audio/L16;channels=2;rate=48000:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01100000000000000000000000000000" duration="0:01:02" sampleFrequency="48000" nrAudioChannels="2">http://192.168.1.72:49162/MEDIA-018-a-1-c-36-2</res></item></DIDL-Lite> ])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:53: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:53: trace mediaRendererAction(Play, AVTransport, /upnp/control/AVTransport, [InstanceID:0, Speed:1])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:53: trace mediaRendererAction(SetAVTransportURI, AVTransport, /upnp/control/AVTransport, [InstanceID:0, CurrentURI:http://s3.amazonaws.com/smartapp-media/polly-tts/salli/light_tv_is_now_off.mp3?ts=1516076933687, CurrentURIMetaData:])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5  04:28:53: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])

This was the output in code quote marks


(Pedro Lemos) #960

The forum filter just blocked my response lol…

Until is approved you can check for the next 24h here:
https://pastebin.com/H98dg8CT

@ule Thanks for the help… It seems it is skipped


(Ule) #961

Hi, looks fine, but could you clean the log and just send 1 time the event.

Thanks


(Pedro Lemos) #962

@ule
That log that I posted is exactly that just one click.
1 click triggers the render events (dogs,) and the other TTS.

The code will look much better as soon my original post is up. I used markdowns that will allow easy reading


(Ule) #963

Hi.

I can see several request to set an audio.

http://192.168.1.72:49162/MEDIA-018-a-1,

http://s3.amazonaws.com/smartapp-media/sonos/dogs.mp3?ts=1516076934825,

http://192.168.1.72:49162/MEDIA-018-a-1,

http://s3.amazonaws.com/smartapp-media/polly-tts/salli/light_tv_is_now_on.mp3?ts=1516076935349,

http://192.168.1.72:49162/MEDIA-018-a-1,

1.- I think you have 2 smart things apps sending the audio to same speakers.

2.- You have a smart phone app open, but that app is trying to take control over speaker, when Smartthings try to set an audio, the phone app try to set it’s own audio and cancel the st audio, try to use some phone apps who does not crash with smartthings, in first post I talk about some compatible control points.

Ule


(Pedro Lemos) #964

Hi @ule

The app in xxx.xxx.1.72 is the technics app.
Killing the app and the tablet to that matter does not solve the issue.
In this particular instance it seems that your device handler triggers to restore play of last track (that is no longer available, as device not on the network anymore). If this is the case of the issue is being caused by the handler itself.

Update: not sure if it is the handler or the renderer one of them it’s at fault.
I remove both smartapp (big talker and events) and triggered play on the handler. No sound.

This is the log that shows same behaviour…
ae3ebb81-0992-4dfe-a358-0cb4cea490c5 13:21:03: trace Skipping event generation for sound file http://s3.amazonaws.com/smartapp-media/sonos/dogs.mp3?ts=1516108634630
75c6672f-f3a7-4ed9-b896-4eb448a41360 13:21:00: debug getChildDevices(false), children=1
ae3ebb81-0992-4dfe-a358-0cb4cea490c5 13:21:00: trace mediaRendererAction(X_GetState, Party, /Party_Control, [:])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5 13:21:00: trace mediaRendererAction(GetPositionInfo, AVTransport, /upnp/control/AVTransport, [InstanceID:0])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5 13:21:00: trace mediaRendererAction(GetTransportSettings, AVTransport, /upnp/control/AVTransport, [InstanceID:0])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5 13:21:00: trace mediaRendererAction(GetVolume, RenderingControl, /upnp/control/RenderingControl, [InstanceID:0, Channel:Master])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5 13:21:00: trace mediaRendererAction(GetTransportInfo, AVTransport, /upnp/control/AVTransport, [InstanceID:0])
ae3ebb81-0992-4dfe-a358-0cb4cea490c5 13:20:54: trace mediaRendererAction(Play, AVTransport, /upnp/control/AVTransport, [InstanceID:0, Speed:1])
47d76404-49ad-4d23-b3b1-cffc2f91fb0a 13:20:49: info SHM getInitialData 0.058 (00) incidents:00, locationId:ba9046a1-20a6-4f8f-b057-2e4d1732cc37
47d76404-49ad-4d23-b3b1-cffc2f91fb0a 13:20:49: debug summaryData: [[icon:indicator-dot-green, iconColor:#79b821, value:Armed (Stay)], [icon:indicator-dot-green, iconColor:#79b821, value:Everything OK, heroInfo:[heroStatus:ok, heroMessage:Everything OK]]] - [[icon:indicator-dot-green, value:Armed (Stay), iconColor:#79b821], [icon:indicator-dot-green, heroInfo:[heroStatus:ok, heroMessage:Everything OK], value:Everything OK, iconColor:#79b821]]


(Pedro Lemos) #965

@ule diz you had a chance to look into it?


(Ule) #966

the last log you have, does not show the full event process, I suggest you , uninstall all st apps who send audio to speakers, then use media renderer events, and send me the logs of the speaker, just of the peaker, not like your last post who show several devices.


(Pedro Lemos) #967

@ule,
did as suggested.

Logs

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:04: trace Skipping event generation for sound file http://s3.amazonaws.com/smartapp-media/sonos/dogs.mp3?ts=1516392362115

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:04: trace Skipping event generation for sound file http://s3.amazonaws.com/smartapp-media/sonos/dogs.mp3?ts=1516392362115

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:02: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:02: trace mediaRendererAction(SetAVTransportURI, AVTransport, /upnp/control/AVTransport, [InstanceID:0, CurrentURI:http://192.168.1.72:49162/MEDIA-018-a-1, CurrentURIMetaData: dc:title</dc:title>upnp:classobject.item.audioItem</upnp:class>dc:creator</dc:creator>upnp:artist</upnp:artist>upnp:album</upnp:album>upnp:genre</upnp:genre>av:liveTypeMUSIC_SERVICE</av:liveType> ])

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:02: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:02: trace mediaRendererAction(Play, AVTransport, /upnp/control/AVTransport, [InstanceID:0, Speed:1])

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:02: trace mediaRendererAction(SetAVTransportURI, AVTransport, /upnp/control/AVTransport, [InstanceID:0, CurrentURI:http://s3.amazonaws.com/smartapp-media/sonos/dogs.mp3?ts=1516392362115, CurrentURIMetaData:])

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:02: trace mediaRendererAction(Stop, AVTransport, /upnp/control/AVTransport, [InstanceID:0])

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:00: trace mediaRendererAction(X_GetState, Party, /Party_Control, [:])

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:00: trace mediaRendererAction(GetPositionInfo, AVTransport, /upnp/control/AVTransport, [InstanceID:0])

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:00: trace mediaRendererAction(GetTransportSettings, AVTransport, /upnp/control/AVTransport, [InstanceID:0])

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:00: trace mediaRendererAction(GetVolume, RenderingControl, /upnp/control/RenderingControl, [InstanceID:0, Channel:Master])

ae3ebb81-0992-4dfe-a358-0cb4cea490c5 20:06:00: trace mediaRendererAction(GetTransportInfo, AVTransport, /upnp/control/AVTransport, [InstanceID:0])


#968

I am curious to know how DLNA on my TV would work. Let’s say I am watching TV. Can I have my Samsung TV play announcements from Smart Things when they happen. So basically, I could be watching the morning news and I would have the audio interrupted by a sound announcement that ‘Doorbell Just Rung’.


(Andy - United Kingdom) #969

I tried it with my sony tv.
When ST wants to announce things it’s not just the audio that goes off… the picture does too and then switches to the DNLA setting in the TV.
Also, with my TV at least, it didn’t change back…

I, like you, was really hoping it would just replace the audio on the TV… no such luck.
Of course YMMV