Web Application and Raspberry Pi


I am building a home automation system that will be based on a Raspberry Pi. I mainly use Python for this project.

What I need is my users to be able to login to a website and control their home devices. Since there is not the possibility of using static IPs, commands cannot be sent directly to the Raspberries. So, I figured out it has to be a web application where users should deposit commands and Raspberries should enquire for commands according to their unique ID.

I am a beginner in web development, so I would like to ask for directions on how to move on this. Is there any commercial platform that I could integrate in my system? How should I approach this attempt? If I need to develop it from scratch, which methods do you suggest?

Thanks in advance,
Who is Participating?
nociConnect With a Mentor Software EngineerCommented:
No you write some program on the rasp-pi that read the MAC address from the interface.
And them make a regular web query  or  POST with the mac address embedded.
Should be doable from java/python.

The server can then lookup values and return everything that is needed for the client.

I would make it a dedicated php/cgi script. (you can test this with a regular browser)
and if you want automated access curl (http://curl.haxx.se ) has the tools (Commandline tool and library)

You can consider SOAP if you want a more fancy API. (not easily testable using a browser).
nociSoftware EngineerCommented:
The Rasp PI's have a macaddress. That address should be unique enough.
If you poll your website (Using HTTPS & properly configuring that, of course)
then  you can identify each device without having a big administration besides.
Make the MAC address part of each request from the RaspPi's.

And return the data that is waiting to them. Hardly rocket science.
panmitzAuthor Commented:
Thanks noci.

So you suggest that I write a script with PHP that recognizes the MAC address of each raspberry and returns the appropriate commands. OK for this part.
How about the front end? Is a Joomla website capable of these things (since it has user management) or do I need some other tool?
(Told you I'm a newbie ;-) )
I should probably mention that in the future it should be possible to also build Android and iOS applications for the same system for the user's part.
panmitzAuthor Commented:
Thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.