Shop OBEX P1 Docs P2 Docs Learn Events
Prop Network with a Web Server Front End — Parallax Forums

Prop Network with a Web Server Front End

ShawnaShawna Posts: 508
edited 2015-02-07 12:07 in Propeller 1
I need help figuring out which path to take on this project. My brain is tied up in knots.

What I want to do.

I want multiple devices around my house controlling things. Of course they are all going to be powered by propellers.
I am setting up a web server and I want to be able to view data from these devices via a web browser.

What I have tried.

I have a Wiznet setup and running as a small web server. I am able to view variables from the prop via a web browser. The prop generates a xml file when the browser makes a request. Its actually pretty cool! Thanks to everyone who developed the objects for wiznet and helped me get it running.
I do not want to use the wiznet as my web server though. It has a hard time handling pictures because it only has 8 sockets. At least that's why I think it has problems with pictures.
So what I tried to do was move the html file stored on the wiznet to my web server. I modified the url in the request code to send the request to my wiznet. The wiznet gets the request but I get nothing in my browser. After doing some research I think that my browser is probably gettirng the data from the wiznet, but doing nothing with the data because cross domain boundaries are not allowed with xml files and browsers. I read in another post in the spinneret forum about something called enable cores which allows cross domain boundaries. I am still reading about that though.

Basically what I am thinking is to have all of my prop devices hooked up to my local lan network with wiznet boards. Then have my web browser send request to the different wiznet boards to fetch xml files. The xml files would have all the data I want from my devices to display on the web page.

Am I approaching this from the wrong direction?
The angle I am researching right now, is to have php script running on my web server to go out and grab the xml files from the wiznets out on my network. I got this idea, from this thread in the spinneret forum. http://forums.parallax.com/showthread.php/158301-Socket-Server-for-link-between-multiple-XBee-Wifi-modules-and-offsite-server

I am not sure which direction to go with this.
Maybe xml files are over kill, maybe I need to be using something else.

Any thoughts or comments guys.

Thanks
Shawn

Comments

  • Heater.Heater. Posts: 21,230
    edited 2015-02-07 12:07
    I have no idea what you are actually trying to do but that won't stop me making suggestions :) :

    1) Have all connections from the internet come into your world via a single PC, or Raspberry Pi, or something.

    2) That single point of entry can take care of all the hard work of HTTP requests, SSl security etc.

    3) Have all your devices, Propeller or other, connect to that server machine over ethernet, WIFI, serial link whatever.

    4) Device to server connections need not be using HTTP. Serial links can use whatever protocol you devise. Perhaps MQTT is a good option.

    5) Requests from the net can be forwarded to the devices, over whatever media / protocol the are connected with.

    6) Create that server in node.js rather than messing around with legacy Apache and PHP. In node you can do all this really easily.

    Whilst we are here, it would be great to see the Prop be able to communicate using MQTT over a wiznet or other IP connection. Sadly I don't have time to pursue all these avenues.
Sign In or Register to comment.