Python to python (django) communication on Yun

Hi all,

I am currently trying to build a home automation solution using arduino. I have bought an arduino Yun. I tried to program using the arduino (atmel) side of the Yun, but quickly ran out of memory. Hence, I quickly moved onto writing my code on the linino side. I say quickly, I first had to learn python, not an easy thing to do. The arduino then controls some arduino unos very radio frequencies (433 MHz where I live). Anyway, I have written the arduino code, a python script to control the house, and a django web server. I have great communication between the arduino (even with cheapest RF modules), the arduino and linino via the bridge protocol, as well as the django web server and a opened webpage. I have written a basic socket function to communicate between the python script and django (using select.select for asynchronous communication). The problem is, I don't think this communication method via by basic socket script is very robust. I have been looking through the web for several days to find a good and simple to use "bridge" between the django (a python based web server) and my python script, but they all look complicated (e.g. RPyC and zeroMQ (needs a lot of other programs to install, so I have not tried to install yet)).

Has anyone got any advice on which communication method would be best on the Yun for python to python communication?

Regards

irishcream

irishcream24:
::::SNIP::::

Has anyone got any advice on which communication method would be best on the Yun for python to python communication?

@irishcream24,
Yes, dump django. Django is a framework intended for websites with massive amounts of Content (for things like newspagers). If you want to learn and use Django professionally - that is one thing, but if you just want to control your home - it's massive overkill.

Start again and seriously consider a REST API. There is a very good example that came with IDE. Goto File->Examples->Bridge->Bridge.
Play with that for a bit. Then come back and let me know what you think.

Jesse