- This topic is empty.
July 9, 2013 at 10:52 pm #22521
I’m looking for some basic procedural help setting up my RaspberryPi with OSPi.
One of things that would help is a general top level procedure on what actually needs to be installed and running on the Pi to make the opensprinkler work. Right now, I feel I’m piecing together bits of OSPi and Opensprinkler without a roadmap to what I’m trying to accomplish as the end working solution. Perhaps someone has this already??
Meanwhile I have a few questions that may or may not make sense:
1. What should the firmware version be in the OpensprinklerPi?
2. How do I tell which version I have?
3. I keep reading about 1.8.3, do I need this version? If so, how would I load it to the OSPi? Online instructions seem to only refer to the standard OpenSprinkler
4. I read that the OSPi and the Raspberry Pi should be assigned separate IP addresses. Currently, I can only see the Raspberry (set statically for 192.168.1.50). I don’t see how the OSPi could have an IP address. I’m clearly confused about how these devices communicate as there is only one network interface through my USB (WIFI) adapter.
5. When running the apache server for opensprinkler, should lighttpd server be shut down?
Any help appreciated,
RussJuly 9, 2013 at 11:10 pm #24742
I know a wiki is being worked on to aggregate this information however here is some simple answers to your questions.
The Raspberry Pi is the logic for the OpenSprinkler Pi. The OpenSprinkler Pi has no logic or network interface and therefor you don’t need to worry about it at all after attaching it to your Raspberry Pi correctly.
The Raspberry Pi needs several things to properly control your sprinkler system. It needs an operating system which it sounds like you have (eg. Raspbian). It then needs the interval program installed available here: https://github.com/rayshobby/opensprinkler/tree/master/OpenSprinkler%20Pi/software/demos/interval_program
Honestly, thats it. You don’t even need a HTTP server for just that and you also don’t need to worry about the firmware versions. The interval application says it uses 1.8.2 but that is because it is based on the OpenSprinkler 1.8.2 firmware. The only major difference between 1.8.2 and the newer ones (1.8.3 and 2.0.0) is the sequential option which Dan is working to add back in.
I think the confusion arises when you read posts related to my mobile web app which does require a web server and requires a different port (same IP is no problem). If that is something you need assistance with I would be glad to help however I suggest getting a working interval program first then proceeding from there.July 10, 2013 at 3:16 pm #24743
So just to be clear…
Load Raspian – I’ve done this and it’s working properly
Load Interval program – OSPi.py – I’ve done this and made the modifications to make it run automatically.
When I browse to 18.104.22.168:8080 I can see the interval demo:
Refresh Options Stations Programs Log
Firmware version: 1.8.2
Device time: Wed, 10 Jul 2013 14:56:35 GMT+0:00
Program Preview Stop All Stations Run-Once Program
Water level: 100%
Now my last question is: Should apps like SprinklerAce and the Mobile Opensprinkler app just work?
The interface presented by OSPI.py seems a bit clunky, although functional. I’ve tested that I can manually turn on each GPIO port.July 10, 2013 at 3:41 pm #24744
I have no experience with SprinklerAce however my mobile app will work out of the box now. If you don’t wish to install the mobile app you can simply use the version hosted on Rays website (requires a port forward but gives you access anywhere) available here: http://rayshobby.net/apps/sprinklers/
If you want it running on your Pi (which brings extra features such as logging) you can follow the instructions on my Github page here: https://github.com/salbahra/OpenSprinkler-ControllerJuly 10, 2013 at 4:24 pm #24745
Okay, this is the part where my head explodes:)
My first goal is to get a good desktop browser app.
I tried using your link : http://rayshobby.net/apps/sprinklers/ using both Chrome and Firefox from a Mac Pro.
I plugged in 192.168.1.50:808 as my IP address
and used opendoor as the password
Just spins and never delivers a web page. Could it be that you most use a mobile device?
Second question: what does it mean to run it on the Pi? Run what on the Pi. I thought the program and station parameters were already stored in the Pi and the web interface merely accessed that data.
I did follow the instructions on Github, but that’s where I got lost on which server or device was in control.
Thanks for the continued help and patience.
RussellJuly 10, 2013 at 4:26 pm #24746
Correction to previous post:
IP address used was 192.168.1.50:8080July 10, 2013 at 6:39 pm #24747
The IP your trying to use is a local IP (192.168.0.0, 10.0.0.0, and 172.16.0.0). Since Ray’s server is outside of your LAN the app cannot ever reach your sprinkler (hence the constant spinning).
Sorry for the confusion. I completely understand why it’s confusing. Lets just focus on you installing my mobile app. The only computer you will interact with is your Raspberry Pi. SSH or login to your Raspbian and install apache, php, and git (like the instructions state). Then you will copy the files in using git (instructions on Github).
After that point you should be able to launch the app by going to your Raspberry Pi’s IP on your machine (doesn’t matter if its a desktop or mobile device).
Example: http://192.168.1.50 (notice no port is defined because Apache uses the default HTTP port which is 80).
Now you should be presented with an install screen which helps setup the rest of my app. This WILL ask for your OSPi’s IP and in your case it will be: 127.0.0.1:8080. Just to explain: 127.0.0.1 is a loop back IP that every machine has. It lets you access services. The port 8080 is what your interval program uses.
Hope this helps.July 11, 2013 at 8:49 pm #24748
I get the loop back IP idea now. However it’s still not working.
So I went into the sprinklers directory and deleted the config.php file so that it would start as a new config.
I browse to 192.168.1.50:8080 and can see the interval setup page. It seems to work fine. See this image:
Then I browse to 192.168.1.50:80 and get to this page:
I fill in the 127.0.0.1:8080 loopback IP with the password I used and try to submit/save and it pops up a quick message in a box saying that the config cannot be saved.
Then i tried 127.0.0.1:80 and the config saved and took me to the login page. I log in and I’m back to where I was before. The status page is blank and I can’t control the system
BTW, I check the config.php file and is indeed saved in the sprinklers directory.
What am I doing wrong this time?
RussellJuly 11, 2013 at 8:53 pm #24749
1) What browser are you using that’s causing the app to render so poorly?
2) You can’t use the :80 since that’s the web apps’s port. I will add some code to prevent you from using the wrong port since this is becoming an issue. In the meantime, just use 192.168.1.50:8080 instead of 127.0.0.1:80 and see if that helps. Just to be clear the web app is asking for the OpenSprinkler interval program IP and port.July 11, 2013 at 10:41 pm #24750
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)July 12, 2013 at 1:55 am #24751
If you update to the latest version, it will now do a closer inspection and confirm if the device is OpenSprinkler (Pi). Hopefully this clears up some confusion.
- You must be logged in to reply to this topic.