Author |
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: April 27 2011 at 12:48 | IP Logged
|
|
|
This macro when running will alert you to potential weather alerts. Its main focus is on Tornados and if there is an advisory out then the frequency of checking will be increase. If there is a Tornado Warning then a message box will pop up. If this gets to be annoying comment out the next to last line.
Weather_Alert will self-install and should not take any user input other than what zone you’re in. A screen will pop up prompting for the zone. You then enter your zone (3 letters and 3 numbers) in the WA_ZONE Global. Weather_Alert defaults to trigger every 10 minutes and only reports if there is weather alert. The frequency of reporting an alert will depend on the type of alert. Tornados getting the highest respect. Announcements are only made on the initial alert or and any change or depending on the urgency of the alert. The accuracy of reporting depends on Alerts.Weather.Gov. Sometimes there is a missed alert and the macro will compensate for that and retry. There are commented out areas that allow you to SS-request to another system for TTS otherwise all TTS is done on the local system. There are other commented out areas that are for debugging and left in on purpose. This is not a substitute for NOAA radio but more of a useful tool to build upon. The fun part of this macro is you can spot areas of alerts and become a “virtual storm chaser” by entering the Zone of the tornado areas.. Please report back with any suggestions, errors or accuracy.
For 2.2.1 and above…..
2011-05-10_081933_WA24.txt
Use this one for 2.1.b and earlier….
2011-05-10_082036_WA21b.txt
EDIT: Multiple changes to error recovery and message handling. See “change history” in comments of macro. 05/10/11
Edited by BeachBum - May 10 2011 at 08:28
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: April 29 2011 at 14:27 | IP Logged
|
|
|
I placed a newer version of the Weather_Alert on this thread. After testing in Alabama and North Carolina with the unfortunate storms, I changed the message generated to be a bit more precise. Thanks to Dave the erroneous Syntax Error has been eliminated. Lee, thanks for testing live.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
Jerrem Newbie
Joined: December 23 2008 Location: United States
Online Status: Offline Posts: 16
|
Posted: April 30 2011 at 14:33 | IP Logged
|
|
|
I was glad to see an update to match the new web page
format. Unfortunately, I am getting an SQL "wrong number
of values for insert" error and only the macro Weather
Alert being created with 1 partial line of content, when
attempting to execute the install. By chance does this
macro take advantage of features that are not in 2.1B?
Thanks in advance, when I get this working it will be nice
to have the weather warnings operational again.
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: April 30 2011 at 15:15 | IP Logged
|
|
|
I just tested the install and it went in without a problem. If you have an old Weather_Alert delete it and get out of that window before going any further. Then double click the file above, copy it and open Multi-Editor. Make sure your in SQL mode. Paste it then do an Execute. Reinit and you should be good to go. Macro is backward compatible to 2.1.
Edited by BeachBum - April 30 2011 at 15:58
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: April 30 2011 at 16:56 | IP Logged
|
|
|
I confirm what Pete has verified. I right clicked on the link above to the macro and did a Save Target As .... to a file on my system. Brought the file up under WordPad, copied the content to the clipboard, pasting the clipboard to the Powerhome Multi-Editor in SQL mode. Then used Edit | Execute Script to store the Macro.
Pete, as a side note I continue to see the Syntax error in the log after the Exit message. Does not hurting anything that I can tell. Not an issue for me. Running 2.1.4 on XP
__________________ Lee G
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: April 30 2011 at 20:52 | IP Logged
|
|
|
Lee reload it I had a narrow window of opportunity for a glitch. Had a bad load but fixed it minutes later. You probably caught me in the window.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
Jerrem Newbie
Joined: December 23 2008 Location: United States
Online Status: Offline Posts: 16
|
Posted: April 30 2011 at 21:57 | IP Logged
|
|
|
Pete: Thanks for the reply. Unfortunately, still no luck. I have done as has been indicated in the thread, deleted the partial weather alert macro, checked for Weather_alert as potentially being used in other macros, reinitialize, double checked SQL mode etc.
Still seeing the same error when executing the script.
Invalid Direct SQL Code -207
SQLSTATE = 21S01
[Sybase][ODBC Driver][Adaptive Server Anywhere]Insert value list does not match column list: Wrong number of values for INSERT
By chance does TTS need to be installed?
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: April 30 2011 at 22:10 | IP Logged
|
|
|
TTS yes, but what version are on? We may have a compatibility issue because of comment fields. If that’s the case I’ll issue another update.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: April 30 2011 at 22:17 | IP Logged
|
|
|
Not to grind this into the ground but make sure you follow Dave’s suggestion… Although It doesn’t sound like this problem.
"Your problem however has a very simple solution. Based upon your error message, you have the PowerHome Multi-Editor in PH Formula mode (check the title of the multi-editor to easily see the mode). This is for evaluating PowerHome formulas and the like. To run SQL statements, you need to change the editor to (SQL) mode. A Shift-F5 should do this for you (you can also go to the menu under Edit|Language|SQL to do this as well). This should allow you to execute the SQL and successfully import your macro or other macros.
When importing macros or other SQL elements, just be certain that they don't already exist in your database or you'll be getting a different type of error."
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: April 30 2011 at 22:20 | IP Logged
|
|
|
Pete
An earlier post indieated 2.1B.
Syntax error gone. THANKS!
__________________ Lee G
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: April 30 2011 at 22:33 | IP Logged
|
|
|
Lee, I concerned about the comment fields. I believe when I asked Dave if that would be a problem he indicated they would be basically dropped. You know me I could have interpreted that wrong. Any case if that’s the problem it’s an easy fix. I’ll go ahead and prepare a load without them.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: April 30 2011 at 22:43 | IP Logged
|
|
|
Alright just for giggles let’s see if this works.
EDIT: Remove the upload.
Edited by BeachBum - May 01 2011 at 17:15
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
Jerrem Newbie
Joined: December 23 2008 Location: United States
Online Status: Offline Posts: 16
|
Posted: April 30 2011 at 23:14 | IP Logged
|
|
|
Pete: Tried the above and am seeing same problem. Went out to code repository and tried importing other macros with same result. I've imported macros in the past so something must be out of wack. I am going to poke around some more and see whats up. Thanks for the help so far.
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: April 30 2011 at 23:25 | IP Logged
|
|
|
Pete
I was not able to install the version that eliminated the syntax error nor the latest link just posted on 2.1b. Number of columns error on both.
__________________ Lee G
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: April 30 2011 at 23:36 | IP Logged
|
|
|
I just deleted WA and reloaded from my 1st post with no problems. Test with no syntax errors. I then did the same with the no comment one and with same results. Where is our problem????
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: May 01 2011 at 17:14 | IP Logged
|
|
|
Well it appears that the comment column introduced in the latest release doesn’t allow us to load a macro on 2.1b. If I remove the “,” from the last delimiter of the macro line it will work. I’ve tried to write a macro that would remove it but so far I have not succeeded. Maybe Dave has a suggestion. When I use ph_replaceall it hangs in the execution queue.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: May 01 2011 at 22:42 | IP Logged
|
|
|
Finally I got it. Here is the 2.1b version… Don't worry about the file name.
EDIT: Removed file. Refer to 1st post.
Edited by BeachBum - May 10 2011 at 08:17
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
Jerrem Newbie
Joined: December 23 2008 Location: United States
Online Status: Offline Posts: 16
|
Posted: May 03 2011 at 22:48 | IP Logged
|
|
|
Pete: The 2.1b version installed nicely. Checking it out right now. Thanks for adding in the back compatability.
Jerry
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: May 03 2011 at 23:18 | IP Logged
|
|
|
Thanks Jerry.. I just updated it because of a potential error in the Timed Event. You might want to reload.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: May 10 2011 at 08:47 | IP Logged
|
|
|
Several minor problems have been addressed with the newest update. Due to the nature of how the feeds are updated sometimes a Tornado Warning is dropped because it is being updated. The end result was the “tornado warning” was no longer active and then suddenly it was there again. This has been fixed with multiple retries. There was also a concern with the accuracy of the message and that has been addressed. Both files in the 1st post are the same except for the loading into PH. Everyday a “tornado warning” appears somewhere around late afternoon so this has been tested intensely. The macro reports other alerts also but with a different frequency once detected. If no alerts are detected it run silently every 10 minutes. Around line 3700 there is also a stopping of TTS because of the time of night.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|