dps / piui

Add a UI to your standalone Raspberry Pi project using your Android phone
419 stars 96 forks source link

Feature request: PiUi without nginx? #1

Closed andig closed 11 years ago

andig commented 11 years ago

CherryPi seems to provide it's own webserver. Would it be possible to run PiUi without nginx and without turning the Pi into an access point and rather have it available in the local network?

MrChronoM commented 11 years ago

I did test this application yesterday and it is possible to just access it on the local network. I didn't do the access point configuration and it just runs on the local network.

andig commented 11 years ago

@MrChronoM: could you explain how? Running the sample app I can curl localhost:9999, but I cannot read the Pi from another machine (I can on port 80 though)?

MrChronoM commented 11 years ago

I just followed the 'do-it-yourself' installation instructions on http://blog.davidsingleton.org/introducing-piui/, but starting by editing the hosts file (not the Access Point). When the installation is all done I did run 'python piui_demo.py' and from that point on I could connect to http://:9999/ (Not sure what is running on all different ports, but I think 80 and 9000 have something to do with nginx or CherryPi)

dps commented 11 years ago

Hi folks, the reason nginx is required is to force HTTP/1.0. Without this, the interaction between cherrypy and the android web browser is laggy (related to how pipelined connections are handled). If you have no interest in your project working well on android, you can drop nginx and connect directly to port 9999 or even run cherrypy on port 80

andig commented 11 years ago

So you're basically using localhost rhen? Could you check if you could connent to :9999 from another machine? That would help narrow down the problem I'm seeing. Thanks!

Von meinem iPhone gesendet

Am 30.03.2013 um 18:31 schrieb MrChronoM notifications@github.com:

I just followed the 'do-it-yourself' installation instructions on http://blog.davidsingleton.org/introducing-piui/, but starting by editing the hosts file (not the Access Point). When the installation is all done I did run 'python piui_demo.py' and from that point on I could connect to http://:9999/ (Not sure what is running on all different ports, but I think 80 and 9000 have something to do with nginx or CherryPi)

— Reply to this email directly or view it on GitHub.

dps commented 11 years ago

The cherrypy instance serves on 0.0.0.0:9999 so you should be able to connect from any other machine on either the wired or wireless (if available) network, assuming that your router or rpi configuration doesn't have any firewall in the way.

andig commented 11 years ago

Please forgive me- confirmed working as suggested.