Own network protocol

Florian Schweikert kelvan at logic.at
Mon Dec 29 22:30:51 EST 2014


On 27/12/14 10:56, pfranken85 at gmail.com wrote:
> What kind of protocol do you recommend for this? UDP or TCP? Do you recommend the use of frameworks such as twisted?

Take a look at CoAP[1], an open IETF protocol for IoT.
You can make your hardware accessible through "resources", it's restful.
So a simple GET on the led resource returns the status of the led,
POST/PUT a new status to the resource can trigger the led.
Clients can use "observe" to get sttus changes of a resource.
For python2 there is txthings[2], based on twisted.
There is a new fork for python3 based on asyncio called aiocoap[3], with
no extra dependencies if python>=3.4 is used.

Futhermore there is a plugin[4] to access CoAP resources directly in
Firefox.

cheers,
Florian

[1] http://coap.technology/
[2] https://github.com/siskin/txThings/
[3] http://aiocoap.readthedocs.org/en/latest/
[4] https://addons.mozilla.org/en-US/firefox/addon/copper-270430/



More information about the Python-list mailing list