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
  #61  
Old 12-31-2018, 08:47 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,800
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.
Reply With Quote
  #62  
Old 01-05-2019, 03:37 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,800
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.
Reply With Quote
  #63  
Old 01-05-2019, 03:41 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,800
Here is the attachment.....
Attached Files
File Type: zip SageTVPluginsDev.zip (1.3 KB, 27 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
  #64  
Old 01-05-2019, 03:54 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,059
Looks like there's a typo in the dependencies

<Plugin>sajex-api</Plugin>

John
Reply With Quote
  #65  
Old 01-07-2019, 06:00 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,800
Quote:
Originally Posted by JREkiwi View Post
Looks like there's a typo in the dependencies

<Plugin>sajex-api</Plugin>

John
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.
Reply With Quote
  #66  
Old 01-07-2019, 12:29 PM
deanm deanm is offline
Sage Aficionado
 
Join Date: Apr 2005
Location: North East, UK
Posts: 293
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
Reply With Quote
  #67  
Old 01-07-2019, 12:43 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,059
Quote:
Originally Posted by deanm View Post
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]
Me too, even with the additional JAR ile

John
Reply With Quote
  #68  
Old 01-07-2019, 02:16 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,800
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.
Reply With Quote
  #69  
Old 01-07-2019, 05:33 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,800
Quote:
Originally Posted by deanm View Post
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
I can't reproduce this. Can you attach a logfile that contains the whole stack trace of the error? That will tell me why that method is throwing an InvocationTargetException.

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.
Reply With Quote
  #70  
Old 01-07-2019, 06:21 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,800
Actually, I think I uploaded the wrong Plugin xml.

Uninstall the plugin.
Overwrite the existing SageTVPluginsDev.xml with the atatched.
Reinstall the plugin.
Attached Files
File Type: zip SageTVPluginsDev.zip (1.4 KB, 39 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
  #71  
Old 01-07-2019, 11:21 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,059
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
Reply With Quote
  #72  
Old 01-08-2019, 06:09 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,800
Quote:
Originally Posted by JREkiwi View Post
Probably need to add a version to their dependencies in the XML.

John
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.
Reply With Quote
  #73  
Old 01-14-2019, 11:21 PM
kegler kegler is offline
Sage User
 
Join Date: Jul 2013
Location: Washington State
Posts: 16
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"
         }
      ]
   }
}
Every field is nulled out except for "visibility". We've been having a a fair amount of fog up here recently. This station, being a small regional airport, puts out an update every time visibility changes. Why NWS does this makes no sense to me.

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
It is also interesting to note that NWS does not use their own API on their own station reporting. This data is all coming from Synoptic. Note the appearance of "mesowest" in the URL. I think Synoptic runs and maintains the site for them. See here.

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.
Reply With Quote
  #74  
Old 01-15-2019, 12:15 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,059
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
Reply With Quote
  #75  
Old 01-15-2019, 05:47 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,800
Quote:
Originally Posted by JREkiwi View Post
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
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.
Reply With Quote
  #76  
Old 01-15-2019, 05:57 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,800
Quote:
Originally Posted by kegler View Post
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"
         }
      ]
   }
}
Every field is nulled out except for "visibility". We've been having a a fair amount of fog up here recently. This station, being a small regional airport, puts out an update every time visibility changes. Why NWS does this makes no sense to me.

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
It is also interesting to note that NWS does not use their own API on their own station reporting. This data is all coming from Synoptic. Note the appearance of "mesowest" in the URL. I think Synoptic runs and maintains the site for them. See here.

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.
I am also seeing the occasional null display and noticed the same thing with the null JSON. I've been thinking about the best way to handle this and am working on a fix. I am planning to check if the JSON is incomplete, and if it is to use the previous JSON and then update it with the data that is available in the newer JSON. Still experimenting.....

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.
Reply With Quote
  #77  
Old 01-15-2019, 02:00 PM
kegler kegler is offline
Sage User
 
Join Date: Jul 2013
Location: Washington State
Posts: 16
Quote:
I am also seeing the occasional null display and noticed the same thing with the null JSON. I've been thinking about the best way to handle this and am working on a fix. I am planning to check if the JSON is incomplete, and if it is to use the previous JSON and then update it with the data that is available in the newer JSON. Still experimenting.....
I don't have any better suggestions. You could just ignore these "specials" and stick to just complete observations. For most stations (on the NWS/FAA network) those come out once an hour anyway. It is that way on the old system (WU) too. Where WU differed was the availability of the Personal Weather Stations (PWS). But the quality of those PWS observations varies widely. Some are very good while others are terrible.

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:
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.
Synoptic is partner in The National Mesonet Program/

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:
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.
Basically you have it right, but it is simpler to use the 1 hour precip (precipitationLastHour) instead.

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.
__________________
Reply With Quote
  #78  
Old 01-17-2019, 06:05 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,800
Quote:
Originally Posted by JREkiwi View Post
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
Try replacing the existing nws.stvi with this one. I think it will solve that issue.
Attached Files
File Type: zip nws-stvi-0.17.zip (85.2 KB, 26 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
  #79  
Old 01-17-2019, 11:16 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,059
Quote:
Originally Posted by tmiranda View Post
Try replacing the existing nws.stvi with this one. I think it will solve that issue.
Yes, that's fixed it. Thanks

John
Reply With Quote
  #80  
Old 01-18-2019, 12:12 AM
Malfunction Malfunction is offline
Sage Advanced User
 
Join Date: Sep 2004
Location: Willoughby, Ohio
Posts: 202
Quote:
Originally Posted by tmiranda View Post
Actually, I think I uploaded the wrong Plugin xml.

Uninstall the plugin.
Overwrite the existing SageTVPluginsDev.xml with the atatched.
Reinstall the plugin.
Where exactly do I drop this file? I put it in C:\Program Files (x86)\SageTV\SageTV. Weather works exactly as it did before even though I've added and removed the new plugin several times. I just see January 15's data. I'm also getting no install options on this plugin.

Disregard this. The Weather app I was seeing was an entry for the old app in ADM.
__________________


ASUS P7H55D-EVO LGA 1156 Motherboard, Intel Core I5-661, 2X Crucial Ballistix XMS3 2GB RAM, 2x Mushkin Blackline 4G RAM, EVGA GT 1030SC, 1x Samsung 250g SSD, 1x WD80EFAX 8TB, 2x WDBH2D0040HNC 4TB, USB-UIRT, ASUS Blu-Ray SATA drive, HD-PVR2, WinTV dualHD, Windows 7 64bit

Last edited by Malfunction; 01-19-2019 at 08:09 AM.
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 09:12 AM.


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