Quickstart¶
IoT-UPnP require python 3.x. It use the following modules:
- asyncio: for the main event loop
- ssdp: base library for SSDP (a component of UPnP)
- netifaces: Network interfaces discovery (to retrieve IPs)
They are tree important objects:
-
class
upnp.
Announcer
(device, httpPort=5000, netBind='0.0.0.0')¶ Annoncer main class
-
class
upnp.
Device
(obj=None)¶ An UPnP device on the Network
-
class
upnp.
Service
(obj=None)¶ A service on a device
All objects can be set with theirs attributes or by passing a dict on the contructor.
Goal¶
UPnP device have services that need to be announced. Services can be controlled and work as SOAP api. The class Announcer is used to anounce a device which have one or many services.
On UPnP references, a device can also have many embedded devices.
To make a UPnP device, you need to make a service, add this service to a device and them, announce this device as a root device.