Forum Replies Created
-
AuthorPosts
-
September 1, 2013 at 7:05 pm in reply to: sprinklers_pi – An alternative sprinkler control program #24974
LLMoonMemberFor you guys who want to pull data from your personal weather station, you may be able to do that by entering “pws:XXXXXXXXXX” in the ZIP field on the settings screen. (where XXXXXXXX is your personal station ID).
I have not tried this, but the code appears to place the ZIP directly in the HTML query field. There are a number of different query formats, listed below and in the link. You may need to change the ZIP field type from numeric to text in web.cpp, etc. and then rebuild.
Here is the format for the query field from wunderground API documentation. I think you could enter any of these query strings in the ZIP field if it is stored as a string.
from http://www.wunderground.com/weather/api/d/docs?d=data/index
query
The location for which you want weather information. Examples:
CA/San_Francisco (US state/city)
60290 (US zipcode)
Australia/Sydney (country/city)
37.8,-122.4 (latitude,longitude)
KJFK (airport code)
pws:KCASANFR70 (PWS id)
autoip (AutoIP address location)
autoip.json?geo_ip=38.102.136.138 (specific IP address location)
LLMoonMembergot mine working as well! Seems it was the DOS cr/lf causing the problems. I used the suggested utilities to clean it up, now the init.d script works as advertised.
Many thanks to Denny and Dan for your assistance! My yard and my wife will be happy now that I can step away from this project for a while. 😀
LLMoonMemberI am struggling with this as well. Got the init.d script created and chmod to executable. This is the response I get when I attempt to get status:
pi@jlm-rpi ~ $ /etc/init.d/ospi status
-bash: /etc/init.d/ospi: /bin/sh^M: bad interpreter: No such file or directoryThere is a file /bin/sh but it is not text, cannot tell what it is. Any advice from the Linux gurus?
LLMoonMemberThanks very much, that resolved the errors and page is loading properly. Seems quite obvious now. I was treating python import like a C “include” statement, and forgot that objects need to be referenced to their source module.
-
AuthorPosts