coherence.upnp.core.device (module)

Devices

This module contains two classes describing UPnP devices.

Device

The base class for all devices.

RootDevice

A device representing a root device.

class Device(parent=None, udn=None)[source]

Bases: eventdispatcher.eventdispatcher.EventDispatcher, coherence.log.LogAble

Represents a UPnP’s device, but this is not a root device, it’s the base class used for any device. See RootDevice if you want a root device.

    Changed in version 0.9.0:
  • Migrated from extern.louie to EventDispatcher

  • The emitted events changed:

    • Coherence.UPnP.Device.detection_completed => device_detection_completed
    • Coherence.UPnP.Device.remove_client => device_remove_client
  • New events: device_service_notified, device_got_client

  • Changes some class variables to be EventDispatcher’s properties

logCategory = 'device'
client
icons
devices
detection_completed
as_dict()[source]
remove(*args)[source]
receiver(*args, **kwargs)[source]
service_detection_failed(device)[source]
get_id()[source]
get_uuid()[source]
get_embedded_devices()[source]
get_embedded_device_by_type(type)[source]
get_services()[source]
get_service_by_type(type)[source]
add_service(service)[source]
remove_service_with_usn(service_usn)[source]
add_device(device)[source]
get_friendly_name()[source]
get_device_type()[source]
get_friendly_device_type()[source]
get_markup_name()[source]
get_device_type_version()[source]
set_client(client)[source]
get_client()[source]
on_client(*args)[source]

Automatically triggered whenever a client is set or changed. Emmit an event notifying that the client has changed.

New in version 0.9.0.

renew_service_subscriptions()[source]

iterate over device’s services and renew subscriptions

unsubscribe_service_subscriptions()[source]

iterate over device’s services and unsubscribe subscriptions

parse_device(d)[source]
get_location()[source]
get_usn()[source]
get_upnp_version()[source]
get_urlbase()[source]
get_presentation_url()[source]
get_parent_id()[source]
make_fullyqualified(url)[source]
as_tuples()[source]
class RootDevice(infos)[source]

Bases: coherence.upnp.core.device.Device

Description for a root device.

    Changed in version 0.9.0:
  • Migrated from extern.louie to EventDispatcher

  • The emitted events changed:

    • Coherence.UPnP.RootDevice.detection_completed => root_device_detection_completed
    • Coherence.UPnP.RootDevice.removed => root_device_removed
root_detection_completed
remove(*args)[source]
get_usn()[source]
get_st()[source]
get_location()[source]
get_upnp_version()[source]
get_urlbase()[source]
get_host()[source]
is_local()[source]
is_remote()[source]
device_detect(*args, **kwargs)[source]
add_device(device)[source]
get_devices()[source]
parse_description()[source]
make_fullyqualified(url)[source]

Be aware that this function returns a byte string