SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v9 Customizations

Notices

SageTV v9 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 9 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 9 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-28-2018, 07:15 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,798
Weather

This thread is for users who want to use the beta version of a weather plugin that can be used in the default STV now that WeatherUnderground has ceased to function.

Attached to this post is the latest developer plugin manifest that will allow you to use the latest beta. You must unzip the file and place the .xml in the install directory (where the sage executable is located) of your server. Once you do that you should go to the plugin manager and install the UI Mod "Weather using NWS and Darksky".

Note. To have the Darksky data update you must get your own API key. To do that go here and create an account. https://darksky.net/dev/register

After obtaining a key you must make a file called "darksky.properties" and place it in the install directory of your sage server. The file should have a single line in it that reads: key=XXXX where XXXX is your unique key. If you don't do this the plugin will work, but the data obtained from Darksky will only be updated when you reboot your sage server.

Usage:


Go to the configuration menu just as you did before then enter either a US Zip Code or a city name. If you enter a US Zip Code the the US National Weather Service will be used to obtain the weather information. If you enter a city name then Darksky will be the weather provider.

To enter more than one locale simply enter another Zip Code or city name in the configuration menu. Once you do that you will see the option to cycle through the various locales.

Release Notes:

VERY IMPORTANT: After installing this version check your JARs directory for duplicate jackson JARs with different versions. If you see two version of the same JAR you must stop sage, delete the older version of the jar, and restart.

The minimum Java version supported is 1.8.

Changelog for Version 0.18:
  • Pressing "Right" on the main weather menu now cycles through configured locales.
  • "Rain" is now accumulation since midnight. (For both NWS and Darksky locales.)
  • If using a Darksky locale and there is snow accumulation since midnight the accumulation will be displayed instead of rain accumulation.
  • Fixed a bug that caused the weather info in the top menu to change if more than one locale was configured and the user cycled through them.
  • Fixed a bug in the System Information menu so it now reports the version of the NWS, OWM, and Darksky jars.
  • Fixed a bug that caused a NPE if getting snow accumulation in a Darksky locales.

FAQ:
  • Do I need a Darksky key if I only use US Zip Codes? - No.
Attached Files
File Type: zip SageTVPluginsDev.zip (1.5 KB, 111 views)
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.

Last edited by tmiranda; 01-26-2019 at 05:27 PM.
Reply With Quote
  #2  
Old 11-29-2018, 04:38 PM
Rob23 Rob23 is offline
Sage Advanced User
 
Join Date: Feb 2009
Posts: 100
Thank you!
__________________
Sage Server: Core 2 Quad Q9550 2.83GHz, Windows 7 x64, Hauppauge WinTV-quadHD, AverMedia M780. HD200 Extender.
Reply With Quote
  #3  
Old 11-29-2018, 06:33 PM
jeb0921 jeb0921 is offline
Sage User
 
Join Date: Jul 2011
Location: Ogden, Utah
Posts: 9
Not there

I have restarted everything and when I go into the plugin setup the plugin isn't there.
Reply With Quote
  #4  
Old 11-29-2018, 08:32 PM
ranger ranger is offline
Sage Aficionado
 
Join Date: Nov 2003
Location: Virginia
Posts: 256
I'm not seeing it listed under UI Mods. Are there any dependencies I might be missing? Running SageTV 9.10.783 with Java 8. I also have Gemstone installed and running.
Reply With Quote
  #5  
Old 11-29-2018, 08:59 PM
jusjoken jusjoken is offline
Sage Icon
 
Join Date: Dec 2005
Location: Minneapolis MN
Posts: 2,162
Quote:
Originally Posted by ranger View Post
I'm not seeing it listed under UI Mods. Are there any dependencies I might be missing? Running SageTV 9.10.783 with Java 8. I also have Gemstone installed and running.
I cannot imagine it working well in Gemstone as i stripped out the default stv weather stuff long ago and built the weather around phoenix weather calls.

I will now need to add the NWS code to phoenix so gemstone will offer it...which tmiranda has offered the source so it should not be complex.

k
Reply With Quote
  #6  
Old 11-29-2018, 10:13 PM
Zogg Zogg is offline
Sage Advanced User
 
Join Date: May 2011
Location: Frisco, TX
Posts: 124
I'm running the basic UI and don't see it either.
Reply With Quote
  #7  
Old 11-30-2018, 07:56 AM
kegler kegler is offline
Sage User
 
Join Date: Jul 2013
Location: Washington State
Posts: 16
Quote:
Originally Posted by Zogg View Post
I'm running the basic UI and don't see it either.
I don't see it either. I am also running the basic UI.

I see that the installation files have been uploaded to bintray, but the manifest has not shown up in my SageTVPlugins.xml. Without that SageTV cannot not display it. It does not show up at http://download.sagetv.com/SageTVPlugins.xml either, so it did not get updated as expected.

The date on my SageTVPlugins.xml is 11/11/2018. When it gets updated we should see a more current date.
Reply With Quote
  #8  
Old 12-01-2018, 07:58 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,798
My bad, it should be there now.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #9  
Old 12-02-2018, 01:24 PM
kegler kegler is offline
Sage User
 
Join Date: Jul 2013
Location: Washington State
Posts: 16
When I started the thread on the WU API shutdown, I wasn't sure how much interest there would be in creating a replacement. For most, in this age of widely available mobile devices, those seem to be the goto preference. I am still a bit old school. If a major weather event is taking place I am going to sit down at my desktop where I have dozens of sites at my disposal.

But for normal day-to-day use I prefer to use Sage. Hopefully we can keep it well focused on just what is needed. IMO that is a forecasting site, a limited number of local observation sites, a zoom-able radar map and perhaps a satellite view.


Here is my list of problems/suggestions/questions/opinions.

1) Should we uninstall the Google Weather plugin? Does this impact extenders given our limited available memory? Granted this is very short term (till the end of the month). I have experienced problems displaying radar maps from time to time. I suspect this is web server related.

2) IMO the selection of a forecasting site should be separate from the selection of local observation site(s). Local forecasting sites are usually limited in number. Local observation site(s) are usually quite numerous in comparison. While I do take note of forecasting site observations, I pay more attention to sites that better reflect my local area.

3) I see you included a file ZipCodes.txt that is a list of valid zip codes and their locations (lat/long). All zip codes that are PO Boxes only were excluded, including mine. These are found mainly out in rural areas where we still have some small local post offices, but used to have our own local zip code delivery area. Nowadays we are part of a much larger zip code but the small local one often gives a much better location.

4) For some reason the location I am using for testing (Sea-Tac International Airport - use Zip 98188) does not display the correct current conditions which can be found here. I have not been able to correlate what I am seeing to anything.

5) And for some reason the above displayed conditions (with wrong values) will disappear after about 15 minutes and are replaced by what appears to be a default blank (zeroed out) record. The "Recorded:" date/timestamp goes away too. If you wait another 45 minutes the original wrong values will re-appear again and the cycle repeats (Please don't ask how I managed to discover this!!) You can reset the cycle by selecting another location and then coming back to this one.

6) When zip 98310 is used, Enetai, WA is displayed. It should show Bremerton, WA. Bremerton is an incorporated city while Enetai is a community in the area. The 98310 zip is the central one for Bremerton and includes the downtown area. This may indicate the presence of aliases in your zip code lookup.

7) Typo - "Max/Max Temp" label. I think you meant Max/Min

8) "Change Units:" "Currently Default" is part of the selection cycle and displays a null record.

9) "Options" (on the lower right hand corner) is still linked to the old Google Weather configuration. Either link to your config or remove.

10) Would like to see Sun Rise/Set times. Moon phases (%) would be nice too. Looks like you left space for them. Need sources?

11) Hourly Forecast - Nice to have but 7 days of it is not usefull. Need a config setting for number of days to display. Two days would be a good default. Simplify and shorten the identification for each segment (i.e. Sun Dec 2 11AM-12PM)

12) Would be nice to have a refresh button for observations. That was always a major irritation with the Google Weather plugin when you know the display is stale, but there is no way to get it to update.


Have you found a suitable radar mapping source? Have you been to this https://www.ncdc.noaa.gov/wct/ site?


Out here in the Pacific Northwest these are sites I use to find local observations:

https://www.wrh.noaa.gov/mso/fwxmaps/pgtsnd.php

https://www.wrh.noaa.gov/mso/fwxmaps/ksew.php

Each site has it's own XML link. This may be unique to our area. I don't know if other areas have similar maps and links. It seems each region likes to do its own thing.
Reply With Quote
  #10  
Old 12-02-2018, 08:10 PM
Thomas Wischgol's Avatar
Thomas Wischgol Thomas Wischgol is offline
Sage Aficionado
 
Join Date: Sep 2005
Posts: 255
Nice work, I like the detailed icons. I noticed the current temperature being off as well. Also, in order to be consistent with how the UI works overall, it would be great to be able to go back with the cursor left key. Currently, it does not seem to do anything.
Reply With Quote
  #11  
Old 12-02-2018, 09:39 PM
jpwegas jpwegas is offline
Sage Aficionado
 
Join Date: May 2007
Posts: 266
I don't see the new plugin.

How do the SageTVPlugins.xml and SageTVPluginV9.xml files get updated? I thought the server polled for updates but my files are dated 2015 and 2017 currently and a restart did not change anything.

--John
Reply With Quote
  #12  
Old 12-03-2018, 05:54 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,798
Quote:
Originally Posted by kegler View Post
When I started the thread on the WU API shutdown, I wasn't sure how much interest there would be in creating a replacement. For most, in this age of widely available mobile devices, those seem to be the goto preference. I am still a bit old school. If a major weather event is taking place I am going to sit down at my desktop where I have dozens of sites at my disposal.

But for normal day-to-day use I prefer to use Sage. Hopefully we can keep it well focused on just what is needed. IMO that is a forecasting site, a limited number of local observation sites, a zoom-able radar map and perhaps a satellite view.


Here is my list of problems/suggestions/questions/opinions.

1) Should we uninstall the Google Weather plugin? Does this impact extenders given our limited available memory? Granted this is very short term (till the end of the month). I have experienced problems displaying radar maps from time to time. I suspect this is web server related.

2) IMO the selection of a forecasting site should be separate from the selection of local observation site(s). Local forecasting sites are usually limited in number. Local observation site(s) are usually quite numerous in comparison. While I do take note of forecasting site observations, I pay more attention to sites that better reflect my local area.

3) I see you included a file ZipCodes.txt that is a list of valid zip codes and their locations (lat/long). All zip codes that are PO Boxes only were excluded, including mine. These are found mainly out in rural areas where we still have some small local post offices, but used to have our own local zip code delivery area. Nowadays we are part of a much larger zip code but the small local one often gives a much better location.

4) For some reason the location I am using for testing (Sea-Tac International Airport - use Zip 98188) does not display the correct current conditions which can be found here. I have not been able to correlate what I am seeing to anything.

5) And for some reason the above displayed conditions (with wrong values) will disappear after about 15 minutes and are replaced by what appears to be a default blank (zeroed out) record. The "Recorded:" date/timestamp goes away too. If you wait another 45 minutes the original wrong values will re-appear again and the cycle repeats (Please don't ask how I managed to discover this!!) You can reset the cycle by selecting another location and then coming back to this one.

6) When zip 98310 is used, Enetai, WA is displayed. It should show Bremerton, WA. Bremerton is an incorporated city while Enetai is a community in the area. The 98310 zip is the central one for Bremerton and includes the downtown area. This may indicate the presence of aliases in your zip code lookup.

7) Typo - "Max/Max Temp" label. I think you meant Max/Min

8) "Change Units:" "Currently Default" is part of the selection cycle and displays a null record.

9) "Options" (on the lower right hand corner) is still linked to the old Google Weather configuration. Either link to your config or remove.

10) Would like to see Sun Rise/Set times. Moon phases (%) would be nice too. Looks like you left space for them. Need sources?

11) Hourly Forecast - Nice to have but 7 days of it is not usefull. Need a config setting for number of days to display. Two days would be a good default. Simplify and shorten the identification for each segment (i.e. Sun Dec 2 11AM-12PM)

12) Would be nice to have a refresh button for observations. That was always a major irritation with the Google Weather plugin when you know the display is stale, but there is no way to get it to update.


Have you found a suitable radar mapping source? Have you been to this https://www.ncdc.noaa.gov/wct/ site?


Out here in the Pacific Northwest these are sites I use to find local observations:

https://www.wrh.noaa.gov/mso/fwxmaps/pgtsnd.php

https://www.wrh.noaa.gov/mso/fwxmaps/ksew.php

Each site has it's own XML link. This may be unique to our area. I don't know if other areas have similar maps and links. It seems each region likes to do its own thing.
Good feedback. Some answers/comments:

1. Not really necessary. I haven't removed the code for the old weather plugin so you are likely to get the "nag" screen if you uninstall it.

2. I'll see if I can figure out how to do that. I am starting from zero with experience on the weather. I didn't even know there was a difference between the forecast site and the observation site.

3. You can edit the ZipCode file if you like. The NWS API works primarily by Lat/Lng and this was the best way I could find to get the Lat/Lng of various locations. If you know a better way let me know.

4. Sounds like a bug. I will investigate.

5. Sounds like a bug. The plugin automatically updates the forecast and observations every 15 minutes. Once an hour it does a "big" update (i.e. everything) and the other 3 times it just updates the local observations.

6. I'm not sure what to do about that.

7. I'll fix that.

8. Another bug.

9. I'll fix that.

10. If you know of sources I'll see if I can add the info.

11. I'll look into it.

12. I'll add that.

I have not found a radar mapping source. i'll have a look at NOAA.

Thanks for the testing. Can you send a logfile showing issues 5 and 8?

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #13  
Old 12-03-2018, 05:55 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,798
Quote:
Originally Posted by Thomas Wischgol View Post
Nice work, I like the detailed icons. I noticed the current temperature being off as well. Also, in order to be consistent with how the UI works overall, it would be great to be able to go back with the cursor left key. Currently, it does not seem to do anything.
Must be a bug in current temp. Sorry.

I'll add the left/back key as well.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #14  
Old 12-03-2018, 05:56 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,798
Quote:
Originally Posted by jpwegas View Post
I don't see the new plugin.

How do the SageTVPlugins.xml and SageTVPluginV9.xml files get updated? I thought the server polled for updates but my files are dated 2015 and 2017 currently and a restart did not change anything.

--John
Those files get updated automatically. Restart the server and let it sit for 3 or 4 minutes then send a logfile. I'll see if I can help. Maybe you blocked the website? Do you have tight security settings?
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #15  
Old 12-03-2018, 06:12 AM
davidk21770 davidk21770 is offline
Sage Aficionado
 
Join Date: Mar 2006
Location: Maryland
Posts: 483
Installed and working here - thanks!
__________________
HDHomeRun x2
Cable Box via Hauppauge HD PVR and USB-UIRT
2 SageTV's HD300

Intel Core 2 Quad Q9650 @4025 MHz, 8G G.Skill Performance
DFI Lanparty DK X48-T2RS Plus; SilverStone Decathlon DA1000 (died - back to an ancient enermax)
eVGA 7900 GT KO RoHS -- Zalman VP900CU Cooling
Synology NAS 22TB
Reply With Quote
  #16  
Old 12-03-2018, 12:41 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,798
Quick Fix

Here is a quick fix to most of the items identified. I was too lazy to package this up as a plugin, to install it:
- Make sure you already have the PlugIn installed.
- Stop sage.
- Go to the JARs folder and overwrite the nws.jar with the one attached.
- Go to the SageTV7 folder and overwrite the nws.stvi with the one attached.

Some notes:
- I have been unable to reproduce keglar's item 5 or item 8. I will need to see logs from somebody.
- If you get overzealous and press the button to refresh the data too often the API starts returning nulls for temperature. (This causes the current temperature to display as 0.) I'm not sure why, I'll look into it.
Attached Files
File Type: zip nws JAR.zip (108.3 KB, 48 views)
File Type: zip nws STVi.zip (44.0 KB, 38 views)
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #17  
Old 12-03-2018, 12:51 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,028
Quote:
Originally Posted by tmiranda View Post
Here is a quick fix to most of the items identified. I was too lazy to package this up as a plugin, to install it:
- Make sure you already have the PlugIn installed.
- Stop sage.
- Go to the JARs folder and overwrite the nws.jar with the one attached.
- Go to the SageTV7 folder and overwrite the nws.stvi with the one attached.

Some notes:
- I have been unable to reproduce keglar's item 5 or item 8. I will need to see logs from somebody.
- If you get overzealous and press the button to refresh the data too often the API starts returning nulls for temperature. (This causes the current temperature to display as 0.) I'm not sure why, I'll look into it.

My system had issue #5 and I think #8 too. I'll see what my logs show.
Reply With Quote
  #18  
Old 12-03-2018, 01:02 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,028
I have this in my log file after starting up with the newest ones:

Code:
Mon 12/3 10:51:12.242 [AWT-EventQueue-0@59c656] EXCEPTION in getValueAsObject:sage.jep.ParseException: Error in method reflection of tmiranda_nws_Forecast_getUnits of java.lang.NullPointerException for:tmiranda_nws_Forecast_getUnits(ForecastInstance)
Is this issue #5?

Checking further, this looks like it happens before it's configured since this appears after the exception: "NWS: Not yet configured."

Last edited by wnjj; 12-03-2018 at 07:37 PM.
Reply With Quote
  #19  
Old 12-03-2018, 01:38 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,028
A ton of these too:
Code:
Mon 12/3 10:51:25.428 [AWT-EventQueue-0@59c656] NWS.Conversion.isMetric: null stationUnit.
Is this issue #8?
Reply With Quote
  #20  
Old 12-03-2018, 01:49 PM
kegler kegler is offline
Sage User
 
Join Date: Jul 2013
Location: Washington State
Posts: 16
Tom, I've been tied up with other activities this morning. I'll load your latest code and re-generate the log info for you this afternoon after 1PM PT - if you haven't figured it out by then.

Jim
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird weather on Weather Underground sacrament055 Gemstone for v7 13 05-27-2013 10:13 AM
The Weather Channel eliminating free weather data feed iolaus SageTV Software 69 08-26-2012 11:17 AM
Downloaded Google Weather Update, No weather? symgryph SageTV v7 Customizations 3 11-18-2011 08:55 AM
Using Weather Network as a feed for Canadian Weather Fastrack SageTV Customizations 2 03-22-2009 09:47 PM
weather.com weather extractor for mlbdude2 1.8.7 (v1.0.1 / July 6) nielm SageTV Customizations 105 10-08-2004 06:54 AM


All times are GMT -6. The time now is 10:57 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.