- This topic is empty.
July 7, 2013 at 4:43 pm #22510
Anybody out there using an AirPort Extreme (AE) for their OSPi network connection?
If so, I would greatly appreciate any tips and/or details for setting up OSPi on the AE
II am already using port 80 for another device. How does one set up another port if 80 is in use?
Do in need to set up a static IP for the OSPi on the AE?
Also I am using a switch for most hard wired devices as the AE only has 3 hard wire ports.
Would like to use WiFi (and have the WiFi hardware running) for my final OSPi installation)
Any and all help is greatly appreciated. My lawn is about to get brown if I don’t get this thing working soon ;>)
Kevin 😕July 7, 2013 at 6:02 pm #24652
Apple Airport is just like any other router just a slightly different system to configure. Anyways, you can have multiple devices using port 80 since they all bind a local IP. The problem is being able to access multiple internal devices from the same port on your outside IP. If that is not your objective you do not need to worry about different ports. If it is you can change the port based on the startup command:
python ospi.py 8081
Or you can setup port triggering to forward ports hitting your WAN to a different port on the inside device.
For the Airport setting up a static DHCP is typically pretty easy and reliable. This is what I have done. It is based on the MAC address.
There is no problem using switches versus a direct connection to the router.
If you have the Wifi hardware in place I am sure you just need to get your Pi connected via software. This guide might help but I have never used it: http://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup/setting-up-wifi-with-occidentalis
Hope this helps!July 7, 2013 at 7:09 pm #24653
Thanks for the quick reply and informative post (as always).
As a hardware and gadget guy with not much software background, I feel like I am playing an adventure game as I figure out each puzzle/challenge and move to the next level of the OSPi configuration and ultimate goal of controlling my irrigation system via my iPhone.
I’ll start working with your advice this afternoon so as to hopefully make it to the next level of the OPSi adventure game :>)
KevinJuly 7, 2013 at 10:38 pm #24654
The instructions on the wiki page (http://rayshobby.net/mediawiki/index.php?title=OpenSprinkler_Pi) for setting up wifi are almost certainly too brief and assume too much knowledge. Let me know what can be done to improve them as you work through it or get in touch for anything that doesn’t make sense.July 7, 2013 at 11:40 pm #24655
Thanks for the post.
My setup is OPSi with wifi, as mentioned router is the AirPort Extreme (AE).
Using the Airport Utility via my iMac I have successfully set up port forwarding for another device and was able to verify it was open using http://www.canyouseeme.org. The difference is the device is connected to the Airport Extreme via ethernet connection.
I am try to do the same thing with the RPi using its wifi connection to the AE. Using the Airport Utilty I am able to add the RPi, its IP address, mac addr, and port number using the same method I set up the other device (that’s port can be seen as -open- on canyouseeme.org.
At this point I can’t see the RPi on canyouseeme.org even after I changing it to port 80 and the other device to 81. (I can see the other device on canyouseeme.org under port 81)
Think I am pretty close to success, but need a few more clues.
KevinJuly 8, 2013 at 12:50 am #24656
Do you have OSPi running on your Pi when you check it on canyouseeme.org? The OSPi code is what responds to port 80 or port 8080. Make sure you can browse to the Pi from “inside” your network before configuring the router and checking it through canyouseeme.org. It does not matter if the device is attached to copper ethernet or using WiFi for connectivity as far as the router and port forwarding are concerned. If the Pi answers on port 8080 (for example: http://192.168.0.33:8080) then make sure the port forwarding configuration on your router forwards port xxxx (for example 88) to 192.168.0.33, port 8080. Then to access OSPi from outside your network (public Internet) you should browse to (http://publicIP:88) where publicIP is what is reported on canyouseeme.org as “Your IP:”. The outside (public) port does NOT have to match the port that your OSPi actually responds on. You just have to map an accessible, not firewalled port to your inside device via the router’s “port forwarding” service…
When I use the canyouseeme.org page and I supply the forwarded (external) port, it finds my OSPi just fine, by the way.
Hope this helps and doesn’t muddy the waters too much!July 8, 2013 at 1:06 am #24657
Another thing to keep in mind is the IP/Mac is different for each interface. Which means your wired and wifi both have their own IP/Mac. When setting up port forwards and static DHCP ensure your using the right interface.July 8, 2013 at 1:19 am #24658
I do not have an Airport Extreme, but some googling did find some documentation about port forwarding: https://discussions.apple.com/docs/DOC-3415
Section 2 is talks about the port forwarding configuration, but don’t skip section 1 to define a static address.
Here is Section 2:
2. Setup Port Mapping on the base station.
AirPort Utility > Select the base station > Edit > Network tab
Click the "+" (Add) button under Port Mapping.
Public UDP Port(s):
Public TCP Port(s):
Private IP Address:
Private UDP Port(s):
Private TCP Port(s):
– You can Ignore the UDP ports, since we are talking TCP to the device.
– The Public TCP port is the port you use externally such as on the canyouseeme.org site.
– The private IP and TCP Ports is what you use to talk to it on your local network.July 8, 2013 at 1:52 am #24659
ITDawg, Samer, et al,
Thanks for the help and info.
For reference on my AE:
– my AE version is 7.6.3
– cysm viisible ip address = router ip addr
– LAN ip addr (internal) begins with 10.
– In Airport Utility- Network – DHCP Reservations-Descriptions = OSPI (I provided this description. Reserved by MAC addr, MAC addr of RPi is showing correctly, along with the IPv4 addr of 10.0.1.21
– In Airport Utility- Network – Port Settings I filled in the same blocks as the other device that can be seen from outside. They are Public TCP port = 80, Private IP addr is 10.0.1.21, Private TCP port = 80
To answer you questions, yes I have OSPi running as the http://0.0.0.0:8080/ is showing on the bottom of my terminal screen. Should it have an IP addr in it?
The wifi usb module is flashing. oh, and I am typing this post and reading yours via the RPi in discussion. So I am sure it has an internet connection.
Sorta new to Apple internet/router, seems the Airport Utility can see the Raspberrypi as listed under the Airport Utility display of wireless clients. (Wonder why it does not see t by its MAC addr?)
Not sure I know how to browse to the RPi on my local network?
Thanks again for the help. Hope the details help.
KevinJuly 8, 2013 at 2:05 am #24660
Lets just be sure what IP and port you are running on. From a terminal window, enter the following commands:
ps -ef | grep -i ospi
The hostname -I command should return the RPi’s current IP address. Hopefully that is 10.0.1.21 as you expect. It should be recorded in your AE as the Private IP address as you have indicated.
The ps -ef command will look for processes that contain “ospi” in the name or options. It will also return the grep line since ospi is an option to the grep command. Here is a copy of my Pi running those commands:
[email protected] ~ $ hostname -I
[email protected] ~ $ ps -ef | grep -i osPI
root 2401 1 0 18:31 ? 00:00:09 /usr/bin/python /usr/ospi/ospi.py 192.168.1.11:8080
pi 8118 7915 0 21:03 pts/1 00:00:00 grep –color=auto -i osPI
[email protected] ~ $
From those commands, you can verify the Pi is doing what you expect it is doing…
Good Luck!July 8, 2013 at 2:20 am #24661
Dumb question…Are these commands entered while OSPI is running?July 8, 2013 at 2:34 am #24662
hostname -I matches AE IP add 10.0.1.21
Cant seem to find the vertical (pipe?) character on my keyboard. Which key is that. Sorry for the dumb question.July 8, 2013 at 2:36 am #24663
It’s usually above the enter key on the right hand side. Shift + back slash button.July 8, 2013 at 2:40 am #24664
It is on the key that way, but when i use shift back slash it shows up in terminal as a ~. Same as this post when used. Wow, it just gets weirder by the key stroke ;>)July 8, 2013 at 2:49 am #24665July 8, 2013 at 2:54 am #24666
So the second command is to show you if your interval program is running. You should have it running in the background but what you pasted does not show it running.July 8, 2013 at 3:00 am #24667
Thanks for the diagnosis.
Guess I’ll try to figure it out tomorrow. Gotta hit the sack now. 0400 come early tomorrow.
Appreciate all the help guys. MJuly 8, 2013 at 4:52 am #24668
The keyboard issue is because the RPi is not configured by default to use US keyboard layouts. Have you gone through the Raspberry Pi configuration? You can go through it again by entering the following at a terminal prompt:
If you are using an older Rasbian distribution, (pre-loaded card) you might want to upgrade and update Raspbian to the latest version. To do so just do:
sudo apt-get update
sudo apt-get upgrade
and wait a few minutes for the upgrade to finish, then restart your PI.
To make OSPi run in the background, there are some lines to add to your /etc/rc.local startup file. Those instructions can be found at the end of the Readme.txt here: https://github.com/rayshobby/opensprinkler/blob/master/OpenSprinkler%20Pi/software/demos/interval_program/README.txt
Good Luck!July 8, 2013 at 1:46 pm #24669
I did go through the setup but must have missed the keyboard part ;>)
I’ll update all the items in your post and add the code to run OSPi in background later today when I get home from work.
I’ll let you know the utcome.
Thanks a bunch for your help and patience!!
KevinJuly 8, 2013 at 10:40 pm #24670
ITDawg, Samer, et al,
Thanks for all the info and direction.
Almost got it!!
Performed all of your guidance above (from last night), including getting my keyboard config set for US.
Was able to open browser, point it to my IP/sprinklers, get to the setup page, enter my acct info and save.
Can even see port 80 (now set for OSPi) on CYSM.
That is where I am now. When I try to login to my acct i get a green screen and that is it.
Thinking I am pretty close to success?
KevinJuly 9, 2013 at 12:36 am #24671
Hey Kevin just to make a suggestion: If your trying to get your OSPi accessible using the mobile app by doing a port forward, you might be interested in the hosted version. It is available at http://rayshobby.net/apps/sprinklers and works almost exactly the same way except the app is hosted on Ray’s website and speaks directly to your Pi using the port forward for the device. Hopefully im not confusing you more! If so, disregard however I think it might be something you’ll like.July 9, 2013 at 1:20 am #24672
Samer, Yes I am interested the hosted version. I found this info from your earlier post on the subject.
For example, if your OpenSprinkler is on your home LAN at IP 192.168.1.30 and using port 80. Then you would goto your router’s configuration and forward port 80 for 192.168.1.30. After that you would use your home’s WAN IP for the OpenSprinkler on the external server. The WAN IP can be found by visiting http://wimi.com inside your home.
A few recommendations for this setup:
1) Ensure your OpenSprinkler has a static IP using the menu settings on the device OR by setting a static DHCP reservation through your router against the MAC address
2) You should use a secure password on your OpenSprinkler since it is now accessible outside of your home
3) You should double check the ‘Ignore Password’ option is unchecked
4) If it is a shared server, ensure permissions are properly set to prevent unwanted viewing of the config.php.
If you need any assistance feel free to ask, hope this helps!
Any updated tip or tricks to get it running. I think I have done most of what you mentioned.
KevinJuly 9, 2013 at 1:30 am #24673
Nope the hosted version is awesome because you don’t have to tinker with it! So long you know the IP, port, and password you can access your device from anywhere by just going to Ray’s hosted version. All the settings are stored only in your browser and never even cached/stored on the server.
So the only trick is getting the right port forwarded.
What you quoted above was not tailored to the OSPi so let me make a small modification for RPi users. The interval program defaults to port 8080 so just change port 80 in what I said earlier with 8080. When you visit the hosted app and it asks for the device IP you will use your external IP from http://wimi.com and the port 8080 so it looks something like:
220.127.116.11:8080July 9, 2013 at 2:40 am #24674
Samer, I’m in!!!!!!
I’ll wire up the valves in the next couple of days.
Thanks a ton. Very exciting.
And as an added bonus, and probably the whole idea relative to the Raspberry Pi, I learned some cool stuff about software. I’m sure I will continue to learn….
PS In your spare time can you help us with the garage door project ;>)July 9, 2013 at 11:32 am #24675
Update – Well at least I am into the template of the web app. It does not seem to be talking to my OSPi.
- You must be logged in to reply to this topic.