I ran into a similar problem. In the end, the issue was that I had to make sure that I was setting the host for the mobile app to be the exact same ip address as what is used in the interval program. For example, if you run the interval program by calling
python ospi.py 192.168.1.50:8080
then you want to point your mobile app to the same IP and port (192.168.1.50:8080).
If, however, you use the loopback (127.0.0.1), as in
python ospi.py 127.0.0.1:8080
then you’ll need to use the loopback in your mobile app configuration.
I think this all has to do with some pickiness on the part of the interval program as to whether it’s opening up local or network sockets for accepting incoming connections.
Personally, I have my configuration set to use the loopback IP address (127.0.0.1), but if you want to also connect directly to the interval program UI (the one that isn’t quite as sharp looking) then you have to use the outward facing IP address of the RPi.
Edit: If you don’t know what the IP address is that the interval program is set to use, you can check the running processes by SSHing into the RPi and executing
look for the entry that looks like:
4254 ? Sl 0:29 /usr/bin/python /home/pi/OSPi/ospi.py 127.0.0.1:8000
The IP address that I’m using is at the end there (127.0.0.1:8000)