LinHES Forums http://forum.linhes.org/ |
|
MythStormAlert for KnoppMyth http://forum.linhes.org/viewtopic.php?f=6&t=4648 |
Page 1 of 1 |
Author: | JoJa15 [ Sat May 21, 2005 2:24 pm ] |
Post subject: | MythStormAlert for KnoppMyth |
I have create a python program called MythStormAlert to be used with Knoppmyth. This program will display a scrolling alert on your screen while watching a show if there is a severe weather alert for your area. I am posting about this program for two reasons. First so people are aware of it in case they would like to use it and second to request help from anyone that might want to contribute to making the program more robust, and flexible. You can find out more about the program at the Knoppmyth Wiki here: http://www.knoppmythwiki.org/index.php? ... thankyou=1 You can help contribute to the program here: http://sourceforge.net/projects/mythstormalert/ Best Regards, John |
Author: | brendan [ Sat May 21, 2005 2:56 pm ] |
Post subject: | Re: MythStormAlert for KnoppMyth |
Very cool! You might want to update the wiki to be slightly more specific about when it doesn't run: Code: The MythTV OSD will only display if you are currently watching Live TV or a recorded program. If you are in the MythTV menu nothing will be displayed.
I'd suggest "recorded TV program". Maybe also be explicit that it doesn't display warnings when CDs or DVDs are being played too. -brendan |
Author: | JoJa15 [ Sat May 21, 2005 6:48 pm ] |
Post subject: | |
OK, I have updated the Wiki. Hopefully I can find some people to help and contribute with the programto make it better. I am a novice Python programmer so it is going to take me awhile to make improvements to the program. - John |
Author: | snake3061 [ Sun May 22, 2005 1:31 pm ] |
Post subject: | testing |
On the wiki you said to "If you currently don't have any events in your county you could fill "headline" with your own info as a test. " I don't know what you are meaning to do. Can you show an example in the script. |
Author: | JoJa15 [ Sun May 22, 2005 11:20 pm ] |
Post subject: | |
Since I am not an expert at Python it is going to be difficult for me to describe what to do exactly. I think the easiest way would be to search your state and other states for active watches, warnings, or weather statements. Then change the following lines to match up with that state, county, event type: change the URL of this line: capurl = 'http://www.nws.noaa.gov/alerts/tx.cap' to match the state URL that has the event you want. change the FIPS code of this line: geocode = '048111' to match the FIPS code of the event. Lastly change the event type of this line: event = 'Flood Warning' to match the event type of the event. To find all this stuff go to the CAPSURL and look at the XML. For example for the Texas one the first event I found was the following: Code: <cap:identifier>NOAA-NWS-ALERTS Texas 2005-05-22T21:37:59-04:00</cap:identifier>
<cap:sender>w-nws.webmaster@noaa.gov</cap:sender> <cap:sent>2005-05-22T21:37:59-04:00</cap:sent> <cap:status>Actual</cap:status> <cap:msgType>Alert</cap:msgType> <cap:scope>Public</cap:scope> - <cap:note> Current Watches, Warnings and Advisories for Texas Issued by the National Weather Service </cap:note> <cap:references> http://www.nws.noaa.gov/alerts/tx.html </cap:references> - <cap:info> <cap:category>Met</cap:category> <cap:event>Short Term Forecast</cap:event> <cap:urgency>Unknown</cap:urgency> <cap:severity>Unknown</cap:severity> <cap:certainty>Unknown</cap:certainty> <cap:effective>2005-05-23T00:49:00</cap:effective> <cap:expires>2005-05-23T03:00:00</cap:expires> <cap:headline> Short Term Forecast </cap:headline> - <cap:description> SHORT TERM FORECAST NATIONAL WEATHER SERVICE NORMAN OK 750 PM CDT SUN MAY 22 2005 OKZ004>048-050>052-TXZ083>090-230300- 750 PM CDT SUN MAY 22 2005 .NOW... ...REGIONAL WEATHER DISCUSSION... A STATIONARY FRONT LOCATED ACROSS NORTHERN OKLAHOMA... EXTENDING FROM NEAR WOODWARD... TO ENID... TO JUST SOUTH OF PONCA CITY... WAS BEING MONITORED FOR THE POSSIBILITY OF THUNDERSTORM DEVELOPMENT THIS EVENING. ALTHOUGH CUMULUS CLOUDS CONTINUE TO BUBBLE UP NEAR THE FRONT... THE PRESENCE OF A LAYER OF WARM TEMPERATURES ALOFT CONTINUES TO BE AN OBSTACLE FOR THUNDERSTORM FORMATION. HOWEVER... IF ANY THUNDERSTORMS DO MANAGE TO FORM THIS EVENING... THEY COULD QUICKLY BECOME SEVERE DUE TO THE VERY UNSTABLE AIRMASS ACROSS THE REGION. MEANWHILE... TEMPERATURES WILL REMAIN WARM THROUGH THE EVENING HOURS... WITH READINGS BY 10 PM RANGING FROM THE UPPER 70S IN NORTHERN OKLAHOMA TO THE MID 80S IN WESTERN NORTH TEXAS. $$ CJS </cap:description> - <cap:web> http://www.nws.noaa.gov/alerts/tx.html#TXZ083.OUNNOWOUN.004900 </cap:web> - <cap:area> <cap:areaDesc>Hardeman (Texas)</cap:areaDesc> <cap:geocode>048197</cap:geocode> </cap:area> </cap:info> If I wanted to use this event as my test I would leave the CAPSURL at: capurl = 'http://www.nws.noaa.gov/alerts/tx.cap' I would change the FIPS code to match the geocode listed in the CAPS info <cap:geocode>048197</cap:geocode>: geocode = '048197' Lastly change the event code to match what is listed in the CAPS info <cap:event>Short Term Forecast</cap:event> event = 'Short Term Forecast' I know the above isn't the clearest explanation but hopefully it helps. - John |
Author: | cesman [ Sun May 22, 2005 11:28 pm ] |
Post subject: | |
John, I've yet to test your app, but it is good to see others that the ball and run with it! If you have not done so, I'd suggest posting this to the MythTV mailing list. I'm sure others would appreciate it. Regards, |
Author: | colinnwn [ Mon Feb 12, 2007 11:19 pm ] |
Post subject: | |
I was trying to follow the directions here http://wiki.knoppmyth.net/index.php?page=MythStormAlert And I get Code: # apt-get install python-elementtree
Reading package lists... Done Building dependency tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: The following packages have unmet dependencies: python-elementtree: Depends: python (< 2.4) but 2.4.4-1 is to be installed Depends: python2.3-elementtree but it is not going to be installed E: Broken packages I really have no idea how to even start trying to resolve this. Can anyone point me in the right direction? |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |