2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

98_DLNARenderer: fix reading updates

git-svn-id: https://svn.fhem.de/fhem/trunk@14143 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
dominikkarall 2017-04-30 13:43:24 +00:00
parent 8bdc8a6f6f
commit 5074aaa690

View File

@ -2,6 +2,9 @@
# Author: dominik.karall@gmail.com # Author: dominik.karall@gmail.com
# $Id$ # $Id$
# #
# v2.0.5 - 20170430
# - BUGFIX: fix "readings not updated"
#
# v2.0.4 - 20170421 # v2.0.4 - 20170421
# - FEATURE: support $readingFnAttributes # - FEATURE: support $readingFnAttributes
# - BUGFIX: fix some freezes # - BUGFIX: fix some freezes
@ -184,7 +187,7 @@ sub DLNARenderer_Define($$) {
if(@param < 3) { if(@param < 3) {
#main #main
$hash->{UDN} = 0; $hash->{UDN} = 0;
my $VERSION = "v2.0.4"; my $VERSION = "v2.0.5";
$hash->{VERSION} = $VERSION; $hash->{VERSION} = $VERSION;
Log3 $hash, 3, "DLNARenderer: DLNA Renderer $VERSION"; Log3 $hash, 3, "DLNARenderer: DLNA Renderer $VERSION";
DLNARenderer_setupControlpoint($hash); DLNARenderer_setupControlpoint($hash);
@ -1330,7 +1333,6 @@ sub DLNARenderer_addedDevice {
readingsSingleUpdate($DLNARendererHash, "presentationURL", $dev->presentationURL(), 1); readingsSingleUpdate($DLNARendererHash, "presentationURL", $dev->presentationURL(), 1);
readingsSingleUpdate($DLNARendererHash, "manufacturer", $dev->manufacturer(), 1); readingsSingleUpdate($DLNARendererHash, "manufacturer", $dev->manufacturer(), 1);
if(!$foundDevice) {
#register callbacks #register callbacks
#urn:upnp-org:serviceId:AVTransport #urn:upnp-org:serviceId:AVTransport
if(DLNARenderer_upnpGetService($DLNARendererHash, "AVTransport")) { if(DLNARenderer_upnpGetService($DLNARendererHash, "AVTransport")) {
@ -1344,7 +1346,6 @@ sub DLNARenderer_addedDevice {
if(DLNARenderer_upnpGetService($DLNARendererHash, "SpeakerManagement")) { if(DLNARenderer_upnpGetService($DLNARendererHash, "SpeakerManagement")) {
$DLNARendererHash->{helper}{speakerManagementSubscription} = DLNARenderer_upnpGetService($DLNARendererHash, "SpeakerManagement")->subscribe(sub { DLNARenderer_subscriptionCallback($DLNARendererHash, @_); }, 1); $DLNARendererHash->{helper}{speakerManagementSubscription} = DLNARenderer_upnpGetService($DLNARendererHash, "SpeakerManagement")->subscribe(sub { DLNARenderer_subscriptionCallback($DLNARendererHash, @_); }, 1);
} }
}
#set online #set online
readingsSingleUpdate($DLNARendererHash,"presence","online",1); readingsSingleUpdate($DLNARendererHash,"presence","online",1);