dps / piui

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

change app url #16

Open han-so1omon opened 5 years ago

han-so1omon commented 5 years ago

I tried changing nginx.conf piui server to 192.168.4.1:8080, then copying the file to /etc/nginx and restarting nginx thru init.d. I also tried changingpiui/init.pyPiUi class port to the same url and then rebuilding/reinstalling thru setup.py. This only works for files in the basepiui` directory, but still no luck for files that are in other directories. I also tried rebooting after all of this and still nothing. Any words of wisdom or ways to pass in url as an argument?

dps commented 5 years ago

What are you actually trying to achieve - it's not super clear from your question.

han-so1omon commented 5 years ago

The code by default starts the piui server at 0.0.0.0:9999. I tried accessing the piui server at this address, but it only works on the local device. http://piui doesn't work over internet either.

I would like to access the server over internet, so I change the URL to another address (192.168.4.1, which is router address) via the files mentioned above.

I notice that there is a tool called cherrypy that can take the server and port as arguments. Maybe it would work to pass those as keywords arguments to PiUi class?

Let me know if there is an easy solution.

han-so1omon commented 5 years ago

Simply: How does one change the piui server url from 0.0.0.0:9999?

Neophytez commented 5 years ago

Local device - 0.0.0.0:9999 Device on same network - :9999 (example 192.168.1.100:9999) For accessing from over the internet, you must open port 9999 for ip address, where RPI is hosted.