OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Starting ospi.py automatically Re: Re: Starting ospi.py automatically

#24719

Dan in CA
Participant

OK. I think I understand whats happening.

I normally interact with the interval program through its own web interface since that’s what I’ve been developing. I also use a wired network connection for my test system.

For someone using Samer’s Mobile Web App, using 0.0.0.0 as the URL for the program works great but you loose access through the underlying interface. It can be handy to be able to use both interfaces. For example, if you encounter a problem and are trying to determine if its with the web app or the Interval program.

The server used by the Interval program defaults to 0.0.0.0:8080 so if you are using Samer’s app and are willing to give up access to the interval program though its own interface you could use a simplified start up script:

cd /home/pi/OSPi/
/usr/bin/python ospi.py &

If you connect to the Raspberry Pi via WiFi, you probably want to add a delay to the start of the script:

sleep 60
cd /home/pi/OSPi/
/usr/bin/python ospi.py $host:$port &

I’ll wait for any additions or other comments and then add this to the wiki page.

Dan