Weather by Zip Code: THE MODULE

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
yeah, the x-tide is great, but boaters and surfers care about this, but also if the seas are 2-3 ft. or 8-10 ft. That's what I was really trying to find. Although the X-tide is a step in the right direction.

This text-to-speech stuff is sooooo cool. And now with Cepstral, it actually sounds good.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
If you can locate a consistent reliable source of data for the stuff you want reported, then on a technical basis anyway - the sky is the limit. In general, all that's needed is a reliable, parse-able data source, a good programmer, and some time.

Do you know where to acquire data like that?
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
Yes sir, just looked up the nvweather-zip to see where its getting stuff from. Went to http://www.srh.noaa.gov and found that they have an option for coastal waters forecast.

I entered my zipcode, and came to page: http://forecast.weather.gov/product...FL&product=CWF&format=CI&version=1&glossary=1
which includes the pertinent data:

$$
AMZ650-670-290330-
COASTAL WATERS FROM JUPITER INLET TO DEERFIELD BEACH, FL OUT 20 NM-
WATERS FROM JUPITER INLET TO DEERFIELD BEACH, FL EXTENDING FROM
20 NM TO 60 NM-
259 PM EDT THU MAY 28 2009

.TONIGHT...SOUTHWEST WINDS 5 TO 10 KNOTS. SEAS 2 FEET OR LESS.
INTRACOASTAL WATERS A LIGHT CHOP. WINDS AND SEAS HIGHER IN SCATTERED
SHOWERS AND THUNDERSTORMS.
.FRIDAY...SOUTHWEST WINDS 5 TO 10 KNOTS BECOMING 10 TO 15 KNOTS.
SEAS 2 FEET OR LESS. INTRACOASTAL WATERS A LIGHT CHOP. WINDS AND
SEAS HIGHER IN SCATTERED SHOWERS AND THUNDERSTORMS.
.FRIDAY NIGHT...SOUTHWEST WINDS 10 TO 15 KNOTS. SEAS 2 TO 3 FEET.
INTRACOASTAL WATERS A LIGHT CHOP. CHANCE OF SHOWERS AND
THUNDERSTORMS.
.SATURDAY...SOUTHWEST WINDS 10 TO 15 KNOTS. SEAS 2 TO 3 FEET.
INTRACOASTAL WATERS A LIGHT CHOP. CHANCE OF SHOWERS AND
THUNDERSTORMS.
.SATURDAY NIGHT...SOUTHWEST WINDS 10 TO 15 KNOTS. SEAS 2 FEET OR
LESS. INTRACOASTAL WATERS A LIGHT CHOP. CHANCE OF SHOWERS AND
THUNDERSTORMS.
.SUNDAY...WEST WINDS 5 TO 10 KNOTS. SEAS 2 FEET OR LESS.
INTRACOASTAL WATERS A LIGHT CHOP. CHANCE OF SHOWERS AND
THUNDERSTORMS.
.SUNDAY NIGHT...EAST WINDS AROUND 5 KNOTS BECOMING SOUTH. SEAS
2 FEET OR LESS. INTRACOASTAL WATERS SMOOTH. SLIGHT CHANCE OF SHOWERS
AND THUNDERSTORMS.
.MONDAY...WEST WINDS AROUND 5 KNOTS BECOMING SOUTHEAST. SEAS 2 FEET
OR LESS. INTRACOASTAL WATERS SMOOTH. CHANCE OF SHOWERS AND
THUNDERSTORMS.
.MONDAY NIGHT...EAST WINDS AROUND 5 KNOTS. SEAS 2 FEET OR LESS.
INTRACOASTAL WATERS SMOOTH. SLIGHT CHANCE OF SHOWERS AND
THUNDERSTORMS.
.TUESDAY...EAST WINDS AROUND 5 KNOTS. SEAS 2 FEET OR LESS.
INTRACOASTAL WATERS SMOOTH. SLIGHT CHANCE OF SHOWERS AND
THUNDERSTORMS.

I assume you'd only really care about 1-3 days of the data
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
I note they also have air quality forecasts, and tropics/hurricanes section also, that maybe would be used as options or in a menu system.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
I note they also have air quality forecasts, and tropics/hurricanes section also, that maybe would be used as options or in a menu system.

I think Im loving the idea. So - it looks like one of three things is available. The data source seems to exist -

The remaining 2, programming talent and time - are then next things for us to work on finding. Wanna sign up and help take a stab at creating? :yesnod:

I'll bet the Weather by Zip module / program could form the basis of much of the work -

Hmmmm?
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
I haven't programmed in probably 10 years - LOL.

Maybe if my schedule clears up - I'd be glad to peak into it though.

This text-2-speech stuff just really has such possibilities, and what you guys are doing now with the 3rd party plugins for FreePBX sure does make it about idiot proof - nice job.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
I haven't programmed in probably 10 years - LOL.

Maybe if my schedule clears up - I'd be glad to peak into it though.

This text-2-speech stuff just really has such possibilities, and what you guys are doing now with the 3rd party plugins for FreePBX sure does make it about idiot proof - nice job.

Wow - Thanks for the kind words! :biggrin5:

The more I think about this, the better I like the idea. As soon as my project schedule slows a little bit - maybe we can put our heads together and come up with a new toy for all the wave-watchers out there.

-tshif
 

Bitnetix

Guru
Joined
May 21, 2009
Messages
323
Reaction score
0
I must admit that I didn't real all of this thread, but we do a lot of custom PHP coding at our company. I'd be happy to help out if that's what you're looking for.

Wow - Thanks for the kind words! :biggrin5:

The more I think about this, the better I like the idea. As soon as my project schedule slows a little bit - maybe we can put our heads together and come up with a new toy for all the wave-watchers out there.

-tshif
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
krzykat -

Looks like were going for it!

Why and how so fast? Well because of the generosity of Bitnetix - who just signed on at the project dev site as our newest developer!

Welcome Aboard Bitnetix! And from all of us, thanks for your future contributions!

- tshif
 
Joined
Apr 22, 2009
Messages
230
Reaction score
0
As reported to tshif I've found two bugs in the weather-zip.agi.

Replace
$link = mysql_connect("localhost", "root", "passw0rd")
by
$link = mysql_connect("localhost", $dsn['username'], $dsn['password'])


replace at the end of the agi:

execute_agi("exec flite $msg") ;

by

execute_agi("exec $tts $msg") ;
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
krzykat -

Looks like were going for it!

Why and how so fast? Well because of the generosity of Bitnetix - who just signed on at the project dev site as our newest developer!

Welcome Aboard Bitnetix! And from all of us, thanks for your future contributions!

- tshif

That's awesome. I love how things gets accomplished around here. So much better communication than the green place.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
:chefb: It may not happen super fast - but it will happen. Life has this funny way of dragging you away from your "want to do" projects and taking way to much time with your "have-to-do" projects!
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
I understand that all too well. If only we all had enough money so that bills were no issue and we could work only on "the fun projects" life would be great.

Appreciate all the work, and look forward to the mod being done sometime ;)
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Weather by ZIP Module is Elastix Compatible!

Because from time to time folks ask which distributions the Weather by Zip module is compatible with - and because forum user patrick_elx recently finished validation testing so we can add Elastix to our supported distro list! Thanks Patrick! So here's the restated stats:

This module is compatible with the security models used in the following distributions:

Fonicatec PABX
Foncordiax
PBX In A Flash
TrixBOX CE *See Special Issues
Elastix *See Special Issues

The Module’s wiki Page is here.

Asterisk Version Compatibility
This module has been tested and found to work correctly with Asterisk versions 1.4 and 1.6.

Known Issues:
1. This module does not properly clean up changes made to extensions_custom.conf. Specifically, this line:
# include custom_weatherzip.conf
Will be attached to the bottom of the extensions_custom.conf file every time you install / re install the module. This is harmless, and will be corrected in a future release of the module.

2.This module supports only mysql, if your PBX is deployed using another database, this module will fail.

Special Issues:
3. On TrixBOX CE, Elastix and possibly other distributions, the sounds directory in which the weather reports are stored has disappeared. The symptom for this would be a weather report that introduces the report but never plays it. Here's how to recreate the directory (from putty or your favorite program)
cd /var/lib/asterisk/sounds
mkdir tts
chmod 775 tts
chown asterisk:asterisk tts
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Weather by Zip Module v 1.1.5 Maintenance Release

Weather by Zip Module v 1.1.5 Released. Get it from the Devleopment Support Site here.

This is an optional maintenance release.
There are three changes in this maintenance release.

1. Ticket #118 Zip Codes Load fails on slow machines.
The initial installation of the zip code database could sometimes fail on some machines. This has been corrected - as the entire Zip Code DB should now load faster.

2. Ticket #148 Not using the proper database password
The module did use a hard coded database login/password instead of the one looked up from the file. This completes a previous patch that was supposed to have corrected this already.

3. Ticket #156 Create TTS folder where it does not exist
During module installation create TTS folder where it does not exist, and set with appropriate permissions. (such as trixbox, and elastix)

As always - let us know how this version works for you!
-tshif
 

frontline

Member
Joined
Oct 18, 2007
Messages
110
Reaction score
0
Regarding hard coded passwords. I am not sure if this is what you are have changed in Item two. This module has hard coded default passwords e.g. in the .htaccess file. The freepbx model provides for custom and hardened passwords. In that regard the modules (not limited to this one) require editing prior to installation. That may be unavoidable. It would be helpful if there would be a README or even better alert of some kind in the install that would highlight the hard coded default password locations for manual edit.

The work you have done to get all the modules developed and the superhuman detailed documentation you have provided for A2B and fax to name a couple is astounding. You and joe are the "20 mule team" combo around here. You are appreciated.
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

Thank you for your kind words, but we only build on the work of others. This is the beauty of open source as opposed to just free stuff.

In respect of the .htaccess files in the module, they are there as part of the security mechanism in FonicaPABX, which allows ACL access for FreePBX, but uses apache security, rather than relying on the FreePBX security, which shall we say, is not so heavily tested as Apache.

The presence of these files will have no effect on a standard install of PiaF, as the httpd.conf file is set not to recognise or honour .htaccess files, PiaF relies on Apache Directory access security the configuration of which is in /etc/pbx/httpdconf/pbx.conf.

So they can be safely left in place, on a standard PiaF install.

Joe
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Indeed - thanks for the kind words! We always like hearing the good stuff (and not just the bad! :) )

Its true - natively, this module does not support the less-standard deployment of PBXIAF under FreePBX ACL's.

Theres a couple ways you might fix it without a major headache each time you install.

Would you take a look at this, try it and let me know what happens?

1. Using FreePBX, create a new user in Administrator. Assign this user permissions over ONLY the Weather By ZIP module.

2. Delete in total the htaccess file included with the module.

-tshif
 

frontline

Member
Joined
Oct 18, 2007
Messages
110
Reaction score
0
I was originally thinking of the modules as a group. Hacking the embedded default passwords is not a major pain. It can be done by working the tarfile before uploading or installing and tracing them from there. That is necessary for many of the scripts that rely on default passwords. I then keep a small sed script for many of the repeat installs. What I was wishing for is maybe a small heads up file in each of the modules saying that the module is built with default passwords and a location to change if the installer is using custom passwords. I guess the "official" freepbx modules pick the custom passwords from amportal.conf and elsewhere. That would be good if possible.

In any case I only referred to the .htaccess file since it has the amp109 password and was a convient example.

I have your change log at CSG software setup in my feed reader. It is always exciting to see what is going to pop up there.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
I was originally thinking of the modules as a group. Hacking the embedded default passwords is not a major pain. It can be done by working the tarfile before uploading or installing and tracing them from there. That is necessary for many of the scripts that rely on default passwords. I then keep a small sed script for many of the repeat installs. What I was wishing for is maybe a small heads up file in each of the modules saying that the module is built with default passwords and a location to change if the installer is using custom passwords. I guess the "official" freepbx modules pick the custom passwords from amportal.conf and elsewhere. That would be good if possible.

In any case I only referred to the .htaccess file since it has the amp109 password and was a convient example.

I have your change log at CSG software setup in my feed reader. It is always exciting to see what is going to pop up there.

Brother - I couldn't agree more! :smile5: One of the reasons I started on my module-ization kick was because I was dissatisfied knowing that the struggle with installations of great software like Weather by ZIP was stopping some people from getting things running. Also - I was frustrated over and over again trying to get a hotel wake up calls script running - so I chose that as my first one. Plus, I thought If I learned how to make a module, I might be able to give back something to this wonderful community that helped me so much - and still does. I'm pretty sure that same desire is what has driven so many to contribute to the modules since we (finaly) got them into the public view at the Software Devlopment Support site.

But - more to your point. The most recent releases of all the modules (at least those that I am directly Project Manager for) should remove the dependencies on the default IDs and passwords - exactly by doing as you suggest - we parse it from amportal.conf. Those modules that haven't had this upgrade are probably going through the process at this moment.

Regarding the htaccess file. Thats really a special situation. By default, PBXIAF will ignore this file. As Joe said, by default, only Foncordiax and Fonica PABX Distributions pay any attention to it.

The good folks who manage PBXIAF have not released (to my knowledge) a reccomended methodology for deploying using FreePBX ACl's and perhaps other Apache security as you (possibly) have done. Because there isnt a standard of that type - there is nothing for us to make the module conform to. If you have any thoughts on how to get around that - I'd love to hear them - truly.

Thanks again for the nice comments. It really is nice to hear every so often. And a nice secret thrill to know your subscribed to the site updates. Cool.

-Tony
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top