Forum Replies Created
-
AuthorPosts
-
kkpwrh2oMemberSo I deleted apache and set rc.file to 8080 and rebotted.
So looks like the main loop is looping
http://10.0.1.21:8080
Resulting in what appear to be a loop every 30 seconds or so with my RPi IP the time and date along with…
GET /sn0 - 200 OK
over and over (with different time of course)
Is that what it is supposed to look like. Cant get the mobile app up as I did before the above changes.
kkpwrh2oMemberlooking at the out put of
sudo netstat -anp --ip
I also notice the IP 10.0.1.21 for the RSPi in this line
udp 0 0 10.0.1.21:123 0.0.0.0:* 2212/ntpd
kkpwrh2oMemberGood info. Thanks!
This is what I have for port 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2091/apache2
kkpwrh2oMemberCorrect. My goal is to have the mobile app work from anywhere.
Tried both 80 and 8080
host=$(hostname -I | sed 's/ *$//g')
port=:80
cd /home/pi/OSPi/
/usr/bin/python ospi.py $host$portBoth resulted in
ValueError: :80 is not a valid ip address
respectively
kkpwrh2oMemberThe only port I have been using is port 80 for the OSPi. Is there more than one somewhere else I need to configure?
Not sure what else is running on the port. The router is setup by mac addr for the RSPi on port 80.
BTW, during boot up I see the line
Starting web server: apache2apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
It has ok on the line following so I guess it is good to go?
kkpwrh2oMemberHad the same problem.
Did this, Before the “host=…” line, add “sleep 60” on a new line and see what that does…
Failed with this
socket.error: No socket could be created
Suggestions appreciated
Thanks,
Kevin
kkpwrh2oMemberSprinkler valves have long wires 😆
kkpwrh2oMemberWill give it a try this evening when I get home.
Thanks for all of your help.
Regards,
Kevin
kkpwrh2oMemberThanks Joe. Thanks Samer. Much appreciated. Still no joy after loading Joe’s rc.local file.
Out of patience for tonight. Will give it another crack in a day or so.
Regards,
Kevin
kkpwrh2oMemberwent back and checked this code to make sure I had it in correctly. I copied and pasted the exact text from the readme file just to make sure I had it right.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %sn" "$_IP"
fi
host=$(hostname -I | sed 's/ *$//g')
port=:80
cd /home/pi/OSPi
## If you aren't sure that the path to python on your Pi is /usr/bin/, use whereis python to determine the location /usr/bin/python ospi.p$
exit 0
I notice “fi” just before host=$(hostname -i….. line. Is that correct? Or is It is supposed to be “if” and I fat fingered it somehow?
kkpwrh2oMemberI went to the OSPi dir and started ospi.py with the following results
pi@raspberrypi ~/OSPi $ sudo python ospi.py
Starting main loop
http://0.0.0.0:8080/
That pretty much confirms it wasn’t running (I think)
Ran this again
hostname -I
ps -ef | grep -i ospi
No result was displayed, Just a cursor on a blank line.
kkpwrh2oMemberi’m thinking the port is forwarded ok. I have my other port forwarded device working fine on port 81.
I can see it on CYSM successfully using ths same IP addr as port 80 that the RPi is using. Port 80 is visible on CYSM as well.
Is there a way to tell if ospi is running? Perhaps in Task manager?
I made the changes to the 4 lines of code required to to so, but i can’t convince my self it is running.
I ran this again
hostname -I
ps -ef | grep -i ospiwith the following result
pi@raspberrypi ~ $ hostname -I
10.0.1.21
pi@raspberrypi ~ $ ps -ef | grep -i ospi
pi 2602 2585 0 01:18 pts/0 00:00:00 grep --color=auto -i ospi
pi@raspberrypi ~ $
Based on the last time we went through this, it does not look like the interval timer is running.
kkpwrh2oMemberNext item…
When I go to this link, http://rayshobby.net/apps/sprinklers
(which I visited a couple of day ago and was able to enter some information and resulted in a dark blank screen with a revolving arrow graphic.)
I am back to the dark, blank screen with revolving arrow graphic.
Not sure where to go from here.
kkpwrh2oMemberNow we are cookin….
pi@raspberrypi ~ $ wget https://github.com/rayshobby/opensprinkler/blob/master/OpenSprinkler%20Pi/software/demos/interval_program/ospi.tar.gz?raw=true
–2013-07-11 00:07:37– https://github.com/rayshobby/opensprinkler/blob/master/OpenSprinkler%20Pi/software/demos/interval_program/ospi.tar.gz?raw=true
Resolving github.com (github.com)… 204.232.175.90
Connecting to github.com (github.com)|204.232.175.90|:443… connected.
HTTP request sent, awaiting response… 302 Found
Location: https://github.com/rayshobby/opensprinkler/raw/master/OpenSprinkler%20Pi/software/demos/interval_program/ospi.tar.gz [following]
–2013-07-11 00:07:44– https://github.com/rayshobby/opensprinkler/raw/master/OpenSprinkler%20Pi/software/demos/interval_program/ospi.tar.gz
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response… 302 Found
Location: https://raw.github.com/rayshobby/opensprinkler/master/OpenSprinkler%20Pi/software/demos/interval_program/ospi.tar.gz [following]
–2013-07-11 00:07:49– https://raw.github.com/rayshobby/opensprinkler/master/OpenSprinkler%20Pi/software/demos/interval_program/ospi.tar.gz
Resolving raw.github.com (raw.github.com)… 199.27.74.133
Connecting to raw.github.com (raw.github.com)|199.27.74.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 286597 (280K) [application/x-gzip]
Saving to: `ospi.tar.gz?raw=true’100%[============================>] 286,597 922K/s in 0.3s
2013-07-11 00:07:55 (922 KB/s) – `ospi.tar.gz?raw=true’ saved [286597/286597]
pi@raspberrypi ~ $
kkpwrh2oMemberSamer,
Tried that (a couple of time before posting) as I found your advice on another post. Still have the same issue.
Perhaps it is the way I am saving it. When I click the link, a dialog box comes up with save, save as, etc. I select save as, and save it to the pi directory.
Is that the correct way to save it, or is there a better way?
kkpwrh2oMemberUpdate – Well at least I am into the template of the web app. It does not seem to be talking to my OSPi.
Suggestions?
kkpwrh2oMemberSamer, I’m in!!!!!!
Awesome!
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….
Regards,
Kevin
PS In your spare time can you help us with the garage door project ;>)
kkpwrh2oMemberSamer, 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.
Thanks,
Kevin
kkpwrh2oMemberYou guys are reading my mind…
My OSPi will also be located in the garage less than 5 feet from one of my garage door opener buttons.
It is my next home automation project right behind the OSPi project. It would be fantastic to be able to control the garage doors and sense their position via a smart phone/webapp.
I really like the idea of the 24v relay being controlled by one of the triacs on the OSPi and using alarm reed switches for position feedback.
I have no doubt Samer, Ray, and the rest of the clever people on this forum could help us make this magic happen.
Regards,
Kevin
kkpwrh2oMemberITDawg, 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?
Regards,
Kevin
kkpwrh2oMemberITDawg
Good info.
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!!
Regards,
Kevin
kkpwrh2oMemberThanks 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. M
kkpwrh2oMemberUsed a different keyboard same problem. Never mind…
I copy and pasted the commands…
Here are the results. Obviously different.
pi@raspberrypi ~ $ hostname -I
10.0.1.21
pi@raspberrypi ~ $ ps -ef | grep -i ospi
pi 2604 2455 0 02:47 pts/0 00:00:00 grep –color=auto -i ospi
kkpwrh2oMemberIt 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 ;>)
kkpwrh2oMemberhostname -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.
-
AuthorPosts