|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#61
|
||||
|
||||
Update
A quick update on this. After more experimentation I am going to abandon Open Weather Map for the time being. It just does not have enough information available.
On a positive note, Darksky is excellent and I am well on the way to integrating that into the default STV. Darksky will be useful for users outside of the US. Darksky will require each user to get their own API key but the process is trivial.
__________________
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. |
#62
|
||||
|
||||
Version 0.15
Here is version 0.15 which adds support for darksky. Unzip the attached into the Sage install directory on your server.
On the configuration screen you will have the option to either enter a Zip Code or a city name. If you enter a ZipCode the US National Weather Service will be the data provider. If you enter a city name Darksky will be the data provider. For the best experience you will need to go to the darksky website and get a key. Once you get a key create a file called darksky.properties in the Sage install directory and put a single line it it that reads "key=XXXX" where XXX is your key. The darksky key is free and it allows 100,000 api accesses per month. This should be plenty for the average user. The Darksky key can be obtained here: https://darksky.net/dev If you do not get you own key the plugin will use an internal key BUT the weather info will only be updated when the Sage server is stopped and restarted. If you enter a city name that does not have an exact match a list of cities with similar names will appear for you to choose from. Note: You can enter multiple locales and they can be a combination of NWS or Darksky locales.
__________________
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. |
#63
|
||||
|
||||
Here is the attachment.....
__________________
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. |
#64
|
||||
|
||||
Looks like there's a typo in the dependencies
<Plugin>sajex-api</Plugin> John |
#65
|
||||
|
||||
Oops
__________________
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. |
#66
|
|||
|
|||
Hi Tom
Been trying to get this work but ran into an issue. On the configuration screen I can enter my City name (Sunderland) and a list of Cities is then presented to me. When I pick a City click Continue it gos back to the Weather screen but is just blank. If I click on any of the menu option for example Hourly Forecast. I get a message stating it is updating but nothing ever loads. When checked the Sage logs I can see the following entry Mon 1/7 18:01:49.140 [ReProcessHook@a6b8477] EXCEPTION in getValueAsObject:sage.jep.ParseException: Error in method reflection of new_tmiranda_darksky_Forecast of java.lang.reflect.InvocationTargetException for:new_tmiranda_darksky_Forecast(ConfiguredZipCode, GetProperty("nws_units", "english"), true) Mon 1/7 18:01:49.146 [ReProcessHook@a6b8477] NWS: Failed to create instance for 3333205 Mon 1/7 18:01:49.150 [ReProcessHook@a6b8477] NWS: Locales = [3333205] 3333205 is it seems my location as this is displayed in the config screen. I have also created the darksky.properies file with my API key. I assume something is not working correctly? Let me know if you need more information or if I’m doing something wrong. Dean
__________________
Darkside: DVB-C x4 DVB-T2 x2 HD-300 x4 Lightside: DVB-C x2 DVB-T2 x4 HD-300 x3 |
#67
|
||||
|
||||
Quote:
John |
#68
|
||||
|
||||
I'll look at it tonight. Obviously something is not right ..... Sorry.
__________________
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. |
#69
|
||||
|
||||
Quote:
Also, please confirm that the following JAR files are in the JARs directory: - darksky.jar - darksky-forecast-api-1.3.1.jar - darksky-forecast-api-jackson-1.3.1.jar - jackson-annotations-2.9.8.jar - jackson-core-2.9.8.jar - jackson-databind-2.9.8.jar - jackson-datatype-jsr310-2.9.3.jar (let me know if you also see version 2.9.8 of this jar) - nws.jat - owm.jar If the jackson jars are an older version you should update them. (Updates should be available in the repo.) Also confirm that city.list.json and ZipCodes.txt are in the Sage install directory.
__________________
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-07-2019 at 05:55 PM. |
#70
|
||||
|
||||
Actually, I think I uploaded the wrong Plugin xml.
Uninstall the plugin. Overwrite the existing SageTVPluginsDev.xml with the atatched. Reinstall the plugin.
__________________
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. |
#71
|
||||
|
||||
Using the old XML
- darksky.jar - darksky-forecast-api-1.3.1.jar - darksky-forecast-api-jackson-1.3.1.jar - jackson-annotations-2.9.3.jar - jackson-core-2.9.3.jar - jackson-databind-2.9.3.jar - jackson-datatype-jsr310-2.9.8.jar - nws.jat - owm.jar I downloaded the 2 darksky-forecast JARS manually, and it still didn't work until I upgraded the jackson JARS to 2.98. Probably need to add a version to their dependencies in the XML. John |
#72
|
||||
|
||||
Yup. I uploaded my "test" manifest. Should have taken the extra 30 seconds to add the version info.
__________________
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. |
#73
|
|||
|
|||
Hi Tom, hope you had some relaxation away from this stuff during the holidays. I've been holding back on a couple issues since then, as well as waiting it out while you were working on getting your Dark Sky implementation done. Hopefully now is a better time frame.
- Null Observation Display - Still getting these from time to time. I am now up to speed on JSON and how these APIs work, as well as slowly getting up to speed on Java (not to mention all the other related stuff you need to know about - still in the steep portion of that learning curve.) As I happened to see an occurrence early this morning, I followed up on it and tracked down the cause. This is a portion of what NWS returned. This is for StaID "KTIW" on 2019-01-14T10:42:00Z. This came from the JSON returned on your log entry. (formatted below) Code:
"properties":{ "@id":"https://api.weather.gov/stations/KTIW/observations/2019-01-14T10:42:00+00:00", "@type":"wx:ObservationStation", "elevation":{ "value":89, "unitCode":"unit:m" }, "station":"https://api.weather.gov/stations/KTIW", "timestamp":"2019-01-14T10:42:00+00:00", "rawMessage":"KTIW141042ZAUTO00000KT3SMBRBKN00101/00A3010RMKAO2T00110000", "textDescription":"Fog/Mist", "icon":"https://api.weather.gov/icons/land/night/fog?size=medium", "presentWeather":[ { "intensity":null, "modifier":null, "weather":"fog_mist", "rawString":"BR" } ], "temperature":{ "value":null, "unitCode":"unit:degC", "qualityControl":"qc:Z" }, "dewpoint":{ "value":null, "unitCode":"unit:degC", "qualityControl":"qc:Z" }, "windDirection":{ "value":null, "unitCode":"unit:degree_(angle)", "qualityControl":"qc:Z" }, "windSpeed":{ "value":null, "unitCode":"unit:m_s-1", "qualityControl":"qc:Z" }, "windGust":{ "value":null, "unitCode":"unit:m_s-1", "qualityControl":"qc:Z" }, "barometricPressure":{ "value":null, "unitCode":"unit:Pa", "qualityControl":"qc:Z" }, "seaLevelPressure":{ "value":null, "unitCode":"unit:Pa", "qualityControl":"qc:Z" }, "visibility":{ "value":4830, "unitCode":"unit:m", "qualityControl":"qc:C" }, "maxTemperatureLast24Hours":{ "value":null, "unitCode":"unit:degC", "qualityControl":null }, "minTemperatureLast24Hours":{ "value":null, "unitCode":"unit:degC", "qualityControl":null }, "precipitationLastHour":{ "value":null, "unitCode":"unit:m", "qualityControl":"qc:Z" }, "precipitationLast3Hours":{ "value":null, "unitCode":"unit:m", "qualityControl":"qc:Z" }, "precipitationLast6Hours":{ "value":null, "unitCode":"unit:m", "qualityControl":"qc:Z" }, "relativeHumidity":{ "value":null, "unitCode":"unit:percent", "qualityControl":"qc:C" }, "windChill":{ "value":null, "unitCode":"unit:degC", "qualityControl":"qc:V" }, "heatIndex":{ "value":null, "unitCode":"unit:degC", "qualityControl":"qc:V" }, "cloudLayers":[ { "base":{ "value":30, "unitCode":"unit:m" }, "amount":"BKN" } ] } } I know this reporting station supplies it with their observation. I have been experimenting with another service (Synoptic aka MesoWest) and all the other fields are present. (the below is show in local time - look at 02:42) Code:
----- Observation ----- staId : KTIW Report Date/Time: 2019-01-14T02:03 METAR : KTIW 141003Z AUTO 12004KT 1SM BR VV001 02/01 A3010 RMK AO2 T00220011 Air Temp : 35.96 Altimeter : 30.1 Dew Point : 33.98 Rel Humidity : 92.42 Station Pressure: 1007.75 Visibility : 1.0 Weather Cond : Mist Wind Dir : 120.0 Wind Dir Card : ESE Wind Speed : 4.0 ----- Observation ----- staId : KTIW Report Date/Time: 2019-01-14T02:07 METAR : KTIW 141007Z AUTO 00000KT 1/4SM FG VV001 02/01 A3010 RMK AO2 T00220011 Air Temp : 35.96 Altimeter : 30.1 Dew Point : 33.98 Rel Humidity : 92.42 Station Pressure: 1007.75 Visibility : 0.25 Weather Cond : Fog Wind Dir : 0.0 Wind Dir Card : N Wind Speed : 0.0 ----- Observation ----- staId : KTIW Report Date/Time: 2019-01-14T02:40 METAR : METAR KTIW 141040Z AUTO 00000KT 1 1/4SM BR BKN001 01/00 A3010 RMK AO2 T00110000 Air Temp : 33.8 Altimeter : 30.1 Dew Point : 32.0 Rel Humidity : 93.02 Station Pressure: 1007.75 Visibility : 1.25 Weather Cond : Mist Wind Dir : 0.0 Wind Dir Card : N Wind Speed : 0.0 ----- Observation ----- staId : KTIW Report Date/Time: 2019-01-14T02:42 METAR : KTIW 141042Z AUTO 00000KT 3SM BR BKN001 01/00 A3010 RMK AO2 T00110000 Air Temp : 33.98 Altimeter : 30.1 Dew Point : 32.0 Rel Humidity : 92.35 Station Pressure: 1007.75 Visibility : 3.0 Weather Cond : Mist Wind Dir : 0.0 Wind Dir Card : N Wind Speed : 0.0 ----- Observation ----- staId : KTIW Report Date/Time: 2019-01-14T02:50 METAR : METAR KTIW 141050Z AUTO 00000KT 7SM SCT001 01/00 A3010 RMK AO2 Air Temp : 33.8 Altimeter : 30.1 Dew Point : 32.0 Rel Humidity : 93.02 Station Pressure: 1007.75 Visibility : 7.0 Weather Cond : Partly Cloudy Wind Dir : 0.0 Wind Dir Card : N Wind Speed : 0.0 ----- Observation ----- staId : KTIW Report Date/Time: 2019-01-14T02:53 METAR : METAR KTIW 141053Z AUTO 00000KT 5SM BR FEW001 00/00 A3010 RMK AO2 SLP195 T00000000 Air Temp : 32.0 Altimeter : 30.1 Dew Point : 32.0 Rel Humidity : 100.0 Sea Lvl Pressure: 1019.5 Station Pressure: 1007.75 Visibility : 5.0 Weather Cond : Mist Wind Dir : 0.0 Wind Dir Card : N Wind Speed : 0.0 ----- Observation ----- staId : KTIW Report Date/Time: 2019-01-14T02:57 METAR : KTIW 141057Z AUTO 00000KT 1 3/4SM BR FEW001 00/00 A3010 RMK AO2 T00000000 Air Temp : 32.0 Altimeter : 30.1 Dew Point : 32.0 Rel Humidity : 100.0 Station Pressure: 1007.75 Visibility : 1.75 Weather Cond : Mist Wind Dir : 0.0 Wind Dir Card : N Wind Speed : 0.0 Also you can check the MesoWest site too. - Precipitation - I have not seen anything but a zero for any station I try (yes, it does rain up here, especially this time of year ). But, no one else has mentioned either. So confirmation is still needed. What type of precip content were you intending to display? Hopefully precip since midnight. That is pretty much the norm. Last edited by kegler; 01-14-2019 at 11:25 PM. |
#74
|
||||
|
||||
Tom, just a small buglet with 0.15.
The units value changes correctly on the buttons, but it doesn't get saved anywhere so is reset every time you start a client. John |
#75
|
||||
|
||||
OK. I'll look into that one. It's certainly supposed to be saved
__________________
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. |
#76
|
||||
|
||||
Quote:
I don't understand what you are saying about the mesowest. Is this part of NWS or a separate source for data? Sorry, I'm dense sometimes. For the precipitation - I've seen a lot of zeros there too. When I've looked into it the data seems to always be zero, even when it's raining. I'm not sure why but it is on my "bug list". The NWS supplies rain accumulation for the past 3 hours and the last 6 hours. My code uses the data for the last 6 hours. I haven't seen a way to get accumulation since midnight other than to keep track and add it up. Maybe I'm missing something. I will look into these items and get a fix out. I should have some time this week.
__________________
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. |
#77
|
|||
|
|||
Quote:
Where I live, the nearby NWS/FAA stations do not always reflect the conditions I see locally. Differences in local terrain can make substantial differences in observations, even for locations only a few miles apart. With WU going away (so far it is still available, but for how long?) I am losing all of my local sources. I may have to put up my own PWS, but WU (read IBM) will not be getting my data. Quote:
MesoWest started out as a program at the University of Utah to provide North American weather information in the mid-1990's. Synoptic was initiated to build on the MesoWest foundation. In 2018 Synoptic became a PBC (Public Benefit Corporation). See https://synopticdata.com/history/ Like Dark Sky, they do have a free tier for access to public domain data. That is what I am using as a test. Quote:
When you initialize your program, you need to download all hourly observations since midnight. Once initialized you can just keep a running total throughout the day, updating with each hourly report and resetting to zero at midnight. Be sure to ignore any "special" observations. Those are not needed and will mess up your total. Most stations report their hourly observation between 50 and 59 minutes past the hour. You will need to find a way to distinguish between "hourly" and "special" observations. I am not familiar enough with what NWS supplies to help out there. __________________ |
#78
|
||||
|
||||
Try replacing the existing nws.stvi with this one. I think it will solve that issue.
__________________
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. |
#79
|
||||
|
||||
Quote:
John |
#80
|
|||
|
|||
Quote:
Disregard this. The Weather app I was seeing was an entry for the old app in ADM.
__________________
ASRock B450M Pro4 AM4 MB, Ryzen 5 2600 3.4ghz, Crucial Ballistix Gaming 32GB (2 x 16GB) DDR4-3200, EVGA GT 1030SC, WD Black NVMe SSD 250GB, 1x WD120EFAX 12TB, 1x WD80EFAX 8TB, 1x WDBH2D0040HNC 4TB, USB-UIRT, Colossus 2, WinTV-DualHD USB, Windows 11 64bit Last edited by Malfunction; 01-19-2019 at 08:09 AM. |
Currently Active Users Viewing This Thread: 2 (0 members and 2 guests) | |
|
|
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 |