bontiv / iot-upnp Goto Github PK
View Code? Open in Web Editor NEWPython library to annonce UPnP device on network (can be shown on Windows Explorer)
Home Page: https://bontiv.github.io/iot-upnp/
License: GNU General Public License v3.0
Python library to annonce UPnP device on network (can be shown on Windows Explorer)
Home Page: https://bontiv.github.io/iot-upnp/
License: GNU General Public License v3.0
I'm building an IoT system that is controlled via a webapp served from the device itself, and I want to publish the URL using uPnP. I tried to use your module, but I'm unable to see it from the uPnP programs I used. Currently I tried VLC under a PC and DMS Explorer in Android, but neither of them shows my device.
The problem is that I don't know if they are those programs who are filtering my device, or if it is me, configuring incorrectly your module.
Could you add some "classic" examples to the documentation? Specifically it would be great to have how to publish an URL with the web control of the device.
Thanks.
Bonjour, the following proposed commit fixes the following issue seen with python3.7:
iot-upnp/upnp/HTTP.py:170: RuntimeWarning: coroutine 'StreamReader.readline' was never awaited
header = yield from reader.readline()
Task exception was never retrieved
future: <Task finished coro=<HttpServer.InConnection() done, defined at /Users/divy/workareas/iot-upnp/upnp/HTTP.py:169> exception=TypeError("cannot 'yield from' a coroutine object in a non-coroutine generator")>
commit 8d2b97fee71dab2fd15206459fae22a61e6ffcf7 (HEAD -> asyncio_decorator)
Author: Divy Le Ray <[email protected]>
Date: Sun Sep 9 11:52:02 2018 -0700
Add a asyncio decorator to avoid the following error seen with python3.7:
iot-upnp/upnp/HTTP.py:170: RuntimeWarning: coroutine 'StreamReader.readline' was never awaited
header = yield from reader.readline()
Task exception was never retrieved
future: <Task finished coro=<HttpServer.InConnection() done, defined at /Users/divy/workareas/iot-upnp/upnp/HTTP.py:169> exception=TypeError("cannot 'yield from' a coroutine object in a non-coroutine generator")>
Signed-off-by: Divy Le Ray <[email protected]>
diff --git a/upnp/HTTP.py b/upnp/HTTP.py
index 3044777..11eb2cd 100644
--- a/upnp/HTTP.py
+++ b/upnp/HTTP.py
@@ -166,6 +166,7 @@ class HttpServer:
def __init__(self, config):
self.config = config
+ @asyncio.coroutine
def InConnection(self, reader, writer):
header = yield from reader.readline()
cheaders = header.decode('latin1').strip()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.